@0xsequence/metadata 2.3.0 → 2.3.2
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.
|
@@ -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 eb101fbae674de87b532432e85ce7694ccee2212
|
|
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 = 'eb101fbae674de87b532432e85ce7694ccee2212';
|
|
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";
|
|
@@ -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 => {
|
|
@@ -979,6 +995,53 @@ class Admin {
|
|
|
979
995
|
});
|
|
980
996
|
});
|
|
981
997
|
};
|
|
998
|
+
this.isInTokenDirectory = (args, headers, signal) => {
|
|
999
|
+
return this.fetch(this.url('IsInTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1000
|
+
return buildResponse(res).then(_data => {
|
|
1001
|
+
return {
|
|
1002
|
+
ok: _data.ok,
|
|
1003
|
+
featureIndex: _data.featureIndex
|
|
1004
|
+
};
|
|
1005
|
+
});
|
|
1006
|
+
}, error => {
|
|
1007
|
+
throw WebrpcRequestFailedError.new({
|
|
1008
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1009
|
+
});
|
|
1010
|
+
});
|
|
1011
|
+
};
|
|
1012
|
+
this.setTokenDirectoryFeatureIndex = (args, headers, signal) => {
|
|
1013
|
+
return this.fetch(this.url('SetTokenDirectoryFeatureIndex'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1014
|
+
return buildResponse(res).then(_data => {
|
|
1015
|
+
return {};
|
|
1016
|
+
});
|
|
1017
|
+
}, error => {
|
|
1018
|
+
throw WebrpcRequestFailedError.new({
|
|
1019
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1020
|
+
});
|
|
1021
|
+
});
|
|
1022
|
+
};
|
|
1023
|
+
this.addContractToTokenDirectory = (args, headers, signal) => {
|
|
1024
|
+
return this.fetch(this.url('AddContractToTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1025
|
+
return buildResponse(res).then(_data => {
|
|
1026
|
+
return {};
|
|
1027
|
+
});
|
|
1028
|
+
}, error => {
|
|
1029
|
+
throw WebrpcRequestFailedError.new({
|
|
1030
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1031
|
+
});
|
|
1032
|
+
});
|
|
1033
|
+
};
|
|
1034
|
+
this.removeContractFromTokenDirectory = (args, headers, signal) => {
|
|
1035
|
+
return this.fetch(this.url('RemoveContractFromTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1036
|
+
return buildResponse(res).then(_data => {
|
|
1037
|
+
return {};
|
|
1038
|
+
});
|
|
1039
|
+
}, error => {
|
|
1040
|
+
throw WebrpcRequestFailedError.new({
|
|
1041
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1042
|
+
});
|
|
1043
|
+
});
|
|
1044
|
+
};
|
|
982
1045
|
this.refreshTokenDirectory = (headers, signal) => {
|
|
983
1046
|
return this.fetch(this.url('RefreshTokenDirectory'), createHTTPRequest({}, headers, signal)).then(res => {
|
|
984
1047
|
return buildResponse(res).then(_data => {
|
|
@@ -1246,6 +1309,12 @@ class TaskFailedError extends WebrpcError {
|
|
|
1246
1309
|
Object.setPrototypeOf(this, TaskFailedError.prototype);
|
|
1247
1310
|
}
|
|
1248
1311
|
}
|
|
1312
|
+
class DeprecatedError extends WebrpcError {
|
|
1313
|
+
constructor(name = 'Deprecated', code = 1008, message = `RPC method is deprecated`, status = 0, cause) {
|
|
1314
|
+
super(name, code, message, status, cause);
|
|
1315
|
+
Object.setPrototypeOf(this, DeprecatedError.prototype);
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1249
1318
|
class TimeoutError extends WebrpcError {
|
|
1250
1319
|
constructor(name = 'Timeout', code = 2000, message = `Request timed out`, status = 0, cause) {
|
|
1251
1320
|
super(name, code, message, status, cause);
|
|
@@ -1326,6 +1395,7 @@ let errors = /*#__PURE__*/function (errors) {
|
|
|
1326
1395
|
errors["Fail"] = "Fail";
|
|
1327
1396
|
errors["Geoblocked"] = "Geoblocked";
|
|
1328
1397
|
errors["TaskFailed"] = "TaskFailed";
|
|
1398
|
+
errors["Deprecated"] = "Deprecated";
|
|
1329
1399
|
errors["Timeout"] = "Timeout";
|
|
1330
1400
|
errors["InvalidArgument"] = "InvalidArgument";
|
|
1331
1401
|
errors["RequiredArgument"] = "RequiredArgument";
|
|
@@ -1358,6 +1428,7 @@ let WebrpcErrorCodes = /*#__PURE__*/function (WebrpcErrorCodes) {
|
|
|
1358
1428
|
WebrpcErrorCodes[WebrpcErrorCodes["Fail"] = 1005] = "Fail";
|
|
1359
1429
|
WebrpcErrorCodes[WebrpcErrorCodes["Geoblocked"] = 1006] = "Geoblocked";
|
|
1360
1430
|
WebrpcErrorCodes[WebrpcErrorCodes["TaskFailed"] = 1007] = "TaskFailed";
|
|
1431
|
+
WebrpcErrorCodes[WebrpcErrorCodes["Deprecated"] = 1008] = "Deprecated";
|
|
1361
1432
|
WebrpcErrorCodes[WebrpcErrorCodes["Timeout"] = 2000] = "Timeout";
|
|
1362
1433
|
WebrpcErrorCodes[WebrpcErrorCodes["InvalidArgument"] = 2001] = "InvalidArgument";
|
|
1363
1434
|
WebrpcErrorCodes[WebrpcErrorCodes["RequiredArgument"] = 2002] = "RequiredArgument";
|
|
@@ -1390,6 +1461,7 @@ const webrpcErrorByCode = {
|
|
|
1390
1461
|
[1005]: FailError,
|
|
1391
1462
|
[1006]: GeoblockedError,
|
|
1392
1463
|
[1007]: TaskFailedError,
|
|
1464
|
+
[1008]: DeprecatedError,
|
|
1393
1465
|
[2000]: TimeoutError,
|
|
1394
1466
|
[2001]: InvalidArgumentError,
|
|
1395
1467
|
[2002]: RequiredArgumentError,
|
|
@@ -1455,6 +1527,7 @@ exports.Admin = Admin;
|
|
|
1455
1527
|
exports.ChainNotFoundError = ChainNotFoundError;
|
|
1456
1528
|
exports.Collections = Collections;
|
|
1457
1529
|
exports.ContractType = ContractType;
|
|
1530
|
+
exports.DeprecatedError = DeprecatedError;
|
|
1458
1531
|
exports.FailError = FailError;
|
|
1459
1532
|
exports.GeoblockedError = GeoblockedError;
|
|
1460
1533
|
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 eb101fbae674de87b532432e85ce7694ccee2212
|
|
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 = 'eb101fbae674de87b532432e85ce7694ccee2212';
|
|
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";
|
|
@@ -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 => {
|
|
@@ -979,6 +995,53 @@ class Admin {
|
|
|
979
995
|
});
|
|
980
996
|
});
|
|
981
997
|
};
|
|
998
|
+
this.isInTokenDirectory = (args, headers, signal) => {
|
|
999
|
+
return this.fetch(this.url('IsInTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1000
|
+
return buildResponse(res).then(_data => {
|
|
1001
|
+
return {
|
|
1002
|
+
ok: _data.ok,
|
|
1003
|
+
featureIndex: _data.featureIndex
|
|
1004
|
+
};
|
|
1005
|
+
});
|
|
1006
|
+
}, error => {
|
|
1007
|
+
throw WebrpcRequestFailedError.new({
|
|
1008
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1009
|
+
});
|
|
1010
|
+
});
|
|
1011
|
+
};
|
|
1012
|
+
this.setTokenDirectoryFeatureIndex = (args, headers, signal) => {
|
|
1013
|
+
return this.fetch(this.url('SetTokenDirectoryFeatureIndex'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1014
|
+
return buildResponse(res).then(_data => {
|
|
1015
|
+
return {};
|
|
1016
|
+
});
|
|
1017
|
+
}, error => {
|
|
1018
|
+
throw WebrpcRequestFailedError.new({
|
|
1019
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1020
|
+
});
|
|
1021
|
+
});
|
|
1022
|
+
};
|
|
1023
|
+
this.addContractToTokenDirectory = (args, headers, signal) => {
|
|
1024
|
+
return this.fetch(this.url('AddContractToTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1025
|
+
return buildResponse(res).then(_data => {
|
|
1026
|
+
return {};
|
|
1027
|
+
});
|
|
1028
|
+
}, error => {
|
|
1029
|
+
throw WebrpcRequestFailedError.new({
|
|
1030
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1031
|
+
});
|
|
1032
|
+
});
|
|
1033
|
+
};
|
|
1034
|
+
this.removeContractFromTokenDirectory = (args, headers, signal) => {
|
|
1035
|
+
return this.fetch(this.url('RemoveContractFromTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1036
|
+
return buildResponse(res).then(_data => {
|
|
1037
|
+
return {};
|
|
1038
|
+
});
|
|
1039
|
+
}, error => {
|
|
1040
|
+
throw WebrpcRequestFailedError.new({
|
|
1041
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1042
|
+
});
|
|
1043
|
+
});
|
|
1044
|
+
};
|
|
982
1045
|
this.refreshTokenDirectory = (headers, signal) => {
|
|
983
1046
|
return this.fetch(this.url('RefreshTokenDirectory'), createHTTPRequest({}, headers, signal)).then(res => {
|
|
984
1047
|
return buildResponse(res).then(_data => {
|
|
@@ -1246,6 +1309,12 @@ class TaskFailedError extends WebrpcError {
|
|
|
1246
1309
|
Object.setPrototypeOf(this, TaskFailedError.prototype);
|
|
1247
1310
|
}
|
|
1248
1311
|
}
|
|
1312
|
+
class DeprecatedError extends WebrpcError {
|
|
1313
|
+
constructor(name = 'Deprecated', code = 1008, message = `RPC method is deprecated`, status = 0, cause) {
|
|
1314
|
+
super(name, code, message, status, cause);
|
|
1315
|
+
Object.setPrototypeOf(this, DeprecatedError.prototype);
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1249
1318
|
class TimeoutError extends WebrpcError {
|
|
1250
1319
|
constructor(name = 'Timeout', code = 2000, message = `Request timed out`, status = 0, cause) {
|
|
1251
1320
|
super(name, code, message, status, cause);
|
|
@@ -1326,6 +1395,7 @@ let errors = /*#__PURE__*/function (errors) {
|
|
|
1326
1395
|
errors["Fail"] = "Fail";
|
|
1327
1396
|
errors["Geoblocked"] = "Geoblocked";
|
|
1328
1397
|
errors["TaskFailed"] = "TaskFailed";
|
|
1398
|
+
errors["Deprecated"] = "Deprecated";
|
|
1329
1399
|
errors["Timeout"] = "Timeout";
|
|
1330
1400
|
errors["InvalidArgument"] = "InvalidArgument";
|
|
1331
1401
|
errors["RequiredArgument"] = "RequiredArgument";
|
|
@@ -1358,6 +1428,7 @@ let WebrpcErrorCodes = /*#__PURE__*/function (WebrpcErrorCodes) {
|
|
|
1358
1428
|
WebrpcErrorCodes[WebrpcErrorCodes["Fail"] = 1005] = "Fail";
|
|
1359
1429
|
WebrpcErrorCodes[WebrpcErrorCodes["Geoblocked"] = 1006] = "Geoblocked";
|
|
1360
1430
|
WebrpcErrorCodes[WebrpcErrorCodes["TaskFailed"] = 1007] = "TaskFailed";
|
|
1431
|
+
WebrpcErrorCodes[WebrpcErrorCodes["Deprecated"] = 1008] = "Deprecated";
|
|
1361
1432
|
WebrpcErrorCodes[WebrpcErrorCodes["Timeout"] = 2000] = "Timeout";
|
|
1362
1433
|
WebrpcErrorCodes[WebrpcErrorCodes["InvalidArgument"] = 2001] = "InvalidArgument";
|
|
1363
1434
|
WebrpcErrorCodes[WebrpcErrorCodes["RequiredArgument"] = 2002] = "RequiredArgument";
|
|
@@ -1390,6 +1461,7 @@ const webrpcErrorByCode = {
|
|
|
1390
1461
|
[1005]: FailError,
|
|
1391
1462
|
[1006]: GeoblockedError,
|
|
1392
1463
|
[1007]: TaskFailedError,
|
|
1464
|
+
[1008]: DeprecatedError,
|
|
1393
1465
|
[2000]: TimeoutError,
|
|
1394
1466
|
[2001]: InvalidArgumentError,
|
|
1395
1467
|
[2002]: RequiredArgumentError,
|
|
@@ -1455,6 +1527,7 @@ exports.Admin = Admin;
|
|
|
1455
1527
|
exports.ChainNotFoundError = ChainNotFoundError;
|
|
1456
1528
|
exports.Collections = Collections;
|
|
1457
1529
|
exports.ContractType = ContractType;
|
|
1530
|
+
exports.DeprecatedError = DeprecatedError;
|
|
1458
1531
|
exports.FailError = FailError;
|
|
1459
1532
|
exports.GeoblockedError = GeoblockedError;
|
|
1460
1533
|
exports.InvalidArgumentError = InvalidArgumentError;
|
|
@@ -9,14 +9,14 @@ function _extends() {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
/* eslint-disable */
|
|
12
|
-
// sequence-metadata v0.4.0
|
|
12
|
+
// sequence-metadata v0.4.0 eb101fbae674de87b532432e85ce7694ccee2212
|
|
13
13
|
// --
|
|
14
|
-
// Code generated by webrpc-gen@v0.25.
|
|
14
|
+
// Code generated by webrpc-gen@v0.25.3 with typescript generator. DO NOT EDIT.
|
|
15
15
|
//
|
|
16
16
|
// webrpc-gen -schema=metadata.ridl -target=typescript -client -out=./clients/metadata.gen.ts
|
|
17
17
|
|
|
18
18
|
const WebrpcHeader = 'Webrpc';
|
|
19
|
-
const WebrpcHeaderValue = 'webrpc@v0.25.
|
|
19
|
+
const WebrpcHeaderValue = 'webrpc@v0.25.3;gen-typescript@v0.17.0;sequence-metadata@v0.4.0';
|
|
20
20
|
|
|
21
21
|
// WebRPC description and code-gen version
|
|
22
22
|
const WebRPCVersion = 'v1';
|
|
@@ -25,7 +25,7 @@ const WebRPCVersion = 'v1';
|
|
|
25
25
|
const WebRPCSchemaVersion = 'v0.4.0';
|
|
26
26
|
|
|
27
27
|
// Schema hash generated from your RIDL schema
|
|
28
|
-
const WebRPCSchemaHash = '
|
|
28
|
+
const WebRPCSchemaHash = 'eb101fbae674de87b532432e85ce7694ccee2212';
|
|
29
29
|
function VersionFromHeader(headers) {
|
|
30
30
|
const headerValue = headers.get(WebrpcHeader);
|
|
31
31
|
if (!headerValue) {
|
|
@@ -71,6 +71,8 @@ let ContractType = /*#__PURE__*/function (ContractType) {
|
|
|
71
71
|
ContractType["ERC20"] = "ERC20";
|
|
72
72
|
ContractType["ERC721"] = "ERC721";
|
|
73
73
|
ContractType["ERC1155"] = "ERC1155";
|
|
74
|
+
ContractType["ERC6909"] = "ERC6909";
|
|
75
|
+
ContractType["MISC"] = "MISC";
|
|
74
76
|
return ContractType;
|
|
75
77
|
}({});
|
|
76
78
|
let Source = /*#__PURE__*/function (Source) {
|
|
@@ -81,6 +83,7 @@ let Source = /*#__PURE__*/function (Source) {
|
|
|
81
83
|
Source["FETCHER_ON_CHAIN_ERC20_INTERFACE"] = "FETCHER_ON_CHAIN_ERC20_INTERFACE";
|
|
82
84
|
Source["FETCHER_ON_CHAIN_TOKEN_URI"] = "FETCHER_ON_CHAIN_TOKEN_URI";
|
|
83
85
|
Source["FETCHER_ON_CHAIN_CONTRACT_URI"] = "FETCHER_ON_CHAIN_CONTRACT_URI";
|
|
86
|
+
Source["FETCHER_TOKEN_DIRECTORY_ADMIN"] = "FETCHER_TOKEN_DIRECTORY_ADMIN";
|
|
84
87
|
Source["TOKEN_DIRECTORY"] = "TOKEN_DIRECTORY";
|
|
85
88
|
Source["TOKEN_DIRECTORY_PUBLIC_TOKEN_LIST"] = "TOKEN_DIRECTORY_PUBLIC_TOKEN_LIST";
|
|
86
89
|
Source["TOKEN_DIRECTORY_3RD_PARTY"] = "TOKEN_DIRECTORY_3RD_PARTY";
|
|
@@ -928,6 +931,19 @@ class Admin {
|
|
|
928
931
|
this.hostname = void 0;
|
|
929
932
|
this.fetch = void 0;
|
|
930
933
|
this.path = '/rpc/Admin/';
|
|
934
|
+
this.getContractInfoOverride = (args, headers, signal) => {
|
|
935
|
+
return this.fetch(this.url('GetContractInfoOverride'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
936
|
+
return buildResponse(res).then(_data => {
|
|
937
|
+
return {
|
|
938
|
+
contractInfoOverride: _data.contractInfoOverride
|
|
939
|
+
};
|
|
940
|
+
});
|
|
941
|
+
}, error => {
|
|
942
|
+
throw WebrpcRequestFailedError.new({
|
|
943
|
+
cause: `fetch(): ${error.message || ''}`
|
|
944
|
+
});
|
|
945
|
+
});
|
|
946
|
+
};
|
|
931
947
|
this.getContractInfoOverrides = (args, headers, signal) => {
|
|
932
948
|
return this.fetch(this.url('GetContractInfoOverrides'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
933
949
|
return buildResponse(res).then(_data => {
|
|
@@ -975,6 +991,53 @@ class Admin {
|
|
|
975
991
|
});
|
|
976
992
|
});
|
|
977
993
|
};
|
|
994
|
+
this.isInTokenDirectory = (args, headers, signal) => {
|
|
995
|
+
return this.fetch(this.url('IsInTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
996
|
+
return buildResponse(res).then(_data => {
|
|
997
|
+
return {
|
|
998
|
+
ok: _data.ok,
|
|
999
|
+
featureIndex: _data.featureIndex
|
|
1000
|
+
};
|
|
1001
|
+
});
|
|
1002
|
+
}, error => {
|
|
1003
|
+
throw WebrpcRequestFailedError.new({
|
|
1004
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1005
|
+
});
|
|
1006
|
+
});
|
|
1007
|
+
};
|
|
1008
|
+
this.setTokenDirectoryFeatureIndex = (args, headers, signal) => {
|
|
1009
|
+
return this.fetch(this.url('SetTokenDirectoryFeatureIndex'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1010
|
+
return buildResponse(res).then(_data => {
|
|
1011
|
+
return {};
|
|
1012
|
+
});
|
|
1013
|
+
}, error => {
|
|
1014
|
+
throw WebrpcRequestFailedError.new({
|
|
1015
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1016
|
+
});
|
|
1017
|
+
});
|
|
1018
|
+
};
|
|
1019
|
+
this.addContractToTokenDirectory = (args, headers, signal) => {
|
|
1020
|
+
return this.fetch(this.url('AddContractToTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1021
|
+
return buildResponse(res).then(_data => {
|
|
1022
|
+
return {};
|
|
1023
|
+
});
|
|
1024
|
+
}, error => {
|
|
1025
|
+
throw WebrpcRequestFailedError.new({
|
|
1026
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1027
|
+
});
|
|
1028
|
+
});
|
|
1029
|
+
};
|
|
1030
|
+
this.removeContractFromTokenDirectory = (args, headers, signal) => {
|
|
1031
|
+
return this.fetch(this.url('RemoveContractFromTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1032
|
+
return buildResponse(res).then(_data => {
|
|
1033
|
+
return {};
|
|
1034
|
+
});
|
|
1035
|
+
}, error => {
|
|
1036
|
+
throw WebrpcRequestFailedError.new({
|
|
1037
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1038
|
+
});
|
|
1039
|
+
});
|
|
1040
|
+
};
|
|
978
1041
|
this.refreshTokenDirectory = (headers, signal) => {
|
|
979
1042
|
return this.fetch(this.url('RefreshTokenDirectory'), createHTTPRequest({}, headers, signal)).then(res => {
|
|
980
1043
|
return buildResponse(res).then(_data => {
|
|
@@ -1242,6 +1305,12 @@ class TaskFailedError extends WebrpcError {
|
|
|
1242
1305
|
Object.setPrototypeOf(this, TaskFailedError.prototype);
|
|
1243
1306
|
}
|
|
1244
1307
|
}
|
|
1308
|
+
class DeprecatedError extends WebrpcError {
|
|
1309
|
+
constructor(name = 'Deprecated', code = 1008, message = `RPC method is deprecated`, status = 0, cause) {
|
|
1310
|
+
super(name, code, message, status, cause);
|
|
1311
|
+
Object.setPrototypeOf(this, DeprecatedError.prototype);
|
|
1312
|
+
}
|
|
1313
|
+
}
|
|
1245
1314
|
class TimeoutError extends WebrpcError {
|
|
1246
1315
|
constructor(name = 'Timeout', code = 2000, message = `Request timed out`, status = 0, cause) {
|
|
1247
1316
|
super(name, code, message, status, cause);
|
|
@@ -1322,6 +1391,7 @@ let errors = /*#__PURE__*/function (errors) {
|
|
|
1322
1391
|
errors["Fail"] = "Fail";
|
|
1323
1392
|
errors["Geoblocked"] = "Geoblocked";
|
|
1324
1393
|
errors["TaskFailed"] = "TaskFailed";
|
|
1394
|
+
errors["Deprecated"] = "Deprecated";
|
|
1325
1395
|
errors["Timeout"] = "Timeout";
|
|
1326
1396
|
errors["InvalidArgument"] = "InvalidArgument";
|
|
1327
1397
|
errors["RequiredArgument"] = "RequiredArgument";
|
|
@@ -1354,6 +1424,7 @@ let WebrpcErrorCodes = /*#__PURE__*/function (WebrpcErrorCodes) {
|
|
|
1354
1424
|
WebrpcErrorCodes[WebrpcErrorCodes["Fail"] = 1005] = "Fail";
|
|
1355
1425
|
WebrpcErrorCodes[WebrpcErrorCodes["Geoblocked"] = 1006] = "Geoblocked";
|
|
1356
1426
|
WebrpcErrorCodes[WebrpcErrorCodes["TaskFailed"] = 1007] = "TaskFailed";
|
|
1427
|
+
WebrpcErrorCodes[WebrpcErrorCodes["Deprecated"] = 1008] = "Deprecated";
|
|
1357
1428
|
WebrpcErrorCodes[WebrpcErrorCodes["Timeout"] = 2000] = "Timeout";
|
|
1358
1429
|
WebrpcErrorCodes[WebrpcErrorCodes["InvalidArgument"] = 2001] = "InvalidArgument";
|
|
1359
1430
|
WebrpcErrorCodes[WebrpcErrorCodes["RequiredArgument"] = 2002] = "RequiredArgument";
|
|
@@ -1386,6 +1457,7 @@ const webrpcErrorByCode = {
|
|
|
1386
1457
|
[1005]: FailError,
|
|
1387
1458
|
[1006]: GeoblockedError,
|
|
1388
1459
|
[1007]: TaskFailedError,
|
|
1460
|
+
[1008]: DeprecatedError,
|
|
1389
1461
|
[2000]: TimeoutError,
|
|
1390
1462
|
[2001]: InvalidArgumentError,
|
|
1391
1463
|
[2002]: RequiredArgumentError,
|
|
@@ -1447,4 +1519,4 @@ class SequenceCollections extends Collections {
|
|
|
1447
1519
|
// https://github.com/0xsequence/go-sequence/blob/master/metadata/collections.go#L52
|
|
1448
1520
|
}
|
|
1449
1521
|
|
|
1450
|
-
export { Admin, ChainNotFoundError, Collections, ContractType, FailError, GeoblockedError, InvalidArgumentError, Metadata, MethodNotFoundError, NotFoundError, PermissionDeniedError, ProjectNotFoundError, PropertyType, QueryFailedError, RateLimitedError, RequestConflictError, RequiredArgumentError, ResourceStatus, SequenceCollections, SequenceMetadata, SessionExpiredError, Source, SwapType, TaskFailedError, TaskStatus, TimeoutError, TokenDirectoryDisabledError, UnauthorizedError, ValidationFailedError, VersionFromHeader, WebRPCSchemaHash, WebRPCSchemaVersion, WebRPCVersion, WebrpcBadMethodError, WebrpcBadRequestError, WebrpcBadResponseError, WebrpcBadRouteError, WebrpcClientDisconnectedError, WebrpcEndpointError, WebrpcError, WebrpcErrorCodes, WebrpcHeader, WebrpcHeaderValue, WebrpcInternalErrorError, WebrpcRequestFailedError, WebrpcServerPanicError, WebrpcStreamFinishedError, WebrpcStreamLostError, errors, webrpcErrorByCode };
|
|
1522
|
+
export { Admin, ChainNotFoundError, Collections, ContractType, DeprecatedError, FailError, GeoblockedError, InvalidArgumentError, Metadata, MethodNotFoundError, NotFoundError, PermissionDeniedError, ProjectNotFoundError, PropertyType, QueryFailedError, RateLimitedError, RequestConflictError, RequiredArgumentError, ResourceStatus, SequenceCollections, SequenceMetadata, SessionExpiredError, Source, SwapType, TaskFailedError, TaskStatus, TimeoutError, TokenDirectoryDisabledError, UnauthorizedError, ValidationFailedError, VersionFromHeader, WebRPCSchemaHash, WebRPCSchemaVersion, WebRPCVersion, WebrpcBadMethodError, WebrpcBadRequestError, WebrpcBadResponseError, WebrpcBadRouteError, WebrpcClientDisconnectedError, WebrpcEndpointError, WebrpcError, WebrpcErrorCodes, WebrpcHeader, WebrpcHeaderValue, WebrpcInternalErrorError, WebrpcRequestFailedError, WebrpcServerPanicError, WebrpcStreamFinishedError, WebrpcStreamLostError, errors, webrpcErrorByCode };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare const WebrpcHeader = "Webrpc";
|
|
2
|
-
export declare const WebrpcHeaderValue = "webrpc@v0.25.
|
|
2
|
+
export declare const WebrpcHeaderValue = "webrpc@v0.25.3;gen-typescript@v0.17.0;sequence-metadata@v0.4.0";
|
|
3
3
|
export declare const WebRPCVersion = "v1";
|
|
4
4
|
export declare const WebRPCSchemaVersion = "v0.4.0";
|
|
5
|
-
export declare const WebRPCSchemaHash = "
|
|
5
|
+
export declare const WebRPCSchemaHash = "eb101fbae674de87b532432e85ce7694ccee2212";
|
|
6
6
|
type WebrpcGenVersions = {
|
|
7
7
|
webrpcGenVersion: string;
|
|
8
8
|
codeGenName: string;
|
|
@@ -15,7 +15,9 @@ export declare enum ContractType {
|
|
|
15
15
|
UNKNOWN = "UNKNOWN",
|
|
16
16
|
ERC20 = "ERC20",
|
|
17
17
|
ERC721 = "ERC721",
|
|
18
|
-
ERC1155 = "ERC1155"
|
|
18
|
+
ERC1155 = "ERC1155",
|
|
19
|
+
ERC6909 = "ERC6909",
|
|
20
|
+
MISC = "MISC"
|
|
19
21
|
}
|
|
20
22
|
export declare enum Source {
|
|
21
23
|
UNKNOWN = "UNKNOWN",
|
|
@@ -25,6 +27,7 @@ export declare enum Source {
|
|
|
25
27
|
FETCHER_ON_CHAIN_ERC20_INTERFACE = "FETCHER_ON_CHAIN_ERC20_INTERFACE",
|
|
26
28
|
FETCHER_ON_CHAIN_TOKEN_URI = "FETCHER_ON_CHAIN_TOKEN_URI",
|
|
27
29
|
FETCHER_ON_CHAIN_CONTRACT_URI = "FETCHER_ON_CHAIN_CONTRACT_URI",
|
|
30
|
+
FETCHER_TOKEN_DIRECTORY_ADMIN = "FETCHER_TOKEN_DIRECTORY_ADMIN",
|
|
28
31
|
TOKEN_DIRECTORY = "TOKEN_DIRECTORY",
|
|
29
32
|
TOKEN_DIRECTORY_PUBLIC_TOKEN_LIST = "TOKEN_DIRECTORY_PUBLIC_TOKEN_LIST",
|
|
30
33
|
TOKEN_DIRECTORY_3RD_PARTY = "TOKEN_DIRECTORY_3RD_PARTY",
|
|
@@ -142,6 +145,27 @@ export interface ContractInfoExtensions {
|
|
|
142
145
|
featured: boolean;
|
|
143
146
|
featureIndex: number;
|
|
144
147
|
}
|
|
148
|
+
export interface ContractInfoOverride {
|
|
149
|
+
name?: string;
|
|
150
|
+
type?: string;
|
|
151
|
+
symbol?: string;
|
|
152
|
+
decimals?: number;
|
|
153
|
+
logoURI?: string;
|
|
154
|
+
extensions: ContractInfoExtensionsOverride;
|
|
155
|
+
}
|
|
156
|
+
export interface ContractInfoExtensionsOverride {
|
|
157
|
+
link?: string;
|
|
158
|
+
description?: string;
|
|
159
|
+
categories?: Array<string>;
|
|
160
|
+
ogImage?: string;
|
|
161
|
+
ogName?: string;
|
|
162
|
+
originChainId?: number;
|
|
163
|
+
originAddress?: string;
|
|
164
|
+
blacklist?: boolean;
|
|
165
|
+
verified?: boolean;
|
|
166
|
+
verifiedBy?: string;
|
|
167
|
+
featureIndex?: number;
|
|
168
|
+
}
|
|
145
169
|
export interface TokenMetadata {
|
|
146
170
|
contractAddress?: string;
|
|
147
171
|
tokenId: string;
|
|
@@ -906,6 +930,7 @@ export interface Admin {
|
|
|
906
930
|
/**
|
|
907
931
|
* Contract Info Overrides
|
|
908
932
|
*/
|
|
933
|
+
getContractInfoOverride(args: GetContractInfoOverrideArgs, headers?: object, signal?: AbortSignal): Promise<GetContractInfoOverrideReturn>;
|
|
909
934
|
getContractInfoOverrides(args: GetContractInfoOverridesArgs, headers?: object, signal?: AbortSignal): Promise<GetContractInfoOverridesReturn>;
|
|
910
935
|
addContractInfoOverride(args: AddContractInfoOverrideArgs, headers?: object, signal?: AbortSignal): Promise<AddContractInfoOverrideReturn>;
|
|
911
936
|
updateContractInfoOverride(args: UpdateContractInfoOverrideArgs, headers?: object, signal?: AbortSignal): Promise<UpdateContractInfoOverrideReturn>;
|
|
@@ -913,6 +938,10 @@ export interface Admin {
|
|
|
913
938
|
/**
|
|
914
939
|
* Token Directory
|
|
915
940
|
*/
|
|
941
|
+
isInTokenDirectory(args: IsInTokenDirectoryArgs, headers?: object, signal?: AbortSignal): Promise<IsInTokenDirectoryReturn>;
|
|
942
|
+
setTokenDirectoryFeatureIndex(args: SetTokenDirectoryFeatureIndexArgs, headers?: object, signal?: AbortSignal): Promise<SetTokenDirectoryFeatureIndexReturn>;
|
|
943
|
+
addContractToTokenDirectory(args: AddContractToTokenDirectoryArgs, headers?: object, signal?: AbortSignal): Promise<AddContractToTokenDirectoryReturn>;
|
|
944
|
+
removeContractFromTokenDirectory(args: RemoveContractFromTokenDirectoryArgs, headers?: object, signal?: AbortSignal): Promise<RemoveContractFromTokenDirectoryReturn>;
|
|
916
945
|
refreshTokenDirectory(headers?: object, signal?: AbortSignal): Promise<RefreshTokenDirectoryReturn>;
|
|
917
946
|
/**
|
|
918
947
|
* @deprecated use new admin api
|
|
@@ -935,21 +964,32 @@ export interface Admin {
|
|
|
935
964
|
*/
|
|
936
965
|
listTokenDirectory(args: ListTokenDirectoryArgs, headers?: object, signal?: AbortSignal): Promise<ListTokenDirectoryReturn>;
|
|
937
966
|
}
|
|
967
|
+
export interface GetContractInfoOverrideArgs {
|
|
968
|
+
chainID: string;
|
|
969
|
+
contractAddress: string;
|
|
970
|
+
}
|
|
971
|
+
export interface GetContractInfoOverrideReturn {
|
|
972
|
+
contractInfoOverride: ContractInfoOverride;
|
|
973
|
+
}
|
|
938
974
|
export interface GetContractInfoOverridesArgs {
|
|
939
975
|
chainID?: string;
|
|
940
976
|
page?: Page;
|
|
941
977
|
}
|
|
942
978
|
export interface GetContractInfoOverridesReturn {
|
|
943
|
-
contractInfoOverrides: Array<
|
|
979
|
+
contractInfoOverrides: Array<ContractInfoOverride>;
|
|
944
980
|
page: Page;
|
|
945
981
|
}
|
|
946
982
|
export interface AddContractInfoOverrideArgs {
|
|
947
|
-
|
|
983
|
+
chainID: string;
|
|
984
|
+
contractAddress: string;
|
|
985
|
+
contractInfoOverride: ContractInfoOverride;
|
|
948
986
|
}
|
|
949
987
|
export interface AddContractInfoOverrideReturn {
|
|
950
988
|
}
|
|
951
989
|
export interface UpdateContractInfoOverrideArgs {
|
|
952
|
-
|
|
990
|
+
chainID: string;
|
|
991
|
+
contractAddress: string;
|
|
992
|
+
contractInfoOverride: ContractInfoOverride;
|
|
953
993
|
}
|
|
954
994
|
export interface UpdateContractInfoOverrideReturn {
|
|
955
995
|
}
|
|
@@ -959,6 +999,33 @@ export interface RemoveContractInfoOverrideArgs {
|
|
|
959
999
|
}
|
|
960
1000
|
export interface RemoveContractInfoOverrideReturn {
|
|
961
1001
|
}
|
|
1002
|
+
export interface IsInTokenDirectoryArgs {
|
|
1003
|
+
chainID: string;
|
|
1004
|
+
contractAddress: string;
|
|
1005
|
+
}
|
|
1006
|
+
export interface IsInTokenDirectoryReturn {
|
|
1007
|
+
ok: boolean;
|
|
1008
|
+
featureIndex: number;
|
|
1009
|
+
}
|
|
1010
|
+
export interface SetTokenDirectoryFeatureIndexArgs {
|
|
1011
|
+
chainID: string;
|
|
1012
|
+
contractAddress: string;
|
|
1013
|
+
featureIndex: number;
|
|
1014
|
+
}
|
|
1015
|
+
export interface SetTokenDirectoryFeatureIndexReturn {
|
|
1016
|
+
}
|
|
1017
|
+
export interface AddContractToTokenDirectoryArgs {
|
|
1018
|
+
chainID: string;
|
|
1019
|
+
contractAddress: string;
|
|
1020
|
+
}
|
|
1021
|
+
export interface AddContractToTokenDirectoryReturn {
|
|
1022
|
+
}
|
|
1023
|
+
export interface RemoveContractFromTokenDirectoryArgs {
|
|
1024
|
+
chainID: string;
|
|
1025
|
+
contractAddress: string;
|
|
1026
|
+
}
|
|
1027
|
+
export interface RemoveContractFromTokenDirectoryReturn {
|
|
1028
|
+
}
|
|
962
1029
|
export interface RefreshTokenDirectoryArgs {
|
|
963
1030
|
}
|
|
964
1031
|
export interface RefreshTokenDirectoryReturn {
|
|
@@ -1081,10 +1148,15 @@ export declare class Admin implements Admin {
|
|
|
1081
1148
|
protected path: string;
|
|
1082
1149
|
constructor(hostname: string, fetch: Fetch);
|
|
1083
1150
|
private url;
|
|
1151
|
+
getContractInfoOverride: (args: GetContractInfoOverrideArgs, headers?: object, signal?: AbortSignal) => Promise<GetContractInfoOverrideReturn>;
|
|
1084
1152
|
getContractInfoOverrides: (args: GetContractInfoOverridesArgs, headers?: object, signal?: AbortSignal) => Promise<GetContractInfoOverridesReturn>;
|
|
1085
1153
|
addContractInfoOverride: (args: AddContractInfoOverrideArgs, headers?: object, signal?: AbortSignal) => Promise<AddContractInfoOverrideReturn>;
|
|
1086
1154
|
updateContractInfoOverride: (args: UpdateContractInfoOverrideArgs, headers?: object, signal?: AbortSignal) => Promise<UpdateContractInfoOverrideReturn>;
|
|
1087
1155
|
removeContractInfoOverride: (args: RemoveContractInfoOverrideArgs, headers?: object, signal?: AbortSignal) => Promise<RemoveContractInfoOverrideReturn>;
|
|
1156
|
+
isInTokenDirectory: (args: IsInTokenDirectoryArgs, headers?: object, signal?: AbortSignal) => Promise<IsInTokenDirectoryReturn>;
|
|
1157
|
+
setTokenDirectoryFeatureIndex: (args: SetTokenDirectoryFeatureIndexArgs, headers?: object, signal?: AbortSignal) => Promise<SetTokenDirectoryFeatureIndexReturn>;
|
|
1158
|
+
addContractToTokenDirectory: (args: AddContractToTokenDirectoryArgs, headers?: object, signal?: AbortSignal) => Promise<AddContractToTokenDirectoryReturn>;
|
|
1159
|
+
removeContractFromTokenDirectory: (args: RemoveContractFromTokenDirectoryArgs, headers?: object, signal?: AbortSignal) => Promise<RemoveContractFromTokenDirectoryReturn>;
|
|
1088
1160
|
refreshTokenDirectory: (headers?: object, signal?: AbortSignal) => Promise<RefreshTokenDirectoryReturn>;
|
|
1089
1161
|
addContractsToTokenDirectory: (args: AddContractsToTokenDirectoryArgs, headers?: object, signal?: AbortSignal) => Promise<AddContractsToTokenDirectoryReturn>;
|
|
1090
1162
|
removeContractsFromTokenDirectory: (args: RemoveContractsFromTokenDirectoryArgs, headers?: object, signal?: AbortSignal) => Promise<RemoveContractsFromTokenDirectoryReturn>;
|
|
@@ -1160,6 +1232,9 @@ export declare class GeoblockedError extends WebrpcError {
|
|
|
1160
1232
|
export declare class TaskFailedError extends WebrpcError {
|
|
1161
1233
|
constructor(name?: string, code?: number, message?: string, status?: number, cause?: string);
|
|
1162
1234
|
}
|
|
1235
|
+
export declare class DeprecatedError extends WebrpcError {
|
|
1236
|
+
constructor(name?: string, code?: number, message?: string, status?: number, cause?: string);
|
|
1237
|
+
}
|
|
1163
1238
|
export declare class TimeoutError extends WebrpcError {
|
|
1164
1239
|
constructor(name?: string, code?: number, message?: string, status?: number, cause?: string);
|
|
1165
1240
|
}
|
|
@@ -1210,6 +1285,7 @@ export declare enum errors {
|
|
|
1210
1285
|
Fail = "Fail",
|
|
1211
1286
|
Geoblocked = "Geoblocked",
|
|
1212
1287
|
TaskFailed = "TaskFailed",
|
|
1288
|
+
Deprecated = "Deprecated",
|
|
1213
1289
|
Timeout = "Timeout",
|
|
1214
1290
|
InvalidArgument = "InvalidArgument",
|
|
1215
1291
|
RequiredArgument = "RequiredArgument",
|
|
@@ -1241,6 +1317,7 @@ export declare enum WebrpcErrorCodes {
|
|
|
1241
1317
|
Fail = 1005,
|
|
1242
1318
|
Geoblocked = 1006,
|
|
1243
1319
|
TaskFailed = 1007,
|
|
1320
|
+
Deprecated = 1008,
|
|
1244
1321
|
Timeout = 2000,
|
|
1245
1322
|
InvalidArgument = 2001,
|
|
1246
1323
|
RequiredArgument = 2002,
|
package/package.json
CHANGED
package/src/metadata.gen.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
// sequence-metadata v0.4.0
|
|
2
|
+
// sequence-metadata v0.4.0 eb101fbae674de87b532432e85ce7694ccee2212
|
|
3
3
|
// --
|
|
4
|
-
// Code generated by webrpc-gen@v0.25.
|
|
4
|
+
// Code generated by webrpc-gen@v0.25.3 with typescript generator. DO NOT EDIT.
|
|
5
5
|
//
|
|
6
6
|
// webrpc-gen -schema=metadata.ridl -target=typescript -client -out=./clients/metadata.gen.ts
|
|
7
7
|
|
|
8
8
|
export const WebrpcHeader = 'Webrpc'
|
|
9
9
|
|
|
10
|
-
export const WebrpcHeaderValue = 'webrpc@v0.25.
|
|
10
|
+
export const WebrpcHeaderValue = 'webrpc@v0.25.3;gen-typescript@v0.17.0;sequence-metadata@v0.4.0'
|
|
11
11
|
|
|
12
12
|
// WebRPC description and code-gen version
|
|
13
13
|
export const WebRPCVersion = 'v1'
|
|
@@ -16,7 +16,7 @@ export const WebRPCVersion = 'v1'
|
|
|
16
16
|
export const WebRPCSchemaVersion = 'v0.4.0'
|
|
17
17
|
|
|
18
18
|
// Schema hash generated from your RIDL schema
|
|
19
|
-
export const WebRPCSchemaHash = '
|
|
19
|
+
export const WebRPCSchemaHash = 'eb101fbae674de87b532432e85ce7694ccee2212'
|
|
20
20
|
|
|
21
21
|
type WebrpcGenVersions = {
|
|
22
22
|
webrpcGenVersion: string
|
|
@@ -74,7 +74,9 @@ export enum ContractType {
|
|
|
74
74
|
UNKNOWN = 'UNKNOWN',
|
|
75
75
|
ERC20 = 'ERC20',
|
|
76
76
|
ERC721 = 'ERC721',
|
|
77
|
-
ERC1155 = 'ERC1155'
|
|
77
|
+
ERC1155 = 'ERC1155',
|
|
78
|
+
ERC6909 = 'ERC6909',
|
|
79
|
+
MISC = 'MISC'
|
|
78
80
|
}
|
|
79
81
|
|
|
80
82
|
export enum Source {
|
|
@@ -85,6 +87,7 @@ export enum Source {
|
|
|
85
87
|
FETCHER_ON_CHAIN_ERC20_INTERFACE = 'FETCHER_ON_CHAIN_ERC20_INTERFACE',
|
|
86
88
|
FETCHER_ON_CHAIN_TOKEN_URI = 'FETCHER_ON_CHAIN_TOKEN_URI',
|
|
87
89
|
FETCHER_ON_CHAIN_CONTRACT_URI = 'FETCHER_ON_CHAIN_CONTRACT_URI',
|
|
90
|
+
FETCHER_TOKEN_DIRECTORY_ADMIN = 'FETCHER_TOKEN_DIRECTORY_ADMIN',
|
|
88
91
|
TOKEN_DIRECTORY = 'TOKEN_DIRECTORY',
|
|
89
92
|
TOKEN_DIRECTORY_PUBLIC_TOKEN_LIST = 'TOKEN_DIRECTORY_PUBLIC_TOKEN_LIST',
|
|
90
93
|
TOKEN_DIRECTORY_3RD_PARTY = 'TOKEN_DIRECTORY_3RD_PARTY',
|
|
@@ -208,6 +211,29 @@ export interface ContractInfoExtensions {
|
|
|
208
211
|
featureIndex: number
|
|
209
212
|
}
|
|
210
213
|
|
|
214
|
+
export interface ContractInfoOverride {
|
|
215
|
+
name?: string
|
|
216
|
+
type?: string
|
|
217
|
+
symbol?: string
|
|
218
|
+
decimals?: number
|
|
219
|
+
logoURI?: string
|
|
220
|
+
extensions: ContractInfoExtensionsOverride
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export interface ContractInfoExtensionsOverride {
|
|
224
|
+
link?: string
|
|
225
|
+
description?: string
|
|
226
|
+
categories?: Array<string>
|
|
227
|
+
ogImage?: string
|
|
228
|
+
ogName?: string
|
|
229
|
+
originChainId?: number
|
|
230
|
+
originAddress?: string
|
|
231
|
+
blacklist?: boolean
|
|
232
|
+
verified?: boolean
|
|
233
|
+
verifiedBy?: string
|
|
234
|
+
featureIndex?: number
|
|
235
|
+
}
|
|
236
|
+
|
|
211
237
|
export interface TokenMetadata {
|
|
212
238
|
contractAddress?: string
|
|
213
239
|
tokenId: string
|
|
@@ -1124,6 +1150,11 @@ export interface Admin {
|
|
|
1124
1150
|
/**
|
|
1125
1151
|
* Contract Info Overrides
|
|
1126
1152
|
*/
|
|
1153
|
+
getContractInfoOverride(
|
|
1154
|
+
args: GetContractInfoOverrideArgs,
|
|
1155
|
+
headers?: object,
|
|
1156
|
+
signal?: AbortSignal
|
|
1157
|
+
): Promise<GetContractInfoOverrideReturn>
|
|
1127
1158
|
getContractInfoOverrides(
|
|
1128
1159
|
args: GetContractInfoOverridesArgs,
|
|
1129
1160
|
headers?: object,
|
|
@@ -1147,6 +1178,22 @@ export interface Admin {
|
|
|
1147
1178
|
/**
|
|
1148
1179
|
* Token Directory
|
|
1149
1180
|
*/
|
|
1181
|
+
isInTokenDirectory(args: IsInTokenDirectoryArgs, headers?: object, signal?: AbortSignal): Promise<IsInTokenDirectoryReturn>
|
|
1182
|
+
setTokenDirectoryFeatureIndex(
|
|
1183
|
+
args: SetTokenDirectoryFeatureIndexArgs,
|
|
1184
|
+
headers?: object,
|
|
1185
|
+
signal?: AbortSignal
|
|
1186
|
+
): Promise<SetTokenDirectoryFeatureIndexReturn>
|
|
1187
|
+
addContractToTokenDirectory(
|
|
1188
|
+
args: AddContractToTokenDirectoryArgs,
|
|
1189
|
+
headers?: object,
|
|
1190
|
+
signal?: AbortSignal
|
|
1191
|
+
): Promise<AddContractToTokenDirectoryReturn>
|
|
1192
|
+
removeContractFromTokenDirectory(
|
|
1193
|
+
args: RemoveContractFromTokenDirectoryArgs,
|
|
1194
|
+
headers?: object,
|
|
1195
|
+
signal?: AbortSignal
|
|
1196
|
+
): Promise<RemoveContractFromTokenDirectoryReturn>
|
|
1150
1197
|
refreshTokenDirectory(headers?: object, signal?: AbortSignal): Promise<RefreshTokenDirectoryReturn>
|
|
1151
1198
|
/**
|
|
1152
1199
|
* @deprecated use new admin api
|
|
@@ -1178,22 +1225,34 @@ export interface Admin {
|
|
|
1178
1225
|
listTokenDirectory(args: ListTokenDirectoryArgs, headers?: object, signal?: AbortSignal): Promise<ListTokenDirectoryReturn>
|
|
1179
1226
|
}
|
|
1180
1227
|
|
|
1228
|
+
export interface GetContractInfoOverrideArgs {
|
|
1229
|
+
chainID: string
|
|
1230
|
+
contractAddress: string
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
export interface GetContractInfoOverrideReturn {
|
|
1234
|
+
contractInfoOverride: ContractInfoOverride
|
|
1235
|
+
}
|
|
1181
1236
|
export interface GetContractInfoOverridesArgs {
|
|
1182
1237
|
chainID?: string
|
|
1183
1238
|
page?: Page
|
|
1184
1239
|
}
|
|
1185
1240
|
|
|
1186
1241
|
export interface GetContractInfoOverridesReturn {
|
|
1187
|
-
contractInfoOverrides: Array<
|
|
1242
|
+
contractInfoOverrides: Array<ContractInfoOverride>
|
|
1188
1243
|
page: Page
|
|
1189
1244
|
}
|
|
1190
1245
|
export interface AddContractInfoOverrideArgs {
|
|
1191
|
-
|
|
1246
|
+
chainID: string
|
|
1247
|
+
contractAddress: string
|
|
1248
|
+
contractInfoOverride: ContractInfoOverride
|
|
1192
1249
|
}
|
|
1193
1250
|
|
|
1194
1251
|
export interface AddContractInfoOverrideReturn {}
|
|
1195
1252
|
export interface UpdateContractInfoOverrideArgs {
|
|
1196
|
-
|
|
1253
|
+
chainID: string
|
|
1254
|
+
contractAddress: string
|
|
1255
|
+
contractInfoOverride: ContractInfoOverride
|
|
1197
1256
|
}
|
|
1198
1257
|
|
|
1199
1258
|
export interface UpdateContractInfoOverrideReturn {}
|
|
@@ -1203,6 +1262,34 @@ export interface RemoveContractInfoOverrideArgs {
|
|
|
1203
1262
|
}
|
|
1204
1263
|
|
|
1205
1264
|
export interface RemoveContractInfoOverrideReturn {}
|
|
1265
|
+
export interface IsInTokenDirectoryArgs {
|
|
1266
|
+
chainID: string
|
|
1267
|
+
contractAddress: string
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
export interface IsInTokenDirectoryReturn {
|
|
1271
|
+
ok: boolean
|
|
1272
|
+
featureIndex: number
|
|
1273
|
+
}
|
|
1274
|
+
export interface SetTokenDirectoryFeatureIndexArgs {
|
|
1275
|
+
chainID: string
|
|
1276
|
+
contractAddress: string
|
|
1277
|
+
featureIndex: number
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
export interface SetTokenDirectoryFeatureIndexReturn {}
|
|
1281
|
+
export interface AddContractToTokenDirectoryArgs {
|
|
1282
|
+
chainID: string
|
|
1283
|
+
contractAddress: string
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
export interface AddContractToTokenDirectoryReturn {}
|
|
1287
|
+
export interface RemoveContractFromTokenDirectoryArgs {
|
|
1288
|
+
chainID: string
|
|
1289
|
+
contractAddress: string
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
export interface RemoveContractFromTokenDirectoryReturn {}
|
|
1206
1293
|
export interface RefreshTokenDirectoryArgs {}
|
|
1207
1294
|
|
|
1208
1295
|
export interface RefreshTokenDirectoryReturn {
|
|
@@ -2312,6 +2399,25 @@ export class Admin implements Admin {
|
|
|
2312
2399
|
return this.hostname + this.path + name
|
|
2313
2400
|
}
|
|
2314
2401
|
|
|
2402
|
+
getContractInfoOverride = (
|
|
2403
|
+
args: GetContractInfoOverrideArgs,
|
|
2404
|
+
headers?: object,
|
|
2405
|
+
signal?: AbortSignal
|
|
2406
|
+
): Promise<GetContractInfoOverrideReturn> => {
|
|
2407
|
+
return this.fetch(this.url('GetContractInfoOverride'), createHTTPRequest(args, headers, signal)).then(
|
|
2408
|
+
res => {
|
|
2409
|
+
return buildResponse(res).then(_data => {
|
|
2410
|
+
return {
|
|
2411
|
+
contractInfoOverride: <ContractInfoOverride>_data.contractInfoOverride
|
|
2412
|
+
}
|
|
2413
|
+
})
|
|
2414
|
+
},
|
|
2415
|
+
error => {
|
|
2416
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2417
|
+
}
|
|
2418
|
+
)
|
|
2419
|
+
}
|
|
2420
|
+
|
|
2315
2421
|
getContractInfoOverrides = (
|
|
2316
2422
|
args: GetContractInfoOverridesArgs,
|
|
2317
2423
|
headers?: object,
|
|
@@ -2321,7 +2427,7 @@ export class Admin implements Admin {
|
|
|
2321
2427
|
res => {
|
|
2322
2428
|
return buildResponse(res).then(_data => {
|
|
2323
2429
|
return {
|
|
2324
|
-
contractInfoOverrides: <Array<
|
|
2430
|
+
contractInfoOverrides: <Array<ContractInfoOverride>>_data.contractInfoOverrides,
|
|
2325
2431
|
page: <Page>_data.page
|
|
2326
2432
|
}
|
|
2327
2433
|
})
|
|
@@ -2383,6 +2489,77 @@ export class Admin implements Admin {
|
|
|
2383
2489
|
)
|
|
2384
2490
|
}
|
|
2385
2491
|
|
|
2492
|
+
isInTokenDirectory = (
|
|
2493
|
+
args: IsInTokenDirectoryArgs,
|
|
2494
|
+
headers?: object,
|
|
2495
|
+
signal?: AbortSignal
|
|
2496
|
+
): Promise<IsInTokenDirectoryReturn> => {
|
|
2497
|
+
return this.fetch(this.url('IsInTokenDirectory'), createHTTPRequest(args, headers, signal)).then(
|
|
2498
|
+
res => {
|
|
2499
|
+
return buildResponse(res).then(_data => {
|
|
2500
|
+
return {
|
|
2501
|
+
ok: <boolean>_data.ok,
|
|
2502
|
+
featureIndex: <number>_data.featureIndex
|
|
2503
|
+
}
|
|
2504
|
+
})
|
|
2505
|
+
},
|
|
2506
|
+
error => {
|
|
2507
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2508
|
+
}
|
|
2509
|
+
)
|
|
2510
|
+
}
|
|
2511
|
+
|
|
2512
|
+
setTokenDirectoryFeatureIndex = (
|
|
2513
|
+
args: SetTokenDirectoryFeatureIndexArgs,
|
|
2514
|
+
headers?: object,
|
|
2515
|
+
signal?: AbortSignal
|
|
2516
|
+
): Promise<SetTokenDirectoryFeatureIndexReturn> => {
|
|
2517
|
+
return this.fetch(this.url('SetTokenDirectoryFeatureIndex'), createHTTPRequest(args, headers, signal)).then(
|
|
2518
|
+
res => {
|
|
2519
|
+
return buildResponse(res).then(_data => {
|
|
2520
|
+
return {}
|
|
2521
|
+
})
|
|
2522
|
+
},
|
|
2523
|
+
error => {
|
|
2524
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2525
|
+
}
|
|
2526
|
+
)
|
|
2527
|
+
}
|
|
2528
|
+
|
|
2529
|
+
addContractToTokenDirectory = (
|
|
2530
|
+
args: AddContractToTokenDirectoryArgs,
|
|
2531
|
+
headers?: object,
|
|
2532
|
+
signal?: AbortSignal
|
|
2533
|
+
): Promise<AddContractToTokenDirectoryReturn> => {
|
|
2534
|
+
return this.fetch(this.url('AddContractToTokenDirectory'), createHTTPRequest(args, headers, signal)).then(
|
|
2535
|
+
res => {
|
|
2536
|
+
return buildResponse(res).then(_data => {
|
|
2537
|
+
return {}
|
|
2538
|
+
})
|
|
2539
|
+
},
|
|
2540
|
+
error => {
|
|
2541
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2542
|
+
}
|
|
2543
|
+
)
|
|
2544
|
+
}
|
|
2545
|
+
|
|
2546
|
+
removeContractFromTokenDirectory = (
|
|
2547
|
+
args: RemoveContractFromTokenDirectoryArgs,
|
|
2548
|
+
headers?: object,
|
|
2549
|
+
signal?: AbortSignal
|
|
2550
|
+
): Promise<RemoveContractFromTokenDirectoryReturn> => {
|
|
2551
|
+
return this.fetch(this.url('RemoveContractFromTokenDirectory'), createHTTPRequest(args, headers, signal)).then(
|
|
2552
|
+
res => {
|
|
2553
|
+
return buildResponse(res).then(_data => {
|
|
2554
|
+
return {}
|
|
2555
|
+
})
|
|
2556
|
+
},
|
|
2557
|
+
error => {
|
|
2558
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2559
|
+
}
|
|
2560
|
+
)
|
|
2561
|
+
}
|
|
2562
|
+
|
|
2386
2563
|
refreshTokenDirectory = (headers?: object, signal?: AbortSignal): Promise<RefreshTokenDirectoryReturn> => {
|
|
2387
2564
|
return this.fetch(this.url('RefreshTokenDirectory'), createHTTPRequest({}, headers, signal)).then(
|
|
2388
2565
|
res => {
|
|
@@ -2807,6 +2984,19 @@ export class TaskFailedError extends WebrpcError {
|
|
|
2807
2984
|
}
|
|
2808
2985
|
}
|
|
2809
2986
|
|
|
2987
|
+
export class DeprecatedError extends WebrpcError {
|
|
2988
|
+
constructor(
|
|
2989
|
+
name: string = 'Deprecated',
|
|
2990
|
+
code: number = 1008,
|
|
2991
|
+
message: string = `RPC method is deprecated`,
|
|
2992
|
+
status: number = 0,
|
|
2993
|
+
cause?: string
|
|
2994
|
+
) {
|
|
2995
|
+
super(name, code, message, status, cause)
|
|
2996
|
+
Object.setPrototypeOf(this, DeprecatedError.prototype)
|
|
2997
|
+
}
|
|
2998
|
+
}
|
|
2999
|
+
|
|
2810
3000
|
export class TimeoutError extends WebrpcError {
|
|
2811
3001
|
constructor(
|
|
2812
3002
|
name: string = 'Timeout',
|
|
@@ -2957,6 +3147,7 @@ export enum errors {
|
|
|
2957
3147
|
Fail = 'Fail',
|
|
2958
3148
|
Geoblocked = 'Geoblocked',
|
|
2959
3149
|
TaskFailed = 'TaskFailed',
|
|
3150
|
+
Deprecated = 'Deprecated',
|
|
2960
3151
|
Timeout = 'Timeout',
|
|
2961
3152
|
InvalidArgument = 'InvalidArgument',
|
|
2962
3153
|
RequiredArgument = 'RequiredArgument',
|
|
@@ -2989,6 +3180,7 @@ export enum WebrpcErrorCodes {
|
|
|
2989
3180
|
Fail = 1005,
|
|
2990
3181
|
Geoblocked = 1006,
|
|
2991
3182
|
TaskFailed = 1007,
|
|
3183
|
+
Deprecated = 1008,
|
|
2992
3184
|
Timeout = 2000,
|
|
2993
3185
|
InvalidArgument = 2001,
|
|
2994
3186
|
RequiredArgument = 2002,
|
|
@@ -3021,6 +3213,7 @@ export const webrpcErrorByCode: { [code: number]: any } = {
|
|
|
3021
3213
|
[1005]: FailError,
|
|
3022
3214
|
[1006]: GeoblockedError,
|
|
3023
3215
|
[1007]: TaskFailedError,
|
|
3216
|
+
[1008]: DeprecatedError,
|
|
3024
3217
|
[2000]: TimeoutError,
|
|
3025
3218
|
[2001]: InvalidArgumentError,
|
|
3026
3219
|
[2002]: RequiredArgumentError,
|