models

package
v1.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2020 License: MIT Imports: 1 Imported by: 44

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {

	// the account public key
	Address string `json:"address"`

	// \[algo\] total number of MicroAlgos in the account
	Amount uint64 `json:"amount"`

	// specifies the amount of MicroAlgos in the account, without the pending rewards.
	AmountWithoutPendingRewards uint64 `json:"amount-without-pending-rewards"`

	// \[asset\] assets held by this account.
	//
	// Note the raw object uses `map[int] -> AssetHolding` for this type.
	Assets []AssetHolding `json:"assets,omitempty"`

	// \[apar\] parameters of assets created by this account.
	//
	// Note: the raw account uses `map[int] -> Asset` for this type.
	CreatedAssets []Asset `json:"created-assets,omitempty"`

	// AccountParticipation describes the parameters used by this account in consensus protocol.
	Participation AccountParticipation `json:"participation,omitempty"`

	// amount of MicroAlgos of pending rewards in this account.
	PendingRewards uint64 `json:"pending-rewards"`

	// \[ebase\] used as part of the rewards computation. Only applicable to accounts which are participating.
	RewardBase uint64 `json:"reward-base,omitempty"`

	// \[ern\] total rewards of MicroAlgos the account has received, including pending rewards.
	Rewards uint64 `json:"rewards"`

	// The round for which this information is relevant.
	Round uint64 `json:"round"`

	// \[onl\] delegation status of the account's MicroAlgos
	// * Offline - indicates that the associated account is delegated.
	// *  Online  - indicates that the associated account used as part of the delegation pool.
	// *   NotParticipating - indicates that the associated account is neither a delegator nor a delegate.
	Status string `json:"status"`

	// Indicates what type of signature is used by this account, must be one of:
	// * sig
	// * msig
	// * lsig
	Type string `json:"sig-type,omitempty"`
}

Account defines model for account information at a given round.

type AccountId

type AccountId string

AccountId defines model for account-id.

type AccountParticipation

type AccountParticipation struct {

	// \[sel\] Selection public key (if any) currently registered for this round.
	SelectionParticipationKey []byte `json:"selection-participation-key,omitempty"`

	// \[voteFst\] First round for which this participation is valid.
	VoteFirstValid uint64 `json:"vote-first-valid,omitempty"`

	// \[voteKD\] Number of subkeys in each batch of participation keys.
	VoteKeyDilution uint64 `json:"vote-key-dilution,omitempty"`

	// \[voteLst\] Last round for which this participation is valid.
	VoteLastValid uint64 `json:"vote-last-valid,omitempty"`

	// \[vote\] root participation public key (if any) currently registered for this round.
	VoteParticipationKey []byte `json:"vote-participation-key,omitempty"`
}

AccountParticipation describes the parameters used by this account in consensus protocol.

type AccountResponse

type AccountResponse struct {

	// Account information at a given round.
	//
	// Definition:
	// data/basics/userBalance.go : AccountData
	Account Account `json:"account"`

	// Round at which the results were computed.
	CurrentRound uint64 `json:"current-round"`

	// Used for pagination, when making another request provide this token with the next parameter.
	NextToken string `json:"next-token"`
}

AccountResponse defines model for AccountResponse.

type AccountsResponse

type AccountsResponse struct {
	Accounts []Account `json:"accounts"`

	// Round at which the results were computed.
	CurrentRound uint64 `json:"current-round"`

	// Used for pagination, when making another request provide this token with the next parameter.
	NextToken string `json:"next-token"`
}

AccountsResponse defines model for AccountsResponse.

type Address

type Address string

Address defines model for address.

type AddressGreaterThan

type AddressGreaterThan string

AddressGreaterThan defines model for address-greater-than.

type AddressRole

type AddressRole string

AddressRole defines model for address-role.

type AfterAddress

type AfterAddress string

AfterAddress defines model for after-address.

type AfterAsset

type AfterAsset uint64

AfterAsset defines model for after-asset.

type AfterTime

type AfterTime string

AfterTime defines model for after-time.

type AlgosGreaterThan

type AlgosGreaterThan uint64

AlgosGreaterThan defines model for algos-greater-than.

type AlgosLessThan

type AlgosLessThan uint64

AlgosLessThan defines model for algos-less-than.

type Asset

type Asset struct {

	// unique asset identifier
	Index uint64 `json:"index"`

	// AssetParams specifies the parameters for an asset.
	//
	// \[apar\] when part of an AssetConfig transaction.
	//
	// Definition:
	// data/transactions/asset.go : AssetParams
	Params AssetParams `json:"params"`
}

Asset specifies both the unique identifier and the parameters for an asset

type AssetBalancesResponse

type AssetBalancesResponse struct {

	// A simplified version of AssetHolding
	Balances []MiniAssetHolding `json:"balances"`

	// Round at which the results were computed.
	CurrentRound uint64 `json:"current-round"`

	// Used for pagination, when making another request provide this token with the next parameter.
	NextToken string `json:"next-token"`
}

AssetBalancesResponse defines model for AssetBalancesResponse.

type AssetHolding

type AssetHolding struct {

	// \[a\] number of units held.
	Amount uint64 `json:"amount"`

	// Asset ID of the holding.
	AssetId uint64 `json:"asset-id"`

	// Address that created this asset. This is the address where the parameters for this asset can be found, and also the address where unwanted asset units can be sent in the worst case.
	Creator string `json:"creator"`

	// \[f\] whether or not the holding is frozen.
	IsFrozen bool `json:"is-frozen,omitempty"`
}

AssetHolding describes an asset held by an account.

type AssetId

type AssetId uint64

AssetId defines model for asset-id.

type AssetParams

type AssetParams struct {

	// \[c\] Address of account used to clawback holdings of this asset.  If empty, clawback is not permitted.
	Clawback string `json:"clawback,omitempty"`

	// The address that created this asset. This is the address where the parameters for this asset can be found, and also the address where unwanted asset units can be sent in the worst case.
	Creator string `json:"creator"`

	// \[dc\] The number of digits to use after the decimal point when displaying this asset. If 0, the asset is not divisible. If 1, the base unit of the asset is in tenths. If 2, the base unit of the asset is in hundredths, and so on. This value must be between 0 and 19 (inclusive).
	Decimals uint64 `json:"decimals"`

	// \[df\] Whether holdings of this asset are frozen by default.
	DefaultFrozen bool `json:"default-frozen,omitempty"`

	// \[f\] Address of account used to freeze holdings of this asset.  If empty, freezing is not permitted.
	Freeze string `json:"freeze,omitempty"`

	// \[m\] Address of account used to manage the keys of this asset and to destroy it.
	Manager string `json:"manager,omitempty"`

	// \[am\] A commitment to some unspecified asset metadata. The format of this metadata is up to the application.
	MetadataHash []byte `json:"metadata-hash,omitempty"`

	// \[an\] Name of this asset, as supplied by the creator.
	Name string `json:"name,omitempty"`

	// \[r\] Address of account holding reserve (non-minted) units of this asset.
	Reserve string `json:"reserve,omitempty"`

	// \[t\] The total number of units of this asset.
	Total uint64 `json:"total"`

	// \[un\] Name of a unit of this asset, as supplied by the creator.
	UnitName string `json:"unit-name,omitempty"`

	// \[au\] URL where more information about the asset can be retrieved.
	Url string `json:"url,omitempty"`
}

AssetParams specifies the parameters for an asset.

type AssetResponse

type AssetResponse struct {

	// Specifies both the unique identifier and the parameters for an asset
	Asset Asset `json:"asset"`

	// Round at which the results were computed.
	CurrentRound uint64 `json:"current-round"`
}

AssetResponse defines model for AssetResponse.

type AssetsResponse

type AssetsResponse struct {
	Assets []Asset `json:"assets"`

	// Round at which the results were computed.
	CurrentRound uint64 `json:"current-round"`

	// Used for pagination, when making another request provide this token with the next parameter.
	NextToken string `json:"next-token"`
}

AssetsResponse defines model for AssetsResponse.

type BeforeTime

type BeforeTime string

BeforeTime defines model for before-time.

type Block

type Block struct {
	Cert string `json:"cert"`

	// \[gh\] hash to which this block belongs.
	GenesisHash []byte `json:"genesis-hash"`

	// \[gen\] ID to which this block belongs.
	GenesisId string `json:"genesis-id"`

	// Current block hash
	Hash []byte `json:"hash"`

	// Period on which the block was confirmed.
	Period uint64 `json:"period"`

	// \[prev\] Previous block hash.
	PreviousBlockHash []byte `json:"previous-block-hash"`

	// Address that proposed this block.
	Proposer string `json:"proposer"`

	// Fields relating to rewards,
	Rewards BlockRewards `json:"rewards,omitempty"`

	// \[rnd\] Current round on which this block was appended to the chain.
	Round uint64 `json:"round"`

	// \[seed\] Sortition seed.
	Seed []byte `json:"seed"`

	// \[ts\] Block creation timestamp in seconds since eposh
	Timestamp uint64 `json:"timestamp"`

	// \[txns\] list of transactions corresponding to a given round.
	Transactions []Transaction `json:"transactions,omitempty"`

	// \[txn\] TransactionsRoot authenticates the set of transactions appearing in the block. More specifically, it's the root of a merkle tree whose leaves are the block's Txids, in lexicographic order. For the empty block, it's 0. Note that the TxnRoot does not authenticate the signatures on the transactions, only the transactions themselves. Two blocks with the same transactions but in a different order and with different signatures will have the same TxnRoot.
	TransactionsRoot []byte `json:"transactions-root"`

	// \[tc\] TxnCounter counts the number of transactions committed in the ledger, from the time at which support for this feature was introduced.
	//
	// Specifically, TxnCounter is the number of the next transaction that will be committed after this block.  It is 0 when no transactions have ever been committed (since TxnCounter started being supported).
	TxnCounter uint64 `json:"txn-counter,omitempty"`

	// Fields relating to a protocol upgrade.
	UpgradeState BlockUpgradeState `json:"upgrade-state,omitempty"`

	// Fields relating to voting for a protocol upgrade.
	UpgradeVote BlockUpgradeVote `json:"upgrade-vote,omitempty"`
}

Block defines model for Block.

type BlockResponse

type BlockResponse Block

BlockResponse defines model for BlockResponse.

type BlockRewards

type BlockRewards struct {

	// \[fees\] accepts transaction fees, it can only spend to the incentive pool.
	FeeSink string `json:"fee-sink"`

	// \[rwcalr\] number of leftover MicroAlgos after the distribution of rewards-rate MicroAlgos for every reward unit in the next round.
	RewardsCalculationRound uint64 `json:"rewards-calculation-round"`

	// \[earn\] How many rewards, in MicroAlgos, have been distributed to each RewardUnit of MicroAlgos since genesis.
	RewardsLevel uint64 `json:"rewards-level"`

	// \[rwd\] accepts periodic injections from the fee-sink and continually redistributes them as rewards.
	RewardsPool string `json:"rewards-pool"`

	// \[rate\] Number of new MicroAlgos added to the participation stake from rewards at the next round.
	RewardsRate uint64 `json:"rewards-rate"`

	// \[frac\] Number of leftover MicroAlgos after the distribution of RewardsRate/rewardUnits MicroAlgos for every reward unit in the next round.
	RewardsResidue uint64 `json:"rewards-residue"`
}

BlockRewards defines model for BlockRewards.

type BlockUpgradeState

type BlockUpgradeState struct {

	// \[proto\] The current protocol version.
	CurrentProtocol string `json:"current-protocol"`

	// \[nextproto\] The next proposed protocol version.
	NextProtocol string `json:"next-protocol,omitempty"`

	// \[nextyes\] Number of blocks which approved the protocol upgrade.
	NextProtocolApprovals uint64 `json:"next-protocol-approvals,omitempty"`

	// \[nextswitch\] Round on which the protocol upgrade will take effect.
	NextProtocolSwitchOn uint64 `json:"next-protocol-switch-on,omitempty"`

	// \[nextbefore\] Deadline round for this protocol upgrade (No votes will be consider after this round).
	NextProtocolVoteBefore uint64 `json:"next-protocol-vote-before,omitempty"`
}

BlockUpgradeState defines model for BlockUpgradeState.

type BlockUpgradeVote

type BlockUpgradeVote struct {

	// \[upgradeyes\] Indicates a yes vote for the current proposal.
	UpgradeApprove bool `json:"upgrade-approve,omitempty"`

	// \[upgradedelay\] Indicates the time between acceptance and execution.
	UpgradeDelay uint64 `json:"upgrade-delay,omitempty"`

	// \[upgradeprop\] Indicates a proposed upgrade.
	UpgradePropose string `json:"upgrade-propose,omitempty"`
}

BlockUpgradeVote defines model for BlockUpgradeVote.

type CurrencyGreaterThan

type CurrencyGreaterThan uint64

CurrencyGreaterThan defines model for currency-greater-than.

type CurrencyLessThan

type CurrencyLessThan uint64

CurrencyLessThan defines model for currency-less-than.

type ErrorResponse

type ErrorResponse struct {
	Data    *map[string]interface{} `json:"data,omitempty"`
	Message string                  `json:"message"`
}

ErrorResponse defines model for ErrorResponse.

type ExcludeCloseTo

type ExcludeCloseTo bool

ExcludeCloseTo defines model for exclude-close-to.

type GetBlockParams

type GetBlockParams struct {
	// Return raw msgpack block bytes or json
	Format string `url:"format,omitempty"`
}

GetBlockParams defines parameters for GetBlock.

type GetBlockResponse

type GetBlockResponse = struct {
	Blockb64 string `json:"block"`
}

GetBlock response is returned by Block

type GetPendingTransactionsByAddressParams

type GetPendingTransactionsByAddressParams struct {
	// Truncated number of transactions to display. If max=0, returns all pending txns.
	Max uint64 `url:"max,omitempty"`
	// Return raw msgpack block bytes or json
	Format string `url:"format,omitempty"`
}

GetPendingTransactionsByAddressParams defines parameters for GetPendingTransactionsByAddress.

type HealthCheck

type HealthCheck struct {
	Data    *map[string]interface{} `json:"data,omitempty"`
	Message string                  `json:"message"`
}

HealthCheck defines model for HealthCheck.

type HealthCheckResponse

type HealthCheckResponse HealthCheck

HealthCheckResponse defines model for HealthCheckResponse.

type Limit

type Limit uint64

Limit defines model for limit.

type LookupAccountByIDParams

type LookupAccountByIDParams struct {

	// Include results for the specified round.
	Round uint64 `url:"round,omitempty"`
}

LookupAccountByIDParams defines parameters for LookupAccountByID.

type LookupAccountByIDResponse

type LookupAccountByIDResponse struct {
	CurrentRound uint64  `json:"current-round"`
	Account      Account `json:"account"`
}

type LookupAccountTransactionsParams

type LookupAccountTransactionsParams struct {

	// Specifies a prefix which must be contained in the note field.
	NotePrefix string `url:"note-prefix,omitempty"`
	TxType     string `url:"tx-type,omitempty"`

	// SigType filters just results using the specified type of signature:
	//  sig - Standard
	//  msig - MultiSig
	//  lsig - LogicSig
	SigType string `url:"sig-type,omitempty"`

	// Lookup the specific transaction by ID.
	TxId string `url:"txid,omitempty"`

	// Include results for the specified round.
	Round uint64 `url:"round,omitempty"`

	// Include results at or after the specified min-round.
	MinRound uint64 `url:"min-round,omitempty"`

	// Include results at or before the specified max-round.
	MaxRound uint64 `url:"max-round,omitempty"`

	// Asset ID
	AssetId uint64 `url:"asset-id,omitempty"`

	// Maximum number of results to return.
	Limit uint64 `url:"limit,omitempty"`

	// Include results before the given time. Must be an RFC 3339 formatted string.
	BeforeTime string `url:"before-time,omitempty"`

	// Include results after the given time. Must be an RFC 3339 formatted string.
	AfterTime string `url:"after-time,omitempty"`

	// Results should have an amount greater than this value. MicroAlgos are the default currency unless an asset-id is provided, in which case the asset will be used.
	CurrencyGreaterThan uint64 `url:"currency-greater-than,omitempty"`

	// Results should have an amount less than this value. MicroAlgos are the default currency unless an asset-id is provided, in which case the asset will be used.
	CurrencyLessThan uint64 `url:"currency-less-than,omitempty"`

	// Used for pagination.
	NextToken string `url:"next,omitempty"`
}

LookupAccountTransactionsParams defines parameters for LookupAccountTransactions.

type LookupAssetBalancesParams

type LookupAssetBalancesParams struct {

	// Maximum number of results to return.
	Limit uint64 `url:"limit,omitempty"`

	// Used in conjunction with limit to page through results.
	AfterAddress string `url:"after-address,omitempty"`

	// Include results for the specified round.
	Round uint64 `url:"round,omitempty"`

	// Results should have an amount greater than this value. MicroAlgos are the default currency unless an asset-id is provided, in which case the asset will be used.
	CurrencyGreaterThan uint64 `url:"currency-greater-than,omitempty"`

	// Results should have an amount less than this value. MicroAlgos are the default currency unless an asset-id is provided, in which case the asset will be used.
	CurrencyLessThan uint64 `url:"currency-less-than,omitempty"`

	// Used for pagination.
	NextToken string `url:"next,omitempty"`
}

LookupAssetBalancesParams defines parameters for LookupAssetBalances.

type LookupAssetByIDResponse

type LookupAssetByIDResponse struct {
	CurrentRound uint64 `json:"current-round"`
	Asset        Asset  `json:"asset"`
}

type LookupAssetTransactionsParams

type LookupAssetTransactionsParams struct {

	// Specifies a prefix which must be contained in the note field.
	NotePrefix string `url:"note-prefix,omitempty"`
	TxType     string `url:"tx-type,omitempty"`

	// SigType filters just results using the specified type of signature:
	//  sig - Standard
	//  msig - MultiSig
	//  lsig - LogicSig
	SigType string `url:"sig-type,omitempty"`

	// Lookup the specific transaction by ID.
	TxId string `url:"txid,omitempty"`

	// Include results for the specified round.
	Round uint64 `url:"round,omitempty"`

	// Include results at or after the specified min-round.
	MinRound uint64 `url:"min-round,omitempty"`

	// Include results at or before the specified max-round.
	MaxRound uint64 `url:"max-round,omitempty"`

	// Maximum number of results to return.
	Limit uint64 `url:"limit,omitempty"`

	// Include results before the given time. Must be an RFC 3339 formatted string.
	BeforeTime string `url:"before-time,omitempty"`

	// Include results after the given time. Must be an RFC 3339 formatted string.
	AfterTime string `url:"after-time,omitempty"`

	// Results should have an amount greater than this value. MicroAlgos are the default currency unless an asset-id is provided, in which case the asset will be used.
	CurrencyGreaterThan uint64 `url:"currency-greater-than,omitempty"`

	// Results should have an amount less than this value. MicroAlgos are the default currency unless an asset-id is provided, in which case the asset will be used.
	CurrencyLessThan uint64 `url:"currency-less-than,omitempty"`

	// Only include transactions with this address in one of the transaction fields.
	Address string `url:"address,omitempty"`

	// Combine with the address parameter to define what type of address to search for.
	AddressRole string `url:"address-role,omitempty"`

	// Combine with address and address-role parameters to define what type of address to search for. The close to fields are normally treated as a receiver, if you would like to exclude them set this parameter to true.
	ExcludeCloseTo bool `url:"exclude-close-to,omitempty"`

	// Used for pagination.
	NextToken string `url:"next,omitempty"`
}

LookupAssetTransactionsParams defines parameters for LookupAssetTransactions.

type MaxRound

type MaxRound uint64

MaxRound defines model for max-round.

type MinRound

type MinRound uint64

MinRound defines model for min-round.

type MiniAssetHolding

type MiniAssetHolding struct {
	Address  string `json:"address"`
	Amount   uint64 `json:"amount"`
	IsFrozen bool   `json:"is-frozen"`
}

MiniAssetHolding defines model for MiniAssetHolding.

type NodeStatus

type NodeStatus struct {

	// CatchupTime in nanoseconds
	CatchupTime uint64 `json:"catchup-time"`

	// HasSyncedSinceStartup indicates whether a round has completed since startup
	HasSyncedSinceStartup bool `json:"has-synced-since-startup"`

	// LastRound indicates the last round seen
	LastRound uint64 `json:"last-round"`

	// LastVersion indicates the last consensus version supported
	LastVersion string `json:"last-version,omitempty"`

	// NextVersion of consensus protocol to use
	NextVersion string `json:"next-version,omitempty"`

	// NextVersionRound is the round at which the next consensus version will apply
	NextVersionRound uint64 `json:"next-version-round,omitempty"`

	// NextVersionSupported indicates whether the next consensus version is supported by this node
	NextVersionSupported bool `json:"next-version-supported,omitempty"`

	// StoppedAtUnsupportedRound indicates that the node does not support the new rounds and has stopped making progress
	StoppedAtUnsupportedRound bool `json:"stopped-at-unsupported-round"`

	// TimeSinceLastRound in nanoseconds
	TimeSinceLastRound uint64 `json:"time-since-last-round"`
}

NodeStatus contains the information about a node's 'status.

type NotePrefix

type NotePrefix []byte

NotePrefix defines model for note-prefix.

type Offset

type Offset uint64

Offset defines model for offset.

type PendingTransactionInfoResponse

type PendingTransactionInfoResponse = struct {
	Transaction types.SignedTxn `codec:"txn"`
	//PoolError indicates that the transaction was kicked out of this node's transaction pool (and specifies why that happened).  An empty string indicates the transaction wasn't kicked out of this node's txpool due to an error.
	PoolError string `codec:"pool-error"`
	//ConfirmedRound is the round where this transaction was confirmed, if present.
	ConfirmedRound uint64 `codec:"confirmed-round,omitempty"`
	//AssetIndex is the index of the newly created asset, if this was an asset creation transaction.
	AssetIndex uint64 `codec:"asset-index,omitempty"`
	//Closing amount for the transaction.
	ClosingAmount uint64 `codec:"closing-amount,omitempty"`
	//Rewards, in microAlgos, applied to sender.
	SenderRewards uint64 `codec:"sender-rewards,omitempty"`
	//Rewards, in microAlgos, applied to receiver.
	ReceiverRewards uint64 `codec:"receiver-rewards,omitempty"`
	//Rewards, in microAlgos, applied to close-to.
	CloseRewards uint64 `codec:"close-rewards,omitempty"`
}

PendingTransactionInfoResponse is returned by Get Pending Transaction by TXID

type PendingTransactionInformationParams

type PendingTransactionInformationParams struct {
	// Return raw msgpack block bytes or json
	Format string `url:"format,omitempty"`

	// Truncated number of transactions to display. If max=0, returns all pending txns.
	Max uint64 `url:"max,omitempty"`
}

PendingTransactionInformationParams defines parameters for GetPendingTransactions.

type PendingTransactionsResponse

type PendingTransactionsResponse = struct {
	TopTransactions   []types.SignedTxn `codec:"top-transactions"`
	TotalTransactions uint64            `codec:"total-transactions"`
}

PendingTransactionsResponse is returned by PendingTransactions and by Txid

type RawBlockJson

type RawBlockJson struct {
	Block string
}

type RawBlockMsgpack

type RawBlockMsgpack struct {
	Block string `json:"url,omitempty"`
}

type RegisterParticipationKeysAccountIdParams

type RegisterParticipationKeysAccountIdParams struct {

	// The fee to use when submitting key registration transactions. Defaults to the suggested fee.
	Fee uint64 `url:"fee,omitempty"`

	// value to use for two-level participation key.
	KeyDilution uint64 `url:"key-dilution,omitempty"`

	// The last round for which the generated participation keys will be valid.
	RoundLastValid uint64 `url:"round-last-valid,omitempty"`

	// Don't wait for transaction to commit.
	NoWait bool `url:"no-wait,omitempty"`
}

RegisterParticipationKeysAccountIdParams defines parameters for GetV2RegisterParticipationKeysAccountId.

type Round

type Round uint64

Round defines model for round.

type RoundNumber

type RoundNumber uint64

RoundNumber defines model for round-number.

type SearchAccountsParams

type SearchAccountsParams struct {

	// Include accounts holding the specified asset
	AssetId uint64 `url:"asset-id,omitempty"`

	// Maximum number of results to return.
	Limit uint64 `url:"limit,omitempty"`

	// Results should have an amount greater than this value. MicroAlgos are the default currency unless an asset-id is provided, in which case the asset will be used.
	CurrencyGreaterThan uint64 `url:"currency-greater-than,omitempty"`

	// Results should have an amount less than this value. MicroAlgos are the default currency unless an asset-id is provided, in which case the asset will be used.
	CurrencyLessThan uint64 `url:"currency-less-than,omitempty"`

	// Used in conjunction with limit to page through results.
	AfterAddress string `url:"after-address,omitempty"`

	// Used for pagination.
	NextToken string `url:"next,omitempty"`

	// Round for results.
	Round uint64 `url:"round,omitempty"`
}

SearchAccountsParams defines parameters for SearchAccounts.

type SearchForAssetsParams

type SearchForAssetsParams struct {

	// Maximum number of results to return.
	Limit uint64 `url:"limit,omitempty"`

	// Filter just assets with the given creator address.
	Creator string `url:"creator,omitempty"`

	// Filter just assets with the given name.
	Name string `url:"name,omitempty"`

	// Filter just assets with the given unit.
	Unit string `url:"unit,omitempty"`

	// Asset ID
	AssetId uint64 `url:"asset-id,omitempty"`

	// Used in conjunction with limit to page through results.
	AfterAsset uint64 `url:"after-asset,omitempty"`

	// Used for pagination.
	NextToken string `url:"next,omitempty"`
}

SearchForAssetsParams defines parameters for SearchForAssets.

type SearchForTransactionsParams

type SearchForTransactionsParams struct {

	// Specifies a prefix which must be contained in the note field.
	NotePrefix string `url:"note-prefix,omitempty"`
	TxType     string `url:"tx-type,omitempty"`

	// SigType filters just results using the specified type of signature:
	//  sig - Standard
	//  msig - MultiSig
	//  lsig - LogicSig
	SigType string `url:"sig-type,omitempty"`

	// Lookup the specific transaction by ID.
	TxId string `url:"txid,omitempty"`

	// Include results for the specified round.
	Round uint64 `url:"round,omitempty"`

	// Include results at or after the specified min-round.
	MinRound uint64 `url:"min-round,omitempty"`

	// Include results at or before the specified max-round.
	MaxRound uint64 `url:"max-round,omitempty"`

	// Asset ID
	AssetId uint64 `url:"asset-id,omitempty"`

	// Maximum number of results to return.
	Limit uint64 `url:"limit,omitempty"`

	// Include results before the given time. Must be an RFC 3339 formatted string.
	BeforeTime string `url:"before-time,omitempty"`

	// Include results after the given time. Must be an RFC 3339 formatted string.
	AfterTime string `url:"after-time,omitempty"`

	// Results should have an amount greater than this value. MicroAlgos are the default currency unless an asset-id is provided, in which case the asset will be used.
	CurrencyGreaterThan uint64 `url:"currency-greater-than,omitempty"`

	// Results should have an amount less than this value. MicroAlgos are the default currency unless an asset-id is provided, in which case the asset will be used.
	CurrencyLessThan uint64 `url:"currency-less-than,omitempty"`

	// Only include transactions with this address in one of the transaction fields.
	Address string `url:"address,omitempty"`

	// Combine with the address parameter to define what type of address to search for.
	AddressRole string `url:"address-role,omitempty"`

	// Combine with address and address-role parameters to define what type of address to search for. The close to fields are normally treated as a receiver, if you would like to exclude them set this parameter to true.
	ExcludeCloseTo bool `url:"exclude-close-to,omitempty"`

	// Used for pagination.
	NextToken string `url:"next,omitempty"`
}

SearchForTransactionsParams defines parameters for SearchForTransactions.

type ShutdownParams

type ShutdownParams struct {
	Timeout uint64 `url:"timeout,omitempty"`
}

ShutdownParams defines parameters for GetV2Shutdown.

type SigType

type SigType string

SigType defines model for sig-type.

type Supply

type Supply struct {

	// OnlineMoney
	OnlineMoney uint64 `json:"online-money"`

	// Round
	Round uint64 `json:"current_round"`

	// TotalMoney
	TotalMoney uint64 `json:"total-money"`
}

Supply defines model for Supply.

type Transaction

type Transaction struct {

	// Fields for asset allocation, re-configuration, and destruction.
	//
	//
	// A zero value for asset-id indicates asset creation.
	// A zero value for the params indicates asset destruction.
	//
	// Definition:
	// data/transactions/asset.go : AssetConfigTxnFields
	AssetConfigTransaction TransactionAssetConfig `json:"asset-config-transaction,omitempty"`

	// Fields for an asset freeze transaction.
	//
	// Definition:
	// data/transactions/asset.go : AssetFreezeTxnFields
	AssetFreezeTransaction TransactionAssetFreeze `json:"asset-freeze-transaction,omitempty"`

	// Fields for an asset transfer transaction.
	//
	// Definition:
	// data/transactions/asset.go : AssetTransferTxnFields
	AssetTransferTransaction TransactionAssetTransfer `json:"asset-transfer-transaction,omitempty"`

	// \[rc\] rewards applied to close-remainder-to account.
	CloseRewards uint64 `json:"close-rewards,omitempty"`

	// \[ca\] closing amount for transaction.
	ClosingAmount uint64 `json:"closing-amount,omitempty"`

	// Round when the transaction was confirmed.
	ConfirmedRound uint64 `json:"confirmed-round,omitempty"`

	// Specifies an asset index (ID) if an asset was created with this transaction.
	CreatedAssetIndex uint64 `json:"created-asset-index,omitempty"`

	// \[fee\] Transaction fee.
	Fee uint64 `json:"fee"`

	// \[fv\] First valid round for this transaction.
	FirstValid uint64 `json:"first-valid"`

	// \[gh\] Hash of genesis block.
	GenesisHash []byte `json:"genesis-hash,omitempty"`

	// \[gen\] genesis block ID.
	GenesisId string `json:"genesis-id,omitempty"`

	// \[grp\] Base64 encoded byte array of a sha512/256 digest. When present indicates that this transaction is part of a transaction group and the value is the sha512/256 hash of the transactions in that group.
	Group []byte `json:"group,omitempty"`

	// Transaction ID
	Id string `json:"id"`

	// Fields for a keyreg transaction.
	//
	// Definition:
	// data/transactions/keyreg.go : KeyregTxnFields
	KeyregTransaction TransactionKeyreg `json:"keyreg-transaction,omitempty"`

	// \[lv\] Last valid round for this transaction.
	LastValid uint64 `json:"last-valid"`

	// \[lx\] Base64 encoded 32-byte array. Lease enforces mutual exclusion of transactions.  If this field is nonzero, then once the transaction is confirmed, it acquires the lease identified by the (Sender, Lease) pair of the transaction until the LastValid round passes.  While this transaction possesses the lease, no other transaction specifying this lease can be confirmed.
	Lease []byte `json:"lease,omitempty"`

	// \[note\] Free form data.
	Note []byte `json:"note,omitempty"`

	// Fields for a payment transaction.
	//
	// Definition:
	// data/transactions/payment.go : PaymentTxnFields
	PaymentTransaction TransactionPayment `json:"payment-transaction,omitempty"`

	// \[rr\] rewards applied to receiver account.
	ReceiverRewards uint64 `json:"receiver-rewards,omitempty"`

	// Time when the block this transaction is in was confirmed.
	RoundTime uint64 `json:"round-time,omitempty"`

	// \[snd\] Sender's address.
	Sender string `json:"sender"`

	// \[rs\] rewards applied to sender account.
	SenderRewards uint64 `json:"sender-rewards,omitempty"`

	// Validation signature associated with some data. Only one of the signatures should be provided.
	Signature TransactionSignature `json:"signature"`

	// \[type\] Indicates what type of transaction this is. Different types have different fields.
	//
	// Valid types, and where their fields are stored:
	// * \[pay\] payment-transaction
	// * \[keyreg\] keyreg-transaction
	// * \[acfg\] asset-config-transaction
	// * \[axfer\] asset-transfer-transaction
	// * \[afrz\] asset-freeze-transaction
	Type string `json:"tx-type"`
}

Transaction defines model for Transaction.

type TransactionAssetConfig

type TransactionAssetConfig struct {

	// \[xaid\] ID of the asset being configured or empty if creating.
	AssetId uint64 `json:"asset-id,omitempty"`

	// AssetParams specifies the parameters for an asset.
	//
	// \[apar\] when part of an AssetConfig transaction.
	//
	// Definition:
	// data/transactions/asset.go : AssetParams
	Params AssetParams `json:"params,omitempty"`
}

TransactionAssetConfig defines model for TransactionAssetConfig.

type TransactionAssetFreeze

type TransactionAssetFreeze struct {

	// \[fadd\] Address of the account whose asset is being frozen or thawed.
	Address string `json:"address"`

	// \[faid\] ID of the asset being frozen or thawed.
	AssetId uint64 `json:"asset-id"`

	// \[afrz\] The new freeze status.
	NewFreezeStatus bool `json:"new-freeze-status"`
}

TransactionAssetFreeze defines model for TransactionAssetFreeze.

type TransactionAssetTransfer

type TransactionAssetTransfer struct {

	// \[aamt\] Amount of asset to transfer. A zero amount transferred to self allocates that asset in the account's Assets map.
	Amount uint64 `json:"amount"`

	// \[xaid\] ID of the asset being transferred.
	AssetId uint64 `json:"asset-id"`

	// \[aclose\] Indicates that the asset should be removed from the account's Assets map, and specifies where the remaining asset holdings should be transferred.  It's always valid to transfer remaining asset holdings to the creator account.
	CloseTo string `json:"close-to,omitempty"`

	// \[arcv\] Recipient address of the transfer.
	Receiver string `json:"receiver"`

	// \[asnd\] The effective sender during a clawback transactions. If this is not a zero value, the real transaction sender must be the Clawback address from the AssetParams.
	Sender string `json:"sender,omitempty"`

	CloseAmount uint64 `json:"close-amount,omitempty"`
}

TransactionAssetTransfer defines model for TransactionAssetTransfer.

type TransactionKeyreg

type TransactionKeyreg struct {

	// \[nonpart\] Mark the account as participating or non-participating.
	NonParticipation bool `json:"non-participation,omitempty"`

	// \[selkey\] Public key used with the Verified Random Function (VRF) result during committee selection.
	SelectionParticipationKey []byte `json:"selection-participation-key,omitempty"`

	// \[votefst\] First round this participation key is valid.
	VoteFirstValid uint64 `json:"vote-first-valid,omitempty"`

	// \[votekd\] Number of subkeys in each batch of participation keys.
	VoteKeyDilution uint64 `json:"vote-key-dilution,omitempty"`

	// \[votelst\] Last round this participation key is valid.
	VoteLastValid uint64 `json:"vote-last-valid,omitempty"`

	// \[votekey\] Participation public key used in key registration transactions.
	VoteParticipationKey []byte `json:"vote-participation-key,omitempty"`
}

TransactionKeyreg defines model for TransactionKeyreg.

type TransactionParams

type TransactionParams struct {

	// ConsensusVersion indicates the consensus protocol version
	// as of LastRound.
	ConsensusVersion string `json:"consensus-version"`

	// Fee is the suggested transaction fee
	// Fee is in units of micro-Algos per byte.
	// Fee may fall to zero but transactions must still have a fee of
	// at least MinTxnFee for the current network protocol.
	Fee uint64 `json:"fee"`

	// GenesisID is an ID listed in the genesis block.
	GenesisID string `json:"genesis-id"`

	// GenesisHash is the hash of the genesis block.
	Genesishash []byte `json:"genesis-hash"`

	// LastRound indicates the last round seen
	LastRound uint64 `json:"last-round"`

	// The minimum transaction fee (not per byte) required for the
	// txn to validate for the current network protocol.
	MinFee uint64 `json:"min-fee,omitempty"`
}

TransactionParams contains the parameters that help a client construct a new transaction.

type TransactionPayment

type TransactionPayment struct {

	// \[amt\] number of MicroAlgos intended to be transferred.
	Amount uint64 `json:"amount"`

	// Number of MicroAlgos that were sent to the close-remainder-to address when closing the sender account.
	CloseAmount uint64 `json:"close-amount,omitempty"`

	// \[close\] when set, indicates that the sending account should be closed and all remaining funds be transferred to this address.
	CloseRemainderTo string `json:"close-remainder-to,omitempty"`

	// \[rcv\] receiver's address.
	Receiver string `json:"receiver"`
}

TransactionPayment defines model for TransactionPayment.

type TransactionSignature

type TransactionSignature struct {

	// \[lsig\] Programatic transaction signature.
	//
	// Definition:
	// data/transactions/logicsig.go
	Logicsig TransactionSignatureLogicsig `json:"logicsig,omitempty"`

	// \[msig\] structure holding multiple subsignatures.
	//
	// Definition:
	// crypto/multisig.go : MultisigSig
	Multisig TransactionSignatureMultisig `json:"multisig,omitempty"`

	// \[sig\] Standard ed25519 signature.
	Sig []byte `json:"sig,omitempty"`
}

TransactionSignature defines model for TransactionSignature.

type TransactionSignatureLogicsig

type TransactionSignatureLogicsig struct {

	// \[arg\] Logic arguments, base64 encoded.
	Args []string `json:"args,omitempty"`

	// \[l\] Program signed by a signature or multi signature, or hashed to be the address of ana ccount. Base64 encoded TEAL program.
	Logic []byte `json:"logic"`

	// \[msig\] structure holding multiple subsignatures.
	//
	// Definition:
	// crypto/multisig.go : MultisigSig
	MultisigSignature TransactionSignatureMultisig `json:"multisig-signature,omitempty"`

	// \[sig\] ed25519 signature.
	Signature []byte `json:"signature,omitempty"`
}

TransactionSignatureLogicsig defines model for TransactionSignatureLogicsig.

type TransactionSignatureMultisig

type TransactionSignatureMultisig struct {

	// \[subsig\] holds pairs of public key and signatures.
	Subsignature []TransactionSignatureMultisigSubsignature `json:"subsignature,omitempty"`

	// \[thr\]
	Threshold uint64 `json:"threshold,omitempty"`

	// \[v\]
	Version uint64 `json:"version,omitempty"`
}

TransactionSignatureMultisig defines model for TransactionSignatureMultisig.

type TransactionSignatureMultisigSubsignature

type TransactionSignatureMultisigSubsignature struct {

	// \[pk\]
	PublicKey []byte `json:"public-key,omitempty"`

	// \[s\]
	Signature []byte `json:"signature,omitempty"`
}

TransactionSignatureMultisigSubsignature defines model for TransactionSignatureMultisigSubsignature.

type TransactionsResponse

type TransactionsResponse struct {

	// Round at which the results were computed.
	CurrentRound uint64        `json:"current-round"`
	Transactions []Transaction `json:"transactions"`

	// Used for pagination, when making another request provide this token with the next parameter.
	NextToken string `json:"next-token"`
}

TransactionsResponse defines model for TransactionsResponse.

type TxId

type TxId []byte

TxId defines model for tx-id.

type TxType

type TxType string

TxType defines model for tx-type.

type Version

type Version struct {

	// the current algod build version information.
	Build       VersionBuild `json:"build"`
	GenesisHash []byte       `json:"genesis-hash"`
	GenesisId   string       `json:"genesis-id"`
	Versions    []string     `json:"versions"`
}

Version defines model for Version.

type VersionBuild

type VersionBuild struct {
	Branch      string `json:"branch"`
	BuildNumber uint64 `json:"build-number"`
	Channel     string `json:"channel"`
	CommitHash  []byte `json:"commit-hash"`
	Major       uint64 `json:"major"`
	Minor       uint64 `json:"minor"`
}

VersionBuild defines model for the current algod build version information.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL