Fetch data from chain
TS SDK Fetch data from chain
const endless = new Endless();
const alice = Account.generate();
// fund alice, make sure account is created on chain
const info = await endless.getAccountInfo({ accountAddress: alice.accountAddress });
const txs = await endless.getAccountTransactions({ accountAddress: alice.accountAddress });
const resources = await endless.getAccountResources({ accountAddress: alice.accountAddress });Queries with generics
const resource = await endless.getAccountResource<Coin>({
accountAddress: alice.accountAddress,
resourceType: "0x1::account::Account",
});
// Now we have access to the response type property
const authKey = resource.authentication_key;options input argument
options input argumentWait for Indexer to sync up
Use namespace
Last updated