@lelantos-org/sdk / wallet / AssetRegistry
Class: AssetRegistry โ
Defined in: @lelantos-org/sdk/dist/wallet/asset-registry.d.ts:16
Constructors โ
Constructor โ
new AssetRegistry(src): AssetRegistry;Defined in: @lelantos-org/sdk/dist/wallet/asset-registry.d.ts:21
Parameters โ
| Parameter | Type |
|---|---|
src | AssetRegistrySource |
Returns โ
AssetRegistry
Methods โ
list() โ
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() โ
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 โ
| Parameter | Type |
|---|---|
id | AssetId |
Returns โ
AssetInfo | undefined
put() โ
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 โ
| Parameter | Type |
|---|---|
info | AssetInfo |
Returns โ
void
resolve() โ
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 โ
| Parameter | Type |
|---|---|
ref | AssetRef |
Returns โ
Promise<AssetInfo>