Skip to content

AlgodClient

Defined in: packages/algod_client/src/client.ts:5

new AlgodClient(config): AlgodClient

Defined in: packages/algod_client/src/client.ts:6

ClientConfig

AlgodClient

AlgodApi.constructor

readonly httpRequest: BaseHttpRequest

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

AlgodApi.httpRequest

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>

AlgodApi.accountApplicationInformation


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>

AlgodApi.accountAssetInformation


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>

AlgodApi.accountInformation


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>

AlgodApi.applicationBoxByName


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>

AlgodApi.applicationBoxes


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>

AlgodApi.applicationById


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>

AlgodApi.assetById


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

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

number | bigint

boolean

Promise<BlockResponse>

AlgodApi.block


blockHash(round): Promise<BlockHashResponse>

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

number | bigint

Promise<BlockHashResponse>

AlgodApi.blockHash


blockTimeStampOffset(): Promise<GetBlockTimeStampOffsetResponse>

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

Gets the current timestamp offset.

Promise<GetBlockTimeStampOffsetResponse>

AlgodApi.blockTimeStampOffset


blockTxIds(round): Promise<BlockTxidsResponse>

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

number | bigint

Promise<BlockTxidsResponse>

AlgodApi.blockTxIds


genesis(): Promise<Genesis>

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

Returns the entire genesis file in json.

Promise<Genesis>

AlgodApi.genesis


healthCheck(): Promise<void>

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

Promise<void>

AlgodApi.healthCheck


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>

AlgodApi.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>

AlgodApi.ledgerStateDeltaForTransactionGroup


lightBlockHeaderProof(round): Promise<LightBlockHeaderProof>

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

number | bigint

Promise<LightBlockHeaderProof>

AlgodApi.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>

AlgodApi.pendingTransactionInformation


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>

AlgodApi.pendingTransactions


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>

AlgodApi.pendingTransactionsByAddress


ready(): Promise<void>

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

Promise<void>

AlgodApi.ready


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>

AlgodApi.sendRawTransaction


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>

AlgodApi.setBlockTimeStampOffset


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>

AlgodApi.setSyncRound


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>

AlgodApi.simulateRawTransactions


simulateTransactions(body): Promise<SimulateResponse>

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

SimulateRequest

Promise<SimulateResponse>

AlgodApi.simulateTransactions


stateProof(round): Promise<StateProof>

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

number | bigint

Promise<StateProof>

AlgodApi.stateProof


status(): Promise<NodeStatusResponse>

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

Promise<NodeStatusResponse>

AlgodApi.status


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>

AlgodApi.statusAfterBlock


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; }>

AlgodApi.suggestedParams


supply(): Promise<SupplyResponse>

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

Promise<SupplyResponse>

AlgodApi.supply


syncRound(): Promise<GetSyncRoundResponse>

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

Gets the minimum sync round for the ledger.

Promise<GetSyncRoundResponse>

AlgodApi.syncRound


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>

AlgodApi.tealCompile


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>

AlgodApi.tealDisassemble


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>

AlgodApi.transactionGroupLedgerStateDeltasForRound


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; }>

AlgodApi.transactionParams


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>

AlgodApi.transactionProof


unsetSyncRound(): Promise<void>

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

Unset the ledger sync round.

Promise<void>

AlgodApi.unsetSyncRound


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>

AlgodApi.version