Skip to content
docs

NearRpc

Defined in: wallet-near/src/rpc.ts:110

The NEAR JSON-RPC calls a wallet uses, with parsed results.

new NearRpc(fetch): NearRpc

Defined in: wallet-near/src/rpc.ts:111

NearFetch

NearRpc

readonly fetch: NearFetch

Defined in: wallet-near/src/rpc.ts:111

callFunction<T>(contract, method, args?): Promise<T>

Defined in: wallet-near/src/rpc.ts:134

View call; the JSON-decoded return value (null for an empty result).

T = unknown

string

string

Record<string, unknown> = {}

Promise<T>


gasPrice(): Promise<bigint>

Defined in: wallet-near/src/rpc.ts:150

Promise<bigint>


latestBlockHash(): Promise<string>

Defined in: wallet-near/src/rpc.ts:144

Promise<string>


sendTx(signedTxBase64, waitUntil?): Promise<RawFinalOutcome>

Defined in: wallet-near/src/rpc.ts:156

string

"NONE" | "INCLUDED" | "EXECUTED_OPTIMISTIC" | "INCLUDED_FINAL" | "EXECUTED" | "FINAL"

Promise<RawFinalOutcome>


txStatus(hash, senderId): Promise<RawFinalOutcome | undefined>

Defined in: wallet-near/src/rpc.ts:161

undefined when the node does not know the transaction.

string

string

Promise<RawFinalOutcome | undefined>


viewAccessKey(accountId, publicKey): Promise<RawAccessKeyView | undefined>

Defined in: wallet-near/src/rpc.ts:124

undefined when the key is not on the account.

string

string

Promise<RawAccessKeyView | undefined>


viewAccount(accountId): Promise<RawAccountView | undefined>

Defined in: wallet-near/src/rpc.ts:114

undefined when the account does not exist.

string

Promise<RawAccountView | undefined>