Connection
A connection to a fullnode JSON RPC endpoint
Constructor Summary
Public Constructor | ||
public |
constructor(endpoint: string, commitment: Commitment) Establish a JSON RPC connection |
Member Summary
Public Members | ||
public get |
The default commitment used for requests |
Method Summary
Public Methods | ||
public |
async confirmTransaction(signature: TransactionSignature, commitment: Commitment): Promise<RpcResponseAndContext<SignatureResult>> Confirm the transaction identified by the specified signature. |
|
public |
async getAccountInfo(publicKey: PublicKey, commitment: Commitment): Promise<AccountInfo<Buffer>|nullliteral> Fetch all the account info for the specified public key |
|
public |
async getAccountInfoAndContext(publicKey: PublicKey, commitment: Commitment): Promise<RpcResponseAndContext<AccountInfo<Buffer>|nullliteral>> Fetch all the account info for the specified public key, return with context |
|
public |
async getBalance(publicKey: PublicKey, commitment: Commitment): Promise<number> Fetch the balance for the specified public key |
|
public |
async getBalanceAndContext(publicKey: PublicKey, commitment: Commitment): Promise<RpcResponseAndContext<number>> Fetch the balance for the specified public key, return with context |
|
public |
async getBlockTime(slot: number): Promise<number|nullliteral> Fetch the estimated production time of a block |
|
public |
async getClusterNodes(): Promise<Array<ContactInfo>> Return the list of nodes that are currently participating in the cluster |
|
public |
async getConfirmedBlock(slot: number): Promise<ConfirmedBlock> Fetch a list of Transactions and transaction statuses from the cluster for a confirmed block |
|
public |
async getConfirmedSignaturesForAddress(address: PublicKey, startSlot: number, endSlot: number): Promise<Array<TransactionSignature>> Fetch a list of all the confirmed signatures for transactions involving an address within a specified slot range. |
|
public |
async getConfirmedSignaturesForAddress2(address: PublicKey, options: ConfirmedSignaturesForAddress2Options): Promise<Array<ConfirmedSignatureInfo>> Returns confirmed signatures for transactions involving an address backwards in time from the provided signature or most recent confirmed block |
|
public |
async getConfirmedTransaction(signature: TransactionSignature): Promise<ConfirmedTransaction|nullliteral> Fetch a transaction details for a confirmed transaction |
|
public |
async getEpochInfo(commitment: Commitment): Promise<EpochInfo> Fetch the Epoch Info parameters |
|
public |
async getEpochSchedule(): Promise<EpochSchedule> Fetch the Epoch Schedule parameters |
|
public |
async getFeeCalculatorForBlockhash(blockhash: Blockhash, commitment: Commitment): Promise<RpcResponseAndContext<FeeCalculator|nullliteral>> Fetch the fee calculator for a recent blockhash from the cluster, return with context |
|
public |
async getFirstAvailableBlock(): Promise<number> Fetch the slot of the lowest confirmed block that has not been purged from the ledger |
|
public |
async getInflationGovernor(commitment: Commitment): Promise<InflationGovernor> Fetch the cluster InflationGovernor parameters |
|
public |
async getLargestAccounts(config: GetLargestAccountsConfig): Promise<RpcResponseAndContext<Array<AccountBalancePair>>> Fetch the 20 largest accounts with their current balances |
|
public |
Fetch the leader schedule for the current epoch |
|
public |
async getMinimumBalanceForRentExemption(dataLength: number, commitment: Commitment): Promise<number> Fetch the minimum balance needed to exempt an account of |
|
public |
async getMinimumLedgerSlot(): Promise<number> Fetch the lowest slot that the node has information about in its ledger. |
|
public |
async getNonce(nonceAccount: PublicKey, commitment: Commitment): Promise<NonceAccount|nullliteral> Fetch the contents of a Nonce account from the cluster |
|
public |
async getNonceAndContext(nonceAccount: PublicKey, commitment: Commitment): Promise<RpcResponseAndContext<NonceAccount|nullliteral>> Fetch the contents of a Nonce account from the cluster, return with context |
|
public |
async getParsedAccountInfo(publicKey: PublicKey, commitment: Commitment): Promise<RpcResponseAndContext<AccountInfo<Buffer|ParsedAccountData>|nullliteral>> Fetch parsed account info for the specified public key |
|
public |
async getParsedConfirmedTransaction(signature: TransactionSignature): Promise<ParsedConfirmedTransaction|nullliteral> Fetch parsed transaction details for a confirmed transaction |
|
public |
async getParsedProgramAccounts(programId: PublicKey, commitment: Commitment): Promise<Array<{pubkey: PublicKey, account: AccountInfo<Buffer|ParsedAccountData>}>> Fetch and parse all the accounts owned by the specified program id |
|
public |
async getParsedTokenAccountsByOwner(ownerAddress: PublicKey, filter: TokenAccountsFilter, commitment: Commitment): Promise<RpcResponseAndContext<Array<{pubkey: PublicKey, account: AccountInfo<ParsedAccountData>}>>>{pubkey:> Fetch parsed token accounts owned by the specified account |
|
public |
async getProgramAccounts(programId: PublicKey, commitment: Commitment): Promise<Array<{pubkey: PublicKey, account: AccountInfo<Buffer>}>>{pubkey:> Fetch all the accounts owned by the specified program id |
|
public |
async getRecentBlockhash(commitment: Commitment): Promise<{blockhash: Blockhash, feeCalculator: FeeCalculator}>{blockhash:> Fetch a recent blockhash from the cluster |
|
public |
async getRecentBlockhashAndContext(commitment: Commitment): Promise<RpcResponseAndContext<{blockhash: Blockhash, feeCalculator: FeeCalculator}>>{blockhash:> Fetch a recent blockhash from the cluster, return with context |
|
public |
async getRecentPerformanceSamples(limit: number): Promise<Array<PerfSample>> Fetch recent performance samples |
|
public |
async getSignatureStatus(signature: TransactionSignature, config: SignatureStatusConfig): Promise<RpcResponseAndContext<SignatureStatus|nullliteral>> Fetch the current status of a signature |
|
public |
async getSignatureStatuses(signatures: Array<TransactionSignature>, config: SignatureStatusConfig): Promise<RpcResponseAndContext<Array<SignatureStatus|nullliteral>>> Fetch the current statuses of a batch of signatures |
|
public |
async getSlot(commitment: Commitment): Promise<number> Fetch the current slot that the node is processing |
|
public |
async getSlotLeader(commitment: Commitment): Promise<string> Fetch the current slot leader of the cluster |
|
public |
async getStakeActivation(publicKey: PublicKey, commitment: Commitment, epoch: number): Promise<StakeActivationData> Returns epoch activation information for a stake account that has been delegated |
|
public |
async getSupply(commitment: Commitment): Promise<RpcResponseAndContext<Supply>> Fetch information about the current supply |
|
public |
async getTokenAccountBalance(tokenAddress: PublicKey, commitment: Commitment): Promise<RpcResponseAndContext<TokenAmount>> Fetch the current balance of a token account |
|
public |
async getTokenAccountsByOwner(ownerAddress: PublicKey, filter: TokenAccountsFilter, commitment: Commitment): Promise<RpcResponseAndContext<Array<{pubkey: PublicKey, account: AccountInfo<Buffer>}>>>{pubkey:> Fetch all the token accounts owned by the specified account |
|
public |
async getTokenLargestAccounts(mintAddress: PublicKey, commitment: Commitment): Promise<RpcResponseAndContext<Array<TokenAccountBalancePair>>> Fetch the 20 largest token accounts with their current balances for a given mint. |
|
public |
async getTokenSupply(tokenMintAddress: PublicKey, commitment: Commitment): Promise<RpcResponseAndContext<TokenAmount>> Fetch the current supply of a token mint |
|
public |
async getTotalSupply(commitment: Commitment): Promise<number> Fetch the current total currency supply of the cluster in lamports |
|
public |
async getTransactionCount(commitment: Commitment): Promise<number> Fetch the current transaction count of the cluster |
|
public |
async getVersion(): Promise<Version> Fetch the node version |
|
public |
async getVoteAccounts(commitment: Commitment): Promise<VoteAccountStatus> Return the list of nodes that are currently participating in the cluster |
|
public |
onAccountChange(publicKey: PublicKey, callback: AccountChangeCallback, commitment: Commitment): number Register a callback to be invoked whenever the specified account changes |
|
public |
onProgramAccountChange(programId: PublicKey, callback: ProgramAccountChangeCallback, commitment: Commitment): number Register a callback to be invoked whenever accounts owned by the specified program change |
|
public |
onRootChange(callback: RootChangeCallback): number Register a callback to be invoked upon root changes |
|
public |
onSignature(signature: TransactionSignature, callback: SignatureResultCallback, commitment: Commitment): number Register a callback to be invoked upon signature updates |
|
public |
onSlotChange(callback: SlotChangeCallback): number Register a callback to be invoked upon slot changes |
|
public |
async removeAccountChangeListener(id: number): Promise<void> Deregister an account notification callback |
|
public |
async removeProgramAccountChangeListener(id: number): Promise<void> Deregister an account notification callback |
|
public |
async removeRootChangeListener(id: number): Promise<void> Deregister a root notification callback |
|
public |
async removeSignatureListener(id: number): Promise<void> Deregister a signature notification callback |
|
public |
async removeSlotChangeListener(id: number): Promise<void> Deregister a slot notification callback |
|
public |
async requestAirdrop(to: PublicKey, amount: number): Promise<TransactionSignature> Request an allocation of lamports to the specified account |
|
public |
async sendEncodedTransaction(encodedTransaction: string, options: SendOptions): Promise<TransactionSignature> Send a transaction that has already been signed, serialized into the wire format, and encoded as a base64 string |
|
public |
async sendRawTransaction(rawTransaction: Buffer | Uint8Array | Array<number>, options: SendOptions): Promise<TransactionSignature> Send a transaction that has already been signed and serialized into the wire format |
|
public |
async sendTransaction(transaction: Transaction, signers: Array<Account>, options: SendOptions): Promise<TransactionSignature> Sign and send a transaction |
|
public |
async simulateTransaction(transaction: Transaction, signers: Array<Account>): Promise<RpcResponseAndContext<SimulatedTransactionResponse>> Simulate a transaction |
Public Constructors
public constructor(endpoint: string, commitment: Commitment) source
Establish a JSON RPC connection
Params:
Name | Type | Attribute | Description |
endpoint | string | URL to the fullnode JSON RPC endpoint |
|
commitment | Commitment |
|
optional default commitment level |
Public Members
Public Methods
public async confirmTransaction(signature: TransactionSignature, commitment: Commitment): Promise<RpcResponseAndContext<SignatureResult>> source
Confirm the transaction identified by the specified signature.
Params:
Name | Type | Attribute | Description |
signature | TransactionSignature | ||
commitment | Commitment |
|
public async getAccountInfo(publicKey: PublicKey, commitment: Commitment): Promise<AccountInfo<Buffer>|nullliteral> source
Fetch all the account info for the specified public key
Params:
Name | Type | Attribute | Description |
publicKey | PublicKey | ||
commitment | Commitment |
|
public async getAccountInfoAndContext(publicKey: PublicKey, commitment: Commitment): Promise<RpcResponseAndContext<AccountInfo<Buffer>|nullliteral>> source
Fetch all the account info for the specified public key, return with context
Params:
Name | Type | Attribute | Description |
publicKey | PublicKey | ||
commitment | Commitment |
|
public async getBalance(publicKey: PublicKey, commitment: Commitment): Promise<number> source
Fetch the balance for the specified public key
Params:
Name | Type | Attribute | Description |
publicKey | PublicKey | ||
commitment | Commitment |
|
public async getBalanceAndContext(publicKey: PublicKey, commitment: Commitment): Promise<RpcResponseAndContext<number>> source
Fetch the balance for the specified public key, return with context
Params:
Name | Type | Attribute | Description |
publicKey | PublicKey | ||
commitment | Commitment |
|
public async getBlockTime(slot: number): Promise<number|nullliteral> source
Fetch the estimated production time of a block
Params:
Name | Type | Attribute | Description |
slot | number |
public async getClusterNodes(): Promise<Array<ContactInfo>> source
Return the list of nodes that are currently participating in the cluster
public async getConfirmedBlock(slot: number): Promise<ConfirmedBlock> source
Fetch a list of Transactions and transaction statuses from the cluster for a confirmed block
Params:
Name | Type | Attribute | Description |
slot | number |
public async getConfirmedSignaturesForAddress(address: PublicKey, startSlot: number, endSlot: number): Promise<Array<TransactionSignature>> source
Fetch a list of all the confirmed signatures for transactions involving an address within a specified slot range. Max range allowed is 10,000 slots.
public async getConfirmedSignaturesForAddress2(address: PublicKey, options: ConfirmedSignaturesForAddress2Options): Promise<Array<ConfirmedSignatureInfo>> source
Returns confirmed signatures for transactions involving an address backwards in time from the provided signature or most recent confirmed block
Params:
Name | Type | Attribute | Description |
address | PublicKey | queried address |
|
options | ConfirmedSignaturesForAddress2Options |
|
options |
public async getConfirmedTransaction(signature: TransactionSignature): Promise<ConfirmedTransaction|nullliteral> source
Fetch a transaction details for a confirmed transaction
Params:
Name | Type | Attribute | Description |
signature | TransactionSignature |
public async getEpochInfo(commitment: Commitment): Promise<EpochInfo> source
Fetch the Epoch Info parameters
Params:
Name | Type | Attribute | Description |
commitment | Commitment |
|
public async getFeeCalculatorForBlockhash(blockhash: Blockhash, commitment: Commitment): Promise<RpcResponseAndContext<FeeCalculator|nullliteral>> source
Fetch the fee calculator for a recent blockhash from the cluster, return with context
Params:
Name | Type | Attribute | Description |
blockhash | Blockhash | ||
commitment | Commitment |
|
public async getFirstAvailableBlock(): Promise<number> source
Fetch the slot of the lowest confirmed block that has not been purged from the ledger
public async getInflationGovernor(commitment: Commitment): Promise<InflationGovernor> source
Fetch the cluster InflationGovernor parameters
Params:
Name | Type | Attribute | Description |
commitment | Commitment |
|
public async getLargestAccounts(config: GetLargestAccountsConfig): Promise<RpcResponseAndContext<Array<AccountBalancePair>>> source
Fetch the 20 largest accounts with their current balances
Params:
Name | Type | Attribute | Description |
config | GetLargestAccountsConfig |
|
public async getLeaderSchedule(): Promise<RpcResponseAndContext<LeaderSchedule>> source
Fetch the leader schedule for the current epoch
public async getMinimumBalanceForRentExemption(dataLength: number, commitment: Commitment): Promise<number> source
Fetch the minimum balance needed to exempt an account of dataLength
size from rent
Params:
Name | Type | Attribute | Description |
dataLength | number | ||
commitment | Commitment |
|
public async getMinimumLedgerSlot(): Promise<number> source
Fetch the lowest slot that the node has information about in its ledger. This value may increase over time if the node is configured to purge older ledger data
public async getNonce(nonceAccount: PublicKey, commitment: Commitment): Promise<NonceAccount|nullliteral> source
Fetch the contents of a Nonce account from the cluster
Params:
Name | Type | Attribute | Description |
nonceAccount | PublicKey | ||
commitment | Commitment |
|
public async getNonceAndContext(nonceAccount: PublicKey, commitment: Commitment): Promise<RpcResponseAndContext<NonceAccount|nullliteral>> source
Fetch the contents of a Nonce account from the cluster, return with context
Params:
Name | Type | Attribute | Description |
nonceAccount | PublicKey | ||
commitment | Commitment |
|
public async getParsedAccountInfo(publicKey: PublicKey, commitment: Commitment): Promise<RpcResponseAndContext<AccountInfo<Buffer|ParsedAccountData>|nullliteral>> source
Fetch parsed account info for the specified public key
Params:
Name | Type | Attribute | Description |
publicKey | PublicKey | ||
commitment | Commitment |
|
public async getParsedConfirmedTransaction(signature: TransactionSignature): Promise<ParsedConfirmedTransaction|nullliteral> source
Fetch parsed transaction details for a confirmed transaction
Params:
Name | Type | Attribute | Description |
signature | TransactionSignature |
public async getParsedProgramAccounts(programId: PublicKey, commitment: Commitment): Promise<Array<{pubkey: PublicKey, account: AccountInfo<Buffer|ParsedAccountData>}>> source
Fetch and parse all the accounts owned by the specified program id
Params:
Name | Type | Attribute | Description |
programId | PublicKey | ||
commitment | Commitment |
|
public async getParsedTokenAccountsByOwner(ownerAddress: PublicKey, filter: TokenAccountsFilter, commitment: Commitment): Promise<RpcResponseAndContext<Array<{pubkey: PublicKey, account: AccountInfo<ParsedAccountData>}>>>{pubkey:> source
Fetch parsed token accounts owned by the specified account
Params:
Name | Type | Attribute | Description |
ownerAddress | PublicKey | ||
filter | TokenAccountsFilter | ||
commitment | Commitment |
|
Return:
Promise<RpcResponseAndContext<Array<{pubkey: PublicKey, account: AccountInfo<ParsedAccountData>}>>>{pubkey:> |
public async getProgramAccounts(programId: PublicKey, commitment: Commitment): Promise<Array<{pubkey: PublicKey, account: AccountInfo<Buffer>}>>{pubkey:> source
Fetch all the accounts owned by the specified program id
Params:
Name | Type | Attribute | Description |
programId | PublicKey | ||
commitment | Commitment |
|
public async getRecentBlockhash(commitment: Commitment): Promise<{blockhash: Blockhash, feeCalculator: FeeCalculator}>{blockhash:> source
Fetch a recent blockhash from the cluster
Params:
Name | Type | Attribute | Description |
commitment | Commitment |
|
public async getRecentBlockhashAndContext(commitment: Commitment): Promise<RpcResponseAndContext<{blockhash: Blockhash, feeCalculator: FeeCalculator}>>{blockhash:> source
Fetch a recent blockhash from the cluster, return with context
Params:
Name | Type | Attribute | Description |
commitment | Commitment |
|
Return:
Promise<RpcResponseAndContext<{blockhash: Blockhash, feeCalculator: FeeCalculator}>>{blockhash:> |
public async getRecentPerformanceSamples(limit: number): Promise<Array<PerfSample>> source
Fetch recent performance samples
Params:
Name | Type | Attribute | Description |
limit | number |
|
public async getSignatureStatus(signature: TransactionSignature, config: SignatureStatusConfig): Promise<RpcResponseAndContext<SignatureStatus|nullliteral>> source
Fetch the current status of a signature
Params:
Name | Type | Attribute | Description |
signature | TransactionSignature | ||
config | SignatureStatusConfig |
|
public async getSignatureStatuses(signatures: Array<TransactionSignature>, config: SignatureStatusConfig): Promise<RpcResponseAndContext<Array<SignatureStatus|nullliteral>>> source
Fetch the current statuses of a batch of signatures
Params:
Name | Type | Attribute | Description |
signatures | Array<TransactionSignature> | ||
config | SignatureStatusConfig |
|
public async getSlot(commitment: Commitment): Promise<number> source
Fetch the current slot that the node is processing
Params:
Name | Type | Attribute | Description |
commitment | Commitment |
|
public async getSlotLeader(commitment: Commitment): Promise<string> source
Fetch the current slot leader of the cluster
Params:
Name | Type | Attribute | Description |
commitment | Commitment |
|
public async getStakeActivation(publicKey: PublicKey, commitment: Commitment, epoch: number): Promise<StakeActivationData> source
Returns epoch activation information for a stake account that has been delegated
Params:
Name | Type | Attribute | Description |
publicKey | PublicKey | ||
commitment | Commitment |
|
|
epoch | number |
|
public async getSupply(commitment: Commitment): Promise<RpcResponseAndContext<Supply>> source
Fetch information about the current supply
Params:
Name | Type | Attribute | Description |
commitment | Commitment |
|
public async getTokenAccountBalance(tokenAddress: PublicKey, commitment: Commitment): Promise<RpcResponseAndContext<TokenAmount>> source
Fetch the current balance of a token account
Params:
Name | Type | Attribute | Description |
tokenAddress | PublicKey | ||
commitment | Commitment |
|
public async getTokenAccountsByOwner(ownerAddress: PublicKey, filter: TokenAccountsFilter, commitment: Commitment): Promise<RpcResponseAndContext<Array<{pubkey: PublicKey, account: AccountInfo<Buffer>}>>>{pubkey:> source
Fetch all the token accounts owned by the specified account
Params:
Name | Type | Attribute | Description |
ownerAddress | PublicKey | ||
filter | TokenAccountsFilter | ||
commitment | Commitment |
|
Return:
Promise<RpcResponseAndContext<Array<{pubkey: PublicKey, account: AccountInfo<Buffer>}>>>{pubkey:> |
public async getTokenLargestAccounts(mintAddress: PublicKey, commitment: Commitment): Promise<RpcResponseAndContext<Array<TokenAccountBalancePair>>> source
Fetch the 20 largest token accounts with their current balances for a given mint.
Params:
Name | Type | Attribute | Description |
mintAddress | PublicKey | ||
commitment | Commitment |
|
public async getTokenSupply(tokenMintAddress: PublicKey, commitment: Commitment): Promise<RpcResponseAndContext<TokenAmount>> source
Fetch the current supply of a token mint
Params:
Name | Type | Attribute | Description |
tokenMintAddress | PublicKey | ||
commitment | Commitment |
|
public async getTotalSupply(commitment: Commitment): Promise<number> source
Fetch the current total currency supply of the cluster in lamports
Params:
Name | Type | Attribute | Description |
commitment | Commitment |
|
public async getTransactionCount(commitment: Commitment): Promise<number> source
Fetch the current transaction count of the cluster
Params:
Name | Type | Attribute | Description |
commitment | Commitment |
|
public async getVoteAccounts(commitment: Commitment): Promise<VoteAccountStatus> source
Return the list of nodes that are currently participating in the cluster
Params:
Name | Type | Attribute | Description |
commitment | Commitment |
|
public onAccountChange(publicKey: PublicKey, callback: AccountChangeCallback, commitment: Commitment): number source
Register a callback to be invoked whenever the specified account changes
Params:
Name | Type | Attribute | Description |
publicKey | PublicKey | Public key of the account to monitor |
|
callback | AccountChangeCallback | Function to invoke whenever the account is changed |
|
commitment | Commitment |
|
Specify the commitment level account changes must reach before notification |
public onProgramAccountChange(programId: PublicKey, callback: ProgramAccountChangeCallback, commitment: Commitment): number source
Register a callback to be invoked whenever accounts owned by the specified program change
Params:
Name | Type | Attribute | Description |
programId | PublicKey | Public key of the program to monitor |
|
callback | ProgramAccountChangeCallback | Function to invoke whenever the account is changed |
|
commitment | Commitment |
|
Specify the commitment level account changes must reach before notification |
public onRootChange(callback: RootChangeCallback): number source
Register a callback to be invoked upon root changes
Params:
Name | Type | Attribute | Description |
callback | RootChangeCallback | Function to invoke whenever the root changes |
public onSignature(signature: TransactionSignature, callback: SignatureResultCallback, commitment: Commitment): number source
Register a callback to be invoked upon signature updates
Params:
Name | Type | Attribute | Description |
signature | TransactionSignature | Transaction signature string in base 58 |
|
callback | SignatureResultCallback | Function to invoke on signature notifications |
|
commitment | Commitment |
|
Specify the commitment level signature must reach before notification |
public onSlotChange(callback: SlotChangeCallback): number source
Register a callback to be invoked upon slot changes
Params:
Name | Type | Attribute | Description |
callback | SlotChangeCallback | Function to invoke whenever the slot changes |
public async removeAccountChangeListener(id: number): Promise<void> source
Deregister an account notification callback
Params:
Name | Type | Attribute | Description |
id | number | subscription id to deregister |
public async removeProgramAccountChangeListener(id: number): Promise<void> source
Deregister an account notification callback
Params:
Name | Type | Attribute | Description |
id | number | subscription id to deregister |
public async removeRootChangeListener(id: number): Promise<void> source
Deregister a root notification callback
Params:
Name | Type | Attribute | Description |
id | number | subscription id to deregister |
public async removeSignatureListener(id: number): Promise<void> source
Deregister a signature notification callback
Params:
Name | Type | Attribute | Description |
id | number | subscription id to deregister |
public async removeSlotChangeListener(id: number): Promise<void> source
Deregister a slot notification callback
Params:
Name | Type | Attribute | Description |
id | number | subscription id to deregister |
public async requestAirdrop(to: PublicKey, amount: number): Promise<TransactionSignature> source
Request an allocation of lamports to the specified account
public async sendEncodedTransaction(encodedTransaction: string, options: SendOptions): Promise<TransactionSignature> source
Send a transaction that has already been signed, serialized into the wire format, and encoded as a base64 string
Params:
Name | Type | Attribute | Description |
encodedTransaction | string | ||
options | SendOptions |
|
public async sendRawTransaction(rawTransaction: Buffer | Uint8Array | Array<number>, options: SendOptions): Promise<TransactionSignature> source
Send a transaction that has already been signed and serialized into the wire format
Params:
Name | Type | Attribute | Description |
rawTransaction | Buffer | Uint8Array | Array<number> | ||
options | SendOptions |
|
public async sendTransaction(transaction: Transaction, signers: Array<Account>, options: SendOptions): Promise<TransactionSignature> source
Sign and send a transaction
Params:
Name | Type | Attribute | Description |
transaction | Transaction | ||
signers | Array<Account> | ||
options | SendOptions |
public async simulateTransaction(transaction: Transaction, signers: Array<Account>): Promise<RpcResponseAndContext<SimulatedTransactionResponse>> source
Simulate a transaction
Params:
Name | Type | Attribute | Description |
transaction | Transaction | ||
signers | Array<Account> |