emblem-vault-sdk 1.9.20 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +11 -2
- package/dist/index.js +10 -1
- package/dist/utils.js +1 -1
- package/docs/bundle.js +11 -2
- package/package.json +1 -1
- package/src/index.ts +12 -0
- package/src/utils.ts +1 -1
- package/types/index.d.ts +3 -0
package/dist/bundle.js
CHANGED
|
@@ -711421,7 +711421,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
711421
711421
|
const bignumber_1 = require("@ethersproject/bignumber");
|
|
711422
711422
|
const utils_1 = require("./utils");
|
|
711423
711423
|
const derive_1 = require("./derive");
|
|
711424
|
-
const SDK_VERSION = '1.
|
|
711424
|
+
const SDK_VERSION = '1.10.0';
|
|
711425
711425
|
class EmblemVaultSDK {
|
|
711426
711426
|
constructor(apiKey, baseUrl) {
|
|
711427
711427
|
this.apiKey = apiKey;
|
|
@@ -711451,6 +711451,15 @@ class EmblemVaultSDK {
|
|
|
711451
711451
|
getAllAssetMetadata() {
|
|
711452
711452
|
return (0, utils_1.metadataObj2Arr)(utils_1.NFT_DATA);
|
|
711453
711453
|
}
|
|
711454
|
+
getRemoteAssetMetadataProjectList() {
|
|
711455
|
+
return (0, utils_1.fetchData)(`${this.v3Url}/asset_metadata/projects`, this.apiKey);
|
|
711456
|
+
}
|
|
711457
|
+
getRemoteAssetMetadata(asset_name) {
|
|
711458
|
+
return (0, utils_1.fetchData)(`${this.v3Url}/asset_metadata/${asset_name}`, this.apiKey);
|
|
711459
|
+
}
|
|
711460
|
+
getRemoteAssetMetadataVaultedProjectList() {
|
|
711461
|
+
return (0, utils_1.fetchData)(`${this.v3Url}/asset_metadata/projects/vaulted`, this.apiKey);
|
|
711462
|
+
}
|
|
711454
711463
|
getAllProjects() {
|
|
711455
711464
|
const NFT_DATA_ARR = (0, utils_1.metadataObj2Arr)(utils_1.NFT_DATA);
|
|
711456
711465
|
const projects = (0, utils_1.metadataAllProjects)(NFT_DATA_ARR);
|
|
@@ -712339,7 +712348,7 @@ function generateTemplate(record) {
|
|
|
712339
712348
|
else if (recordName == "Bitcoin DeGods") {
|
|
712340
712349
|
allowed = firstAsset.coin == "ordinalsbtc" && firstAsset.balance == 1 && firstAsset.project == "DeGods";
|
|
712341
712350
|
}
|
|
712342
|
-
else if (recordName == "dot_id" || recordName == "dot_bit" || recordName == "Twitter Eggs" || recordName == "Blockhead" || recordName == "
|
|
712351
|
+
else if (recordName == "dot_id" || recordName == "dot_bit" || recordName == "Twitter Eggs" || recordName == "Blockhead" || recordName == "punycodes") {
|
|
712343
712352
|
data = _this.filterNativeBalances({ balances: data }, _this);
|
|
712344
712353
|
allowed = data[0].project == recordName;
|
|
712345
712354
|
}
|
package/dist/index.js
CHANGED
|
@@ -35,7 +35,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
35
35
|
const bignumber_1 = require("@ethersproject/bignumber");
|
|
36
36
|
const utils_1 = require("./utils");
|
|
37
37
|
const derive_1 = require("./derive");
|
|
38
|
-
const SDK_VERSION = '1.
|
|
38
|
+
const SDK_VERSION = '1.10.0';
|
|
39
39
|
class EmblemVaultSDK {
|
|
40
40
|
constructor(apiKey, baseUrl) {
|
|
41
41
|
this.apiKey = apiKey;
|
|
@@ -65,6 +65,15 @@ class EmblemVaultSDK {
|
|
|
65
65
|
getAllAssetMetadata() {
|
|
66
66
|
return (0, utils_1.metadataObj2Arr)(utils_1.NFT_DATA);
|
|
67
67
|
}
|
|
68
|
+
getRemoteAssetMetadataProjectList() {
|
|
69
|
+
return (0, utils_1.fetchData)(`${this.v3Url}/asset_metadata/projects`, this.apiKey);
|
|
70
|
+
}
|
|
71
|
+
getRemoteAssetMetadata(asset_name) {
|
|
72
|
+
return (0, utils_1.fetchData)(`${this.v3Url}/asset_metadata/${asset_name}`, this.apiKey);
|
|
73
|
+
}
|
|
74
|
+
getRemoteAssetMetadataVaultedProjectList() {
|
|
75
|
+
return (0, utils_1.fetchData)(`${this.v3Url}/asset_metadata/projects/vaulted`, this.apiKey);
|
|
76
|
+
}
|
|
68
77
|
getAllProjects() {
|
|
69
78
|
const NFT_DATA_ARR = (0, utils_1.metadataObj2Arr)(utils_1.NFT_DATA);
|
|
70
79
|
const projects = (0, utils_1.metadataAllProjects)(NFT_DATA_ARR);
|
package/dist/utils.js
CHANGED
|
@@ -319,7 +319,7 @@ function generateTemplate(record) {
|
|
|
319
319
|
else if (recordName == "Bitcoin DeGods") {
|
|
320
320
|
allowed = firstAsset.coin == "ordinalsbtc" && firstAsset.balance == 1 && firstAsset.project == "DeGods";
|
|
321
321
|
}
|
|
322
|
-
else if (recordName == "dot_id" || recordName == "dot_bit" || recordName == "Twitter Eggs" || recordName == "Blockhead" || recordName == "
|
|
322
|
+
else if (recordName == "dot_id" || recordName == "dot_bit" || recordName == "Twitter Eggs" || recordName == "Blockhead" || recordName == "punycodes") {
|
|
323
323
|
data = _this.filterNativeBalances({ balances: data }, _this);
|
|
324
324
|
allowed = data[0].project == recordName;
|
|
325
325
|
}
|
package/docs/bundle.js
CHANGED
|
@@ -711421,7 +711421,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
711421
711421
|
const bignumber_1 = require("@ethersproject/bignumber");
|
|
711422
711422
|
const utils_1 = require("./utils");
|
|
711423
711423
|
const derive_1 = require("./derive");
|
|
711424
|
-
const SDK_VERSION = '1.
|
|
711424
|
+
const SDK_VERSION = '1.10.0';
|
|
711425
711425
|
class EmblemVaultSDK {
|
|
711426
711426
|
constructor(apiKey, baseUrl) {
|
|
711427
711427
|
this.apiKey = apiKey;
|
|
@@ -711451,6 +711451,15 @@ class EmblemVaultSDK {
|
|
|
711451
711451
|
getAllAssetMetadata() {
|
|
711452
711452
|
return (0, utils_1.metadataObj2Arr)(utils_1.NFT_DATA);
|
|
711453
711453
|
}
|
|
711454
|
+
getRemoteAssetMetadataProjectList() {
|
|
711455
|
+
return (0, utils_1.fetchData)(`${this.v3Url}/asset_metadata/projects`, this.apiKey);
|
|
711456
|
+
}
|
|
711457
|
+
getRemoteAssetMetadata(asset_name) {
|
|
711458
|
+
return (0, utils_1.fetchData)(`${this.v3Url}/asset_metadata/${asset_name}`, this.apiKey);
|
|
711459
|
+
}
|
|
711460
|
+
getRemoteAssetMetadataVaultedProjectList() {
|
|
711461
|
+
return (0, utils_1.fetchData)(`${this.v3Url}/asset_metadata/projects/vaulted`, this.apiKey);
|
|
711462
|
+
}
|
|
711454
711463
|
getAllProjects() {
|
|
711455
711464
|
const NFT_DATA_ARR = (0, utils_1.metadataObj2Arr)(utils_1.NFT_DATA);
|
|
711456
711465
|
const projects = (0, utils_1.metadataAllProjects)(NFT_DATA_ARR);
|
|
@@ -712339,7 +712348,7 @@ function generateTemplate(record) {
|
|
|
712339
712348
|
else if (recordName == "Bitcoin DeGods") {
|
|
712340
712349
|
allowed = firstAsset.coin == "ordinalsbtc" && firstAsset.balance == 1 && firstAsset.project == "DeGods";
|
|
712341
712350
|
}
|
|
712342
|
-
else if (recordName == "dot_id" || recordName == "dot_bit" || recordName == "Twitter Eggs" || recordName == "Blockhead" || recordName == "
|
|
712351
|
+
else if (recordName == "dot_id" || recordName == "dot_bit" || recordName == "Twitter Eggs" || recordName == "Blockhead" || recordName == "punycodes") {
|
|
712343
712352
|
data = _this.filterNativeBalances({ balances: data }, _this);
|
|
712344
712353
|
allowed = data[0].project == recordName;
|
|
712345
712354
|
}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -41,6 +41,18 @@ class EmblemVaultSDK {
|
|
|
41
41
|
return metadataObj2Arr(NFT_DATA)
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
getRemoteAssetMetadataProjectList() {
|
|
45
|
+
return fetchData(`${this.v3Url}/asset_metadata/projects`, this.apiKey);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
getRemoteAssetMetadata(asset_name: string) {
|
|
49
|
+
return fetchData(`${this.v3Url}/asset_metadata/${asset_name}`, this.apiKey);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
getRemoteAssetMetadataVaultedProjectList() {
|
|
53
|
+
return fetchData(`${this.v3Url}/asset_metadata/projects/vaulted`, this.apiKey);
|
|
54
|
+
}
|
|
55
|
+
|
|
44
56
|
getAllProjects() {
|
|
45
57
|
const NFT_DATA_ARR = metadataObj2Arr(NFT_DATA)
|
|
46
58
|
const projects = metadataAllProjects(NFT_DATA_ARR)
|
package/src/utils.ts
CHANGED
|
@@ -296,7 +296,7 @@ export function generateTemplate(record: any) {
|
|
|
296
296
|
}
|
|
297
297
|
} else if (recordName == "Bitcoin DeGods") {
|
|
298
298
|
allowed = firstAsset.coin == "ordinalsbtc" && firstAsset.balance == 1 && firstAsset.project == "DeGods"
|
|
299
|
-
} else if (recordName == "dot_id" || recordName == "dot_bit" || recordName == "Twitter Eggs" || recordName == "Blockhead" || recordName == "
|
|
299
|
+
} else if (recordName == "dot_id" || recordName == "dot_bit" || recordName == "Twitter Eggs" || recordName == "Blockhead" || recordName == "punycodes") {
|
|
300
300
|
data = _this.filterNativeBalances({balances: data}, _this)
|
|
301
301
|
allowed = data[0].project == recordName
|
|
302
302
|
} else if (PROJECTS_DATA.includes(recordName)) { // XCP
|
package/types/index.d.ts
CHANGED
|
@@ -10,6 +10,9 @@ declare class EmblemVaultSDK {
|
|
|
10
10
|
generateUploadUrl(): void;
|
|
11
11
|
getAssetMetadata(projectName: string, strict?: boolean): any[];
|
|
12
12
|
getAllAssetMetadata(): any[];
|
|
13
|
+
getRemoteAssetMetadataProjectList(): Promise<any>;
|
|
14
|
+
getRemoteAssetMetadata(asset_name: string): Promise<any>;
|
|
15
|
+
getRemoteAssetMetadataVaultedProjectList(): Promise<any>;
|
|
13
16
|
getAllProjects(): any[];
|
|
14
17
|
fetchCuratedContracts(hideUnMintable?: boolean, overrideFunc?: Function | boolean): Promise<CuratedCollectionsResponse>;
|
|
15
18
|
fetchCuratedContractByName(name: string, contracts?: any): Promise<Collection | null>;
|