Get Subaccount Summary

Retrieves subaccount info. Can be done via the engine (off-chain) or from on-chain contracts.

On-chain

Returns a comprehensive summary for a subaccount, including its balances and health.

See getSubaccountSummary API reference for more details.

Makes a call to the on-chain Querier contract via the SDK.

Usage

import { createVertexClient } from '@vertex-protocol/client';

const vertexClient = await createVertexClient('testnet', ...);
const res = await vertexClient.subaccount.getSubaccountSummary(...);

Off-chain

Gets the subaccount state according to the offchain engine.

See getEngineSubaccountSummary API reference for more details.

Makes a call to REST API > Queries > Subaccount Info via the SDK.

Usage

import { createVertexClient } from '@vertex-protocol/client';

const vertexClient = await createVertexClient('testnet', ...);
const res = await vertexClient.subaccount.getEngineSubaccountSummary(...);

Last updated