@0xsequence/metadata 2.3.1 → 2.3.3
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/0xsequence-metadata.cjs.dev.js +103 -18
- package/dist/0xsequence-metadata.cjs.prod.js +103 -18
- package/dist/0xsequence-metadata.esm.js +103 -19
- package/dist/declarations/src/metadata.gen.d.ts +104 -21
- package/package.json +1 -1
- package/src/metadata.gen.ts +268 -51
|
@@ -13,14 +13,14 @@ function _extends() {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
/* eslint-disable */
|
|
16
|
-
// sequence-metadata v0.4.0
|
|
16
|
+
// sequence-metadata v0.4.0 136240089e035d0bcdadfa59508ddbf164efd5e7
|
|
17
17
|
// --
|
|
18
|
-
// Code generated by webrpc-gen@v0.25.
|
|
18
|
+
// Code generated by webrpc-gen@v0.25.3 with typescript generator. DO NOT EDIT.
|
|
19
19
|
//
|
|
20
20
|
// webrpc-gen -schema=metadata.ridl -target=typescript -client -out=./clients/metadata.gen.ts
|
|
21
21
|
|
|
22
22
|
const WebrpcHeader = 'Webrpc';
|
|
23
|
-
const WebrpcHeaderValue = 'webrpc@v0.25.
|
|
23
|
+
const WebrpcHeaderValue = 'webrpc@v0.25.3;gen-typescript@v0.17.0;sequence-metadata@v0.4.0';
|
|
24
24
|
|
|
25
25
|
// WebRPC description and code-gen version
|
|
26
26
|
const WebRPCVersion = 'v1';
|
|
@@ -29,7 +29,7 @@ const WebRPCVersion = 'v1';
|
|
|
29
29
|
const WebRPCSchemaVersion = 'v0.4.0';
|
|
30
30
|
|
|
31
31
|
// Schema hash generated from your RIDL schema
|
|
32
|
-
const WebRPCSchemaHash = '
|
|
32
|
+
const WebRPCSchemaHash = '136240089e035d0bcdadfa59508ddbf164efd5e7';
|
|
33
33
|
function VersionFromHeader(headers) {
|
|
34
34
|
const headerValue = headers.get(WebrpcHeader);
|
|
35
35
|
if (!headerValue) {
|
|
@@ -75,6 +75,8 @@ let ContractType = /*#__PURE__*/function (ContractType) {
|
|
|
75
75
|
ContractType["ERC20"] = "ERC20";
|
|
76
76
|
ContractType["ERC721"] = "ERC721";
|
|
77
77
|
ContractType["ERC1155"] = "ERC1155";
|
|
78
|
+
ContractType["ERC6909"] = "ERC6909";
|
|
79
|
+
ContractType["MISC"] = "MISC";
|
|
78
80
|
return ContractType;
|
|
79
81
|
}({});
|
|
80
82
|
let Source = /*#__PURE__*/function (Source) {
|
|
@@ -85,6 +87,7 @@ let Source = /*#__PURE__*/function (Source) {
|
|
|
85
87
|
Source["FETCHER_ON_CHAIN_ERC20_INTERFACE"] = "FETCHER_ON_CHAIN_ERC20_INTERFACE";
|
|
86
88
|
Source["FETCHER_ON_CHAIN_TOKEN_URI"] = "FETCHER_ON_CHAIN_TOKEN_URI";
|
|
87
89
|
Source["FETCHER_ON_CHAIN_CONTRACT_URI"] = "FETCHER_ON_CHAIN_CONTRACT_URI";
|
|
90
|
+
Source["FETCHER_TOKEN_DIRECTORY_ADMIN"] = "FETCHER_TOKEN_DIRECTORY_ADMIN";
|
|
88
91
|
Source["TOKEN_DIRECTORY"] = "TOKEN_DIRECTORY";
|
|
89
92
|
Source["TOKEN_DIRECTORY_PUBLIC_TOKEN_LIST"] = "TOKEN_DIRECTORY_PUBLIC_TOKEN_LIST";
|
|
90
93
|
Source["TOKEN_DIRECTORY_3RD_PARTY"] = "TOKEN_DIRECTORY_3RD_PARTY";
|
|
@@ -507,12 +510,12 @@ class Metadata {
|
|
|
507
510
|
});
|
|
508
511
|
});
|
|
509
512
|
};
|
|
510
|
-
this.
|
|
511
|
-
return this.fetch(this.url('
|
|
513
|
+
this.getTokenDirectoryNetworks = (args, headers, signal) => {
|
|
514
|
+
return this.fetch(this.url('GetTokenDirectoryNetworks'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
512
515
|
return buildResponse(res).then(_data => {
|
|
513
516
|
return {
|
|
514
|
-
|
|
515
|
-
|
|
517
|
+
chainIDs: _data.chainIDs,
|
|
518
|
+
networks: _data.networks
|
|
516
519
|
};
|
|
517
520
|
});
|
|
518
521
|
}, error => {
|
|
@@ -521,11 +524,11 @@ class Metadata {
|
|
|
521
524
|
});
|
|
522
525
|
});
|
|
523
526
|
};
|
|
524
|
-
this.
|
|
525
|
-
return this.fetch(this.url('
|
|
527
|
+
this.getTokenDirectory = (args, headers, signal) => {
|
|
528
|
+
return this.fetch(this.url('GetTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
526
529
|
return buildResponse(res).then(_data => {
|
|
527
530
|
return {
|
|
528
|
-
|
|
531
|
+
contracts: _data.contracts,
|
|
529
532
|
page: _data.page
|
|
530
533
|
};
|
|
531
534
|
});
|
|
@@ -535,12 +538,12 @@ class Metadata {
|
|
|
535
538
|
});
|
|
536
539
|
});
|
|
537
540
|
};
|
|
538
|
-
this.
|
|
539
|
-
return this.fetch(this.url('
|
|
541
|
+
this.searchTokenDirectory = (args, headers, signal) => {
|
|
542
|
+
return this.fetch(this.url('SearchTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
540
543
|
return buildResponse(res).then(_data => {
|
|
541
544
|
return {
|
|
542
|
-
|
|
543
|
-
|
|
545
|
+
contracts: _data.contracts,
|
|
546
|
+
page: _data.page
|
|
544
547
|
};
|
|
545
548
|
});
|
|
546
549
|
}, error => {
|
|
@@ -932,6 +935,19 @@ class Admin {
|
|
|
932
935
|
this.hostname = void 0;
|
|
933
936
|
this.fetch = void 0;
|
|
934
937
|
this.path = '/rpc/Admin/';
|
|
938
|
+
this.getContractInfoOverride = (args, headers, signal) => {
|
|
939
|
+
return this.fetch(this.url('GetContractInfoOverride'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
940
|
+
return buildResponse(res).then(_data => {
|
|
941
|
+
return {
|
|
942
|
+
contractInfoOverride: _data.contractInfoOverride
|
|
943
|
+
};
|
|
944
|
+
});
|
|
945
|
+
}, error => {
|
|
946
|
+
throw WebrpcRequestFailedError.new({
|
|
947
|
+
cause: `fetch(): ${error.message || ''}`
|
|
948
|
+
});
|
|
949
|
+
});
|
|
950
|
+
};
|
|
935
951
|
this.getContractInfoOverrides = (args, headers, signal) => {
|
|
936
952
|
return this.fetch(this.url('GetContractInfoOverrides'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
937
953
|
return buildResponse(res).then(_data => {
|
|
@@ -949,7 +965,9 @@ class Admin {
|
|
|
949
965
|
this.addContractInfoOverride = (args, headers, signal) => {
|
|
950
966
|
return this.fetch(this.url('AddContractInfoOverride'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
951
967
|
return buildResponse(res).then(_data => {
|
|
952
|
-
return {
|
|
968
|
+
return {
|
|
969
|
+
ok: _data.ok
|
|
970
|
+
};
|
|
953
971
|
});
|
|
954
972
|
}, error => {
|
|
955
973
|
throw WebrpcRequestFailedError.new({
|
|
@@ -960,7 +978,9 @@ class Admin {
|
|
|
960
978
|
this.updateContractInfoOverride = (args, headers, signal) => {
|
|
961
979
|
return this.fetch(this.url('UpdateContractInfoOverride'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
962
980
|
return buildResponse(res).then(_data => {
|
|
963
|
-
return {
|
|
981
|
+
return {
|
|
982
|
+
ok: _data.ok
|
|
983
|
+
};
|
|
964
984
|
});
|
|
965
985
|
}, error => {
|
|
966
986
|
throw WebrpcRequestFailedError.new({
|
|
@@ -971,7 +991,62 @@ class Admin {
|
|
|
971
991
|
this.removeContractInfoOverride = (args, headers, signal) => {
|
|
972
992
|
return this.fetch(this.url('RemoveContractInfoOverride'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
973
993
|
return buildResponse(res).then(_data => {
|
|
974
|
-
return {
|
|
994
|
+
return {
|
|
995
|
+
ok: _data.ok
|
|
996
|
+
};
|
|
997
|
+
});
|
|
998
|
+
}, error => {
|
|
999
|
+
throw WebrpcRequestFailedError.new({
|
|
1000
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1001
|
+
});
|
|
1002
|
+
});
|
|
1003
|
+
};
|
|
1004
|
+
this.isInTokenDirectory = (args, headers, signal) => {
|
|
1005
|
+
return this.fetch(this.url('IsInTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1006
|
+
return buildResponse(res).then(_data => {
|
|
1007
|
+
return {
|
|
1008
|
+
ok: _data.ok,
|
|
1009
|
+
featureIndex: _data.featureIndex
|
|
1010
|
+
};
|
|
1011
|
+
});
|
|
1012
|
+
}, error => {
|
|
1013
|
+
throw WebrpcRequestFailedError.new({
|
|
1014
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1015
|
+
});
|
|
1016
|
+
});
|
|
1017
|
+
};
|
|
1018
|
+
this.setTokenDirectoryFeatureIndex = (args, headers, signal) => {
|
|
1019
|
+
return this.fetch(this.url('SetTokenDirectoryFeatureIndex'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1020
|
+
return buildResponse(res).then(_data => {
|
|
1021
|
+
return {
|
|
1022
|
+
ok: _data.ok
|
|
1023
|
+
};
|
|
1024
|
+
});
|
|
1025
|
+
}, error => {
|
|
1026
|
+
throw WebrpcRequestFailedError.new({
|
|
1027
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1028
|
+
});
|
|
1029
|
+
});
|
|
1030
|
+
};
|
|
1031
|
+
this.addContractToTokenDirectory = (args, headers, signal) => {
|
|
1032
|
+
return this.fetch(this.url('AddContractToTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1033
|
+
return buildResponse(res).then(_data => {
|
|
1034
|
+
return {
|
|
1035
|
+
ok: _data.ok
|
|
1036
|
+
};
|
|
1037
|
+
});
|
|
1038
|
+
}, error => {
|
|
1039
|
+
throw WebrpcRequestFailedError.new({
|
|
1040
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1041
|
+
});
|
|
1042
|
+
});
|
|
1043
|
+
};
|
|
1044
|
+
this.removeContractFromTokenDirectory = (args, headers, signal) => {
|
|
1045
|
+
return this.fetch(this.url('RemoveContractFromTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1046
|
+
return buildResponse(res).then(_data => {
|
|
1047
|
+
return {
|
|
1048
|
+
ok: _data.ok
|
|
1049
|
+
};
|
|
975
1050
|
});
|
|
976
1051
|
}, error => {
|
|
977
1052
|
throw WebrpcRequestFailedError.new({
|
|
@@ -1246,6 +1321,12 @@ class TaskFailedError extends WebrpcError {
|
|
|
1246
1321
|
Object.setPrototypeOf(this, TaskFailedError.prototype);
|
|
1247
1322
|
}
|
|
1248
1323
|
}
|
|
1324
|
+
class DeprecatedError extends WebrpcError {
|
|
1325
|
+
constructor(name = 'Deprecated', code = 1008, message = `RPC method is deprecated`, status = 0, cause) {
|
|
1326
|
+
super(name, code, message, status, cause);
|
|
1327
|
+
Object.setPrototypeOf(this, DeprecatedError.prototype);
|
|
1328
|
+
}
|
|
1329
|
+
}
|
|
1249
1330
|
class TimeoutError extends WebrpcError {
|
|
1250
1331
|
constructor(name = 'Timeout', code = 2000, message = `Request timed out`, status = 0, cause) {
|
|
1251
1332
|
super(name, code, message, status, cause);
|
|
@@ -1326,6 +1407,7 @@ let errors = /*#__PURE__*/function (errors) {
|
|
|
1326
1407
|
errors["Fail"] = "Fail";
|
|
1327
1408
|
errors["Geoblocked"] = "Geoblocked";
|
|
1328
1409
|
errors["TaskFailed"] = "TaskFailed";
|
|
1410
|
+
errors["Deprecated"] = "Deprecated";
|
|
1329
1411
|
errors["Timeout"] = "Timeout";
|
|
1330
1412
|
errors["InvalidArgument"] = "InvalidArgument";
|
|
1331
1413
|
errors["RequiredArgument"] = "RequiredArgument";
|
|
@@ -1358,6 +1440,7 @@ let WebrpcErrorCodes = /*#__PURE__*/function (WebrpcErrorCodes) {
|
|
|
1358
1440
|
WebrpcErrorCodes[WebrpcErrorCodes["Fail"] = 1005] = "Fail";
|
|
1359
1441
|
WebrpcErrorCodes[WebrpcErrorCodes["Geoblocked"] = 1006] = "Geoblocked";
|
|
1360
1442
|
WebrpcErrorCodes[WebrpcErrorCodes["TaskFailed"] = 1007] = "TaskFailed";
|
|
1443
|
+
WebrpcErrorCodes[WebrpcErrorCodes["Deprecated"] = 1008] = "Deprecated";
|
|
1361
1444
|
WebrpcErrorCodes[WebrpcErrorCodes["Timeout"] = 2000] = "Timeout";
|
|
1362
1445
|
WebrpcErrorCodes[WebrpcErrorCodes["InvalidArgument"] = 2001] = "InvalidArgument";
|
|
1363
1446
|
WebrpcErrorCodes[WebrpcErrorCodes["RequiredArgument"] = 2002] = "RequiredArgument";
|
|
@@ -1390,6 +1473,7 @@ const webrpcErrorByCode = {
|
|
|
1390
1473
|
[1005]: FailError,
|
|
1391
1474
|
[1006]: GeoblockedError,
|
|
1392
1475
|
[1007]: TaskFailedError,
|
|
1476
|
+
[1008]: DeprecatedError,
|
|
1393
1477
|
[2000]: TimeoutError,
|
|
1394
1478
|
[2001]: InvalidArgumentError,
|
|
1395
1479
|
[2002]: RequiredArgumentError,
|
|
@@ -1455,6 +1539,7 @@ exports.Admin = Admin;
|
|
|
1455
1539
|
exports.ChainNotFoundError = ChainNotFoundError;
|
|
1456
1540
|
exports.Collections = Collections;
|
|
1457
1541
|
exports.ContractType = ContractType;
|
|
1542
|
+
exports.DeprecatedError = DeprecatedError;
|
|
1458
1543
|
exports.FailError = FailError;
|
|
1459
1544
|
exports.GeoblockedError = GeoblockedError;
|
|
1460
1545
|
exports.InvalidArgumentError = InvalidArgumentError;
|
|
@@ -13,14 +13,14 @@ function _extends() {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
/* eslint-disable */
|
|
16
|
-
// sequence-metadata v0.4.0
|
|
16
|
+
// sequence-metadata v0.4.0 136240089e035d0bcdadfa59508ddbf164efd5e7
|
|
17
17
|
// --
|
|
18
|
-
// Code generated by webrpc-gen@v0.25.
|
|
18
|
+
// Code generated by webrpc-gen@v0.25.3 with typescript generator. DO NOT EDIT.
|
|
19
19
|
//
|
|
20
20
|
// webrpc-gen -schema=metadata.ridl -target=typescript -client -out=./clients/metadata.gen.ts
|
|
21
21
|
|
|
22
22
|
const WebrpcHeader = 'Webrpc';
|
|
23
|
-
const WebrpcHeaderValue = 'webrpc@v0.25.
|
|
23
|
+
const WebrpcHeaderValue = 'webrpc@v0.25.3;gen-typescript@v0.17.0;sequence-metadata@v0.4.0';
|
|
24
24
|
|
|
25
25
|
// WebRPC description and code-gen version
|
|
26
26
|
const WebRPCVersion = 'v1';
|
|
@@ -29,7 +29,7 @@ const WebRPCVersion = 'v1';
|
|
|
29
29
|
const WebRPCSchemaVersion = 'v0.4.0';
|
|
30
30
|
|
|
31
31
|
// Schema hash generated from your RIDL schema
|
|
32
|
-
const WebRPCSchemaHash = '
|
|
32
|
+
const WebRPCSchemaHash = '136240089e035d0bcdadfa59508ddbf164efd5e7';
|
|
33
33
|
function VersionFromHeader(headers) {
|
|
34
34
|
const headerValue = headers.get(WebrpcHeader);
|
|
35
35
|
if (!headerValue) {
|
|
@@ -75,6 +75,8 @@ let ContractType = /*#__PURE__*/function (ContractType) {
|
|
|
75
75
|
ContractType["ERC20"] = "ERC20";
|
|
76
76
|
ContractType["ERC721"] = "ERC721";
|
|
77
77
|
ContractType["ERC1155"] = "ERC1155";
|
|
78
|
+
ContractType["ERC6909"] = "ERC6909";
|
|
79
|
+
ContractType["MISC"] = "MISC";
|
|
78
80
|
return ContractType;
|
|
79
81
|
}({});
|
|
80
82
|
let Source = /*#__PURE__*/function (Source) {
|
|
@@ -85,6 +87,7 @@ let Source = /*#__PURE__*/function (Source) {
|
|
|
85
87
|
Source["FETCHER_ON_CHAIN_ERC20_INTERFACE"] = "FETCHER_ON_CHAIN_ERC20_INTERFACE";
|
|
86
88
|
Source["FETCHER_ON_CHAIN_TOKEN_URI"] = "FETCHER_ON_CHAIN_TOKEN_URI";
|
|
87
89
|
Source["FETCHER_ON_CHAIN_CONTRACT_URI"] = "FETCHER_ON_CHAIN_CONTRACT_URI";
|
|
90
|
+
Source["FETCHER_TOKEN_DIRECTORY_ADMIN"] = "FETCHER_TOKEN_DIRECTORY_ADMIN";
|
|
88
91
|
Source["TOKEN_DIRECTORY"] = "TOKEN_DIRECTORY";
|
|
89
92
|
Source["TOKEN_DIRECTORY_PUBLIC_TOKEN_LIST"] = "TOKEN_DIRECTORY_PUBLIC_TOKEN_LIST";
|
|
90
93
|
Source["TOKEN_DIRECTORY_3RD_PARTY"] = "TOKEN_DIRECTORY_3RD_PARTY";
|
|
@@ -507,12 +510,12 @@ class Metadata {
|
|
|
507
510
|
});
|
|
508
511
|
});
|
|
509
512
|
};
|
|
510
|
-
this.
|
|
511
|
-
return this.fetch(this.url('
|
|
513
|
+
this.getTokenDirectoryNetworks = (args, headers, signal) => {
|
|
514
|
+
return this.fetch(this.url('GetTokenDirectoryNetworks'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
512
515
|
return buildResponse(res).then(_data => {
|
|
513
516
|
return {
|
|
514
|
-
|
|
515
|
-
|
|
517
|
+
chainIDs: _data.chainIDs,
|
|
518
|
+
networks: _data.networks
|
|
516
519
|
};
|
|
517
520
|
});
|
|
518
521
|
}, error => {
|
|
@@ -521,11 +524,11 @@ class Metadata {
|
|
|
521
524
|
});
|
|
522
525
|
});
|
|
523
526
|
};
|
|
524
|
-
this.
|
|
525
|
-
return this.fetch(this.url('
|
|
527
|
+
this.getTokenDirectory = (args, headers, signal) => {
|
|
528
|
+
return this.fetch(this.url('GetTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
526
529
|
return buildResponse(res).then(_data => {
|
|
527
530
|
return {
|
|
528
|
-
|
|
531
|
+
contracts: _data.contracts,
|
|
529
532
|
page: _data.page
|
|
530
533
|
};
|
|
531
534
|
});
|
|
@@ -535,12 +538,12 @@ class Metadata {
|
|
|
535
538
|
});
|
|
536
539
|
});
|
|
537
540
|
};
|
|
538
|
-
this.
|
|
539
|
-
return this.fetch(this.url('
|
|
541
|
+
this.searchTokenDirectory = (args, headers, signal) => {
|
|
542
|
+
return this.fetch(this.url('SearchTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
540
543
|
return buildResponse(res).then(_data => {
|
|
541
544
|
return {
|
|
542
|
-
|
|
543
|
-
|
|
545
|
+
contracts: _data.contracts,
|
|
546
|
+
page: _data.page
|
|
544
547
|
};
|
|
545
548
|
});
|
|
546
549
|
}, error => {
|
|
@@ -932,6 +935,19 @@ class Admin {
|
|
|
932
935
|
this.hostname = void 0;
|
|
933
936
|
this.fetch = void 0;
|
|
934
937
|
this.path = '/rpc/Admin/';
|
|
938
|
+
this.getContractInfoOverride = (args, headers, signal) => {
|
|
939
|
+
return this.fetch(this.url('GetContractInfoOverride'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
940
|
+
return buildResponse(res).then(_data => {
|
|
941
|
+
return {
|
|
942
|
+
contractInfoOverride: _data.contractInfoOverride
|
|
943
|
+
};
|
|
944
|
+
});
|
|
945
|
+
}, error => {
|
|
946
|
+
throw WebrpcRequestFailedError.new({
|
|
947
|
+
cause: `fetch(): ${error.message || ''}`
|
|
948
|
+
});
|
|
949
|
+
});
|
|
950
|
+
};
|
|
935
951
|
this.getContractInfoOverrides = (args, headers, signal) => {
|
|
936
952
|
return this.fetch(this.url('GetContractInfoOverrides'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
937
953
|
return buildResponse(res).then(_data => {
|
|
@@ -949,7 +965,9 @@ class Admin {
|
|
|
949
965
|
this.addContractInfoOverride = (args, headers, signal) => {
|
|
950
966
|
return this.fetch(this.url('AddContractInfoOverride'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
951
967
|
return buildResponse(res).then(_data => {
|
|
952
|
-
return {
|
|
968
|
+
return {
|
|
969
|
+
ok: _data.ok
|
|
970
|
+
};
|
|
953
971
|
});
|
|
954
972
|
}, error => {
|
|
955
973
|
throw WebrpcRequestFailedError.new({
|
|
@@ -960,7 +978,9 @@ class Admin {
|
|
|
960
978
|
this.updateContractInfoOverride = (args, headers, signal) => {
|
|
961
979
|
return this.fetch(this.url('UpdateContractInfoOverride'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
962
980
|
return buildResponse(res).then(_data => {
|
|
963
|
-
return {
|
|
981
|
+
return {
|
|
982
|
+
ok: _data.ok
|
|
983
|
+
};
|
|
964
984
|
});
|
|
965
985
|
}, error => {
|
|
966
986
|
throw WebrpcRequestFailedError.new({
|
|
@@ -971,7 +991,62 @@ class Admin {
|
|
|
971
991
|
this.removeContractInfoOverride = (args, headers, signal) => {
|
|
972
992
|
return this.fetch(this.url('RemoveContractInfoOverride'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
973
993
|
return buildResponse(res).then(_data => {
|
|
974
|
-
return {
|
|
994
|
+
return {
|
|
995
|
+
ok: _data.ok
|
|
996
|
+
};
|
|
997
|
+
});
|
|
998
|
+
}, error => {
|
|
999
|
+
throw WebrpcRequestFailedError.new({
|
|
1000
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1001
|
+
});
|
|
1002
|
+
});
|
|
1003
|
+
};
|
|
1004
|
+
this.isInTokenDirectory = (args, headers, signal) => {
|
|
1005
|
+
return this.fetch(this.url('IsInTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1006
|
+
return buildResponse(res).then(_data => {
|
|
1007
|
+
return {
|
|
1008
|
+
ok: _data.ok,
|
|
1009
|
+
featureIndex: _data.featureIndex
|
|
1010
|
+
};
|
|
1011
|
+
});
|
|
1012
|
+
}, error => {
|
|
1013
|
+
throw WebrpcRequestFailedError.new({
|
|
1014
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1015
|
+
});
|
|
1016
|
+
});
|
|
1017
|
+
};
|
|
1018
|
+
this.setTokenDirectoryFeatureIndex = (args, headers, signal) => {
|
|
1019
|
+
return this.fetch(this.url('SetTokenDirectoryFeatureIndex'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1020
|
+
return buildResponse(res).then(_data => {
|
|
1021
|
+
return {
|
|
1022
|
+
ok: _data.ok
|
|
1023
|
+
};
|
|
1024
|
+
});
|
|
1025
|
+
}, error => {
|
|
1026
|
+
throw WebrpcRequestFailedError.new({
|
|
1027
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1028
|
+
});
|
|
1029
|
+
});
|
|
1030
|
+
};
|
|
1031
|
+
this.addContractToTokenDirectory = (args, headers, signal) => {
|
|
1032
|
+
return this.fetch(this.url('AddContractToTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1033
|
+
return buildResponse(res).then(_data => {
|
|
1034
|
+
return {
|
|
1035
|
+
ok: _data.ok
|
|
1036
|
+
};
|
|
1037
|
+
});
|
|
1038
|
+
}, error => {
|
|
1039
|
+
throw WebrpcRequestFailedError.new({
|
|
1040
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1041
|
+
});
|
|
1042
|
+
});
|
|
1043
|
+
};
|
|
1044
|
+
this.removeContractFromTokenDirectory = (args, headers, signal) => {
|
|
1045
|
+
return this.fetch(this.url('RemoveContractFromTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1046
|
+
return buildResponse(res).then(_data => {
|
|
1047
|
+
return {
|
|
1048
|
+
ok: _data.ok
|
|
1049
|
+
};
|
|
975
1050
|
});
|
|
976
1051
|
}, error => {
|
|
977
1052
|
throw WebrpcRequestFailedError.new({
|
|
@@ -1246,6 +1321,12 @@ class TaskFailedError extends WebrpcError {
|
|
|
1246
1321
|
Object.setPrototypeOf(this, TaskFailedError.prototype);
|
|
1247
1322
|
}
|
|
1248
1323
|
}
|
|
1324
|
+
class DeprecatedError extends WebrpcError {
|
|
1325
|
+
constructor(name = 'Deprecated', code = 1008, message = `RPC method is deprecated`, status = 0, cause) {
|
|
1326
|
+
super(name, code, message, status, cause);
|
|
1327
|
+
Object.setPrototypeOf(this, DeprecatedError.prototype);
|
|
1328
|
+
}
|
|
1329
|
+
}
|
|
1249
1330
|
class TimeoutError extends WebrpcError {
|
|
1250
1331
|
constructor(name = 'Timeout', code = 2000, message = `Request timed out`, status = 0, cause) {
|
|
1251
1332
|
super(name, code, message, status, cause);
|
|
@@ -1326,6 +1407,7 @@ let errors = /*#__PURE__*/function (errors) {
|
|
|
1326
1407
|
errors["Fail"] = "Fail";
|
|
1327
1408
|
errors["Geoblocked"] = "Geoblocked";
|
|
1328
1409
|
errors["TaskFailed"] = "TaskFailed";
|
|
1410
|
+
errors["Deprecated"] = "Deprecated";
|
|
1329
1411
|
errors["Timeout"] = "Timeout";
|
|
1330
1412
|
errors["InvalidArgument"] = "InvalidArgument";
|
|
1331
1413
|
errors["RequiredArgument"] = "RequiredArgument";
|
|
@@ -1358,6 +1440,7 @@ let WebrpcErrorCodes = /*#__PURE__*/function (WebrpcErrorCodes) {
|
|
|
1358
1440
|
WebrpcErrorCodes[WebrpcErrorCodes["Fail"] = 1005] = "Fail";
|
|
1359
1441
|
WebrpcErrorCodes[WebrpcErrorCodes["Geoblocked"] = 1006] = "Geoblocked";
|
|
1360
1442
|
WebrpcErrorCodes[WebrpcErrorCodes["TaskFailed"] = 1007] = "TaskFailed";
|
|
1443
|
+
WebrpcErrorCodes[WebrpcErrorCodes["Deprecated"] = 1008] = "Deprecated";
|
|
1361
1444
|
WebrpcErrorCodes[WebrpcErrorCodes["Timeout"] = 2000] = "Timeout";
|
|
1362
1445
|
WebrpcErrorCodes[WebrpcErrorCodes["InvalidArgument"] = 2001] = "InvalidArgument";
|
|
1363
1446
|
WebrpcErrorCodes[WebrpcErrorCodes["RequiredArgument"] = 2002] = "RequiredArgument";
|
|
@@ -1390,6 +1473,7 @@ const webrpcErrorByCode = {
|
|
|
1390
1473
|
[1005]: FailError,
|
|
1391
1474
|
[1006]: GeoblockedError,
|
|
1392
1475
|
[1007]: TaskFailedError,
|
|
1476
|
+
[1008]: DeprecatedError,
|
|
1393
1477
|
[2000]: TimeoutError,
|
|
1394
1478
|
[2001]: InvalidArgumentError,
|
|
1395
1479
|
[2002]: RequiredArgumentError,
|
|
@@ -1455,6 +1539,7 @@ exports.Admin = Admin;
|
|
|
1455
1539
|
exports.ChainNotFoundError = ChainNotFoundError;
|
|
1456
1540
|
exports.Collections = Collections;
|
|
1457
1541
|
exports.ContractType = ContractType;
|
|
1542
|
+
exports.DeprecatedError = DeprecatedError;
|
|
1458
1543
|
exports.FailError = FailError;
|
|
1459
1544
|
exports.GeoblockedError = GeoblockedError;
|
|
1460
1545
|
exports.InvalidArgumentError = InvalidArgumentError;
|