Skip to content

@loktin/sdk / index / Loktin

Interface: Loktin ​

Defined in: @loktin/sdk/dist/loktin.d.ts:22

A configured Loktin SDK instance.

Properties ​

config ​

readonly config: ResolvedConfig

Defined in: @loktin/sdk/dist/loktin.d.ts:23

Methods ​

ledgerInfo() ​

ledgerInfo(): Promise<LedgerInfo>

Defined in: @loktin/sdk/dist/loktin.d.ts:33

Reads the latest ledger and the longest entry time to live, in one RPC call (W57).

Returns ​

Promise<LedgerInfo>


read() ​

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

Defined in: @loktin/sdk/dist/loktin.d.ts:29

Simulates a read-only call (G8, K9). It costs one RPC call, retried on network errors only. The first token call also looks up the token contract, once per instance (W58).

Type Parameters ​

T ​

T = unknown

Parameters ​

contract ​

CallTarget

method ​

string

args? ​

Readonly<Record<string, unknown>>

Returns ​

Promise<T>


write() ​

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

Defined in: @loktin/sdk/dist/loktin.d.ts:31

Builds, simulates, signs, sends and confirms a call (K5, K6).

Type Parameters ​

T ​

T = unknown

Parameters ​

contract ​

CallTarget

method ​

string

args? ​

Readonly<Record<string, unknown>>

Returns ​

Promise<WriteResult<T>>

Built on Stellar