Properties
Readonly chainId
chainId: ChainId
Methods
accountIdToAddress
- accountIdToAddress(accountId: AccountId): string
addressToAccountId
- addressToAccountId(address: string): AccountId
Parameters
Returns AccountId
addressToAssetType
- addressToAssetType(address: string, namespace: string): AssetType
Parameters
address: string
namespace: string
Returns AssetType
assertSameChainId
- assertSameChainId(chainId: ChainId): void
assetIdToAddress
- assetIdToAddress(assetId: AssetId): string
assetTypeToAddress
- assetTypeToAddress(assetType: AssetType): string
optionalAccountIdToAddress
- optionalAccountIdToAddress(accountId?: AccountId): undefined | string
Parameters
Optional accountId: AccountId
Returns undefined | string
Static assertSameAssetType
- assertSameAssetType(assetId: AssetId, assetType: AssetType): void
Parameters
assetId: AssetId
assetType: AssetType
Returns void
Static assertSameChainId
- assertSameChainId(chainId: ChainId, expectedChainId: ChainId): void
Parameters
chainId: ChainId
expectedChainId: ChainId
Returns void
Static assertTypeERC20
- assertTypeERC20(asset: AssetType | AssetId): void
Parameters
asset: AssetType | AssetId
Returns void
Static assertTypeERC721
- assertTypeERC721(asset: AssetType | AssetId): void
Parameters
asset: AssetType | AssetId
Returns void
Static createAssetId
- createAssetId(accountId: AccountId, namespace: AssetNamespace, tokenId: string): AssetId
Parameters
accountId: AccountId
tokenId: string
Returns AssetId
Static createAssetType
- createAssetType(accountId: AccountId, namespace: AssetNamespace): AssetType
Parameters
Returns AssetType
Transforms account ID object to address.