@0xsequence/marketplace 3.0.0-beta.9 → 3.0.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/.turbo/turbo-build.log +2 -2
- package/.turbo/turbo-lint.log +4 -0
- package/.turbo/turbo-test.log +5 -0
- package/.turbo/turbo-typecheck.log +4 -0
- package/CHANGELOG.md +85 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -21
- package/dist/marketplace.gen.js +109 -153
- package/eslint.config.js +4 -0
- package/package.json +8 -5
- package/src/index.ts +3 -3
package/.turbo/turbo-build.log
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,90 @@
|
|
|
1
1
|
# @0xsequence/marketplace
|
|
2
2
|
|
|
3
|
+
## 3.0.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- f68be62: ethauth support
|
|
8
|
+
- 49d8a2f: New chains, minor fixes
|
|
9
|
+
- 3411232: Beta release with dapp connector fixes
|
|
10
|
+
- 23cb9e9: New chains, relayer rpc fix
|
|
11
|
+
- f5f6a7a: dapp-client updates
|
|
12
|
+
- e7de3b1: Fix signer 404 error, minor fixes
|
|
13
|
+
- 493836f: multicall3 optimization
|
|
14
|
+
- 30e1f1a: 3.0.0 beta
|
|
15
|
+
- d5017e8: Beta release for v3
|
|
16
|
+
- 24a5fab: Final RC before 3.0.0
|
|
17
|
+
- e5e1a03: Apple auth fixes
|
|
18
|
+
- 0b63113: Apple auth fix
|
|
19
|
+
- a89134a: Userdata service updates
|
|
20
|
+
- 7c6c811: 3.0.0-beta.3 with fixes
|
|
21
|
+
- 3.0.0 release
|
|
22
|
+
- 98ce38b: 3.0.0-beta.2 with identity instrument updates
|
|
23
|
+
- 747e6b5: Relayer fee options fix
|
|
24
|
+
- 40c19ff: dapp client updates for EOA login
|
|
25
|
+
- 6d5de25: 3.0.0-beta.1
|
|
26
|
+
- 934acd1: RC5 upgrade
|
|
27
|
+
|
|
28
|
+
## 3.0.0-beta.19
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- Final RC before 3.0.0
|
|
33
|
+
|
|
34
|
+
## 3.0.0-beta.18
|
|
35
|
+
|
|
36
|
+
### Patch Changes
|
|
37
|
+
|
|
38
|
+
- multicall3 optimization
|
|
39
|
+
|
|
40
|
+
## 3.0.0-beta.17
|
|
41
|
+
|
|
42
|
+
### Patch Changes
|
|
43
|
+
|
|
44
|
+
- New chains, relayer rpc fix
|
|
45
|
+
|
|
46
|
+
## 3.0.0-beta.16
|
|
47
|
+
|
|
48
|
+
### Patch Changes
|
|
49
|
+
|
|
50
|
+
- ethauth support
|
|
51
|
+
|
|
52
|
+
## 3.0.0-beta.15
|
|
53
|
+
|
|
54
|
+
### Patch Changes
|
|
55
|
+
|
|
56
|
+
- New chains, minor fixes
|
|
57
|
+
|
|
58
|
+
## 3.0.0-beta.14
|
|
59
|
+
|
|
60
|
+
### Patch Changes
|
|
61
|
+
|
|
62
|
+
- Relayer fee options fix
|
|
63
|
+
|
|
64
|
+
## 3.0.0-beta.13
|
|
65
|
+
|
|
66
|
+
### Patch Changes
|
|
67
|
+
|
|
68
|
+
- Userdata service updates
|
|
69
|
+
|
|
70
|
+
## 3.0.0-beta.12
|
|
71
|
+
|
|
72
|
+
### Patch Changes
|
|
73
|
+
|
|
74
|
+
- Beta release with dapp connector fixes
|
|
75
|
+
|
|
76
|
+
## 3.0.0-beta.11
|
|
77
|
+
|
|
78
|
+
### Patch Changes
|
|
79
|
+
|
|
80
|
+
- 3.0.0 beta
|
|
81
|
+
|
|
82
|
+
## 3.0.0-beta.10
|
|
83
|
+
|
|
84
|
+
### Patch Changes
|
|
85
|
+
|
|
86
|
+
- dapp-client updates
|
|
87
|
+
|
|
3
88
|
## 3.0.0-beta.9
|
|
4
89
|
|
|
5
90
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './marketplace.gen';
|
|
2
|
-
import { Marketplace as MarketplaceRpc } from './marketplace.gen';
|
|
1
|
+
export * from './marketplace.gen.js';
|
|
2
|
+
import { Marketplace as MarketplaceRpc } from './marketplace.gen.js';
|
|
3
3
|
export declare class MarketplaceIndexer extends MarketplaceRpc {
|
|
4
4
|
projectAccessKey?: string | undefined;
|
|
5
5
|
jwtAuth?: string | undefined;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AAEpC,OAAO,EAAE,WAAW,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAEpE,qBAAa,kBAAmB,SAAQ,cAAc;IAG3C,gBAAgB,CAAC,EAAE,MAAM;IACzB,OAAO,CAAC,EAAE,MAAM;gBAFvB,QAAQ,EAAE,MAAM,EACT,gBAAgB,CAAC,EAAE,MAAM,YAAA,EACzB,OAAO,CAAC,EAAE,MAAM,YAAA;IAMzB,MAAM,GAAI,OAAO,WAAW,EAAE,OAAO,WAAW,KAAG,OAAO,CAAC,QAAQ,CAAC,CAoBnE;CACF"}
|
package/dist/index.js
CHANGED
|
@@ -1,23 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.MarketplaceIndexer = void 0;
|
|
18
|
-
__exportStar(require("./marketplace.gen"), exports);
|
|
19
|
-
const marketplace_gen_1 = require("./marketplace.gen");
|
|
20
|
-
class MarketplaceIndexer extends marketplace_gen_1.Marketplace {
|
|
1
|
+
export * from './marketplace.gen.js';
|
|
2
|
+
import { Marketplace as MarketplaceRpc } from './marketplace.gen.js';
|
|
3
|
+
export class MarketplaceIndexer extends MarketplaceRpc {
|
|
21
4
|
projectAccessKey;
|
|
22
5
|
jwtAuth;
|
|
23
6
|
constructor(hostname, projectAccessKey, jwtAuth) {
|
|
@@ -43,4 +26,3 @@ class MarketplaceIndexer extends marketplace_gen_1.Marketplace {
|
|
|
43
26
|
return fetch(input, init);
|
|
44
27
|
};
|
|
45
28
|
}
|
|
46
|
-
exports.MarketplaceIndexer = MarketplaceIndexer;
|
package/dist/marketplace.gen.js
CHANGED
|
@@ -1,24 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/* eslint-disable */
|
|
3
2
|
// marketplace-api 652676d9951ceb12f6846907c7c4b5160c73c57a
|
|
4
3
|
// --
|
|
5
4
|
// Code generated by webrpc-gen@v0.30.2 with github.com/webrpc/gen-typescript@v0.19.0 generator. DO NOT EDIT.
|
|
6
5
|
//
|
|
7
6
|
// webrpc-gen -schema=./schema/schema.ridl -target=github.com/webrpc/gen-typescript@v0.19.0 -client -out=./clients/marketplace.gen.ts
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
exports.webrpcErrorByCode = exports.WebrpcErrorCodes = exports.errors = exports.NotImplementedError = exports.InvalidArgumentError = exports.NotFoundError = exports.TimeoutError = exports.AtLeastOneKeyError = exports.MaxAccessKeysError = exports.NoDefaultKeyError = exports.QuotaRateLimitError = exports.QuotaExceededError = exports.InvalidChainError = exports.UnauthorizedUserError = exports.InvalidServiceError = exports.InvalidOriginError = exports.AccessKeyMismatchError = exports.AccessKeyNotFoundError = exports.SecretKeyCorsDisallowedError = exports.ProjectNotFoundError = exports.RateLimitedError = exports.GeoblockedError = exports.AbortedError = exports.RequestConflictError = exports.MethodNotFoundError = void 0;
|
|
11
|
-
exports.VersionFromHeader = VersionFromHeader;
|
|
12
|
-
exports.WebrpcHeader = 'Webrpc';
|
|
13
|
-
exports.WebrpcHeaderValue = 'webrpc@v0.30.2;gen-typescript@v0.19.0;marketplace-api@v0.0.0-652676d9951ceb12f6846907c7c4b5160c73c57a';
|
|
7
|
+
export const WebrpcHeader = 'Webrpc';
|
|
8
|
+
export const WebrpcHeaderValue = 'webrpc@v0.30.2;gen-typescript@v0.19.0;marketplace-api@v0.0.0-652676d9951ceb12f6846907c7c4b5160c73c57a';
|
|
14
9
|
// WebRPC description and code-gen version
|
|
15
|
-
|
|
10
|
+
export const WebRPCVersion = 'v1';
|
|
16
11
|
// Schema version of your RIDL schema
|
|
17
|
-
|
|
12
|
+
export const WebRPCSchemaVersion = '';
|
|
18
13
|
// Schema hash generated from your RIDL schema
|
|
19
|
-
|
|
20
|
-
function VersionFromHeader(headers) {
|
|
21
|
-
const headerValue = headers.get(
|
|
14
|
+
export const WebRPCSchemaHash = '652676d9951ceb12f6846907c7c4b5160c73c57a';
|
|
15
|
+
export function VersionFromHeader(headers) {
|
|
16
|
+
const headerValue = headers.get(WebrpcHeader);
|
|
22
17
|
if (!headerValue) {
|
|
23
18
|
return {
|
|
24
19
|
webrpcGenVersion: '',
|
|
@@ -55,19 +50,19 @@ function parseWebrpcGenVersions(header) {
|
|
|
55
50
|
//
|
|
56
51
|
// Types
|
|
57
52
|
//
|
|
58
|
-
var SortOrder;
|
|
53
|
+
export var SortOrder;
|
|
59
54
|
(function (SortOrder) {
|
|
60
55
|
SortOrder["ASC"] = "ASC";
|
|
61
56
|
SortOrder["DESC"] = "DESC";
|
|
62
|
-
})(SortOrder || (
|
|
63
|
-
var PropertyType;
|
|
57
|
+
})(SortOrder || (SortOrder = {}));
|
|
58
|
+
export var PropertyType;
|
|
64
59
|
(function (PropertyType) {
|
|
65
60
|
PropertyType["INT"] = "INT";
|
|
66
61
|
PropertyType["STRING"] = "STRING";
|
|
67
62
|
PropertyType["ARRAY"] = "ARRAY";
|
|
68
63
|
PropertyType["GENERIC"] = "GENERIC";
|
|
69
|
-
})(PropertyType || (
|
|
70
|
-
var MarketplaceKind;
|
|
64
|
+
})(PropertyType || (PropertyType = {}));
|
|
65
|
+
export var MarketplaceKind;
|
|
71
66
|
(function (MarketplaceKind) {
|
|
72
67
|
MarketplaceKind["unknown"] = "unknown";
|
|
73
68
|
MarketplaceKind["sequence_marketplace_v1"] = "sequence_marketplace_v1";
|
|
@@ -81,8 +76,8 @@ var MarketplaceKind;
|
|
|
81
76
|
MarketplaceKind["payment_processor"] = "payment_processor";
|
|
82
77
|
MarketplaceKind["mintify"] = "mintify";
|
|
83
78
|
MarketplaceKind["magic_eden"] = "magic_eden";
|
|
84
|
-
})(MarketplaceKind || (
|
|
85
|
-
var OrderbookKind;
|
|
79
|
+
})(MarketplaceKind || (MarketplaceKind = {}));
|
|
80
|
+
export var OrderbookKind;
|
|
86
81
|
(function (OrderbookKind) {
|
|
87
82
|
OrderbookKind["unknown"] = "unknown";
|
|
88
83
|
OrderbookKind["sequence_marketplace_v1"] = "sequence_marketplace_v1";
|
|
@@ -93,8 +88,8 @@ var OrderbookKind;
|
|
|
93
88
|
OrderbookKind["reservoir"] = "reservoir";
|
|
94
89
|
OrderbookKind["x2y2"] = "x2y2";
|
|
95
90
|
OrderbookKind["magic_eden"] = "magic_eden";
|
|
96
|
-
})(OrderbookKind || (
|
|
97
|
-
var SourceKind;
|
|
91
|
+
})(OrderbookKind || (OrderbookKind = {}));
|
|
92
|
+
export var SourceKind;
|
|
98
93
|
(function (SourceKind) {
|
|
99
94
|
SourceKind["unknown"] = "unknown";
|
|
100
95
|
SourceKind["external"] = "external";
|
|
@@ -102,20 +97,20 @@ var SourceKind;
|
|
|
102
97
|
SourceKind["sequence_marketplace_v2"] = "sequence_marketplace_v2";
|
|
103
98
|
SourceKind["opensea"] = "opensea";
|
|
104
99
|
SourceKind["magic_eden"] = "magic_eden";
|
|
105
|
-
})(SourceKind || (
|
|
106
|
-
var OrderSide;
|
|
100
|
+
})(SourceKind || (SourceKind = {}));
|
|
101
|
+
export var OrderSide;
|
|
107
102
|
(function (OrderSide) {
|
|
108
103
|
OrderSide["unknown"] = "unknown";
|
|
109
104
|
OrderSide["listing"] = "listing";
|
|
110
105
|
OrderSide["offer"] = "offer";
|
|
111
|
-
})(OrderSide || (
|
|
112
|
-
var OfferType;
|
|
106
|
+
})(OrderSide || (OrderSide = {}));
|
|
107
|
+
export var OfferType;
|
|
113
108
|
(function (OfferType) {
|
|
114
109
|
OfferType["unknown"] = "unknown";
|
|
115
110
|
OfferType["item"] = "item";
|
|
116
111
|
OfferType["collection"] = "collection";
|
|
117
|
-
})(OfferType || (
|
|
118
|
-
var OrderStatus;
|
|
112
|
+
})(OfferType || (OfferType = {}));
|
|
113
|
+
export var OrderStatus;
|
|
119
114
|
(function (OrderStatus) {
|
|
120
115
|
OrderStatus["unknown"] = "unknown";
|
|
121
116
|
OrderStatus["active"] = "active";
|
|
@@ -124,22 +119,22 @@ var OrderStatus;
|
|
|
124
119
|
OrderStatus["cancelled"] = "cancelled";
|
|
125
120
|
OrderStatus["filled"] = "filled";
|
|
126
121
|
OrderStatus["decimals_missing"] = "decimals_missing";
|
|
127
|
-
})(OrderStatus || (
|
|
128
|
-
var ContractType;
|
|
122
|
+
})(OrderStatus || (OrderStatus = {}));
|
|
123
|
+
export var ContractType;
|
|
129
124
|
(function (ContractType) {
|
|
130
125
|
ContractType["UNKNOWN"] = "UNKNOWN";
|
|
131
126
|
ContractType["ERC20"] = "ERC20";
|
|
132
127
|
ContractType["ERC721"] = "ERC721";
|
|
133
128
|
ContractType["ERC1155"] = "ERC1155";
|
|
134
|
-
})(ContractType || (
|
|
135
|
-
var CollectionPriority;
|
|
129
|
+
})(ContractType || (ContractType = {}));
|
|
130
|
+
export var CollectionPriority;
|
|
136
131
|
(function (CollectionPriority) {
|
|
137
132
|
CollectionPriority["unknown"] = "unknown";
|
|
138
133
|
CollectionPriority["low"] = "low";
|
|
139
134
|
CollectionPriority["normal"] = "normal";
|
|
140
135
|
CollectionPriority["high"] = "high";
|
|
141
|
-
})(CollectionPriority || (
|
|
142
|
-
var CollectionStatus;
|
|
136
|
+
})(CollectionPriority || (CollectionPriority = {}));
|
|
137
|
+
export var CollectionStatus;
|
|
143
138
|
(function (CollectionStatus) {
|
|
144
139
|
CollectionStatus["unknown"] = "unknown";
|
|
145
140
|
CollectionStatus["created"] = "created";
|
|
@@ -148,14 +143,14 @@ var CollectionStatus;
|
|
|
148
143
|
CollectionStatus["failed"] = "failed";
|
|
149
144
|
CollectionStatus["inactive"] = "inactive";
|
|
150
145
|
CollectionStatus["incompatible_type"] = "incompatible_type";
|
|
151
|
-
})(CollectionStatus || (
|
|
152
|
-
var ProjectStatus;
|
|
146
|
+
})(CollectionStatus || (CollectionStatus = {}));
|
|
147
|
+
export var ProjectStatus;
|
|
153
148
|
(function (ProjectStatus) {
|
|
154
149
|
ProjectStatus["unknown"] = "unknown";
|
|
155
150
|
ProjectStatus["active"] = "active";
|
|
156
151
|
ProjectStatus["inactive"] = "inactive";
|
|
157
|
-
})(ProjectStatus || (
|
|
158
|
-
var ItemsContractStatus;
|
|
152
|
+
})(ProjectStatus || (ProjectStatus = {}));
|
|
153
|
+
export var ItemsContractStatus;
|
|
159
154
|
(function (ItemsContractStatus) {
|
|
160
155
|
ItemsContractStatus["unknown"] = "unknown";
|
|
161
156
|
ItemsContractStatus["created"] = "created";
|
|
@@ -166,33 +161,33 @@ var ItemsContractStatus;
|
|
|
166
161
|
ItemsContractStatus["active"] = "active";
|
|
167
162
|
ItemsContractStatus["inactive"] = "inactive";
|
|
168
163
|
ItemsContractStatus["incompatible_type"] = "incompatible_type";
|
|
169
|
-
})(ItemsContractStatus || (
|
|
170
|
-
var CollectibleStatus;
|
|
164
|
+
})(ItemsContractStatus || (ItemsContractStatus = {}));
|
|
165
|
+
export var CollectibleStatus;
|
|
171
166
|
(function (CollectibleStatus) {
|
|
172
167
|
CollectibleStatus["unknown"] = "unknown";
|
|
173
168
|
CollectibleStatus["active"] = "active";
|
|
174
169
|
CollectibleStatus["inactive"] = "inactive";
|
|
175
|
-
})(CollectibleStatus || (
|
|
176
|
-
var CollectibleSource;
|
|
170
|
+
})(CollectibleStatus || (CollectibleStatus = {}));
|
|
171
|
+
export var CollectibleSource;
|
|
177
172
|
(function (CollectibleSource) {
|
|
178
173
|
CollectibleSource["unknown"] = "unknown";
|
|
179
174
|
CollectibleSource["indexer"] = "indexer";
|
|
180
175
|
CollectibleSource["manual"] = "manual";
|
|
181
|
-
})(CollectibleSource || (
|
|
182
|
-
var CurrencyStatus;
|
|
176
|
+
})(CollectibleSource || (CollectibleSource = {}));
|
|
177
|
+
export var CurrencyStatus;
|
|
183
178
|
(function (CurrencyStatus) {
|
|
184
179
|
CurrencyStatus["unknown"] = "unknown";
|
|
185
180
|
CurrencyStatus["created"] = "created";
|
|
186
181
|
CurrencyStatus["syncing_metadata"] = "syncing_metadata";
|
|
187
182
|
CurrencyStatus["active"] = "active";
|
|
188
183
|
CurrencyStatus["failed"] = "failed";
|
|
189
|
-
})(CurrencyStatus || (
|
|
190
|
-
var WalletKind;
|
|
184
|
+
})(CurrencyStatus || (CurrencyStatus = {}));
|
|
185
|
+
export var WalletKind;
|
|
191
186
|
(function (WalletKind) {
|
|
192
187
|
WalletKind["unknown"] = "unknown";
|
|
193
188
|
WalletKind["sequence"] = "sequence";
|
|
194
|
-
})(WalletKind || (
|
|
195
|
-
var StepType;
|
|
189
|
+
})(WalletKind || (WalletKind = {}));
|
|
190
|
+
export var StepType;
|
|
196
191
|
(function (StepType) {
|
|
197
192
|
StepType["unknown"] = "unknown";
|
|
198
193
|
StepType["tokenApproval"] = "tokenApproval";
|
|
@@ -203,39 +198,39 @@ var StepType;
|
|
|
203
198
|
StepType["signEIP712"] = "signEIP712";
|
|
204
199
|
StepType["signEIP191"] = "signEIP191";
|
|
205
200
|
StepType["cancel"] = "cancel";
|
|
206
|
-
})(StepType || (
|
|
207
|
-
var TransactionCrypto;
|
|
201
|
+
})(StepType || (StepType = {}));
|
|
202
|
+
export var TransactionCrypto;
|
|
208
203
|
(function (TransactionCrypto) {
|
|
209
204
|
TransactionCrypto["none"] = "none";
|
|
210
205
|
TransactionCrypto["partially"] = "partially";
|
|
211
206
|
TransactionCrypto["all"] = "all";
|
|
212
|
-
})(TransactionCrypto || (
|
|
213
|
-
var TransactionNFTCheckoutProvider;
|
|
207
|
+
})(TransactionCrypto || (TransactionCrypto = {}));
|
|
208
|
+
export var TransactionNFTCheckoutProvider;
|
|
214
209
|
(function (TransactionNFTCheckoutProvider) {
|
|
215
210
|
TransactionNFTCheckoutProvider["unknown"] = "unknown";
|
|
216
211
|
TransactionNFTCheckoutProvider["transak"] = "transak";
|
|
217
212
|
TransactionNFTCheckoutProvider["sardine"] = "sardine";
|
|
218
|
-
})(TransactionNFTCheckoutProvider || (
|
|
219
|
-
var TransactionOnRampProvider;
|
|
213
|
+
})(TransactionNFTCheckoutProvider || (TransactionNFTCheckoutProvider = {}));
|
|
214
|
+
export var TransactionOnRampProvider;
|
|
220
215
|
(function (TransactionOnRampProvider) {
|
|
221
216
|
TransactionOnRampProvider["unknown"] = "unknown";
|
|
222
217
|
TransactionOnRampProvider["transak"] = "transak";
|
|
223
218
|
TransactionOnRampProvider["sardine"] = "sardine";
|
|
224
|
-
})(TransactionOnRampProvider || (
|
|
225
|
-
var TransactionSwapProvider;
|
|
219
|
+
})(TransactionOnRampProvider || (TransactionOnRampProvider = {}));
|
|
220
|
+
export var TransactionSwapProvider;
|
|
226
221
|
(function (TransactionSwapProvider) {
|
|
227
222
|
TransactionSwapProvider["unknown"] = "unknown";
|
|
228
223
|
TransactionSwapProvider["lifi"] = "lifi";
|
|
229
|
-
})(TransactionSwapProvider || (
|
|
230
|
-
var ExecuteType;
|
|
224
|
+
})(TransactionSwapProvider || (TransactionSwapProvider = {}));
|
|
225
|
+
export var ExecuteType;
|
|
231
226
|
(function (ExecuteType) {
|
|
232
227
|
ExecuteType["unknown"] = "unknown";
|
|
233
228
|
ExecuteType["order"] = "order";
|
|
234
229
|
ExecuteType["createListing"] = "createListing";
|
|
235
230
|
ExecuteType["createItemOffer"] = "createItemOffer";
|
|
236
231
|
ExecuteType["createTraitOffer"] = "createTraitOffer";
|
|
237
|
-
})(ExecuteType || (
|
|
238
|
-
var ActivityAction;
|
|
232
|
+
})(ExecuteType || (ExecuteType = {}));
|
|
233
|
+
export var ActivityAction;
|
|
239
234
|
(function (ActivityAction) {
|
|
240
235
|
ActivityAction["unknown"] = "unknown";
|
|
241
236
|
ActivityAction["listing"] = "listing";
|
|
@@ -245,8 +240,8 @@ var ActivityAction;
|
|
|
245
240
|
ActivityAction["listingCancel"] = "listingCancel";
|
|
246
241
|
ActivityAction["offerCancel"] = "offerCancel";
|
|
247
242
|
ActivityAction["transfer"] = "transfer";
|
|
248
|
-
})(ActivityAction || (
|
|
249
|
-
var PrimarySaleContractStatus;
|
|
243
|
+
})(ActivityAction || (ActivityAction = {}));
|
|
244
|
+
export var PrimarySaleContractStatus;
|
|
250
245
|
(function (PrimarySaleContractStatus) {
|
|
251
246
|
PrimarySaleContractStatus["unknown"] = "unknown";
|
|
252
247
|
PrimarySaleContractStatus["created"] = "created";
|
|
@@ -255,28 +250,28 @@ var PrimarySaleContractStatus;
|
|
|
255
250
|
PrimarySaleContractStatus["inactive"] = "inactive";
|
|
256
251
|
PrimarySaleContractStatus["incompatible_type"] = "incompatible_type";
|
|
257
252
|
PrimarySaleContractStatus["failed"] = "failed";
|
|
258
|
-
})(PrimarySaleContractStatus || (
|
|
259
|
-
var PrimarySaleVersion;
|
|
253
|
+
})(PrimarySaleContractStatus || (PrimarySaleContractStatus = {}));
|
|
254
|
+
export var PrimarySaleVersion;
|
|
260
255
|
(function (PrimarySaleVersion) {
|
|
261
256
|
PrimarySaleVersion["v0"] = "v0";
|
|
262
257
|
PrimarySaleVersion["v1"] = "v1";
|
|
263
|
-
})(PrimarySaleVersion || (
|
|
264
|
-
var PrimarySaleItemDetailType;
|
|
258
|
+
})(PrimarySaleVersion || (PrimarySaleVersion = {}));
|
|
259
|
+
export var PrimarySaleItemDetailType;
|
|
265
260
|
(function (PrimarySaleItemDetailType) {
|
|
266
261
|
PrimarySaleItemDetailType["unknown"] = "unknown";
|
|
267
262
|
PrimarySaleItemDetailType["global"] = "global";
|
|
268
263
|
PrimarySaleItemDetailType["individual"] = "individual";
|
|
269
|
-
})(PrimarySaleItemDetailType || (
|
|
270
|
-
var MetadataStatus;
|
|
264
|
+
})(PrimarySaleItemDetailType || (PrimarySaleItemDetailType = {}));
|
|
265
|
+
export var MetadataStatus;
|
|
271
266
|
(function (MetadataStatus) {
|
|
272
267
|
MetadataStatus["NOT_AVAILABLE"] = "NOT_AVAILABLE";
|
|
273
268
|
MetadataStatus["REFRESHING"] = "REFRESHING";
|
|
274
269
|
MetadataStatus["AVAILABLE"] = "AVAILABLE";
|
|
275
|
-
})(MetadataStatus || (
|
|
270
|
+
})(MetadataStatus || (MetadataStatus = {}));
|
|
276
271
|
//
|
|
277
272
|
// Client
|
|
278
273
|
//
|
|
279
|
-
class Admin {
|
|
274
|
+
export class Admin {
|
|
280
275
|
hostname;
|
|
281
276
|
fetch;
|
|
282
277
|
path = '/rpc/Admin/';
|
|
@@ -465,8 +460,7 @@ class Admin {
|
|
|
465
460
|
});
|
|
466
461
|
};
|
|
467
462
|
}
|
|
468
|
-
|
|
469
|
-
class Marketplace {
|
|
463
|
+
export class Marketplace {
|
|
470
464
|
hostname;
|
|
471
465
|
fetch;
|
|
472
466
|
path = '/rpc/Marketplace/';
|
|
@@ -1099,10 +1093,9 @@ class Marketplace {
|
|
|
1099
1093
|
});
|
|
1100
1094
|
};
|
|
1101
1095
|
}
|
|
1102
|
-
exports.Marketplace = Marketplace;
|
|
1103
1096
|
const createHTTPRequest = (body = {}, headers = {}, signal = null) => {
|
|
1104
1097
|
const reqHeaders = { ...headers, 'Content-Type': 'application/json' };
|
|
1105
|
-
reqHeaders[
|
|
1098
|
+
reqHeaders[WebrpcHeader] = WebrpcHeaderValue;
|
|
1106
1099
|
return {
|
|
1107
1100
|
method: 'POST',
|
|
1108
1101
|
headers: reqHeaders,
|
|
@@ -1124,7 +1117,7 @@ const buildResponse = (res) => {
|
|
|
1124
1117
|
}
|
|
1125
1118
|
if (!res.ok) {
|
|
1126
1119
|
const code = typeof data.code === 'number' ? data.code : 0;
|
|
1127
|
-
throw (
|
|
1120
|
+
throw (webrpcErrorByCode[code] || WebrpcError).new(data);
|
|
1128
1121
|
}
|
|
1129
1122
|
return data;
|
|
1130
1123
|
});
|
|
@@ -1132,7 +1125,7 @@ const buildResponse = (res) => {
|
|
|
1132
1125
|
//
|
|
1133
1126
|
// Errors
|
|
1134
1127
|
//
|
|
1135
|
-
class WebrpcError extends Error {
|
|
1128
|
+
export class WebrpcError extends Error {
|
|
1136
1129
|
name;
|
|
1137
1130
|
code;
|
|
1138
1131
|
message;
|
|
@@ -1154,262 +1147,225 @@ class WebrpcError extends Error {
|
|
|
1154
1147
|
return new this(payload.error, payload.code, payload.message || payload.msg, payload.status, payload.cause);
|
|
1155
1148
|
}
|
|
1156
1149
|
}
|
|
1157
|
-
exports.WebrpcError = WebrpcError;
|
|
1158
1150
|
// Webrpc errors
|
|
1159
|
-
class WebrpcEndpointError extends WebrpcError {
|
|
1151
|
+
export class WebrpcEndpointError extends WebrpcError {
|
|
1160
1152
|
constructor(name = 'WebrpcEndpoint', code = 0, message = `endpoint error`, status = 400, cause) {
|
|
1161
1153
|
super(name, code, message, status, cause);
|
|
1162
1154
|
Object.setPrototypeOf(this, WebrpcEndpointError.prototype);
|
|
1163
1155
|
}
|
|
1164
1156
|
}
|
|
1165
|
-
|
|
1166
|
-
class WebrpcRequestFailedError extends WebrpcError {
|
|
1157
|
+
export class WebrpcRequestFailedError extends WebrpcError {
|
|
1167
1158
|
constructor(name = 'WebrpcRequestFailed', code = -1, message = `request failed`, status = 400, cause) {
|
|
1168
1159
|
super(name, code, message, status, cause);
|
|
1169
1160
|
Object.setPrototypeOf(this, WebrpcRequestFailedError.prototype);
|
|
1170
1161
|
}
|
|
1171
1162
|
}
|
|
1172
|
-
|
|
1173
|
-
class WebrpcBadRouteError extends WebrpcError {
|
|
1163
|
+
export class WebrpcBadRouteError extends WebrpcError {
|
|
1174
1164
|
constructor(name = 'WebrpcBadRoute', code = -2, message = `bad route`, status = 404, cause) {
|
|
1175
1165
|
super(name, code, message, status, cause);
|
|
1176
1166
|
Object.setPrototypeOf(this, WebrpcBadRouteError.prototype);
|
|
1177
1167
|
}
|
|
1178
1168
|
}
|
|
1179
|
-
|
|
1180
|
-
class WebrpcBadMethodError extends WebrpcError {
|
|
1169
|
+
export class WebrpcBadMethodError extends WebrpcError {
|
|
1181
1170
|
constructor(name = 'WebrpcBadMethod', code = -3, message = `bad method`, status = 405, cause) {
|
|
1182
1171
|
super(name, code, message, status, cause);
|
|
1183
1172
|
Object.setPrototypeOf(this, WebrpcBadMethodError.prototype);
|
|
1184
1173
|
}
|
|
1185
1174
|
}
|
|
1186
|
-
|
|
1187
|
-
class WebrpcBadRequestError extends WebrpcError {
|
|
1175
|
+
export class WebrpcBadRequestError extends WebrpcError {
|
|
1188
1176
|
constructor(name = 'WebrpcBadRequest', code = -4, message = `bad request`, status = 400, cause) {
|
|
1189
1177
|
super(name, code, message, status, cause);
|
|
1190
1178
|
Object.setPrototypeOf(this, WebrpcBadRequestError.prototype);
|
|
1191
1179
|
}
|
|
1192
1180
|
}
|
|
1193
|
-
|
|
1194
|
-
class WebrpcBadResponseError extends WebrpcError {
|
|
1181
|
+
export class WebrpcBadResponseError extends WebrpcError {
|
|
1195
1182
|
constructor(name = 'WebrpcBadResponse', code = -5, message = `bad response`, status = 500, cause) {
|
|
1196
1183
|
super(name, code, message, status, cause);
|
|
1197
1184
|
Object.setPrototypeOf(this, WebrpcBadResponseError.prototype);
|
|
1198
1185
|
}
|
|
1199
1186
|
}
|
|
1200
|
-
|
|
1201
|
-
class WebrpcServerPanicError extends WebrpcError {
|
|
1187
|
+
export class WebrpcServerPanicError extends WebrpcError {
|
|
1202
1188
|
constructor(name = 'WebrpcServerPanic', code = -6, message = `server panic`, status = 500, cause) {
|
|
1203
1189
|
super(name, code, message, status, cause);
|
|
1204
1190
|
Object.setPrototypeOf(this, WebrpcServerPanicError.prototype);
|
|
1205
1191
|
}
|
|
1206
1192
|
}
|
|
1207
|
-
|
|
1208
|
-
class WebrpcInternalErrorError extends WebrpcError {
|
|
1193
|
+
export class WebrpcInternalErrorError extends WebrpcError {
|
|
1209
1194
|
constructor(name = 'WebrpcInternalError', code = -7, message = `internal error`, status = 500, cause) {
|
|
1210
1195
|
super(name, code, message, status, cause);
|
|
1211
1196
|
Object.setPrototypeOf(this, WebrpcInternalErrorError.prototype);
|
|
1212
1197
|
}
|
|
1213
1198
|
}
|
|
1214
|
-
|
|
1215
|
-
class WebrpcClientAbortedError extends WebrpcError {
|
|
1199
|
+
export class WebrpcClientAbortedError extends WebrpcError {
|
|
1216
1200
|
constructor(name = 'WebrpcClientAborted', code = -8, message = `request aborted by client`, status = 400, cause) {
|
|
1217
1201
|
super(name, code, message, status, cause);
|
|
1218
1202
|
Object.setPrototypeOf(this, WebrpcClientAbortedError.prototype);
|
|
1219
1203
|
}
|
|
1220
1204
|
}
|
|
1221
|
-
|
|
1222
|
-
class WebrpcStreamLostError extends WebrpcError {
|
|
1205
|
+
export class WebrpcStreamLostError extends WebrpcError {
|
|
1223
1206
|
constructor(name = 'WebrpcStreamLost', code = -9, message = `stream lost`, status = 400, cause) {
|
|
1224
1207
|
super(name, code, message, status, cause);
|
|
1225
1208
|
Object.setPrototypeOf(this, WebrpcStreamLostError.prototype);
|
|
1226
1209
|
}
|
|
1227
1210
|
}
|
|
1228
|
-
|
|
1229
|
-
class WebrpcStreamFinishedError extends WebrpcError {
|
|
1211
|
+
export class WebrpcStreamFinishedError extends WebrpcError {
|
|
1230
1212
|
constructor(name = 'WebrpcStreamFinished', code = -10, message = `stream finished`, status = 200, cause) {
|
|
1231
1213
|
super(name, code, message, status, cause);
|
|
1232
1214
|
Object.setPrototypeOf(this, WebrpcStreamFinishedError.prototype);
|
|
1233
1215
|
}
|
|
1234
1216
|
}
|
|
1235
|
-
exports.WebrpcStreamFinishedError = WebrpcStreamFinishedError;
|
|
1236
1217
|
// Schema errors
|
|
1237
|
-
class UnauthorizedError extends WebrpcError {
|
|
1218
|
+
export class UnauthorizedError extends WebrpcError {
|
|
1238
1219
|
constructor(name = 'Unauthorized', code = 1000, message = `Unauthorized access`, status = 401, cause) {
|
|
1239
1220
|
super(name, code, message, status, cause);
|
|
1240
1221
|
Object.setPrototypeOf(this, UnauthorizedError.prototype);
|
|
1241
1222
|
}
|
|
1242
1223
|
}
|
|
1243
|
-
|
|
1244
|
-
class PermissionDeniedError extends WebrpcError {
|
|
1224
|
+
export class PermissionDeniedError extends WebrpcError {
|
|
1245
1225
|
constructor(name = 'PermissionDenied', code = 1001, message = `Permission denied`, status = 403, cause) {
|
|
1246
1226
|
super(name, code, message, status, cause);
|
|
1247
1227
|
Object.setPrototypeOf(this, PermissionDeniedError.prototype);
|
|
1248
1228
|
}
|
|
1249
1229
|
}
|
|
1250
|
-
|
|
1251
|
-
class SessionExpiredError extends WebrpcError {
|
|
1230
|
+
export class SessionExpiredError extends WebrpcError {
|
|
1252
1231
|
constructor(name = 'SessionExpired', code = 1002, message = `Session expired`, status = 403, cause) {
|
|
1253
1232
|
super(name, code, message, status, cause);
|
|
1254
1233
|
Object.setPrototypeOf(this, SessionExpiredError.prototype);
|
|
1255
1234
|
}
|
|
1256
1235
|
}
|
|
1257
|
-
|
|
1258
|
-
class MethodNotFoundError extends WebrpcError {
|
|
1236
|
+
export class MethodNotFoundError extends WebrpcError {
|
|
1259
1237
|
constructor(name = 'MethodNotFound', code = 1003, message = `Method not found`, status = 404, cause) {
|
|
1260
1238
|
super(name, code, message, status, cause);
|
|
1261
1239
|
Object.setPrototypeOf(this, MethodNotFoundError.prototype);
|
|
1262
1240
|
}
|
|
1263
1241
|
}
|
|
1264
|
-
|
|
1265
|
-
class RequestConflictError extends WebrpcError {
|
|
1242
|
+
export class RequestConflictError extends WebrpcError {
|
|
1266
1243
|
constructor(name = 'RequestConflict', code = 1004, message = `Conflict with target resource`, status = 409, cause) {
|
|
1267
1244
|
super(name, code, message, status, cause);
|
|
1268
1245
|
Object.setPrototypeOf(this, RequestConflictError.prototype);
|
|
1269
1246
|
}
|
|
1270
1247
|
}
|
|
1271
|
-
|
|
1272
|
-
class AbortedError extends WebrpcError {
|
|
1248
|
+
export class AbortedError extends WebrpcError {
|
|
1273
1249
|
constructor(name = 'Aborted', code = 1005, message = `Request aborted`, status = 400, cause) {
|
|
1274
1250
|
super(name, code, message, status, cause);
|
|
1275
1251
|
Object.setPrototypeOf(this, AbortedError.prototype);
|
|
1276
1252
|
}
|
|
1277
1253
|
}
|
|
1278
|
-
|
|
1279
|
-
class GeoblockedError extends WebrpcError {
|
|
1254
|
+
export class GeoblockedError extends WebrpcError {
|
|
1280
1255
|
constructor(name = 'Geoblocked', code = 1006, message = `Geoblocked region`, status = 451, cause) {
|
|
1281
1256
|
super(name, code, message, status, cause);
|
|
1282
1257
|
Object.setPrototypeOf(this, GeoblockedError.prototype);
|
|
1283
1258
|
}
|
|
1284
1259
|
}
|
|
1285
|
-
|
|
1286
|
-
class RateLimitedError extends WebrpcError {
|
|
1260
|
+
export class RateLimitedError extends WebrpcError {
|
|
1287
1261
|
constructor(name = 'RateLimited', code = 1007, message = `Rate-limited. Please slow down.`, status = 429, cause) {
|
|
1288
1262
|
super(name, code, message, status, cause);
|
|
1289
1263
|
Object.setPrototypeOf(this, RateLimitedError.prototype);
|
|
1290
1264
|
}
|
|
1291
1265
|
}
|
|
1292
|
-
|
|
1293
|
-
class ProjectNotFoundError extends WebrpcError {
|
|
1266
|
+
export class ProjectNotFoundError extends WebrpcError {
|
|
1294
1267
|
constructor(name = 'ProjectNotFound', code = 1008, message = `Project not found`, status = 401, cause) {
|
|
1295
1268
|
super(name, code, message, status, cause);
|
|
1296
1269
|
Object.setPrototypeOf(this, ProjectNotFoundError.prototype);
|
|
1297
1270
|
}
|
|
1298
1271
|
}
|
|
1299
|
-
|
|
1300
|
-
class SecretKeyCorsDisallowedError extends WebrpcError {
|
|
1272
|
+
export class SecretKeyCorsDisallowedError extends WebrpcError {
|
|
1301
1273
|
constructor(name = 'SecretKeyCorsDisallowed', code = 1009, message = `CORS disallowed. Admin API Secret Key can't be used from a web app.`, status = 403, cause) {
|
|
1302
1274
|
super(name, code, message, status, cause);
|
|
1303
1275
|
Object.setPrototypeOf(this, SecretKeyCorsDisallowedError.prototype);
|
|
1304
1276
|
}
|
|
1305
1277
|
}
|
|
1306
|
-
|
|
1307
|
-
class AccessKeyNotFoundError extends WebrpcError {
|
|
1278
|
+
export class AccessKeyNotFoundError extends WebrpcError {
|
|
1308
1279
|
constructor(name = 'AccessKeyNotFound', code = 1101, message = `Access key not found`, status = 401, cause) {
|
|
1309
1280
|
super(name, code, message, status, cause);
|
|
1310
1281
|
Object.setPrototypeOf(this, AccessKeyNotFoundError.prototype);
|
|
1311
1282
|
}
|
|
1312
1283
|
}
|
|
1313
|
-
|
|
1314
|
-
class AccessKeyMismatchError extends WebrpcError {
|
|
1284
|
+
export class AccessKeyMismatchError extends WebrpcError {
|
|
1315
1285
|
constructor(name = 'AccessKeyMismatch', code = 1102, message = `Access key mismatch`, status = 403, cause) {
|
|
1316
1286
|
super(name, code, message, status, cause);
|
|
1317
1287
|
Object.setPrototypeOf(this, AccessKeyMismatchError.prototype);
|
|
1318
1288
|
}
|
|
1319
1289
|
}
|
|
1320
|
-
|
|
1321
|
-
class InvalidOriginError extends WebrpcError {
|
|
1290
|
+
export class InvalidOriginError extends WebrpcError {
|
|
1322
1291
|
constructor(name = 'InvalidOrigin', code = 1103, message = `Invalid origin for Access Key`, status = 403, cause) {
|
|
1323
1292
|
super(name, code, message, status, cause);
|
|
1324
1293
|
Object.setPrototypeOf(this, InvalidOriginError.prototype);
|
|
1325
1294
|
}
|
|
1326
1295
|
}
|
|
1327
|
-
|
|
1328
|
-
class InvalidServiceError extends WebrpcError {
|
|
1296
|
+
export class InvalidServiceError extends WebrpcError {
|
|
1329
1297
|
constructor(name = 'InvalidService', code = 1104, message = `Service not enabled for Access key`, status = 403, cause) {
|
|
1330
1298
|
super(name, code, message, status, cause);
|
|
1331
1299
|
Object.setPrototypeOf(this, InvalidServiceError.prototype);
|
|
1332
1300
|
}
|
|
1333
1301
|
}
|
|
1334
|
-
|
|
1335
|
-
class UnauthorizedUserError extends WebrpcError {
|
|
1302
|
+
export class UnauthorizedUserError extends WebrpcError {
|
|
1336
1303
|
constructor(name = 'UnauthorizedUser', code = 1105, message = `Unauthorized user`, status = 403, cause) {
|
|
1337
1304
|
super(name, code, message, status, cause);
|
|
1338
1305
|
Object.setPrototypeOf(this, UnauthorizedUserError.prototype);
|
|
1339
1306
|
}
|
|
1340
1307
|
}
|
|
1341
|
-
|
|
1342
|
-
class InvalidChainError extends WebrpcError {
|
|
1308
|
+
export class InvalidChainError extends WebrpcError {
|
|
1343
1309
|
constructor(name = 'InvalidChain', code = 1106, message = `Network not enabled for Access key`, status = 403, cause) {
|
|
1344
1310
|
super(name, code, message, status, cause);
|
|
1345
1311
|
Object.setPrototypeOf(this, InvalidChainError.prototype);
|
|
1346
1312
|
}
|
|
1347
1313
|
}
|
|
1348
|
-
|
|
1349
|
-
class QuotaExceededError extends WebrpcError {
|
|
1314
|
+
export class QuotaExceededError extends WebrpcError {
|
|
1350
1315
|
constructor(name = 'QuotaExceeded', code = 1200, message = `Quota request exceeded`, status = 429, cause) {
|
|
1351
1316
|
super(name, code, message, status, cause);
|
|
1352
1317
|
Object.setPrototypeOf(this, QuotaExceededError.prototype);
|
|
1353
1318
|
}
|
|
1354
1319
|
}
|
|
1355
|
-
|
|
1356
|
-
class QuotaRateLimitError extends WebrpcError {
|
|
1320
|
+
export class QuotaRateLimitError extends WebrpcError {
|
|
1357
1321
|
constructor(name = 'QuotaRateLimit', code = 1201, message = `Quota rate limit exceeded`, status = 429, cause) {
|
|
1358
1322
|
super(name, code, message, status, cause);
|
|
1359
1323
|
Object.setPrototypeOf(this, QuotaRateLimitError.prototype);
|
|
1360
1324
|
}
|
|
1361
1325
|
}
|
|
1362
|
-
|
|
1363
|
-
class NoDefaultKeyError extends WebrpcError {
|
|
1326
|
+
export class NoDefaultKeyError extends WebrpcError {
|
|
1364
1327
|
constructor(name = 'NoDefaultKey', code = 1300, message = `No default access key found`, status = 403, cause) {
|
|
1365
1328
|
super(name, code, message, status, cause);
|
|
1366
1329
|
Object.setPrototypeOf(this, NoDefaultKeyError.prototype);
|
|
1367
1330
|
}
|
|
1368
1331
|
}
|
|
1369
|
-
|
|
1370
|
-
class MaxAccessKeysError extends WebrpcError {
|
|
1332
|
+
export class MaxAccessKeysError extends WebrpcError {
|
|
1371
1333
|
constructor(name = 'MaxAccessKeys', code = 1301, message = `Access keys limit reached`, status = 403, cause) {
|
|
1372
1334
|
super(name, code, message, status, cause);
|
|
1373
1335
|
Object.setPrototypeOf(this, MaxAccessKeysError.prototype);
|
|
1374
1336
|
}
|
|
1375
1337
|
}
|
|
1376
|
-
|
|
1377
|
-
class AtLeastOneKeyError extends WebrpcError {
|
|
1338
|
+
export class AtLeastOneKeyError extends WebrpcError {
|
|
1378
1339
|
constructor(name = 'AtLeastOneKey', code = 1302, message = `You need at least one Access Key`, status = 403, cause) {
|
|
1379
1340
|
super(name, code, message, status, cause);
|
|
1380
1341
|
Object.setPrototypeOf(this, AtLeastOneKeyError.prototype);
|
|
1381
1342
|
}
|
|
1382
1343
|
}
|
|
1383
|
-
|
|
1384
|
-
class TimeoutError extends WebrpcError {
|
|
1344
|
+
export class TimeoutError extends WebrpcError {
|
|
1385
1345
|
constructor(name = 'Timeout', code = 1900, message = `Request timed out`, status = 408, cause) {
|
|
1386
1346
|
super(name, code, message, status, cause);
|
|
1387
1347
|
Object.setPrototypeOf(this, TimeoutError.prototype);
|
|
1388
1348
|
}
|
|
1389
1349
|
}
|
|
1390
|
-
|
|
1391
|
-
class NotFoundError extends WebrpcError {
|
|
1350
|
+
export class NotFoundError extends WebrpcError {
|
|
1392
1351
|
constructor(name = 'NotFound', code = 2000, message = `Resource not found`, status = 400, cause) {
|
|
1393
1352
|
super(name, code, message, status, cause);
|
|
1394
1353
|
Object.setPrototypeOf(this, NotFoundError.prototype);
|
|
1395
1354
|
}
|
|
1396
1355
|
}
|
|
1397
|
-
|
|
1398
|
-
class InvalidArgumentError extends WebrpcError {
|
|
1356
|
+
export class InvalidArgumentError extends WebrpcError {
|
|
1399
1357
|
constructor(name = 'InvalidArgument', code = 2001, message = `Invalid argument`, status = 400, cause) {
|
|
1400
1358
|
super(name, code, message, status, cause);
|
|
1401
1359
|
Object.setPrototypeOf(this, InvalidArgumentError.prototype);
|
|
1402
1360
|
}
|
|
1403
1361
|
}
|
|
1404
|
-
|
|
1405
|
-
class NotImplementedError extends WebrpcError {
|
|
1362
|
+
export class NotImplementedError extends WebrpcError {
|
|
1406
1363
|
constructor(name = 'NotImplemented', code = 9999, message = `Not Implemented`, status = 500, cause) {
|
|
1407
1364
|
super(name, code, message, status, cause);
|
|
1408
1365
|
Object.setPrototypeOf(this, NotImplementedError.prototype);
|
|
1409
1366
|
}
|
|
1410
1367
|
}
|
|
1411
|
-
|
|
1412
|
-
var errors;
|
|
1368
|
+
export var errors;
|
|
1413
1369
|
(function (errors) {
|
|
1414
1370
|
errors["WebrpcEndpoint"] = "WebrpcEndpoint";
|
|
1415
1371
|
errors["WebrpcRequestFailed"] = "WebrpcRequestFailed";
|
|
@@ -1447,8 +1403,8 @@ var errors;
|
|
|
1447
1403
|
errors["NotFound"] = "NotFound";
|
|
1448
1404
|
errors["InvalidArgument"] = "InvalidArgument";
|
|
1449
1405
|
errors["NotImplemented"] = "NotImplemented";
|
|
1450
|
-
})(errors || (
|
|
1451
|
-
var WebrpcErrorCodes;
|
|
1406
|
+
})(errors || (errors = {}));
|
|
1407
|
+
export var WebrpcErrorCodes;
|
|
1452
1408
|
(function (WebrpcErrorCodes) {
|
|
1453
1409
|
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcEndpoint"] = 0] = "WebrpcEndpoint";
|
|
1454
1410
|
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcRequestFailed"] = -1] = "WebrpcRequestFailed";
|
|
@@ -1486,8 +1442,8 @@ var WebrpcErrorCodes;
|
|
|
1486
1442
|
WebrpcErrorCodes[WebrpcErrorCodes["NotFound"] = 2000] = "NotFound";
|
|
1487
1443
|
WebrpcErrorCodes[WebrpcErrorCodes["InvalidArgument"] = 2001] = "InvalidArgument";
|
|
1488
1444
|
WebrpcErrorCodes[WebrpcErrorCodes["NotImplemented"] = 9999] = "NotImplemented";
|
|
1489
|
-
})(WebrpcErrorCodes || (
|
|
1490
|
-
|
|
1445
|
+
})(WebrpcErrorCodes || (WebrpcErrorCodes = {}));
|
|
1446
|
+
export const webrpcErrorByCode = {
|
|
1491
1447
|
[0]: WebrpcEndpointError,
|
|
1492
1448
|
[-1]: WebrpcRequestFailedError,
|
|
1493
1449
|
[-2]: WebrpcBadRouteError,
|
package/eslint.config.js
ADDED
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xsequence/marketplace",
|
|
3
|
-
"version": "3.0.0
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "marketplace sub-package for Sequence",
|
|
5
5
|
"repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/services/marketplace",
|
|
6
|
-
"author": "Sequence Platforms
|
|
6
|
+
"author": "Sequence Platforms ULC",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"publishConfig": {
|
|
9
9
|
"access": "public"
|
|
10
10
|
},
|
|
11
|
+
"type": "module",
|
|
11
12
|
"exports": {
|
|
12
13
|
".": {
|
|
13
14
|
"types": "./dist/index.d.ts",
|
|
@@ -15,14 +16,16 @@
|
|
|
15
16
|
}
|
|
16
17
|
},
|
|
17
18
|
"devDependencies": {
|
|
18
|
-
"@types/node": "^25.0
|
|
19
|
+
"@types/node": "^25.3.0",
|
|
19
20
|
"typescript": "^5.9.3",
|
|
20
|
-
"@repo/
|
|
21
|
+
"@repo/eslint-config": "^0.0.1",
|
|
22
|
+
"@repo/typescript-config": "^0.0.1"
|
|
21
23
|
},
|
|
22
24
|
"scripts": {
|
|
23
25
|
"build": "tsc",
|
|
24
26
|
"dev": "tsc --watch",
|
|
25
27
|
"test": "echo",
|
|
26
|
-
"typecheck": "tsc --noEmit"
|
|
28
|
+
"typecheck": "tsc --noEmit",
|
|
29
|
+
"lint": "eslint . --max-warnings 0"
|
|
27
30
|
}
|
|
28
31
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './marketplace.gen'
|
|
1
|
+
export * from './marketplace.gen.js'
|
|
2
2
|
|
|
3
|
-
import { Marketplace as MarketplaceRpc } from './marketplace.gen'
|
|
3
|
+
import { Marketplace as MarketplaceRpc } from './marketplace.gen.js'
|
|
4
4
|
|
|
5
5
|
export class MarketplaceIndexer extends MarketplaceRpc {
|
|
6
6
|
constructor(
|
|
@@ -15,7 +15,7 @@ export class MarketplaceIndexer extends MarketplaceRpc {
|
|
|
15
15
|
_fetch = (input: RequestInfo, init?: RequestInit): Promise<Response> => {
|
|
16
16
|
// automatically include jwt and access key auth header to requests
|
|
17
17
|
// if its been set on the api client
|
|
18
|
-
const headers:
|
|
18
|
+
const headers: Record<string, string> = {}
|
|
19
19
|
|
|
20
20
|
const jwtAuth = this.jwtAuth
|
|
21
21
|
const projectAccessKey = this.projectAccessKey
|