@interlay/interbtc-api / Exports / DefaultAssetRegistryAPI
• new DefaultAssetRegistryAPI(api
): DefaultAssetRegistryAPI
Name | Type |
---|---|
api |
ApiPromise |
src/parachain/asset-registry.ts:43
• Private
api: ApiPromise
src/parachain/asset-registry.ts:43
▸ extractCollateralCeilingEntryKeys(entries
): InterbtcPrimitivesVaultCurrencyPair
[]
Name | Type |
---|---|
entries |
SystemCollateralCeilingTuple [] |
InterbtcPrimitivesVaultCurrencyPair
[]
src/parachain/asset-registry.ts:104
▸ getAssetRegistryEntries(): Promise
<AssetRegistryMetadataTuple
[]>
Promise
<AssetRegistryMetadataTuple
[]>
src/parachain/asset-registry.ts:71
▸ getCollateralForeignAssets(): Promise
<ForeignAsset
[]>
Get all foreign assets which have a registered collateral ceiling, meaning they can be used as collateral currency.
Promise
<ForeignAsset
[]>
All foreign assets that have been registered as collateral currency
AssetRegistryAPI.getCollateralForeignAssets
src/parachain/asset-registry.ts:110
▸ getForeignAsset(id
): Promise
<ForeignAsset
>
Get foreign asset by its id.
Name | Type | Description |
---|---|---|
id |
number | u32 |
The id of the foreign asset. |
Promise
<ForeignAsset
>
The foreign asset.
AssetRegistryAPI.getForeignAsset
src/parachain/asset-registry.ts:94
▸ getForeignAssets(): Promise
<ForeignAsset
[]>
Get all currencies (foreign assets) in the asset registry.
Promise
<ForeignAsset
[]>
A list of currencies.
AssetRegistryAPI.getForeignAssets
src/parachain/asset-registry.ts:86
▸ getSystemCollateralCeilingEntries(): Promise
<SystemCollateralCeilingTuple
[]>
Promise
<SystemCollateralCeilingTuple
[]>
src/parachain/asset-registry.ts:99
▸ metadataToCurrency(metadata
): Currency
Name | Type |
---|---|
metadata |
OrmlTraitsAssetRegistryAssetMetadata |
Currency
src/parachain/asset-registry.ts:45
▸ metadataTupleToForeignAsset(«destructured»
): ForeignAsset
Name | Type |
---|---|
«destructured» |
UnwrappedAssetRegistryMetadataTuple |
src/parachain/asset-registry.ts:56
▸ unwrapMetadataFromEntries(entries
): UnwrappedAssetRegistryMetadataTuple
[]
Static method to filter out metadata that can be unwrapped.ie. Option.isSome !== true
.
Name | Type | Description |
---|---|---|
entries |
AssetRegistryMetadataTuple [] |
The entries from the asset registry. |
UnwrappedAssetRegistryMetadataTuple
[]
A list of all entries containing metadata.