Skip to content

@lelantos-org/sdk / wallet / AssetRegistry

Class: AssetRegistry โ€‹

Defined in: @lelantos-org/sdk/dist/wallet/asset-registry.d.ts:16

Constructors โ€‹

Constructor โ€‹

ts
new AssetRegistry(src): AssetRegistry;

Defined in: @lelantos-org/sdk/dist/wallet/asset-registry.d.ts:21

Parameters โ€‹

ParameterType
srcAssetRegistrySource

Returns โ€‹

AssetRegistry

Methods โ€‹

list() โ€‹

ts
list(): Promise<AssetInfo[]>;

Defined in: @lelantos-org/sdk/dist/wallet/asset-registry.d.ts:23

Everything the registry knows, lowest id first.

Returns โ€‹

Promise<AssetInfo[]>


peek() โ€‹

ts
peek(id): AssetInfo | undefined;

Defined in: @lelantos-org/sdk/dist/wallet/asset-registry.d.ts:36

Cached entry for id, without touching the network.

Parameters โ€‹

ParameterType
idAssetId

Returns โ€‹

AssetInfo | undefined


put() โ€‹

ts
put(info): void;

Defined in: @lelantos-org/sdk/dist/wallet/asset-registry.d.ts:34

Seed or replace what the registry knows about id.

Parameters โ€‹

ParameterType
infoAssetInfo

Returns โ€‹

void


resolve() โ€‹

ts
resolve(ref): Promise<AssetInfo>;

Defined in: @lelantos-org/sdk/dist/wallet/asset-registry.d.ts:32

The asset ref names.

An id not in the token list is read straight from the chain, so a wallet with no relayer still resolves every id it could before. A symbol or address cannot be derived that way โ€” there is nothing to enumerate โ€” so those fail with what the registry does know.

Parameters โ€‹

ParameterType
refAssetRef

Returns โ€‹

Promise<AssetInfo>

Lelantosno cookies ๐Ÿช ยท no tracking ๐Ÿ‘๏ธ ยท no accounts ๐Ÿ‘คwalletexplorer4536080GitHub