-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/v1.14.0-beta.1'
- Loading branch information
Showing
26 changed files
with
4,389 additions
and
4,048 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# 1.14.0-beta.1 | ||
- Unlimited assets changes (#294) | ||
# 1.13.0 | ||
## Added | ||
- Add app creator to dryrun request (#283) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package algod | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
|
||
"github.com/algorand/go-algorand-sdk/client/v2/common" | ||
"github.com/algorand/go-algorand-sdk/client/v2/common/models" | ||
) | ||
|
||
// AccountApplicationInformationParams contains all of the query parameters for url serialization. | ||
type AccountApplicationInformationParams struct { | ||
|
||
// Format configures whether the response object is JSON or MessagePack encoded. | ||
Format string `url:"format,omitempty"` | ||
} | ||
|
||
// AccountApplicationInformation given a specific account public key and | ||
// application ID, this call returns the account's application local state and | ||
// global state (AppLocalState and AppParams, if either exists). Global state will | ||
// only be returned if the provided address is the application's creator. | ||
type AccountApplicationInformation struct { | ||
c *Client | ||
|
||
address string | ||
applicationId uint64 | ||
|
||
p AccountApplicationInformationParams | ||
} | ||
|
||
// Do performs the HTTP request | ||
func (s *AccountApplicationInformation) Do(ctx context.Context, headers ...*common.Header) (response models.AccountApplicationResponse, err error) { | ||
err = s.c.get(ctx, &response, fmt.Sprintf("/v2/accounts/%v/applications/%v", s.address, s.applicationId), s.p, headers) | ||
return | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package algod | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
|
||
"github.com/algorand/go-algorand-sdk/client/v2/common" | ||
"github.com/algorand/go-algorand-sdk/client/v2/common/models" | ||
) | ||
|
||
// AccountAssetInformationParams contains all of the query parameters for url serialization. | ||
type AccountAssetInformationParams struct { | ||
|
||
// Format configures whether the response object is JSON or MessagePack encoded. | ||
Format string `url:"format,omitempty"` | ||
} | ||
|
||
// AccountAssetInformation given a specific account public key and asset ID, this | ||
// call returns the account's asset holding and asset parameters (if either exist). | ||
// Asset parameters will only be returned if the provided address is the asset's | ||
// creator. | ||
type AccountAssetInformation struct { | ||
c *Client | ||
|
||
address string | ||
assetId uint64 | ||
|
||
p AccountAssetInformationParams | ||
} | ||
|
||
// Do performs the HTTP request | ||
func (s *AccountAssetInformation) Do(ctx context.Context, headers ...*common.Header) (response models.AccountAssetResponse, err error) { | ||
err = s.c.get(ctx, &response, fmt.Sprintf("/v2/accounts/%v/assets/%v", s.address, s.assetId), s.p, headers) | ||
return | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package models | ||
|
||
// AccountApplicationResponse accountApplicationResponse describes the account's | ||
// application local state and global state (AppLocalState and AppParams, if either | ||
// exists) for a specific application ID. Global state will only be returned if the | ||
// provided address is the application's creator. | ||
type AccountApplicationResponse struct { | ||
// AppLocalState (appl) the application local data stored in this account. | ||
// The raw account uses `AppLocalState` for this type. | ||
AppLocalState ApplicationLocalState `json:"app-local-state,omitempty"` | ||
|
||
// CreatedApp (appp) parameters of the application created by this account | ||
// including app global data. | ||
// The raw account uses `AppParams` for this type. | ||
CreatedApp ApplicationParams `json:"created-app,omitempty"` | ||
|
||
// Round the round for which this information is relevant. | ||
Round uint64 `json:"round"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package models | ||
|
||
// AccountAssetResponse accountAssetResponse describes the account's asset holding | ||
// and asset parameters (if either exist) for a specific asset ID. Asset parameters | ||
// will only be returned if the provided address is the asset's creator. | ||
type AccountAssetResponse struct { | ||
// AssetHolding (asset) Details about the asset held by this account. | ||
// The raw account uses `AssetHolding` for this type. | ||
AssetHolding AssetHolding `json:"asset-holding,omitempty"` | ||
|
||
// CreatedAsset (apar) parameters of the asset created by this account. | ||
// The raw account uses `AssetParams` for this type. | ||
CreatedAsset AssetParams `json:"created-asset,omitempty"` | ||
|
||
// Round the round for which this information is relevant. | ||
Round uint64 `json:"round"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package models | ||
|
||
// AccountErrorResponse an error response for the AccountInformation endpoint, with | ||
// optional information about limits that were exceeded. | ||
type AccountErrorResponse struct { | ||
// Data | ||
Data string `json:"data,omitempty"` | ||
|
||
// MaxResults | ||
MaxResults uint64 `json:"max-results,omitempty"` | ||
|
||
// Message | ||
Message string `json:"message"` | ||
|
||
// TotalAppsLocalState | ||
TotalAppsLocalState uint64 `json:"total-apps-local-state,omitempty"` | ||
|
||
// TotalAssets | ||
TotalAssets uint64 `json:"total-assets,omitempty"` | ||
|
||
// TotalCreatedApps | ||
TotalCreatedApps uint64 `json:"total-created-apps,omitempty"` | ||
|
||
// TotalCreatedAssets | ||
TotalCreatedAssets uint64 `json:"total-created-assets,omitempty"` | ||
} |
14 changes: 14 additions & 0 deletions
14
client/v2/common/models/application_local_states_response.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package models | ||
|
||
// ApplicationLocalStatesResponse | ||
type ApplicationLocalStatesResponse struct { | ||
// AppsLocalStates | ||
AppsLocalStates []ApplicationLocalState `json:"apps-local-states"` | ||
|
||
// CurrentRound round at which the results were computed. | ||
CurrentRound uint64 `json:"current-round"` | ||
|
||
// NextToken used for pagination, when making another request provide this token | ||
// with the next parameter. | ||
NextToken string `json:"next-token,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package models | ||
|
||
// AssetHoldingsResponse | ||
type AssetHoldingsResponse struct { | ||
// Assets | ||
Assets []AssetHolding `json:"assets"` | ||
|
||
// CurrentRound round at which the results were computed. | ||
CurrentRound uint64 `json:"current-round"` | ||
|
||
// NextToken used for pagination, when making another request provide this token | ||
// with the next parameter. | ||
NextToken string `json:"next-token,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
package indexer | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
|
||
"github.com/algorand/go-algorand-sdk/client/v2/common" | ||
"github.com/algorand/go-algorand-sdk/client/v2/common/models" | ||
) | ||
|
||
// LookupAccountAppLocalStatesParams contains all of the query parameters for url serialization. | ||
type LookupAccountAppLocalStatesParams struct { | ||
|
||
// ApplicationID application ID | ||
ApplicationID uint64 `url:"application-id,omitempty"` | ||
|
||
// IncludeAll include all items including closed accounts, deleted applications, | ||
// destroyed assets, opted-out asset holdings, and closed-out application | ||
// localstates. | ||
IncludeAll bool `url:"include-all,omitempty"` | ||
|
||
// Limit maximum number of results to return. There could be additional pages even | ||
// if the limit is not reached. | ||
Limit uint64 `url:"limit,omitempty"` | ||
|
||
// Next the next page of results. Use the next token provided by the previous | ||
// results. | ||
Next string `url:"next,omitempty"` | ||
} | ||
|
||
// LookupAccountAppLocalStates lookup an account's asset holdings, optionally for a | ||
// specific ID. | ||
type LookupAccountAppLocalStates struct { | ||
c *Client | ||
|
||
accountId string | ||
|
||
p LookupAccountAppLocalStatesParams | ||
} | ||
|
||
// ApplicationID application ID | ||
func (s *LookupAccountAppLocalStates) ApplicationID(ApplicationID uint64) *LookupAccountAppLocalStates { | ||
s.p.ApplicationID = ApplicationID | ||
return s | ||
} | ||
|
||
// IncludeAll include all items including closed accounts, deleted applications, | ||
// destroyed assets, opted-out asset holdings, and closed-out application | ||
// localstates. | ||
func (s *LookupAccountAppLocalStates) IncludeAll(IncludeAll bool) *LookupAccountAppLocalStates { | ||
s.p.IncludeAll = IncludeAll | ||
return s | ||
} | ||
|
||
// Limit maximum number of results to return. There could be additional pages even | ||
// if the limit is not reached. | ||
func (s *LookupAccountAppLocalStates) Limit(Limit uint64) *LookupAccountAppLocalStates { | ||
s.p.Limit = Limit | ||
return s | ||
} | ||
|
||
// Next the next page of results. Use the next token provided by the previous | ||
// results. | ||
func (s *LookupAccountAppLocalStates) Next(Next string) *LookupAccountAppLocalStates { | ||
s.p.Next = Next | ||
return s | ||
} | ||
|
||
// Do performs the HTTP request | ||
func (s *LookupAccountAppLocalStates) Do(ctx context.Context, headers ...*common.Header) (response models.ApplicationLocalStatesResponse, err error) { | ||
err = s.c.get(ctx, &response, fmt.Sprintf("/v2/accounts/%v/apps-local-state", s.accountId), s.p, headers) | ||
return | ||
} |
Oops, something went wrong.