QubicTypeScript

getOwnedAssets

Returns all assets owned by a given identity, including unit counts and ownership metadata.

Signature

live.getOwnedAssets(identity, opts?): Promise<Result<OwnedAsset[], QubicRpcError>>

Purpose

Fetch the assets held by an identity to display a portfolio or verify ownership before a transfer.

const result = await live.getOwnedAssets(identity)
if (!result.ok) throw result.error

for (const asset of result.value) {
  console.log(asset.data?.ownershipInfo.assetName, asset.data?.ownershipInfo.numberOfUnits)
}

Parameters

NameTypeDescription
identitystringThe owner identity
optsRequestOptionsOptional per-request overrides (signal, fetch)

Returns

Result<OwnedAsset[], QubicRpcError> — array of assets owned by the identity.

On this page