Properties
_getPollInterval
_getPollInterval: ((...args) => Promise<number>)
Type declaration
- (...args): Promise<number>
Parameters
Rest
...args: [type: "key-block" | "micro-block"] | [type: "key-block" | "micro-block", Omit<{
_expectedMineRate?: number;
_microBlockCycle?: number;
onNode: Node;
}, "onNode" | "onAccount" | "onCompiler"> & Partial<{
_expectedMineRate?: number;
_microBlockCycle?: number;
onNode: Node;
}>]
Returns Promise<number>
aensBid
Type declaration
- (...args): Promise<AensClaimReturnType>
Parameters
Rest
...args: [name: `${string}.chain`, nameFee: string | number | BigNumber] | [name: `${string}.chain`, nameFee: string | number | BigNumber, Omit<Omit<AensClaimOptions, "nameFee">, "onNode" | "onAccount" | "onCompiler"> & Partial<Omit<Omit<AensClaimOptions, "nameFee">, "onAccount"> & {
onAccount: OnAccount;
}>]
aensQuery
aensQuery: ((...args) => Promise<Readonly<{ id: string; owner?: string; pointers: { id: string; key: string; }[]; ttl: number; } & { extendTtl: ((nameTtl?,
options?) => Promise<SendTransactionReturnType> & (Promise<Readonly<{ id: string; owner?: string | undefined; ttl: number; pointers: { key: string; id: string; }[]; } & { id: `nm_${string}`; owner: `ak_${string}`; pointers: NamePointer[] | KeyPointers; ... 4 more ...; extendTtl: (nameTtl?: number | undefined, options?: Omit<...> | undefined) => Promise<...> & Promis...
)); id: `nm_${string}`; owner: `ak_${string}`; pointers: NamePointer[] | KeyPointers; revoke: ((options?) => Promise<SendTransactionReturnType>); transfer: ((account,
options?) => Promise<SendTransactionReturnType> & (Promise<Readonly<{ id: string; owner?: string | undefined; ttl: number; pointers: { key: string; id: string; }[]; } & { id: `nm_${string}`; owner: `ak_${string}`; pointers: NamePointer[] | KeyPointers; ... 4 more ...; extendTtl: (nameTtl?: number | undefined, options?: Omit<...> | undefined) => Promise<...> & Promis...
)); ttl: number; update: ((pointers,
options?) => Promise<SendTransactionReturnType> & (Promise<Readonly<{ id: string; owner?: string | undefined; ttl: number; pointers: { key: string; id: string; }[]; } & { id: `nm_${string}`; owner: `ak_${string}`; pointers: NamePointer[] | KeyPointers; ... 4 more ...; extendTtl: (nameTtl?: number | undefined, options?: Omit<...> | undefined) => Promise<...> & Promis...
)); }>>) Type declaration
- (...args): Promise<Readonly<{
id: string;
owner?: string;
pointers: {
id: string;
key: string;
}[];
ttl: number;
} & {
extendTtl: ((nameTtl?, options?) => Promise<SendTransactionReturnType> & (Promise<Readonly<{ id: string; owner?: string | undefined; ttl: number; pointers: { key: string; id: string; }[]; } & { id: `nm_${string}`; owner: `ak_${string}`; pointers: NamePointer[] | KeyPointers; ... 4 more ...; extendTtl: (nameTtl?: number | undefined, options?: Omit<...> | undefined) => Promise<...> & Promis...));
id: `nm_${string}`;
owner: `ak_${string}`;
pointers: NamePointer[] | KeyPointers;
revoke: ((options?) => Promise<SendTransactionReturnType>);
transfer: ((account, options?) => Promise<SendTransactionReturnType> & (Promise<Readonly<{ id: string; owner?: string | undefined; ttl: number; pointers: { key: string; id: string; }[]; } & { id: `nm_${string}`; owner: `ak_${string}`; pointers: NamePointer[] | KeyPointers; ... 4 more ...; extendTtl: (nameTtl?: number | undefined, options?: Omit<...> | undefined) => Promise<...> & Promis...));
ttl: number;
update: ((pointers, options?) => Promise<SendTransactionReturnType> & (Promise<Readonly<{ id: string; owner?: string | undefined; ttl: number; pointers: { key: string; id: string; }[]; } & { id: `nm_${string}`; owner: `ak_${string}`; pointers: NamePointer[] | KeyPointers; ... 4 more ...; extendTtl: (nameTtl?: number | undefined, options?: Omit<...> | undefined) => Promise<...> & Promis...));
}>> Returns Promise<Readonly<{
id: string;
owner?: string;
pointers: {
id: string;
key: string;
}[];
ttl: number;
} & {
extendTtl: ((nameTtl?, options?) => Promise<SendTransactionReturnType> & (Promise<Readonly<{ id: string; owner?: string | undefined; ttl: number; pointers: { key: string; id: string; }[]; } & { id: `nm_${string}`; owner: `ak_${string}`; pointers: NamePointer[] | KeyPointers; ... 4 more ...; extendTtl: (nameTtl?: number | undefined, options?: Omit<...> | undefined) => Promise<...> & Promis...));
id: `nm_${string}`;
owner: `ak_${string}`;
pointers: NamePointer[] | KeyPointers;
revoke: ((options?) => Promise<SendTransactionReturnType>);
transfer: ((account, options?) => Promise<SendTransactionReturnType> & (Promise<Readonly<{ id: string; owner?: string | undefined; ttl: number; pointers: { key: string; id: string; }[]; } & { id: `nm_${string}`; owner: `ak_${string}`; pointers: NamePointer[] | KeyPointers; ... 4 more ...; extendTtl: (nameTtl?: number | undefined, options?: Omit<...> | undefined) => Promise<...> & Promis...));
ttl: number;
update: ((pointers, options?) => Promise<SendTransactionReturnType> & (Promise<Readonly<{ id: string; owner?: string | undefined; ttl: number; pointers: { key: string; id: string; }[]; } & { id: `nm_${string}`; owner: `ak_${string}`; pointers: NamePointer[] | KeyPointers; ... 4 more ...; extendTtl: (nameTtl?: number | undefined, options?: Omit<...> | undefined) => Promise<...> & Promis...));
}>>
awaitHeight
awaitHeight: ((...args) => Promise<number>)
Type declaration
- (...args): Promise<number>
Parameters
Rest
...args: [height: number] | [height: number, Omit<{
interval?: number;
onNode: Node;
} & {
_expectedMineRate?: number;
_microBlockCycle?: number;
onNode: Node;
}, "onNode" | "onAccount" | "onCompiler"> & Partial<{
interval?: number;
onNode: Node;
} & {
_expectedMineRate?: number;
_microBlockCycle?: number;
onNode: Node;
}>]
Returns Promise<number>
buildAuthTxHash
buildAuthTxHash: ((...args) => Promise<Buffer>)
Type declaration
- (...args): Promise<Buffer>
Parameters
Rest
...args: [transaction: `tx_${string}`] | [transaction: `tx_${string}`, Omit<{
fee?: Int;
gasPrice?: Int;
onNode: Node;
}, "onNode" | "onAccount" | "onCompiler"> & Partial<{
fee?: Int;
gasPrice?: Int;
onNode: Node;
}>]
Returns Promise<Buffer>
buildAuthTxHashByGaMetaTx
buildAuthTxHashByGaMetaTx: ((...args) => Promise<Buffer>)
Type declaration
- (...args): Promise<Buffer>
Parameters
Rest
...args: [transaction: `tx_${string}`] | [transaction: `tx_${string}`, Omit<{
onNode: Node;
}, "onNode" | "onAccount" | "onCompiler"> & Partial<{
onNode: Node;
}>]
Returns Promise<Buffer>
createDelegationSignature
createDelegationSignature: ((...args) => Promise<Uint8Array>)
Type declaration
- (...args): Promise<Uint8Array>
Parameters
Rest
...args: [contractAddress: `ct_${string}`, ids: (`${string}.chain` | `kh_${string}` | `mh_${string}` | `bf_${string}` | `bx_${string}` | `bs_${string}` | `ch_${string}` | `ct_${string}` | `cb_${string}` | `ck_${string}` | `cv_${string}` | `tx_${string}` | `th_${string}` | `ok_${string}` | `ov_${string}` | `oq_${string}` | `or_${string}` | `ak_${string}` | `sg_${string}` | `cm_${string}` | `pp_${string}` | `nm_${string}` | `st_${string}` | `pi_${string}` | `ss_${string}` | `cs_${string}` | `ba_${string}`)[]] | [contractAddress: `ct_${string}`, ids: (`${string}.chain` | `kh_${string}` | `mh_${string}` | `bf_${string}` | `bx_${string}` | `bs_${string}` | `ch_${string}` | `ct_${string}` | `cb_${string}` | `ck_${string}` | `cv_${string}` | `tx_${string}` | `th_${string}` | `ok_${string}` | `ov_${string}` | `oq_${string}` | `or_${string}` | `ak_${string}` | `sg_${string}` | `cm_${string}` | `pp_${string}` | `nm_${string}` | `st_${string}` | `pi_${string}` | `ss_${string}` | `cs_${string}` | `ba_${string}`)[], Omit<{
isOracle?: boolean;
omitAddress?: boolean;
onAccount: AccountBase;
onNode: Node;
}, "onNode" | "onAccount" | "onCompiler"> & Partial<Omit<{
isOracle?: boolean;
omitAddress?: boolean;
onAccount: AccountBase;
onNode: Node;
}, "onAccount"> & {
onAccount: OnAccount;
}>]
Returns Promise<Uint8Array>
createGeneralizedAccount
createGeneralizedAccount: ((...args) => Promise<Readonly<{
gaContractId: `ct_${string}`;
owner: `ak_${string}`;
rawTx: `tx_${string}`;
transaction: `th_${string}`;
}>>)
Type declaration
- (...args): Promise<Readonly<{
gaContractId: `ct_${string}`;
owner: `ak_${string}`;
rawTx: `tx_${string}`;
transaction: `th_${string}`;
}>> Returns Promise<Readonly<{
gaContractId: `ct_${string}`;
owner: `ak_${string}`;
rawTx: `tx_${string}`;
transaction: `th_${string}`;
}>>
getAccount
getAccount: ((...args) => Promise<{ authFun?: string; balance: bigint; contractId?: string; id: string; kind?: AccountKind; nonce: number; payable?: boolean; }>) Type declaration
- (...args): Promise<{
authFun?: string;
balance: bigint;
contractId?: string;
id: string;
kind?: AccountKind;
nonce: number;
payable?: boolean;
}> Parameters
Rest
...args: [address: `ct_${string}` | `ak_${string}`] | [address: `ct_${string}` | `ak_${string}`, Omit<{
hash?: `kh_${string}` | `mh_${string}`;
height?: number;
onNode: Node;
}, "onNode" | "onAccount" | "onCompiler"> & Partial<{
hash?: `kh_${string}` | `mh_${string}`;
height?: number;
onNode: Node;
}>]
Returns Promise<{
authFun?: string;
balance: bigint;
contractId?: string;
id: string;
kind?: AccountKind;
nonce: number;
payable?: boolean;
}>
getBalance
getBalance: ((...args) => Promise<string>)
Type declaration
- (...args): Promise<string>
Parameters
Rest
...args: [address: `ct_${string}` | `ok_${string}` | `ak_${string}`] | [address: `ct_${string}` | `ok_${string}` | `ak_${string}`, Omit<{
format?: AE_AMOUNT_FORMATS;
} & {
hash?: `kh_${string}` | `mh_${string}`;
height?: number;
onNode: Node;
}, "onNode" | "onAccount" | "onCompiler"> & Partial<{
format?: AE_AMOUNT_FORMATS;
} & {
hash?: `kh_${string}` | `mh_${string}`;
height?: number;
onNode: Node;
}>]
Returns Promise<string>
getContract
getContract: ((...args) => Promise<{
abiVersion: string;
active: boolean;
deposit: bigint;
id: string;
ownerId: string;
referrerIds: string[];
vmVersion: string;
}>)
Type declaration
- (...args): Promise<{
abiVersion: string;
active: boolean;
deposit: bigint;
id: string;
ownerId: string;
referrerIds: string[];
vmVersion: string;
}> Parameters
Rest
...args: [contractId: `ct_${string}`] | [contractId: `ct_${string}`, Omit<{
onNode: Node;
}, "onNode" | "onAccount" | "onCompiler"> & Partial<{
onNode: Node;
}>]
Returns Promise<{
abiVersion: string;
active: boolean;
deposit: bigint;
id: string;
ownerId: string;
referrerIds: string[];
vmVersion: string;
}>
getContractByteCode
getContractByteCode: ((...args) => Promise<{
bytecode: `cb_${string}`;
}>)
Type declaration
- (...args): Promise<{
bytecode: `cb_${string}`;
}> Parameters
Rest
...args: [contractId: `ct_${string}`] | [contractId: `ct_${string}`, Omit<{
onNode: Node;
}, "onNode" | "onAccount" | "onCompiler"> & Partial<{
onNode: Node;
}>]
Returns Promise<{
bytecode: `cb_${string}`;
}>
getCurrentGeneration
getCurrentGeneration: ((...args) => Promise<{
keyBlock: {
beneficiary: string;
hash: string;
height: number;
info: string;
miner: string;
nonce?: number;
pow?: string[];
prevHash: string;
prevKeyHash: string;
stateHash: string;
target: string;
time: number;
version: number;
};
microBlocks: string[];
}>)
Type declaration
- (...args): Promise<{
keyBlock: {
beneficiary: string;
hash: string;
height: number;
info: string;
miner: string;
nonce?: number;
pow?: string[];
prevHash: string;
prevKeyHash: string;
stateHash: string;
target: string;
time: number;
version: number;
};
microBlocks: string[];
}> Parameters
Rest
...args: [] | [Omit<{
onNode: Node;
}, "onNode" | "onAccount" | "onCompiler"> & Partial<{
onNode: Node;
}>]
Returns Promise<{
keyBlock: {
beneficiary: string;
hash: string;
height: number;
info: string;
miner: string;
nonce?: number;
pow?: string[];
prevHash: string;
prevKeyHash: string;
stateHash: string;
target: string;
time: number;
version: number;
};
microBlocks: string[];
}>
getGeneration
getGeneration: ((...args) => Promise<{
keyBlock: {
beneficiary: string;
hash: string;
height: number;
info: string;
miner: string;
nonce?: number;
pow?: string[];
prevHash: string;
prevKeyHash: string;
stateHash: string;
target: string;
time: number;
version: number;
};
microBlocks: string[];
}>)
Type declaration
- (...args): Promise<{
keyBlock: {
beneficiary: string;
hash: string;
height: number;
info: string;
miner: string;
nonce?: number;
pow?: string[];
prevHash: string;
prevKeyHash: string;
stateHash: string;
target: string;
time: number;
version: number;
};
microBlocks: string[];
}> Parameters
Rest
...args: [hashOrHeight: number | `kh_${string}`] | [hashOrHeight: number | `kh_${string}`, Omit<{
onNode: Node;
}, "onNode" | "onAccount" | "onCompiler"> & Partial<{
onNode: Node;
}>]
Returns Promise<{
keyBlock: {
beneficiary: string;
hash: string;
height: number;
info: string;
miner: string;
nonce?: number;
pow?: string[];
prevHash: string;
prevKeyHash: string;
stateHash: string;
target: string;
time: number;
version: number;
};
microBlocks: string[];
}>
getHeight
getHeight: ((...args) => Promise<number>)
Type declaration
- (...args): Promise<number>
Parameters
Rest
...args: [] | [Omit<{
cached?: boolean;
onNode: Node;
} & {
_expectedMineRate?: number;
_microBlockCycle?: number;
onNode: Node;
}, "onNode" | "onAccount" | "onCompiler"> & Partial<{
cached?: boolean;
onNode: Node;
} & {
_expectedMineRate?: number;
_microBlockCycle?: number;
onNode: Node;
}>]
Returns Promise<number>
getKeyBlock
getKeyBlock: ((...args) => Promise<{
beneficiary: string;
hash: string;
height: number;
info: string;
miner: string;
nonce?: number;
pow?: string[];
prevHash: string;
prevKeyHash: string;
stateHash: string;
target: string;
time: number;
version: number;
}>)
Type declaration
- (...args): Promise<{
beneficiary: string;
hash: string;
height: number;
info: string;
miner: string;
nonce?: number;
pow?: string[];
prevHash: string;
prevKeyHash: string;
stateHash: string;
target: string;
time: number;
version: number;
}> Parameters
Rest
...args: [hashOrHeight: number | `kh_${string}`] | [hashOrHeight: number | `kh_${string}`, Omit<{
onNode: Node;
}, "onNode" | "onAccount" | "onCompiler"> & Partial<{
onNode: Node;
}>]
Returns Promise<{
beneficiary: string;
hash: string;
height: number;
info: string;
miner: string;
nonce?: number;
pow?: string[];
prevHash: string;
prevKeyHash: string;
stateHash: string;
target: string;
time: number;
version: number;
}>
getMicroBlockHeader
getMicroBlockHeader: ((...args) => Promise<{
hash: string;
height: number;
pofHash: string;
prevHash: string;
prevKeyHash: string;
signature: string;
stateHash: string;
time: number;
txsHash: string;
version: number;
}>)
Type declaration
Parameters
Rest
...args: [hash: `mh_${string}`] | [hash: `mh_${string}`, Omit<{
onNode: Node;
}, "onNode" | "onAccount" | "onCompiler"> & Partial<{
onNode: Node;
}>]
Returns Promise<{
hash: string;
height: number;
pofHash: string;
prevHash: string;
prevKeyHash: string;
signature: string;
stateHash: string;
time: number;
txsHash: string;
version: number;
}>
getMicroBlockTransactions
getMicroBlockTransactions: ((...args) => Promise<{ blockHash: string; blockHeight: number; encodedTx?: string; hash: string; signatures: string[]; tx: { abiVersion?: string; accountId?: string; amount?: bigint; authData?: string; authFun?: string; callData?: string; callerId?: string; channelId?: string; channelReserve?: bigint; clientTtl?: number; code?: string; commitmentId?: string; contractId?: string; delegateIds?: { initiator?: string[]; responder?: string[]; }; deposit?: bigint; fee: bigint; fromId?: string; gaId?: string; gas?: number; gasPrice?: bigint; initiatorAmount?: bigint; initiatorAmountFinal?: bigint; initiatorDelegateIds?: string[]; initiatorId?: string; lockPeriod?: string; name?: string; nameFee?: bigint; nameId?: string; nameSalt?: number; nameTtl?: number; nonce?: number; offchainTrees?: string; oracleId?: string; oracleTtl?: { type: "delta"; value: string; }; ownerId?: string; payerId?: string; payload?: string; poi?: string; pointers?: { id: string; key: string; }[]; query?: string; queryFee?: bigint; queryFormat?: string; queryId?: string; queryTtl?: { type: TTLType; value: string; }; recipientId?: string; responderAmount?: bigint; responderAmountFinal?: bigint; responderDelegateIds?: string[]; responderId?: string; response?: string; responseFormat?: string; responseTtl?: { type: "delta"; value: string; }; round?: number; senderId?: string; stateHash?: string; toId?: string; ttl?: number; tx?: { tx: { recipientId?: string | undefined; amount?: bigint | undefined; fee: bigint; ttl?: number | undefined; senderId?: string | undefined; nonce?: number | undefined; payload?: string | undefined; ... 54 more ...; type: TxType; }; ... 4 more ...; signatures: string[]; }
; type: TxType; update?: { op: "OffChainTransfer" | "OffChainWithdrawal" | "OffChainDeposit" | "OffChainNewContract" | "OffChainCallContract"; } | { amount: bigint; from: string; op: "OffChainTransfer"; to: string; } | { amount: bigint; op: "OffChainWithdrawal"; to: string; } | { amount: bigint; from: string; op: "OffChainDeposit"; } | { abiVersion: string; callData: string; code: { bytecode: `cb_${string}`; }; deposit: bigint; op: "OffChainNewContract"; owner: string; vmVersion: string; } | { abiVersion: string; amount: bigint; callData: string; caller: string; contract: string; gas: number; gasPrice: bigint; op: "OffChainCallContract"; }; version: number; vmVersion?: string; }; }[]>) Type declaration
- (...args): Promise<{
blockHash: string;
blockHeight: number;
encodedTx?: string;
hash: string;
signatures: string[];
tx: {
abiVersion?: string;
accountId?: string;
amount?: bigint;
authData?: string;
authFun?: string;
callData?: string;
callerId?: string;
channelId?: string;
channelReserve?: bigint;
clientTtl?: number;
code?: string;
commitmentId?: string;
contractId?: string;
delegateIds?: {
initiator?: string[];
responder?: string[];
};
deposit?: bigint;
fee: bigint;
fromId?: string;
gaId?: string;
gas?: number;
gasPrice?: bigint;
initiatorAmount?: bigint;
initiatorAmountFinal?: bigint;
initiatorDelegateIds?: string[];
initiatorId?: string;
lockPeriod?: string;
name?: string;
nameFee?: bigint;
nameId?: string;
nameSalt?: number;
nameTtl?: number;
nonce?: number;
offchainTrees?: string;
oracleId?: string;
oracleTtl?: {
type: "delta";
value: string;
};
ownerId?: string;
payerId?: string;
payload?: string;
poi?: string;
pointers?: {
id: string;
key: string;
}[];
query?: string;
queryFee?: bigint;
queryFormat?: string;
queryId?: string;
queryTtl?: {
type: TTLType;
value: string;
};
recipientId?: string;
responderAmount?: bigint;
responderAmountFinal?: bigint;
responderDelegateIds?: string[];
responderId?: string;
response?: string;
responseFormat?: string;
responseTtl?: {
type: "delta";
value: string;
};
round?: number;
senderId?: string;
stateHash?: string;
toId?: string;
ttl?: number;
tx?: { tx: { recipientId?: string | undefined; amount?: bigint | undefined; fee: bigint; ttl?: number | undefined; senderId?: string | undefined; nonce?: number | undefined; payload?: string | undefined; ... 54 more ...; type: TxType; }; ... 4 more ...; signatures: string[]; };
type: TxType;
update?: {
op: "OffChainTransfer" | "OffChainWithdrawal" | "OffChainDeposit" | "OffChainNewContract" | "OffChainCallContract";
} | {
amount: bigint;
from: string;
op: "OffChainTransfer";
to: string;
} | {
amount: bigint;
op: "OffChainWithdrawal";
to: string;
} | {
amount: bigint;
from: string;
op: "OffChainDeposit";
} | {
abiVersion: string;
callData: string;
code: {
bytecode: `cb_${string}`;
};
deposit: bigint;
op: "OffChainNewContract";
owner: string;
vmVersion: string;
} | {
abiVersion: string;
amount: bigint;
callData: string;
caller: string;
contract: string;
gas: number;
gasPrice: bigint;
op: "OffChainCallContract";
};
version: number;
vmVersion?: string;
};
}[]> Parameters
Rest
...args: [hash: `mh_${string}`] | [hash: `mh_${string}`, Omit<{
onNode: Node;
}, "onNode" | "onAccount" | "onCompiler"> & Partial<{
onNode: Node;
}>]
Returns Promise<{
blockHash: string;
blockHeight: number;
encodedTx?: string;
hash: string;
signatures: string[];
tx: {
abiVersion?: string;
accountId?: string;
amount?: bigint;
authData?: string;
authFun?: string;
callData?: string;
callerId?: string;
channelId?: string;
channelReserve?: bigint;
clientTtl?: number;
code?: string;
commitmentId?: string;
contractId?: string;
delegateIds?: {
initiator?: string[];
responder?: string[];
};
deposit?: bigint;
fee: bigint;
fromId?: string;
gaId?: string;
gas?: number;
gasPrice?: bigint;
initiatorAmount?: bigint;
initiatorAmountFinal?: bigint;
initiatorDelegateIds?: string[];
initiatorId?: string;
lockPeriod?: string;
name?: string;
nameFee?: bigint;
nameId?: string;
nameSalt?: number;
nameTtl?: number;
nonce?: number;
offchainTrees?: string;
oracleId?: string;
oracleTtl?: {
type: "delta";
value: string;
};
ownerId?: string;
payerId?: string;
payload?: string;
poi?: string;
pointers?: {
id: string;
key: string;
}[];
query?: string;
queryFee?: bigint;
queryFormat?: string;
queryId?: string;
queryTtl?: {
type: TTLType;
value: string;
};
recipientId?: string;
responderAmount?: bigint;
responderAmountFinal?: bigint;
responderDelegateIds?: string[];
responderId?: string;
response?: string;
responseFormat?: string;
responseTtl?: {
type: "delta";
value: string;
};
round?: number;
senderId?: string;
stateHash?: string;
toId?: string;
ttl?: number;
tx?: { tx: { recipientId?: string | undefined; amount?: bigint | undefined; fee: bigint; ttl?: number | undefined; senderId?: string | undefined; nonce?: number | undefined; payload?: string | undefined; ... 54 more ...; type: TxType; }; ... 4 more ...; signatures: string[]; };
type: TxType;
update?: {
op: "OffChainTransfer" | "OffChainWithdrawal" | "OffChainDeposit" | "OffChainNewContract" | "OffChainCallContract";
} | {
amount: bigint;
from: string;
op: "OffChainTransfer";
to: string;
} | {
amount: bigint;
op: "OffChainWithdrawal";
to: string;
} | {
amount: bigint;
from: string;
op: "OffChainDeposit";
} | {
abiVersion: string;
callData: string;
code: {
bytecode: `cb_${string}`;
};
deposit: bigint;
op: "OffChainNewContract";
owner: string;
vmVersion: string;
} | {
abiVersion: string;
amount: bigint;
callData: string;
caller: string;
contract: string;
gas: number;
gasPrice: bigint;
op: "OffChainCallContract";
};
version: number;
vmVersion?: string;
};
}[]>
getName
getName: ((...args) => Promise<{
id: string;
owner?: string;
pointers: {
id: string;
key: string;
}[];
ttl: number;
}>)
Type declaration
- (...args): Promise<{
id: string;
owner?: string;
pointers: {
id: string;
key: string;
}[];
ttl: number;
}> Parameters
Rest
...args: [name: `${string}.chain`] | [name: `${string}.chain`, Omit<{
onNode: Node;
}, "onNode" | "onAccount" | "onCompiler"> & Partial<{
onNode: Node;
}>]
Returns Promise<{
id: string;
owner?: string;
pointers: {
id: string;
key: string;
}[];
ttl: number;
}>
getQueryObject
Type declaration
- (...args): Promise<GetQueryObjectReturnType>
Parameters
Rest
...args: [oracleId: `ok_${string}`, queryId: `oq_${string}`] | [oracleId: `ok_${string}`, queryId: `oq_${string}`, Omit<RespondToQueryOptions & {
interval?: number;
onNode: Node;
} & {
_expectedMineRate?: number;
_microBlockCycle?: number;
onNode: Node;
}, "onNode" | "onAccount" | "onCompiler"> & Partial<Omit<RespondToQueryOptions & {
interval?: number;
onNode: Node;
} & {
_expectedMineRate?: number;
_microBlockCycle?: number;
onNode: Node;
}, "onAccount"> & {
onAccount: OnAccount;
}>]
poll
poll: ((...args) => Promise<{ blockHash: string; blockHeight: number; encodedTx?: string; hash: string; signatures: string[]; tx: { abiVersion?: string; accountId?: string; amount?: bigint; authData?: string; authFun?: string; callData?: string; callerId?: string; channelId?: string; channelReserve?: bigint; clientTtl?: number; code?: string; commitmentId?: string; contractId?: string; delegateIds?: { initiator?: string[]; responder?: string[]; }; deposit?: bigint; fee: bigint; fromId?: string; gaId?: string; gas?: number; gasPrice?: bigint; initiatorAmount?: bigint; initiatorAmountFinal?: bigint; initiatorDelegateIds?: string[]; initiatorId?: string; lockPeriod?: string; name?: string; nameFee?: bigint; nameId?: string; nameSalt?: number; nameTtl?: number; nonce?: number; offchainTrees?: string; oracleId?: string; oracleTtl?: { type: "delta"; value: string; }; ownerId?: string; payerId?: string; payload?: string; poi?: string; pointers?: { id: string; key: string; }[]; query?: string; queryFee?: bigint; queryFormat?: string; queryId?: string; queryTtl?: { type: TTLType; value: string; }; recipientId?: string; responderAmount?: bigint; responderAmountFinal?: bigint; responderDelegateIds?: string[]; responderId?: string; response?: string; responseFormat?: string; responseTtl?: { type: "delta"; value: string; }; round?: number; senderId?: string; stateHash?: string; toId?: string; ttl?: number; tx?: { tx: { recipientId?: string | undefined; amount?: bigint | undefined; fee: bigint; ttl?: number | undefined; senderId?: string | undefined; nonce?: number | undefined; payload?: string | undefined; ... 54 more ...; type: TxType; }; ... 4 more ...; signatures: string[]; }
; type: TxType; update?: { op: "OffChainTransfer" | "OffChainWithdrawal" | "OffChainDeposit" | "OffChainNewContract" | "OffChainCallContract"; } | { amount: bigint; from: string; op: "OffChainTransfer"; to: string; } | { amount: bigint; op: "OffChainWithdrawal"; to: string; } | { amount: bigint; from: string; op: "OffChainDeposit"; } | { abiVersion: string; callData: string; code: { bytecode: `cb_${string}`; }; deposit: bigint; op: "OffChainNewContract"; owner: string; vmVersion: string; } | { abiVersion: string; amount: bigint; callData: string; caller: string; contract: string; gas: number; gasPrice: bigint; op: "OffChainCallContract"; }; version: number; vmVersion?: string; }; }>) Type declaration
- (...args): Promise<{
blockHash: string;
blockHeight: number;
encodedTx?: string;
hash: string;
signatures: string[];
tx: {
abiVersion?: string;
accountId?: string;
amount?: bigint;
authData?: string;
authFun?: string;
callData?: string;
callerId?: string;
channelId?: string;
channelReserve?: bigint;
clientTtl?: number;
code?: string;
commitmentId?: string;
contractId?: string;
delegateIds?: {
initiator?: string[];
responder?: string[];
};
deposit?: bigint;
fee: bigint;
fromId?: string;
gaId?: string;
gas?: number;
gasPrice?: bigint;
initiatorAmount?: bigint;
initiatorAmountFinal?: bigint;
initiatorDelegateIds?: string[];
initiatorId?: string;
lockPeriod?: string;
name?: string;
nameFee?: bigint;
nameId?: string;
nameSalt?: number;
nameTtl?: number;
nonce?: number;
offchainTrees?: string;
oracleId?: string;
oracleTtl?: {
type: "delta";
value: string;
};
ownerId?: string;
payerId?: string;
payload?: string;
poi?: string;
pointers?: {
id: string;
key: string;
}[];
query?: string;
queryFee?: bigint;
queryFormat?: string;
queryId?: string;
queryTtl?: {
type: TTLType;
value: string;
};
recipientId?: string;
responderAmount?: bigint;
responderAmountFinal?: bigint;
responderDelegateIds?: string[];
responderId?: string;
response?: string;
responseFormat?: string;
responseTtl?: {
type: "delta";
value: string;
};
round?: number;
senderId?: string;
stateHash?: string;
toId?: string;
ttl?: number;
tx?: { tx: { recipientId?: string | undefined; amount?: bigint | undefined; fee: bigint; ttl?: number | undefined; senderId?: string | undefined; nonce?: number | undefined; payload?: string | undefined; ... 54 more ...; type: TxType; }; ... 4 more ...; signatures: string[]; };
type: TxType;
update?: {
op: "OffChainTransfer" | "OffChainWithdrawal" | "OffChainDeposit" | "OffChainNewContract" | "OffChainCallContract";
} | {
amount: bigint;
from: string;
op: "OffChainTransfer";
to: string;
} | {
amount: bigint;
op: "OffChainWithdrawal";
to: string;
} | {
amount: bigint;
from: string;
op: "OffChainDeposit";
} | {
abiVersion: string;
callData: string;
code: {
bytecode: `cb_${string}`;
};
deposit: bigint;
op: "OffChainNewContract";
owner: string;
vmVersion: string;
} | {
abiVersion: string;
amount: bigint;
callData: string;
caller: string;
contract: string;
gas: number;
gasPrice: bigint;
op: "OffChainCallContract";
};
version: number;
vmVersion?: string;
};
}> Parameters
Rest
...args: [th: `th_${string}`] | [th: `th_${string}`, Omit<{
blocks?: number;
interval?: number;
onNode: Node;
} & {
_expectedMineRate?: number;
_microBlockCycle?: number;
onNode: Node;
}, "onNode" | "onAccount" | "onCompiler"> & Partial<{
blocks?: number;
interval?: number;
onNode: Node;
} & {
_expectedMineRate?: number;
_microBlockCycle?: number;
onNode: Node;
}>]
Returns Promise<{
blockHash: string;
blockHeight: number;
encodedTx?: string;
hash: string;
signatures: string[];
tx: {
abiVersion?: string;
accountId?: string;
amount?: bigint;
authData?: string;
authFun?: string;
callData?: string;
callerId?: string;
channelId?: string;
channelReserve?: bigint;
clientTtl?: number;
code?: string;
commitmentId?: string;
contractId?: string;
delegateIds?: {
initiator?: string[];
responder?: string[];
};
deposit?: bigint;
fee: bigint;
fromId?: string;
gaId?: string;
gas?: number;
gasPrice?: bigint;
initiatorAmount?: bigint;
initiatorAmountFinal?: bigint;
initiatorDelegateIds?: string[];
initiatorId?: string;
lockPeriod?: string;
name?: string;
nameFee?: bigint;
nameId?: string;
nameSalt?: number;
nameTtl?: number;
nonce?: number;
offchainTrees?: string;
oracleId?: string;
oracleTtl?: {
type: "delta";
value: string;
};
ownerId?: string;
payerId?: string;
payload?: string;
poi?: string;
pointers?: {
id: string;
key: string;
}[];
query?: string;
queryFee?: bigint;
queryFormat?: string;
queryId?: string;
queryTtl?: {
type: TTLType;
value: string;
};
recipientId?: string;
responderAmount?: bigint;
responderAmountFinal?: bigint;
responderDelegateIds?: string[];
responderId?: string;
response?: string;
responseFormat?: string;
responseTtl?: {
type: "delta";
value: string;
};
round?: number;
senderId?: string;
stateHash?: string;
toId?: string;
ttl?: number;
tx?: { tx: { recipientId?: string | undefined; amount?: bigint | undefined; fee: bigint; ttl?: number | undefined; senderId?: string | undefined; nonce?: number | undefined; payload?: string | undefined; ... 54 more ...; type: TxType; }; ... 4 more ...; signatures: string[]; };
type: TxType;
update?: {
op: "OffChainTransfer" | "OffChainWithdrawal" | "OffChainDeposit" | "OffChainNewContract" | "OffChainCallContract";
} | {
amount: bigint;
from: string;
op: "OffChainTransfer";
to: string;
} | {
amount: bigint;
op: "OffChainWithdrawal";
to: string;
} | {
amount: bigint;
from: string;
op: "OffChainDeposit";
} | {
abiVersion: string;
callData: string;
code: {
bytecode: `cb_${string}`;
};
deposit: bigint;
op: "OffChainNewContract";
owner: string;
vmVersion: string;
} | {
abiVersion: string;
amount: bigint;
callData: string;
caller: string;
contract: string;
gas: number;
gasPrice: bigint;
op: "OffChainCallContract";
};
version: number;
vmVersion?: string;
};
}>
pollForQueries
pollForQueries: ((...args) => (() => void))
Type declaration
- (...args): (() => void)
Parameters
Rest
...args: [oracleId: `ok_${string}`, onQuery: ((query) => void)] | [oracleId: `ok_${string}`, onQuery: ((query) => void), Omit<{
interval?: number;
onNode: Node;
} & {
_expectedMineRate?: number;
_microBlockCycle?: number;
onNode: Node;
}, "onNode" | "onAccount" | "onCompiler"> & Partial<{
interval?: number;
onNode: Node;
} & {
_expectedMineRate?: number;
_microBlockCycle?: number;
onNode: Node;
}>]
Returns (() => void)
pollForQueryResponse
pollForQueryResponse: ((...args) => Promise<string>)
Type declaration
- (...args): Promise<string>
Parameters
Rest
...args: [oracleId: `ok_${string}`, queryId: `oq_${string}`] | [oracleId: `ok_${string}`, queryId: `oq_${string}`, Omit<{
interval?: number;
onNode: Node;
} & {
_expectedMineRate?: number;
_microBlockCycle?: number;
onNode: Node;
}, "onNode" | "onAccount" | "onCompiler"> & Partial<{
interval?: number;
onNode: Node;
} & {
_expectedMineRate?: number;
_microBlockCycle?: number;
onNode: Node;
}>]
Returns Promise<string>
pool
pool: Map<string, Node> = ... resolveName
resolveName: ((...args) => Promise<`ct_${string}` | `ak_${string}` | `nm_${string}`>)
Type declaration
- (...args): Promise<`ct_${string}` | `ak_${string}` | `nm_${string}`>
Parameters
Rest
...args: [nameOrId: `${string}.chain` | `ct_${string}` | `ak_${string}`, key: string] | [nameOrId: `${string}.chain` | `ct_${string}` | `ak_${string}`, key: string, Omit<{
onNode: Node;
resolveByNode?: boolean;
verify?: boolean;
}, "onNode" | "onAccount" | "onCompiler"> & Partial<{
onNode: Node;
resolveByNode?: boolean;
verify?: boolean;
}>]
Returns Promise<`ct_${string}` | `ak_${string}` | `nm_${string}`>
Optional
selectedAddress
selectedAddress?: `ak_${string}`
Optional
selectedNodeName
selectedNodeName?: string
spend
Type declaration
- (...args): Promise<SendTransactionReturnType>
Parameters
Rest
...args: [amount: string | number, recipientIdOrName: `${string}.chain` | `ct_${string}` | `ak_${string}`] | [amount: string | number, recipientIdOrName: `${string}.chain` | `ct_${string}` | `ak_${string}`, Omit<SpendOptions, "onNode" | "onAccount" | "onCompiler"> & Partial<Omit<SpendOptions, "onAccount"> & {
onAccount: OnAccount;
}>]
transferFunds
Type declaration
- (...args): Promise<SendTransactionReturnType>
Parameters
Rest
...args: [fraction: string | number, recipientIdOrName: `${string}.chain` | `ct_${string}` | `ak_${string}`] | [fraction: string | number, recipientIdOrName: `${string}.chain` | `ct_${string}` | `ak_${string}`, Omit<TransferFundsOptions, "onNode" | "onAccount" | "onCompiler"> & Partial<Omit<TransferFundsOptions, "onAccount"> & {
onAccount: OnAccount;
}>]
txDryRun
txDryRun: ((...args) => Promise<{ txEvents?: TransformNodeType<undefined | Record<string, unknown>[]>; } & { callObj?: { callerId: string; callerNonce: string; contractId: string; gasPrice: bigint; gasUsed: number; height: number; log: { address: string; data: string; topics: string[]; }[]; returnType: ContractCallReturnType; returnValue: string; }; reason?: string; result: string; type: string; }>) Type declaration
- (...args): Promise<{
txEvents?: TransformNodeType<undefined | Record<string, unknown>[]>;
} & {
callObj?: {
callerId: string;
callerNonce: string;
contractId: string;
gasPrice: bigint;
gasUsed: number;
height: number;
log: {
address: string;
data: string;
topics: string[];
}[];
returnType: ContractCallReturnType;
returnValue: string;
};
reason?: string;
result: string;
type: string;
}> Parameters
Rest
...args: [tx: `tx_${string}`, accountAddress: `ak_${string}`] | [tx: `tx_${string}`, accountAddress: `ak_${string}`, Omit<{
combine?: boolean;
onNode: Node;
top?: number | `kh_${string}` | `mh_${string}`;
txEvents?: boolean;
}, "onNode" | "onAccount" | "onCompiler"> & Partial<{
combine?: boolean;
onNode: Node;
top?: number | `kh_${string}` | `mh_${string}`;
txEvents?: boolean;
}>]
Returns Promise<{
txEvents?: TransformNodeType<undefined | Record<string, unknown>[]>;
} & {
callObj?: {
callerId: string;
callerNonce: string;
contractId: string;
gasPrice: bigint;
gasUsed: number;
height: number;
log: {
address: string;
data: string;
topics: string[];
}[];
returnType: ContractCallReturnType;
returnValue: string;
};
reason?: string;
result: string;
type: string;
}>
waitForTxConfirm
waitForTxConfirm: ((...args) => Promise<number>)
Type declaration
- (...args): Promise<number>
Parameters
Rest
...args: [txHash: `th_${string}`] | [txHash: `th_${string}`, Omit<{
confirm?: number;
onNode: Node;
} & {
interval?: number;
onNode: Node;
} & {
_expectedMineRate?: number;
_microBlockCycle?: number;
onNode: Node;
}, "onNode" | "onAccount" | "onCompiler"> & Partial<{
confirm?: number;
onNode: Node;
} & {
interval?: number;
onNode: Node;
} & {
_expectedMineRate?: number;
_microBlockCycle?: number;
onNode: Node;
}>]
Returns Promise<number>
Basic AeSdk class implements: