Documentation
¶
Index ¶
- Constants
- Variables
- func AccountDataToAccount(address string, record *basics.AccountData, lastRound basics.Round, ...) (model.Account, error)
- func AccountToAccountData(a *model.Account) (basics.AccountData, error)
- func AppLocalState(state basics.AppLocalState, appIdx basics.AppIndex) model.ApplicationLocalState
- func AppParamsToApplication(creator string, appIdx basics.AppIndex, appParams *basics.AppParams) model.Application
- func ApplicationParamsToAppParams(gap *model.ApplicationParams) (basics.AppParams, error)
- func AssetHolding(ah basics.AssetHolding, ai basics.AssetIndex) model.AssetHolding
- func AssetParamsToAsset(creator string, idx basics.AssetIndex, params *basics.AssetParams) model.Asset
- func DeltaLogToLog(logs []string) (*[][]byte, error)
- func GetStateProofTransactionForRound(ctx context.Context, txnFetcher LedgerForAPI, round, latestRound basics.Round, ...) (transactions.Transaction, error)
- func MergeAppParams(base *basics.AppParams, update *basics.AppParams)
- func NewAppCallLogs(txid string, logs []string, appIndex uint64) model.AppCallLogs
- func StateDeltaToStateDelta(sd basics.StateDelta) *model.StateDelta
- type BlockResponseJSON
- type CompileResponseWithSourceMap
- type DryrunRequest
- type Handlers
- func (v2 *Handlers) AbortCatchup(ctx echo.Context, catchpoint string) error
- func (v2 *Handlers) AccountApplicationInformation(ctx echo.Context, address string, applicationID uint64, ...) error
- func (v2 *Handlers) AccountAssetInformation(ctx echo.Context, address string, assetID uint64, ...) error
- func (v2 *Handlers) AccountAssetsInformation(ctx echo.Context, address string, params model.AccountAssetsInformationParams) error
- func (v2 *Handlers) AccountInformation(ctx echo.Context, address string, params model.AccountInformationParams) error
- func (v2 *Handlers) AddParticipationKey(ctx echo.Context) error
- func (v2 *Handlers) AppendKeys(ctx echo.Context, participationID string) error
- func (v2 *Handlers) DeleteParticipationKeyByID(ctx echo.Context, participationID string) error
- func (v2 *Handlers) ExperimentalCheck(ctx echo.Context) error
- func (v2 *Handlers) GenerateParticipationKeys(ctx echo.Context, address string, params model.GenerateParticipationKeysParams) error
- func (v2 *Handlers) GetApplicationBoxByName(ctx echo.Context, applicationID uint64, ...) error
- func (v2 *Handlers) GetApplicationBoxes(ctx echo.Context, applicationID uint64, params model.GetApplicationBoxesParams) error
- func (v2 *Handlers) GetApplicationByID(ctx echo.Context, applicationID uint64) error
- func (v2 *Handlers) GetAssetByID(ctx echo.Context, assetID uint64) error
- func (v2 *Handlers) GetBlock(ctx echo.Context, round uint64, params model.GetBlockParams) error
- func (v2 *Handlers) GetBlockHash(ctx echo.Context, round uint64) error
- func (v2 *Handlers) GetBlockLogs(ctx echo.Context, round uint64) error
- func (v2 *Handlers) GetBlockTimeStampOffset(ctx echo.Context) error
- func (v2 *Handlers) GetBlockTxids(ctx echo.Context, round uint64) error
- func (v2 *Handlers) GetConfig(ctx echo.Context) error
- func (v2 *Handlers) GetDebugSettingsProf(ctx echo.Context) error
- func (v2 *Handlers) GetLedgerStateDelta(ctx echo.Context, round uint64, params model.GetLedgerStateDeltaParams) error
- func (v2 *Handlers) GetLedgerStateDeltaForTransactionGroup(ctx echo.Context, id string, ...) error
- func (v2 *Handlers) GetLightBlockHeaderProof(ctx echo.Context, round uint64) error
- func (v2 *Handlers) GetParticipationKeyByID(ctx echo.Context, participationID string) error
- func (v2 *Handlers) GetParticipationKeys(ctx echo.Context) error
- func (v2 *Handlers) GetPendingTransactions(ctx echo.Context, params model.GetPendingTransactionsParams) error
- func (v2 *Handlers) GetPendingTransactionsByAddress(ctx echo.Context, addr string, ...) error
- func (v2 *Handlers) GetStateProof(ctx echo.Context, round uint64) error
- func (v2 *Handlers) GetStatus(ctx echo.Context) error
- func (v2 *Handlers) GetSupply(ctx echo.Context) error
- func (v2 *Handlers) GetSyncRound(ctx echo.Context) error
- func (v2 *Handlers) GetTransactionGroupLedgerStateDeltasForRound(ctx echo.Context, round uint64, ...) error
- func (v2 *Handlers) GetTransactionProof(ctx echo.Context, round uint64, txid string, ...) error
- func (v2 *Handlers) PendingTransactionInformation(ctx echo.Context, txid string, ...) error
- func (v2 *Handlers) PutDebugSettingsProf(ctx echo.Context) error
- func (v2 *Handlers) RawTransaction(ctx echo.Context) error
- func (v2 *Handlers) RawTransactionAsync(ctx echo.Context) error
- func (v2 *Handlers) SetBlockTimeStampOffset(ctx echo.Context, offset uint64) error
- func (v2 *Handlers) SetSyncRound(ctx echo.Context, round uint64) error
- func (v2 *Handlers) ShutdownNode(ctx echo.Context, params model.ShutdownNodeParams) error
- func (v2 *Handlers) SimulateTransaction(ctx echo.Context, params model.SimulateTransactionParams) error
- func (v2 *Handlers) StartCatchup(ctx echo.Context, catchpoint string, params model.StartCatchupParams) error
- func (v2 *Handlers) TealCompile(ctx echo.Context, params model.TealCompileParams) (err error)
- func (v2 *Handlers) TealDisassemble(ctx echo.Context) error
- func (v2 *Handlers) TealDryrun(ctx echo.Context) error
- func (v2 *Handlers) TransactionParams(ctx echo.Context) error
- func (v2 *Handlers) UnsetSyncRound(ctx echo.Context) error
- func (v2 *Handlers) WaitForBlock(ctx echo.Context, round uint64) error
- type LedgerForAPI
- type NodeInterface
- type PreEncodedSimulateRequest
- type PreEncodedSimulateRequestTransactionGroup
- type PreEncodedSimulateResponse
- type PreEncodedSimulateTxnGroupResult
- type PreEncodedSimulateTxnResult
- type PreEncodedTxInfo
Constants ¶
const DefaultAssetResults = uint64(1000)
DefaultAssetResults sets a default size limit for the number of assets returned in a single request to the /v2/accounts/{address}/assets endpoint
const MaxAssetResults = 1000
MaxAssetResults sets a size limit for the number of assets returned in a single request to the /v2/accounts/{address}/assets endpoint
const MaxTealDryrunBytes = 1_000_000
MaxTealDryrunBytes sets a size limit for dryrun requests With the ability to hold unlimited assets DryrunRequests can become quite large, so we allow up to 1MB
const MaxTealSourceBytes = 512 * 1024
MaxTealSourceBytes sets a size limit for TEAL source programs for requests Max TEAL program size is currently 8k but we allow for comments, spacing, and repeated consts in the source TEAL. We have some indication that real TEAL programs with comments are about 20 times bigger than the bytecode they produce, and we may soon allow 16,000 byte logicsigs, implying a maximum of 320kb. Let's call it half a meg for a little room to spare.
Variables ¶
var ErrNoStateProofForRound = errors.New("no state proof can be found for that round")
ErrNoStateProofForRound returned when a state proof transaction could not be found
var ErrShutdown = errors.New(errServiceShuttingDown)
ErrShutdown represents the error for the string errServiceShuttingDown
var ErrTimeout = errors.New("timed out on request")
ErrTimeout indicates a task took too long, and the server canceled it.
var WaitForBlockTimeout = 1 * time.Minute
WaitForBlockTimeout is the timeout for the WaitForBlock endpoint.
Functions ¶
func AccountDataToAccount ¶
func AccountDataToAccount( address string, record *basics.AccountData, lastRound basics.Round, consensus *config.ConsensusParams, amountWithoutPendingRewards basics.MicroAlgos, ) (model.Account, error)
AccountDataToAccount converts basics.AccountData to v2.model.Account
func AccountToAccountData ¶
func AccountToAccountData(a *model.Account) (basics.AccountData, error)
AccountToAccountData converts v2.model.Account to basics.AccountData
func AppLocalState ¶
func AppLocalState(state basics.AppLocalState, appIdx basics.AppIndex) model.ApplicationLocalState
AppLocalState converts between basics.AppLocalState and model.ApplicationLocalState
func AppParamsToApplication ¶
func AppParamsToApplication(creator string, appIdx basics.AppIndex, appParams *basics.AppParams) model.Application
AppParamsToApplication converts basics.AppParams to model.Application
func ApplicationParamsToAppParams ¶
func ApplicationParamsToAppParams(gap *model.ApplicationParams) (basics.AppParams, error)
ApplicationParamsToAppParams converts model.ApplicationParams to basics.AppParams
func AssetHolding ¶
func AssetHolding(ah basics.AssetHolding, ai basics.AssetIndex) model.AssetHolding
AssetHolding converts between basics.AssetHolding and model.AssetHolding
func AssetParamsToAsset ¶
func AssetParamsToAsset(creator string, idx basics.AssetIndex, params *basics.AssetParams) model.Asset
AssetParamsToAsset converts basics.AssetParams to model.Asset
func DeltaLogToLog ¶
DeltaLogToLog base64 encode the logs
func GetStateProofTransactionForRound ¶
func GetStateProofTransactionForRound(ctx context.Context, txnFetcher LedgerForAPI, round, latestRound basics.Round, stop <-chan struct{}) (transactions.Transaction, error)
GetStateProofTransactionForRound searches for a state proof transaction that can be used to prove on the given round (i.e the round is within the attestation period). the latestRound should be provided as an upper bound for the search
func MergeAppParams ¶
MergeAppParams merges values, existing in "base" take priority over new in "update"
func NewAppCallLogs ¶
func NewAppCallLogs(txid string, logs []string, appIndex uint64) model.AppCallLogs
NewAppCallLogs generates a new model.AppCallLogs struct.
func StateDeltaToStateDelta ¶
func StateDeltaToStateDelta(sd basics.StateDelta) *model.StateDelta
StateDeltaToStateDelta converts basics.StateDelta to model.StateDelta
Types ¶
type BlockResponseJSON ¶
type BlockResponseJSON struct {
Block bookkeeping.Block `codec:"block"`
}
BlockResponseJSON is used to embed the block in JSON responses.
type CompileResponseWithSourceMap ¶
type CompileResponseWithSourceMap struct { model.CompileResponse Sourcemap *logic.SourceMap `json:"sourcemap,omitempty"` }
CompileResponseWithSourceMap overrides the sourcemap field in the CompileResponse for JSON marshalling.
type DryrunRequest ¶
type DryrunRequest struct { // Txns is transactions to simulate Txns []transactions.SignedTxn `codec:"txns"` // not supposed to be serialized // Optional, useful for testing Application Call txns. Accounts []model.Account `codec:"accounts"` Apps []model.Application `codec:"apps"` // ProtocolVersion specifies a specific version string to operate under, otherwise whatever the current protocol of the network this algod is running in. ProtocolVersion string `codec:"protocol-version"` // Round is available to some TEAL scripts. Defaults to the current round on the network this algod is attached to. Round uint64 `codec:"round"` // LatestTimestamp is available to some TEAL scripts. Defaults to the latest confirmed timestamp this algod is attached to. LatestTimestamp int64 `codec:"latest-timestamp"` Sources []model.DryrunSource `codec:"sources"` }
DryrunRequest object uploaded to /v2/teal/dryrun It is the same as model.DryrunRequest but Txns deserialized properly. Given the Transactions and simulated ledger state upload, run TEAL scripts and return debugging information. This is also used for msgp-decoding
func DryrunRequestFromGenerated ¶
func DryrunRequestFromGenerated(gdr *model.DryrunRequest) (dr DryrunRequest, err error)
DryrunRequestFromGenerated converts model.DryrunRequest to DryrunRequest field by fields and re-types Txns []transactions.SignedTxn
func (*DryrunRequest) ExpandSources ¶
func (dr *DryrunRequest) ExpandSources() error
ExpandSources takes DryrunRequest.Source, compiles and puts into appropriate DryrunRequest.Apps entry
type Handlers ¶
type Handlers struct { Node NodeInterface Log logging.Logger Shutdown <-chan struct{} // KeygenLimiter is used to limit the number of concurrent key generation requests. KeygenLimiter *semaphore.Weighted }
Handlers is an implementation to the V2 route handler interface defined by the generated code.
func (*Handlers) AbortCatchup ¶
AbortCatchup Given a catchpoint, it aborts catching up to this catchpoint (DELETE /v2/catchup/{catchpoint})
func (*Handlers) AccountApplicationInformation ¶
func (v2 *Handlers) AccountApplicationInformation(ctx echo.Context, address string, applicationID uint64, params model.AccountApplicationInformationParams) error
AccountApplicationInformation gets account information about a given app. (GET /v2/accounts/{address}/applications/{application-id})
func (*Handlers) AccountAssetInformation ¶
func (v2 *Handlers) AccountAssetInformation(ctx echo.Context, address string, assetID uint64, params model.AccountAssetInformationParams) error
AccountAssetInformation gets account information about a given asset. (GET /v2/accounts/{address}/assets/{asset-id})
func (*Handlers) AccountAssetsInformation ¶
func (v2 *Handlers) AccountAssetsInformation(ctx echo.Context, address string, params model.AccountAssetsInformationParams) error
AccountAssetsInformation looks up an account's asset holdings. (GET /v2/accounts/{address}/assets)
func (*Handlers) AccountInformation ¶
func (v2 *Handlers) AccountInformation(ctx echo.Context, address string, params model.AccountInformationParams) error
AccountInformation gets account information for a given account. (GET /v2/accounts/{address})
func (*Handlers) AddParticipationKey ¶
AddParticipationKey Add a participation key to the node (POST /v2/participation)
func (*Handlers) AppendKeys ¶
AppendKeys Append state proof keys to a participation key (POST /v2/participation/{participation-id})
func (*Handlers) DeleteParticipationKeyByID ¶
DeleteParticipationKeyByID Delete a given participation key by id (DELETE /v2/participation/{participation-id})
func (*Handlers) ExperimentalCheck ¶
ExperimentalCheck is only available when EnabledExperimentalAPI is true
func (*Handlers) GenerateParticipationKeys ¶
func (v2 *Handlers) GenerateParticipationKeys(ctx echo.Context, address string, params model.GenerateParticipationKeysParams) error
GenerateParticipationKeys generates and installs participation keys to the node. (POST /v2/participation/generate/{address})
func (*Handlers) GetApplicationBoxByName ¶
func (v2 *Handlers) GetApplicationBoxByName(ctx echo.Context, applicationID uint64, params model.GetApplicationBoxByNameParams) error
GetApplicationBoxByName returns the value of an application's box (GET /v2/applications/{application-id}/box)
func (*Handlers) GetApplicationBoxes ¶
func (v2 *Handlers) GetApplicationBoxes(ctx echo.Context, applicationID uint64, params model.GetApplicationBoxesParams) error
GetApplicationBoxes returns the box names of an application (GET /v2/applications/{application-id}/boxes)
func (*Handlers) GetApplicationByID ¶
GetApplicationByID returns application information by app idx. (GET /v2/applications/{application-id})
func (*Handlers) GetAssetByID ¶
GetAssetByID returns application information by app idx. (GET /v2/assets/{asset-id})
func (*Handlers) GetBlock ¶
func (v2 *Handlers) GetBlock(ctx echo.Context, round uint64, params model.GetBlockParams) error
GetBlock gets the block for the given round. (GET /v2/blocks/{round})
func (*Handlers) GetBlockHash ¶
GetBlockHash gets the block hash for the given round. (GET /v2/blocks/{round}/hash)
func (*Handlers) GetBlockLogs ¶
GetBlockLogs gets all of the logs (inner and outer app calls) for a given block (GET /v2/blocks/{round}/logs)
func (*Handlers) GetBlockTimeStampOffset ¶
GetBlockTimeStampOffset gets the timestamp offset. This is only available in dev mode. (GET /v2/devmode/blocks/offset)
func (*Handlers) GetBlockTxids ¶
GetBlockTxids gets all top level TxIDs in a block for the given round. (GET /v2/blocks/{round}/txids)
func (*Handlers) GetConfig ¶
GetConfig returns the merged (defaults + overrides) config file in json.
func (*Handlers) GetDebugSettingsProf ¶
GetDebugSettingsProf returns the current mutex and blocking rates.
func (*Handlers) GetLedgerStateDelta ¶
func (v2 *Handlers) GetLedgerStateDelta(ctx echo.Context, round uint64, params model.GetLedgerStateDeltaParams) error
GetLedgerStateDelta returns the deltas for a given round. This should be a representation of the ledgercore.StateDelta object. (GET /v2/deltas/{round})
func (*Handlers) GetLedgerStateDeltaForTransactionGroup ¶
func (v2 *Handlers) GetLedgerStateDeltaForTransactionGroup(ctx echo.Context, id string, params model.GetLedgerStateDeltaForTransactionGroupParams) error
GetLedgerStateDeltaForTransactionGroup retrieves the delta for a specified transaction group. (GET /v2/deltas/txn/group/{id})
func (*Handlers) GetLightBlockHeaderProof ¶
GetLightBlockHeaderProof Gets a proof of a light block header for a given round (GET /v2/blocks/{round}/lightheader/proof)
func (*Handlers) GetParticipationKeyByID ¶
GetParticipationKeyByID Get participation key info by id (GET /v2/participation/{participation-id})
func (*Handlers) GetParticipationKeys ¶
GetParticipationKeys Return a list of participation keys (GET /v2/participation)
func (*Handlers) GetPendingTransactions ¶
func (v2 *Handlers) GetPendingTransactions(ctx echo.Context, params model.GetPendingTransactionsParams) error
GetPendingTransactions returns the list of unconfirmed transactions currently in the transaction pool. (GET /v2/transactions/pending)
func (*Handlers) GetPendingTransactionsByAddress ¶
func (v2 *Handlers) GetPendingTransactionsByAddress(ctx echo.Context, addr string, params model.GetPendingTransactionsByAddressParams) error
GetPendingTransactionsByAddress takes an Algorand address and returns its associated list of unconfirmed transactions currently in the transaction pool. (GET /v2/accounts/{address}/transactions/pending)
func (*Handlers) GetStateProof ¶
GetStateProof returns the state proof for a given round. (GET /v2/stateproofs/{round})
func (*Handlers) GetSupply ¶
GetSupply gets the current supply reported by the ledger. (GET /v2/ledger/supply)
func (*Handlers) GetSyncRound ¶
GetSyncRound gets the sync round from the ledger. (GET /v2/ledger/sync)
func (*Handlers) GetTransactionGroupLedgerStateDeltasForRound ¶
func (v2 *Handlers) GetTransactionGroupLedgerStateDeltasForRound(ctx echo.Context, round uint64, params model.GetTransactionGroupLedgerStateDeltasForRoundParams) error
GetTransactionGroupLedgerStateDeltasForRound retrieves the deltas for transaction groups in a given round. (GET /v2/deltas/{round}/txn/group)
func (*Handlers) GetTransactionProof ¶
func (v2 *Handlers) GetTransactionProof(ctx echo.Context, round uint64, txid string, params model.GetTransactionProofParams) error
GetTransactionProof generates a Merkle proof for a transaction in a block. (GET /v2/blocks/{round}/transactions/{txid}/proof)
func (*Handlers) PendingTransactionInformation ¶
func (v2 *Handlers) PendingTransactionInformation(ctx echo.Context, txid string, params model.PendingTransactionInformationParams) error
PendingTransactionInformation returns a transaction with the specified txID from the transaction pool. If not found looks for the transaction in the last proto.MaxTxnLife rounds (GET /v2/transactions/pending/{txid})
func (*Handlers) PutDebugSettingsProf ¶
PutDebugSettingsProf sets the mutex and blocking rates and returns the old values.
func (*Handlers) RawTransaction ¶
RawTransaction broadcasts a raw transaction to the network. (POST /v2/transactions)
func (*Handlers) RawTransactionAsync ¶
RawTransactionAsync broadcasts a raw transaction to the network without ensuring it is accepted by transaction pool. (POST /v2/transactions/async)
func (*Handlers) SetBlockTimeStampOffset ¶
SetBlockTimeStampOffset sets the timestamp offset. This is only available in dev mode. (POST /v2/devmode/blocks/offset/{offset})
func (*Handlers) SetSyncRound ¶
SetSyncRound sets the sync round on the ledger. (POST /v2/ledger/sync/{round})
func (*Handlers) ShutdownNode ¶
func (v2 *Handlers) ShutdownNode(ctx echo.Context, params model.ShutdownNodeParams) error
ShutdownNode shuts down the node. (POST /v2/shutdown)
func (*Handlers) SimulateTransaction ¶
func (v2 *Handlers) SimulateTransaction(ctx echo.Context, params model.SimulateTransactionParams) error
SimulateTransaction simulates broadcasting a raw transaction to the network, returning relevant simulation results. (POST /v2/transactions/simulate)
func (*Handlers) StartCatchup ¶
func (v2 *Handlers) StartCatchup(ctx echo.Context, catchpoint string, params model.StartCatchupParams) error
StartCatchup Given a catchpoint, it starts catching up to this catchpoint (POST /v2/catchup/{catchpoint})
func (*Handlers) TealCompile ¶
func (v2 *Handlers) TealCompile(ctx echo.Context, params model.TealCompileParams) (err error)
TealCompile compiles TEAL code to binary, return both binary and hash (POST /v2/teal/compile)
func (*Handlers) TealDisassemble ¶
TealDisassemble disassembles the program bytecode in base64 into TEAL code. (POST /v2/teal/disassemble)
func (*Handlers) TealDryrun ¶
TealDryrun takes transactions and additional simulated ledger state and returns debugging information. (POST /v2/teal/dryrun)
func (*Handlers) TransactionParams ¶
TransactionParams returns the suggested parameters for constructing a new transaction. (GET /v2/transactions/params)
func (*Handlers) UnsetSyncRound ¶
UnsetSyncRound removes the sync round restriction from the ledger. (DELETE /v2/ledger/sync)
func (*Handlers) WaitForBlock ¶
WaitForBlock returns the node status after waiting for the given round. (GET /v2/status/wait-for-block-after/{round}/)
type LedgerForAPI ¶
type LedgerForAPI interface { LookupAccount(round basics.Round, addr basics.Address) (ledgercore.AccountData, basics.Round, basics.MicroAlgos, error) LookupLatest(addr basics.Address) (basics.AccountData, basics.Round, basics.MicroAlgos, error) LookupKv(round basics.Round, key string) ([]byte, error) LookupKeysByPrefix(round basics.Round, keyPrefix string, maxKeyNum uint64) ([]string, error) ConsensusParams(r basics.Round) (config.ConsensusParams, error) Latest() basics.Round LookupAsset(rnd basics.Round, addr basics.Address, aidx basics.AssetIndex) (ledgercore.AssetResource, error) LookupAssets(addr basics.Address, assetIDGT basics.AssetIndex, limit uint64) ([]ledgercore.AssetResourceWithIDs, basics.Round, error) LookupApplication(rnd basics.Round, addr basics.Address, aidx basics.AppIndex) (ledgercore.AppResource, error) BlockCert(rnd basics.Round) (blk bookkeeping.Block, cert agreement.Certificate, err error) LatestTotals() (basics.Round, ledgercore.AccountTotals, error) BlockHdr(rnd basics.Round) (blk bookkeeping.BlockHeader, err error) Wait(r basics.Round) chan struct{} WaitWithCancel(r basics.Round) (chan struct{}, func()) GetCreator(cidx basics.CreatableIndex, ctype basics.CreatableType) (basics.Address, bool, error) EncodedBlockCert(rnd basics.Round) (blk []byte, cert []byte, err error) Block(rnd basics.Round) (blk bookkeeping.Block, err error) AddressTxns(id basics.Address, r basics.Round) ([]transactions.SignedTxnWithAD, error) GetStateDeltaForRound(rnd basics.Round) (ledgercore.StateDelta, error) GetTracer() logic.EvalTracer }
LedgerForAPI describes the Ledger methods used by the v2 API.
type NodeInterface ¶
type NodeInterface interface { LedgerForAPI() LedgerForAPI Status() (s node.StatusReport, err error) GenesisID() string GenesisHash() crypto.Digest BroadcastSignedTxGroup(txgroup []transactions.SignedTxn) error AsyncBroadcastSignedTxGroup(txgroup []transactions.SignedTxn) error Simulate(request simulation.Request) (result simulation.Result, err error) GetPendingTransaction(txID transactions.Txid) (res node.TxnWithStatus, found bool) GetPendingTxnsFromPool() ([]transactions.SignedTxn, error) SuggestedFee() basics.MicroAlgos StartCatchup(catchpoint string) error AbortCatchup(catchpoint string) error Config() config.Local InstallParticipationKey(partKeyBinary []byte) (account.ParticipationID, error) ListParticipationKeys() ([]account.ParticipationRecord, error) GetParticipationKey(account.ParticipationID) (account.ParticipationRecord, error) RemoveParticipationKey(account.ParticipationID) error AppendParticipationKeys(id account.ParticipationID, keys account.StateProofKeys) error SetSyncRound(rnd uint64) error GetSyncRound() uint64 UnsetSyncRound() GetBlockTimeStampOffset() (*int64, error) SetBlockTimeStampOffset(int64) error }
NodeInterface represents node fns used by the handlers.
type PreEncodedSimulateRequest ¶
type PreEncodedSimulateRequest struct { TxnGroups []PreEncodedSimulateRequestTransactionGroup `codec:"txn-groups"` Round basics.Round `codec:"round,omitempty"` AllowEmptySignatures bool `codec:"allow-empty-signatures,omitempty"` AllowMoreLogging bool `codec:"allow-more-logging,omitempty"` AllowUnnamedResources bool `codec:"allow-unnamed-resources,omitempty"` ExtraOpcodeBudget uint64 `codec:"extra-opcode-budget,omitempty"` ExecTraceConfig simulation.ExecTraceConfig `codec:"exec-trace-config,omitempty"` FixSigners bool `codec:"fix-signers,omitempty"` }
PreEncodedSimulateRequest mirrors model.SimulateRequest
type PreEncodedSimulateRequestTransactionGroup ¶
type PreEncodedSimulateRequestTransactionGroup struct {
Txns []transactions.SignedTxn `codec:"txns"`
}
PreEncodedSimulateRequestTransactionGroup mirrors model.SimulateRequestTransactionGroup
type PreEncodedSimulateResponse ¶
type PreEncodedSimulateResponse struct { Version uint64 `codec:"version"` LastRound uint64 `codec:"last-round"` TxnGroups []PreEncodedSimulateTxnGroupResult `codec:"txn-groups"` EvalOverrides *model.SimulationEvalOverrides `codec:"eval-overrides,omitempty"` ExecTraceConfig simulation.ExecTraceConfig `codec:"exec-trace-config,omitempty"` InitialStates *model.SimulateInitialStates `codec:"initial-states,omitempty"` }
PreEncodedSimulateResponse mirrors model.SimulateResponse
type PreEncodedSimulateTxnGroupResult ¶
type PreEncodedSimulateTxnGroupResult struct { AppBudgetAdded *uint64 `codec:"app-budget-added,omitempty"` AppBudgetConsumed *uint64 `codec:"app-budget-consumed,omitempty"` FailedAt *[]uint64 `codec:"failed-at,omitempty"` FailureMessage *string `codec:"failure-message,omitempty"` UnnamedResourcesAccessed *model.SimulateUnnamedResourcesAccessed `codec:"unnamed-resources-accessed,omitempty"` Txns []PreEncodedSimulateTxnResult `codec:"txn-results"` }
PreEncodedSimulateTxnGroupResult mirrors model.SimulateTransactionGroupResult
type PreEncodedSimulateTxnResult ¶
type PreEncodedSimulateTxnResult struct { Txn PreEncodedTxInfo `codec:"txn-result"` AppBudgetConsumed *uint64 `codec:"app-budget-consumed,omitempty"` LogicSigBudgetConsumed *uint64 `codec:"logic-sig-budget-consumed,omitempty"` TransactionTrace *model.SimulationTransactionExecTrace `codec:"exec-trace,omitempty"` UnnamedResourcesAccessed *model.SimulateUnnamedResourcesAccessed `codec:"unnamed-resources-accessed,omitempty"` FixedSigner *string `codec:"fixed-signer,omitempty"` }
PreEncodedSimulateTxnResult mirrors model.SimulateTransactionResult
type PreEncodedTxInfo ¶
type PreEncodedTxInfo struct { AssetIndex *uint64 `codec:"asset-index,omitempty"` AssetClosingAmount *uint64 `codec:"asset-closing-amount,omitempty"` ApplicationIndex *uint64 `codec:"application-index,omitempty"` CloseRewards *uint64 `codec:"close-rewards,omitempty"` ClosingAmount *uint64 `codec:"closing-amount,omitempty"` ConfirmedRound *uint64 `codec:"confirmed-round,omitempty"` GlobalStateDelta *model.StateDelta `codec:"global-state-delta,omitempty"` LocalStateDelta *[]model.AccountStateDelta `codec:"local-state-delta,omitempty"` PoolError string `codec:"pool-error"` ReceiverRewards *uint64 `codec:"receiver-rewards,omitempty"` SenderRewards *uint64 `codec:"sender-rewards,omitempty"` Txn transactions.SignedTxn `codec:"txn"` Logs *[][]byte `codec:"logs,omitempty"` Inners *[]PreEncodedTxInfo `codec:"inner-txns,omitempty"` }
PreEncodedTxInfo represents the PendingTransaction response before it is encoded to a format.
func ConvertInnerTxn ¶
func ConvertInnerTxn(txn *transactions.SignedTxnWithAD) PreEncodedTxInfo
ConvertInnerTxn converts an inner SignedTxnWithAD to PreEncodedTxInfo for the REST API
Directories
¶
Path | Synopsis |
---|---|
generated
|
|
data
Package data provides primitives to interact with the openapi HTTP API.
|
Package data provides primitives to interact with the openapi HTTP API. |
experimental
Package experimental provides primitives to interact with the openapi HTTP API.
|
Package experimental provides primitives to interact with the openapi HTTP API. |
model
Package model provides primitives to interact with the openapi HTTP API.
|
Package model provides primitives to interact with the openapi HTTP API. |
nonparticipating/private
Package private provides primitives to interact with the openapi HTTP API.
|
Package private provides primitives to interact with the openapi HTTP API. |
nonparticipating/public
Package public provides primitives to interact with the openapi HTTP API.
|
Package public provides primitives to interact with the openapi HTTP API. |
participating/private
Package private provides primitives to interact with the openapi HTTP API.
|
Package private provides primitives to interact with the openapi HTTP API. |
participating/public
Package public provides primitives to interact with the openapi HTTP API.
|
Package public provides primitives to interact with the openapi HTTP API. |