@collabland/chain
Advanced tools
Comparing version 0.12.2 to 0.13.0
import { AssetName, AssetTypeParams } from './caip'; | ||
import { ChainConnector } from './chain-connector'; | ||
import { AccountIdResource, ChainIdResource } from './chain-resource'; | ||
import { Amount, AssetRequest, AssetResponse, ChainOptions, ChainType, NativeCurrency, NFTAssetOptions, TokenAsset, TokenId, TokenMetadata } from './types'; | ||
import { AccountIdResource, AssetResource, ChainIdResource } from './chain-resource'; | ||
import { Amount, AssetMetadata, AssetRequest, AssetResponse, ChainOptions, ChainType, NativeCurrency, NFTAssetOptions, TokenAsset, TokenId, TokenMetadata } from './types'; | ||
/** | ||
@@ -52,2 +52,3 @@ * Base chain connector | ||
fetchMetadata(token: TokenAsset<TID, M, AMT>): Promise<void>; | ||
getAssetMetadata(asset: AssetResource): Promise<AssetMetadata>; | ||
} |
@@ -149,4 +149,7 @@ "use strict"; | ||
} | ||
getAssetMetadata(asset) { | ||
throw new Error('Method not implemented.'); | ||
} | ||
} | ||
exports.BaseChainConnector = BaseChainConnector; | ||
//# sourceMappingURL=base-connector.js.map |
@@ -17,3 +17,3 @@ "use strict"; | ||
*/ | ||
const tokenId = '[-a-zA-Z0-9._:,]{1,32}'; | ||
const tokenId = '[-a-zA-Z0-9._:,]{1,256}'; | ||
const CAIP2 = { | ||
@@ -20,0 +20,0 @@ name: 'chainId', |
import { AssetName, AssetTypeParams } from './caip'; | ||
import { AccountIdResource, ChainIdResource } from './chain-resource'; | ||
import { AccountIdResource, AssetResource, ChainIdResource } from './chain-resource'; | ||
import type { Amount, AssetRequest, AssetResponse, ChainOptions, ChainType, NativeCurrency, NFTAssetOptions, TokenAsset, TokenId, TokenMetadata } from './types'; | ||
import { AssetMetadata } from './types'; | ||
/** | ||
@@ -67,2 +68,3 @@ * An interface to be implemented by different block chain providers | ||
getAssetTypes?(account: AccountIdResource): Promise<AssetTypeParams[]>; | ||
getAssetMetadata(asset: AssetResource): Promise<AssetMetadata>; | ||
} |
@@ -57,2 +57,6 @@ import { AssetNameParams } from './caip'; | ||
/** | ||
* Metadata for an asset type | ||
*/ | ||
export declare type AssetMetadata = Record<string, any>; | ||
/** | ||
* Default type for token metadata | ||
@@ -59,0 +63,0 @@ */ |
{ | ||
"name": "@collabland/chain", | ||
"version": "0.12.2", | ||
"version": "0.13.0", | ||
"description": "CollabLand Ethereum Integration", | ||
@@ -34,3 +34,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@collabland/common": "^0.22.3", | ||
"@collabland/common": "^0.22.4", | ||
"tslib": "^2.0.0" | ||
@@ -47,3 +47,3 @@ }, | ||
"author": "Abridged, Inc.", | ||
"gitHead": "42d74f2e884b8bc048f833cc3a646d81beb9de6d" | ||
"gitHead": "1ee95c6089b7a3f18d38230a1630388f987e1b1b" | ||
} |
@@ -21,2 +21,3 @@ // Copyright Abridged, Inc. 2021. All Rights Reserved. | ||
AccountIdResource, | ||
AssetResource, | ||
ChainIdResource, | ||
@@ -28,2 +29,3 @@ getChainUri, | ||
Amount, | ||
AssetMetadata, | ||
AssetRequest, | ||
@@ -231,2 +233,6 @@ AssetResponse, | ||
} | ||
getAssetMetadata(asset: AssetResource): Promise<AssetMetadata> { | ||
throw new Error('Method not implemented.'); | ||
} | ||
} |
@@ -19,3 +19,3 @@ // Copyright Abridged, Inc. 2021. All Rights Reserved. | ||
*/ | ||
const tokenId = '[-a-zA-Z0-9._:,]{1,32}'; | ||
const tokenId = '[-a-zA-Z0-9._:,]{1,256}'; | ||
@@ -22,0 +22,0 @@ const CAIP2: IdentifierSpec = { |
@@ -7,3 +7,7 @@ // Copyright Abridged, Inc. 2021. All Rights Reserved. | ||
import {AssetName, AssetTypeParams} from './caip'; | ||
import {AccountIdResource, ChainIdResource} from './chain-resource'; | ||
import { | ||
AccountIdResource, | ||
AssetResource, | ||
ChainIdResource, | ||
} from './chain-resource'; | ||
import type { | ||
@@ -21,2 +25,3 @@ Amount, | ||
} from './types'; | ||
import {AssetMetadata} from './types'; | ||
@@ -113,2 +118,4 @@ /** | ||
getAssetTypes?(account: AccountIdResource): Promise<AssetTypeParams[]>; | ||
getAssetMetadata(asset: AssetResource): Promise<AssetMetadata>; | ||
} |
@@ -89,2 +89,8 @@ // Copyright Abridged, Inc. 2021. All Rights Reserved. | ||
/** | ||
* Metadata for an asset type | ||
*/ | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
export type AssetMetadata = Record<string, any>; | ||
/** | ||
* Default type for token metadata | ||
@@ -91,0 +97,0 @@ */ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
125716
3311
Updated@collabland/common@^0.22.4