Skip to content

AlgodApi

Defined in: packages/algod_client/src/apis/api-service.ts:70

new AlgodApi(httpRequest): AlgodApi

Defined in: packages/algod_client/src/apis/api-service.ts:71

BaseHttpRequest

AlgodApi

readonly httpRequest: BaseHttpRequest

Defined in: packages/algod_client/src/apis/api-service.ts:71

accountApplicationInformation(address, applicationId): Promise<AccountApplicationResponse>

Defined in: packages/algod_client/src/apis/api-service.ts:80

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.

ReadableAddress

number | bigint

Promise<AccountApplicationResponse>


accountAssetInformation(address, assetId): Promise<AccountAssetResponse>

Defined in: packages/algod_client/src/apis/api-service.ts:100

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.

ReadableAddress

number | bigint

Promise<AccountAssetResponse>


accountInformation(address, params?): Promise<Account>

Defined in: packages/algod_client/src/apis/api-service.ts:120

Given a specific account public key, this call returns the account’s status, balance and spendable amounts

ReadableAddress

"all" | "none"

Promise<Account>


applicationBoxByName(applicationId, boxName): Promise<Box>

Defined in: packages/algod_client/src/apis/api-service.ts:789

Given an application ID and box name, it returns the round, box name, and value.

number | bigint

Uint8Array

Promise<Box>


applicationBoxes(applicationId, params?): Promise<BoxesResponse>

Defined in: packages/algod_client/src/apis/api-service.ts:160

Given an application ID, return all Box names. No particular ordering is guaranteed. Request fails when client or server-side configured limits prevent returning all Box names.

number | bigint

number

Promise<BoxesResponse>


applicationById(applicationId): Promise<Application>

Defined in: packages/algod_client/src/apis/api-service.ts:180

Given a application ID, it returns application information including creator, approval and clear programs, global and local schemas, and global state.

number | bigint

Promise<Application>


assetById(assetId): Promise<Asset>

Defined in: packages/algod_client/src/apis/api-service.ts:200

Given a asset ID, it returns asset information including creator, name, total supply and special addresses.

number | bigint

Promise<Asset>


block(round, params?): Promise<BlockResponse>

Defined in: packages/algod_client/src/apis/api-service.ts:217

number | bigint

boolean

Promise<BlockResponse>


blockHash(round): Promise<BlockHashResponse>

Defined in: packages/algod_client/src/apis/api-service.ts:234

number | bigint

Promise<BlockHashResponse>


blockTimeStampOffset(): Promise<GetBlockTimeStampOffsetResponse>

Defined in: packages/algod_client/src/apis/api-service.ts:254

Gets the current timestamp offset.

Promise<GetBlockTimeStampOffsetResponse>


blockTxIds(round): Promise<BlockTxidsResponse>

Defined in: packages/algod_client/src/apis/api-service.ts:271

number | bigint

Promise<BlockTxidsResponse>


genesis(): Promise<Genesis>

Defined in: packages/algod_client/src/apis/api-service.ts:291

Returns the entire genesis file in json.

Promise<Genesis>


healthCheck(): Promise<void>

Defined in: packages/algod_client/src/apis/api-service.ts:308

Promise<void>


ledgerStateDelta(round): Promise<LedgerStateDelta>

Defined in: packages/algod_client/src/apis/api-service.ts:326

Get ledger deltas for a round.

number | bigint

Promise<LedgerStateDelta>


ledgerStateDeltaForTransactionGroup(id): Promise<LedgerStateDelta>

Defined in: packages/algod_client/src/apis/api-service.ts:346

Get a ledger delta for a given transaction group.

string

Promise<LedgerStateDelta>


lightBlockHeaderProof(round): Promise<LightBlockHeaderProof>

Defined in: packages/algod_client/src/apis/api-service.ts:363

number | bigint

Promise<LightBlockHeaderProof>


pendingTransactionInformation(txId): Promise<PendingTransactionResponse>

Defined in: packages/algod_client/src/apis/api-service.ts:387

Given a transaction ID of a recently submitted transaction, it returns information about it. There are several cases when this might succeed:

  • transaction committed (committed round > 0)
  • transaction still in the pool (committed round = 0, pool error = "")
  • transaction removed from pool due to error (committed round = 0, pool error != "") Or the transaction may have happened sufficiently long ago that the node no longer remembers it, and this will return an error.

string

Promise<PendingTransactionResponse>


pendingTransactions(params?): Promise<PendingTransactionsResponse>

Defined in: packages/algod_client/src/apis/api-service.ts:407

Get the list of pending transactions, sorted by priority, in decreasing order, truncated at the end at MAX. If MAX = 0, returns all pending transactions.

number

Promise<PendingTransactionsResponse>


pendingTransactionsByAddress(address, params?): Promise<PendingTransactionsResponse>

Defined in: packages/algod_client/src/apis/api-service.ts:427

Get the list of pending transactions by address, sorted by priority, in decreasing order, truncated at the end at MAX. If MAX = 0, returns all pending transactions.

ReadableAddress

number

Promise<PendingTransactionsResponse>


ready(): Promise<void>

Defined in: packages/algod_client/src/apis/api-service.ts:465

Promise<void>


sendRawTransaction(stxOrStxs): Promise<PostTransactionsResponse>

Defined in: packages/algod_client/src/apis/api-service.ts:773

Send a signed transaction or array of signed transactions to the network.

Uint8Array<ArrayBufferLike> | Uint8Array<ArrayBufferLike>[]

Promise<PostTransactionsResponse>


setBlockTimeStampOffset(offset): Promise<void>

Defined in: packages/algod_client/src/apis/api-service.ts:483

Sets the timestamp offset (seconds) for blocks in dev mode. Providing an offset of 0 will unset this value and try to use the real clock for the timestamp.

number

Promise<void>


setSyncRound(round): Promise<void>

Defined in: packages/algod_client/src/apis/api-service.ts:501

Sets the minimum sync round on the ledger.

number | bigint

Promise<void>


simulateRawTransactions(stxOrStxs): Promise<SimulateResponse>

Defined in: packages/algod_client/src/apis/api-service.ts:822

Simulate an encoded signed transaction or array of encoded signed transactions.

Uint8Array<ArrayBufferLike> | Uint8Array<ArrayBufferLike>[]

Promise<SimulateResponse>


simulateTransactions(body): Promise<SimulateResponse>

Defined in: packages/algod_client/src/apis/api-service.ts:516

SimulateRequest

Promise<SimulateResponse>


stateProof(round): Promise<StateProof>

Defined in: packages/algod_client/src/apis/api-service.ts:538

number | bigint

Promise<StateProof>


status(): Promise<NodeStatusResponse>

Defined in: packages/algod_client/src/apis/api-service.ts:555

Promise<NodeStatusResponse>


statusAfterBlock(round): Promise<NodeStatusResponse>

Defined in: packages/algod_client/src/apis/api-service.ts:575

Waits for a block to appear after round {round} and returns the node’s status at the time. There is a 1 minute timeout, when reached the current status is returned regardless of whether or not it is the round after the given round.

number | bigint

Promise<NodeStatusResponse>


suggestedParams(): Promise<{ consensusVersion: string; fee: bigint; firstValid: bigint; flatFee: boolean; genesisHash: Uint8Array; genesisId: string; lastValid: bigint; minFee: bigint; }>

Defined in: packages/algod_client/src/apis/api-service.ts:797

Returns the common needed parameters for a new transaction.

Promise<{ consensusVersion: string; fee: bigint; firstValid: bigint; flatFee: boolean; genesisHash: Uint8Array; genesisId: string; lastValid: bigint; minFee: bigint; }>


supply(): Promise<SupplyResponse>

Defined in: packages/algod_client/src/apis/api-service.ts:592

Promise<SupplyResponse>


syncRound(): Promise<GetSyncRoundResponse>

Defined in: packages/algod_client/src/apis/api-service.ts:612

Gets the minimum sync round for the ledger.

Promise<GetSyncRoundResponse>


tealCompile(body, params?): Promise<CompileResponse>

Defined in: packages/algod_client/src/apis/api-service.ts:632

Given TEAL source code in plain text, return base64 encoded program bytes and base32 SHA512_256 hash of program bytes (Address style). This endpoint is only enabled when a node’s configuration file sets EnableDeveloperAPI to true.

string

boolean

Promise<CompileResponse>


tealDisassemble(body): Promise<DisassembleResponse>

Defined in: packages/algod_client/src/apis/api-service.ts:657

Given the program bytes, return the TEAL source code in plain text. This endpoint is only enabled when a node’s configuration file sets EnableDeveloperAPI to true.

Uint8Array

Promise<DisassembleResponse>


transactionGroupLedgerStateDeltasForRound()

Section titled “transactionGroupLedgerStateDeltasForRound()”

transactionGroupLedgerStateDeltasForRound(round): Promise<TransactionGroupLedgerStateDeltasForRoundResponse>

Defined in: packages/algod_client/src/apis/api-service.ts:681

Get ledger deltas for transaction groups in a given round.

number | bigint

Promise<TransactionGroupLedgerStateDeltasForRoundResponse>


transactionParams(): Promise<{ consensusVersion: string; fee: bigint; firstValid: bigint; flatFee: boolean; genesisHash: Uint8Array; genesisId: string; lastValid: bigint; minFee: bigint; }>

Defined in: packages/algod_client/src/apis/api-service.ts:815

Returns the common needed parameters for a new transaction.

Promise<{ consensusVersion: string; fee: bigint; firstValid: bigint; flatFee: boolean; genesisHash: Uint8Array; genesisId: string; lastValid: bigint; minFee: bigint; }>


transactionProof(round, txId, params?): Promise<TransactionProof>

Defined in: packages/algod_client/src/apis/api-service.ts:715

number | bigint

string

"sha512_256" | "sha256"

Promise<TransactionProof>


unsetSyncRound(): Promise<void>

Defined in: packages/algod_client/src/apis/api-service.ts:735

Unset the ledger sync round.

Promise<void>


version(): Promise<Version>

Defined in: packages/algod_client/src/apis/api-service.ts:753

Retrieves the supported API versions, binary build versions, and genesis information.

Promise<Version>