@0xsequence/api 2.3.10 → 2.3.12
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,7 +13,7 @@ function _extends() {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
/* eslint-disable */
|
|
16
|
-
// sequence-api v0.4.0
|
|
16
|
+
// sequence-api v0.4.0 e4239870ee5f32736b2f3cc35ad37abb59d7fe85
|
|
17
17
|
// --
|
|
18
18
|
// Code generated by webrpc-gen@v0.25.3 with typescript generator. DO NOT EDIT.
|
|
19
19
|
//
|
|
@@ -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 = "e4239870ee5f32736b2f3cc35ad37abb59d7fe85";
|
|
33
33
|
function VersionFromHeader(headers) {
|
|
34
34
|
const headerValue = headers.get(WebrpcHeader);
|
|
35
35
|
if (!headerValue) {
|
|
@@ -101,6 +101,29 @@ let TransakBuySell = /*#__PURE__*/function (TransakBuySell) {
|
|
|
101
101
|
TransakBuySell["SELL"] = "SELL";
|
|
102
102
|
return TransakBuySell;
|
|
103
103
|
}({});
|
|
104
|
+
let CheckoutOptionCrypto = /*#__PURE__*/function (CheckoutOptionCrypto) {
|
|
105
|
+
CheckoutOptionCrypto["none"] = "none";
|
|
106
|
+
CheckoutOptionCrypto["partially"] = "partially";
|
|
107
|
+
CheckoutOptionCrypto["all"] = "all";
|
|
108
|
+
return CheckoutOptionCrypto;
|
|
109
|
+
}({});
|
|
110
|
+
let CheckoutOptionNFTCheckoutProvider = /*#__PURE__*/function (CheckoutOptionNFTCheckoutProvider) {
|
|
111
|
+
CheckoutOptionNFTCheckoutProvider["unknown"] = "unknown";
|
|
112
|
+
CheckoutOptionNFTCheckoutProvider["sardine"] = "sardine";
|
|
113
|
+
CheckoutOptionNFTCheckoutProvider["transak"] = "transak";
|
|
114
|
+
return CheckoutOptionNFTCheckoutProvider;
|
|
115
|
+
}({});
|
|
116
|
+
let CheckoutOptionOnRampProvider = /*#__PURE__*/function (CheckoutOptionOnRampProvider) {
|
|
117
|
+
CheckoutOptionOnRampProvider["unknown"] = "unknown";
|
|
118
|
+
CheckoutOptionOnRampProvider["sardine"] = "sardine";
|
|
119
|
+
CheckoutOptionOnRampProvider["transak"] = "transak";
|
|
120
|
+
return CheckoutOptionOnRampProvider;
|
|
121
|
+
}({});
|
|
122
|
+
let CheckoutOptionSwapProvider = /*#__PURE__*/function (CheckoutOptionSwapProvider) {
|
|
123
|
+
CheckoutOptionSwapProvider["unknown"] = "unknown";
|
|
124
|
+
CheckoutOptionSwapProvider["lifi"] = "lifi";
|
|
125
|
+
return CheckoutOptionSwapProvider;
|
|
126
|
+
}({});
|
|
104
127
|
//
|
|
105
128
|
// Client
|
|
106
129
|
//
|
|
@@ -1148,6 +1171,45 @@ class API {
|
|
|
1148
1171
|
});
|
|
1149
1172
|
});
|
|
1150
1173
|
};
|
|
1174
|
+
this.checkoutOptionsPrimary = (args, headers, signal) => {
|
|
1175
|
+
return this.fetch(this.url('CheckoutOptionsPrimary'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1176
|
+
return buildResponse(res).then(_data => {
|
|
1177
|
+
return {
|
|
1178
|
+
options: _data.options
|
|
1179
|
+
};
|
|
1180
|
+
});
|
|
1181
|
+
}, error => {
|
|
1182
|
+
throw WebrpcRequestFailedError.new({
|
|
1183
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1184
|
+
});
|
|
1185
|
+
});
|
|
1186
|
+
};
|
|
1187
|
+
this.checkoutOptionsSecondary = (args, headers, signal) => {
|
|
1188
|
+
return this.fetch(this.url('CheckoutOptionsSecondary'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1189
|
+
return buildResponse(res).then(_data => {
|
|
1190
|
+
return {
|
|
1191
|
+
options: _data.options
|
|
1192
|
+
};
|
|
1193
|
+
});
|
|
1194
|
+
}, error => {
|
|
1195
|
+
throw WebrpcRequestFailedError.new({
|
|
1196
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1197
|
+
});
|
|
1198
|
+
});
|
|
1199
|
+
};
|
|
1200
|
+
this.checkoutOptionsGetTransakContractID = (args, headers, signal) => {
|
|
1201
|
+
return this.fetch(this.url('CheckoutOptionsGetTransakContractID'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1202
|
+
return buildResponse(res).then(_data => {
|
|
1203
|
+
return {
|
|
1204
|
+
contractId: _data.contractId
|
|
1205
|
+
};
|
|
1206
|
+
});
|
|
1207
|
+
}, error => {
|
|
1208
|
+
throw WebrpcRequestFailedError.new({
|
|
1209
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1210
|
+
});
|
|
1211
|
+
});
|
|
1212
|
+
};
|
|
1151
1213
|
this.hostname = hostname.replace(/\/*$/, '');
|
|
1152
1214
|
this.fetch = (input, init) => fetch(input, init);
|
|
1153
1215
|
}
|
|
@@ -1586,6 +1648,10 @@ exports.AbortedError = AbortedError;
|
|
|
1586
1648
|
exports.AccessKeyMismatchError = AccessKeyMismatchError;
|
|
1587
1649
|
exports.AccessKeyNotFoundError = AccessKeyNotFoundError;
|
|
1588
1650
|
exports.AtLeastOneKeyError = AtLeastOneKeyError;
|
|
1651
|
+
exports.CheckoutOptionCrypto = CheckoutOptionCrypto;
|
|
1652
|
+
exports.CheckoutOptionNFTCheckoutProvider = CheckoutOptionNFTCheckoutProvider;
|
|
1653
|
+
exports.CheckoutOptionOnRampProvider = CheckoutOptionOnRampProvider;
|
|
1654
|
+
exports.CheckoutOptionSwapProvider = CheckoutOptionSwapProvider;
|
|
1589
1655
|
exports.GeoblockedError = GeoblockedError;
|
|
1590
1656
|
exports.InvalidArgumentError = InvalidArgumentError;
|
|
1591
1657
|
exports.InvalidOriginError = InvalidOriginError;
|
|
@@ -13,7 +13,7 @@ function _extends() {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
/* eslint-disable */
|
|
16
|
-
// sequence-api v0.4.0
|
|
16
|
+
// sequence-api v0.4.0 e4239870ee5f32736b2f3cc35ad37abb59d7fe85
|
|
17
17
|
// --
|
|
18
18
|
// Code generated by webrpc-gen@v0.25.3 with typescript generator. DO NOT EDIT.
|
|
19
19
|
//
|
|
@@ -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 = "e4239870ee5f32736b2f3cc35ad37abb59d7fe85";
|
|
33
33
|
function VersionFromHeader(headers) {
|
|
34
34
|
const headerValue = headers.get(WebrpcHeader);
|
|
35
35
|
if (!headerValue) {
|
|
@@ -101,6 +101,29 @@ let TransakBuySell = /*#__PURE__*/function (TransakBuySell) {
|
|
|
101
101
|
TransakBuySell["SELL"] = "SELL";
|
|
102
102
|
return TransakBuySell;
|
|
103
103
|
}({});
|
|
104
|
+
let CheckoutOptionCrypto = /*#__PURE__*/function (CheckoutOptionCrypto) {
|
|
105
|
+
CheckoutOptionCrypto["none"] = "none";
|
|
106
|
+
CheckoutOptionCrypto["partially"] = "partially";
|
|
107
|
+
CheckoutOptionCrypto["all"] = "all";
|
|
108
|
+
return CheckoutOptionCrypto;
|
|
109
|
+
}({});
|
|
110
|
+
let CheckoutOptionNFTCheckoutProvider = /*#__PURE__*/function (CheckoutOptionNFTCheckoutProvider) {
|
|
111
|
+
CheckoutOptionNFTCheckoutProvider["unknown"] = "unknown";
|
|
112
|
+
CheckoutOptionNFTCheckoutProvider["sardine"] = "sardine";
|
|
113
|
+
CheckoutOptionNFTCheckoutProvider["transak"] = "transak";
|
|
114
|
+
return CheckoutOptionNFTCheckoutProvider;
|
|
115
|
+
}({});
|
|
116
|
+
let CheckoutOptionOnRampProvider = /*#__PURE__*/function (CheckoutOptionOnRampProvider) {
|
|
117
|
+
CheckoutOptionOnRampProvider["unknown"] = "unknown";
|
|
118
|
+
CheckoutOptionOnRampProvider["sardine"] = "sardine";
|
|
119
|
+
CheckoutOptionOnRampProvider["transak"] = "transak";
|
|
120
|
+
return CheckoutOptionOnRampProvider;
|
|
121
|
+
}({});
|
|
122
|
+
let CheckoutOptionSwapProvider = /*#__PURE__*/function (CheckoutOptionSwapProvider) {
|
|
123
|
+
CheckoutOptionSwapProvider["unknown"] = "unknown";
|
|
124
|
+
CheckoutOptionSwapProvider["lifi"] = "lifi";
|
|
125
|
+
return CheckoutOptionSwapProvider;
|
|
126
|
+
}({});
|
|
104
127
|
//
|
|
105
128
|
// Client
|
|
106
129
|
//
|
|
@@ -1148,6 +1171,45 @@ class API {
|
|
|
1148
1171
|
});
|
|
1149
1172
|
});
|
|
1150
1173
|
};
|
|
1174
|
+
this.checkoutOptionsPrimary = (args, headers, signal) => {
|
|
1175
|
+
return this.fetch(this.url('CheckoutOptionsPrimary'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1176
|
+
return buildResponse(res).then(_data => {
|
|
1177
|
+
return {
|
|
1178
|
+
options: _data.options
|
|
1179
|
+
};
|
|
1180
|
+
});
|
|
1181
|
+
}, error => {
|
|
1182
|
+
throw WebrpcRequestFailedError.new({
|
|
1183
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1184
|
+
});
|
|
1185
|
+
});
|
|
1186
|
+
};
|
|
1187
|
+
this.checkoutOptionsSecondary = (args, headers, signal) => {
|
|
1188
|
+
return this.fetch(this.url('CheckoutOptionsSecondary'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1189
|
+
return buildResponse(res).then(_data => {
|
|
1190
|
+
return {
|
|
1191
|
+
options: _data.options
|
|
1192
|
+
};
|
|
1193
|
+
});
|
|
1194
|
+
}, error => {
|
|
1195
|
+
throw WebrpcRequestFailedError.new({
|
|
1196
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1197
|
+
});
|
|
1198
|
+
});
|
|
1199
|
+
};
|
|
1200
|
+
this.checkoutOptionsGetTransakContractID = (args, headers, signal) => {
|
|
1201
|
+
return this.fetch(this.url('CheckoutOptionsGetTransakContractID'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1202
|
+
return buildResponse(res).then(_data => {
|
|
1203
|
+
return {
|
|
1204
|
+
contractId: _data.contractId
|
|
1205
|
+
};
|
|
1206
|
+
});
|
|
1207
|
+
}, error => {
|
|
1208
|
+
throw WebrpcRequestFailedError.new({
|
|
1209
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1210
|
+
});
|
|
1211
|
+
});
|
|
1212
|
+
};
|
|
1151
1213
|
this.hostname = hostname.replace(/\/*$/, '');
|
|
1152
1214
|
this.fetch = (input, init) => fetch(input, init);
|
|
1153
1215
|
}
|
|
@@ -1586,6 +1648,10 @@ exports.AbortedError = AbortedError;
|
|
|
1586
1648
|
exports.AccessKeyMismatchError = AccessKeyMismatchError;
|
|
1587
1649
|
exports.AccessKeyNotFoundError = AccessKeyNotFoundError;
|
|
1588
1650
|
exports.AtLeastOneKeyError = AtLeastOneKeyError;
|
|
1651
|
+
exports.CheckoutOptionCrypto = CheckoutOptionCrypto;
|
|
1652
|
+
exports.CheckoutOptionNFTCheckoutProvider = CheckoutOptionNFTCheckoutProvider;
|
|
1653
|
+
exports.CheckoutOptionOnRampProvider = CheckoutOptionOnRampProvider;
|
|
1654
|
+
exports.CheckoutOptionSwapProvider = CheckoutOptionSwapProvider;
|
|
1589
1655
|
exports.GeoblockedError = GeoblockedError;
|
|
1590
1656
|
exports.InvalidArgumentError = InvalidArgumentError;
|
|
1591
1657
|
exports.InvalidOriginError = InvalidOriginError;
|
|
@@ -9,7 +9,7 @@ function _extends() {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
/* eslint-disable */
|
|
12
|
-
// sequence-api v0.4.0
|
|
12
|
+
// sequence-api v0.4.0 e4239870ee5f32736b2f3cc35ad37abb59d7fe85
|
|
13
13
|
// --
|
|
14
14
|
// Code generated by webrpc-gen@v0.25.3 with typescript generator. DO NOT EDIT.
|
|
15
15
|
//
|
|
@@ -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 = "e4239870ee5f32736b2f3cc35ad37abb59d7fe85";
|
|
29
29
|
function VersionFromHeader(headers) {
|
|
30
30
|
const headerValue = headers.get(WebrpcHeader);
|
|
31
31
|
if (!headerValue) {
|
|
@@ -97,6 +97,29 @@ let TransakBuySell = /*#__PURE__*/function (TransakBuySell) {
|
|
|
97
97
|
TransakBuySell["SELL"] = "SELL";
|
|
98
98
|
return TransakBuySell;
|
|
99
99
|
}({});
|
|
100
|
+
let CheckoutOptionCrypto = /*#__PURE__*/function (CheckoutOptionCrypto) {
|
|
101
|
+
CheckoutOptionCrypto["none"] = "none";
|
|
102
|
+
CheckoutOptionCrypto["partially"] = "partially";
|
|
103
|
+
CheckoutOptionCrypto["all"] = "all";
|
|
104
|
+
return CheckoutOptionCrypto;
|
|
105
|
+
}({});
|
|
106
|
+
let CheckoutOptionNFTCheckoutProvider = /*#__PURE__*/function (CheckoutOptionNFTCheckoutProvider) {
|
|
107
|
+
CheckoutOptionNFTCheckoutProvider["unknown"] = "unknown";
|
|
108
|
+
CheckoutOptionNFTCheckoutProvider["sardine"] = "sardine";
|
|
109
|
+
CheckoutOptionNFTCheckoutProvider["transak"] = "transak";
|
|
110
|
+
return CheckoutOptionNFTCheckoutProvider;
|
|
111
|
+
}({});
|
|
112
|
+
let CheckoutOptionOnRampProvider = /*#__PURE__*/function (CheckoutOptionOnRampProvider) {
|
|
113
|
+
CheckoutOptionOnRampProvider["unknown"] = "unknown";
|
|
114
|
+
CheckoutOptionOnRampProvider["sardine"] = "sardine";
|
|
115
|
+
CheckoutOptionOnRampProvider["transak"] = "transak";
|
|
116
|
+
return CheckoutOptionOnRampProvider;
|
|
117
|
+
}({});
|
|
118
|
+
let CheckoutOptionSwapProvider = /*#__PURE__*/function (CheckoutOptionSwapProvider) {
|
|
119
|
+
CheckoutOptionSwapProvider["unknown"] = "unknown";
|
|
120
|
+
CheckoutOptionSwapProvider["lifi"] = "lifi";
|
|
121
|
+
return CheckoutOptionSwapProvider;
|
|
122
|
+
}({});
|
|
100
123
|
//
|
|
101
124
|
// Client
|
|
102
125
|
//
|
|
@@ -1144,6 +1167,45 @@ class API {
|
|
|
1144
1167
|
});
|
|
1145
1168
|
});
|
|
1146
1169
|
};
|
|
1170
|
+
this.checkoutOptionsPrimary = (args, headers, signal) => {
|
|
1171
|
+
return this.fetch(this.url('CheckoutOptionsPrimary'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1172
|
+
return buildResponse(res).then(_data => {
|
|
1173
|
+
return {
|
|
1174
|
+
options: _data.options
|
|
1175
|
+
};
|
|
1176
|
+
});
|
|
1177
|
+
}, error => {
|
|
1178
|
+
throw WebrpcRequestFailedError.new({
|
|
1179
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1180
|
+
});
|
|
1181
|
+
});
|
|
1182
|
+
};
|
|
1183
|
+
this.checkoutOptionsSecondary = (args, headers, signal) => {
|
|
1184
|
+
return this.fetch(this.url('CheckoutOptionsSecondary'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1185
|
+
return buildResponse(res).then(_data => {
|
|
1186
|
+
return {
|
|
1187
|
+
options: _data.options
|
|
1188
|
+
};
|
|
1189
|
+
});
|
|
1190
|
+
}, error => {
|
|
1191
|
+
throw WebrpcRequestFailedError.new({
|
|
1192
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1193
|
+
});
|
|
1194
|
+
});
|
|
1195
|
+
};
|
|
1196
|
+
this.checkoutOptionsGetTransakContractID = (args, headers, signal) => {
|
|
1197
|
+
return this.fetch(this.url('CheckoutOptionsGetTransakContractID'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1198
|
+
return buildResponse(res).then(_data => {
|
|
1199
|
+
return {
|
|
1200
|
+
contractId: _data.contractId
|
|
1201
|
+
};
|
|
1202
|
+
});
|
|
1203
|
+
}, error => {
|
|
1204
|
+
throw WebrpcRequestFailedError.new({
|
|
1205
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1206
|
+
});
|
|
1207
|
+
});
|
|
1208
|
+
};
|
|
1147
1209
|
this.hostname = hostname.replace(/\/*$/, '');
|
|
1148
1210
|
this.fetch = (input, init) => fetch(input, init);
|
|
1149
1211
|
}
|
|
@@ -1577,4 +1639,4 @@ class SequenceAPIClient extends API {
|
|
|
1577
1639
|
}
|
|
1578
1640
|
}
|
|
1579
1641
|
|
|
1580
|
-
export { API, AbortedError, AccessKeyMismatchError, AccessKeyNotFoundError, AtLeastOneKeyError, GeoblockedError, InvalidArgumentError, InvalidOriginError, InvalidServiceError, MaxAccessKeysError, MethodNotFoundError, NoDefaultKeyError, NotFoundError, PermissionDeniedError, ProjectNotFoundError, QueryFailedError, QuotaExceededError, QuotaRateLimitError, RateLimitedError, RequestConflictError, SardinePaymentType, SardineQuoteType, SequenceAPIClient, SessionExpiredError, SortOrder, TimeoutError, TokenType, TransakBuySell, UnauthorizedError, UnauthorizedUserError, UnavailableError, UnsupportedNetworkError, VersionFromHeader, WebRPCSchemaHash, WebRPCSchemaVersion, WebRPCVersion, WebrpcBadMethodError, WebrpcBadRequestError, WebrpcBadResponseError, WebrpcBadRouteError, WebrpcClientDisconnectedError, WebrpcEndpointError, WebrpcError, WebrpcErrorCodes, WebrpcHeader, WebrpcHeaderValue, WebrpcInternalErrorError, WebrpcRequestFailedError, WebrpcServerPanicError, WebrpcStreamFinishedError, WebrpcStreamLostError, errors, webrpcErrorByCode };
|
|
1642
|
+
export { API, AbortedError, AccessKeyMismatchError, AccessKeyNotFoundError, AtLeastOneKeyError, CheckoutOptionCrypto, CheckoutOptionNFTCheckoutProvider, CheckoutOptionOnRampProvider, CheckoutOptionSwapProvider, GeoblockedError, InvalidArgumentError, InvalidOriginError, InvalidServiceError, MaxAccessKeysError, MethodNotFoundError, NoDefaultKeyError, NotFoundError, PermissionDeniedError, ProjectNotFoundError, QueryFailedError, QuotaExceededError, QuotaRateLimitError, RateLimitedError, RequestConflictError, SardinePaymentType, SardineQuoteType, SequenceAPIClient, SessionExpiredError, SortOrder, TimeoutError, TokenType, TransakBuySell, UnauthorizedError, UnauthorizedUserError, UnavailableError, UnsupportedNetworkError, VersionFromHeader, WebRPCSchemaHash, WebRPCSchemaVersion, WebRPCVersion, WebrpcBadMethodError, WebrpcBadRequestError, WebrpcBadResponseError, WebrpcBadRouteError, WebrpcClientDisconnectedError, WebrpcEndpointError, WebrpcError, WebrpcErrorCodes, WebrpcHeader, WebrpcHeaderValue, WebrpcInternalErrorError, WebrpcRequestFailedError, WebrpcServerPanicError, WebrpcStreamFinishedError, WebrpcStreamLostError, errors, webrpcErrorByCode };
|
|
@@ -2,7 +2,7 @@ export declare const WebrpcHeader = "Webrpc";
|
|
|
2
2
|
export declare const WebrpcHeaderValue = "webrpc@v0.25.3;gen-typescript@v0.17.0;sequence-api@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 = "e4239870ee5f32736b2f3cc35ad37abb59d7fe85";
|
|
6
6
|
type WebrpcGenVersions = {
|
|
7
7
|
webrpcGenVersion: string;
|
|
8
8
|
codeGenName: string;
|
|
@@ -37,6 +37,25 @@ export declare enum TransakBuySell {
|
|
|
37
37
|
BUY = "BUY",
|
|
38
38
|
SELL = "SELL"
|
|
39
39
|
}
|
|
40
|
+
export declare enum CheckoutOptionCrypto {
|
|
41
|
+
none = "none",
|
|
42
|
+
partially = "partially",
|
|
43
|
+
all = "all"
|
|
44
|
+
}
|
|
45
|
+
export declare enum CheckoutOptionNFTCheckoutProvider {
|
|
46
|
+
unknown = "unknown",
|
|
47
|
+
sardine = "sardine",
|
|
48
|
+
transak = "transak"
|
|
49
|
+
}
|
|
50
|
+
export declare enum CheckoutOptionOnRampProvider {
|
|
51
|
+
unknown = "unknown",
|
|
52
|
+
sardine = "sardine",
|
|
53
|
+
transak = "transak"
|
|
54
|
+
}
|
|
55
|
+
export declare enum CheckoutOptionSwapProvider {
|
|
56
|
+
unknown = "unknown",
|
|
57
|
+
lifi = "lifi"
|
|
58
|
+
}
|
|
40
59
|
export interface Version {
|
|
41
60
|
webrpcVersion: string;
|
|
42
61
|
schemaVersion: string;
|
|
@@ -349,7 +368,8 @@ export interface LifiToken {
|
|
|
349
368
|
symbol: string;
|
|
350
369
|
name: string;
|
|
351
370
|
decimals: number;
|
|
352
|
-
priceUsd:
|
|
371
|
+
priceUsd: number;
|
|
372
|
+
price?: string;
|
|
353
373
|
coinKey: string;
|
|
354
374
|
logoUri: string;
|
|
355
375
|
}
|
|
@@ -364,8 +384,8 @@ export interface GetLifiSwapQuoteParams {
|
|
|
364
384
|
walletAddress: string;
|
|
365
385
|
fromTokenAddress: string;
|
|
366
386
|
toTokenAddress: string;
|
|
367
|
-
fromTokenAmount
|
|
368
|
-
toTokenAmount
|
|
387
|
+
fromTokenAmount?: string;
|
|
388
|
+
toTokenAmount?: string;
|
|
369
389
|
includeApprove: boolean;
|
|
370
390
|
slippageBps: number;
|
|
371
391
|
}
|
|
@@ -581,6 +601,23 @@ export interface TransakChain {
|
|
|
581
601
|
name: string;
|
|
582
602
|
chainId: number;
|
|
583
603
|
}
|
|
604
|
+
export interface CheckoutOptionsPrimaryParams {
|
|
605
|
+
quantity: string;
|
|
606
|
+
tokenId: string;
|
|
607
|
+
}
|
|
608
|
+
export interface CheckoutOptionsSecondaryParams {
|
|
609
|
+
collectionAddress: string;
|
|
610
|
+
marketplaceAddress: string;
|
|
611
|
+
currencyAddress: string;
|
|
612
|
+
priceAmount: string;
|
|
613
|
+
tokenId: string;
|
|
614
|
+
}
|
|
615
|
+
export interface CheckoutOptions {
|
|
616
|
+
crypto: CheckoutOptionCrypto;
|
|
617
|
+
swap: Array<CheckoutOptionSwapProvider>;
|
|
618
|
+
nftCheckout: Array<CheckoutOptionNFTCheckoutProvider>;
|
|
619
|
+
onRamp: Array<CheckoutOptionOnRampProvider>;
|
|
620
|
+
}
|
|
584
621
|
export interface API {
|
|
585
622
|
/**
|
|
586
623
|
*
|
|
@@ -770,6 +807,9 @@ export interface API {
|
|
|
770
807
|
getPack(args: GetPackArgs, headers?: object, signal?: AbortSignal): Promise<GetPackReturn>;
|
|
771
808
|
deletePack(args: DeletePackArgs, headers?: object, signal?: AbortSignal): Promise<DeletePackReturn>;
|
|
772
809
|
updatePackContent(args: UpdatePackContentArgs, headers?: object, signal?: AbortSignal): Promise<UpdatePackContentReturn>;
|
|
810
|
+
checkoutOptionsPrimary(args: CheckoutOptionsPrimaryArgs, headers?: object, signal?: AbortSignal): Promise<CheckoutOptionsPrimaryReturn>;
|
|
811
|
+
checkoutOptionsSecondary(args: CheckoutOptionsSecondaryArgs, headers?: object, signal?: AbortSignal): Promise<CheckoutOptionsSecondaryReturn>;
|
|
812
|
+
checkoutOptionsGetTransakContractID(args: CheckoutOptionsGetTransakContractIDArgs, headers?: object, signal?: AbortSignal): Promise<CheckoutOptionsGetTransakContractIDReturn>;
|
|
773
813
|
}
|
|
774
814
|
export interface PingArgs {
|
|
775
815
|
}
|
|
@@ -1213,6 +1253,8 @@ export interface GetLifiTokensReturn {
|
|
|
1213
1253
|
export interface GetLifiSwapRoutesArgs {
|
|
1214
1254
|
chainId: number;
|
|
1215
1255
|
toTokenAddress: string;
|
|
1256
|
+
toTokenAmount: string;
|
|
1257
|
+
walletAddress: string;
|
|
1216
1258
|
}
|
|
1217
1259
|
export interface GetLifiSwapRoutesReturn {
|
|
1218
1260
|
routes: Array<LifiSwapRoute>;
|
|
@@ -1300,6 +1342,31 @@ export interface UpdatePackContentArgs {
|
|
|
1300
1342
|
export interface UpdatePackContentReturn {
|
|
1301
1343
|
merkleRoot: string;
|
|
1302
1344
|
}
|
|
1345
|
+
export interface CheckoutOptionsPrimaryArgs {
|
|
1346
|
+
chainId: number;
|
|
1347
|
+
wallet: string;
|
|
1348
|
+
contractAddress: string;
|
|
1349
|
+
collectionAddress: string;
|
|
1350
|
+
params: Array<CheckoutOptionsPrimaryParams>;
|
|
1351
|
+
}
|
|
1352
|
+
export interface CheckoutOptionsPrimaryReturn {
|
|
1353
|
+
options: CheckoutOptions;
|
|
1354
|
+
}
|
|
1355
|
+
export interface CheckoutOptionsSecondaryArgs {
|
|
1356
|
+
chainId: number;
|
|
1357
|
+
wallet: string;
|
|
1358
|
+
params: Array<CheckoutOptionsSecondaryParams>;
|
|
1359
|
+
}
|
|
1360
|
+
export interface CheckoutOptionsSecondaryReturn {
|
|
1361
|
+
options: CheckoutOptions;
|
|
1362
|
+
}
|
|
1363
|
+
export interface CheckoutOptionsGetTransakContractIDArgs {
|
|
1364
|
+
chainId: number;
|
|
1365
|
+
contractAddress: string;
|
|
1366
|
+
}
|
|
1367
|
+
export interface CheckoutOptionsGetTransakContractIDReturn {
|
|
1368
|
+
contractId: string;
|
|
1369
|
+
}
|
|
1303
1370
|
export declare class API implements API {
|
|
1304
1371
|
protected hostname: string;
|
|
1305
1372
|
protected fetch: Fetch;
|
|
@@ -1385,6 +1452,9 @@ export declare class API implements API {
|
|
|
1385
1452
|
getPack: (args: GetPackArgs, headers?: object, signal?: AbortSignal) => Promise<GetPackReturn>;
|
|
1386
1453
|
deletePack: (args: DeletePackArgs, headers?: object, signal?: AbortSignal) => Promise<DeletePackReturn>;
|
|
1387
1454
|
updatePackContent: (args: UpdatePackContentArgs, headers?: object, signal?: AbortSignal) => Promise<UpdatePackContentReturn>;
|
|
1455
|
+
checkoutOptionsPrimary: (args: CheckoutOptionsPrimaryArgs, headers?: object, signal?: AbortSignal) => Promise<CheckoutOptionsPrimaryReturn>;
|
|
1456
|
+
checkoutOptionsSecondary: (args: CheckoutOptionsSecondaryArgs, headers?: object, signal?: AbortSignal) => Promise<CheckoutOptionsSecondaryReturn>;
|
|
1457
|
+
checkoutOptionsGetTransakContractID: (args: CheckoutOptionsGetTransakContractIDArgs, headers?: object, signal?: AbortSignal) => Promise<CheckoutOptionsGetTransakContractIDReturn>;
|
|
1388
1458
|
}
|
|
1389
1459
|
export declare class WebrpcError extends Error {
|
|
1390
1460
|
name: string;
|
package/package.json
CHANGED
package/src/api.gen.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
// sequence-api v0.4.0
|
|
2
|
+
// sequence-api v0.4.0 e4239870ee5f32736b2f3cc35ad37abb59d7fe85
|
|
3
3
|
// --
|
|
4
4
|
// Code generated by webrpc-gen@v0.25.3 with typescript generator. DO NOT EDIT.
|
|
5
5
|
//
|
|
@@ -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 = "e4239870ee5f32736b2f3cc35ad37abb59d7fe85"
|
|
20
20
|
|
|
21
21
|
type WebrpcGenVersions = {
|
|
22
22
|
webrpcGenVersion: string;
|
|
@@ -102,6 +102,29 @@ export enum TransakBuySell {
|
|
|
102
102
|
SELL = 'SELL'
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
+
export enum CheckoutOptionCrypto {
|
|
106
|
+
none = 'none',
|
|
107
|
+
partially = 'partially',
|
|
108
|
+
all = 'all'
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export enum CheckoutOptionNFTCheckoutProvider {
|
|
112
|
+
unknown = 'unknown',
|
|
113
|
+
sardine = 'sardine',
|
|
114
|
+
transak = 'transak'
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export enum CheckoutOptionOnRampProvider {
|
|
118
|
+
unknown = 'unknown',
|
|
119
|
+
sardine = 'sardine',
|
|
120
|
+
transak = 'transak'
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export enum CheckoutOptionSwapProvider {
|
|
124
|
+
unknown = 'unknown',
|
|
125
|
+
lifi = 'lifi'
|
|
126
|
+
}
|
|
127
|
+
|
|
105
128
|
export interface Version {
|
|
106
129
|
webrpcVersion: string
|
|
107
130
|
schemaVersion: string
|
|
@@ -451,7 +474,8 @@ export interface LifiToken {
|
|
|
451
474
|
symbol: string
|
|
452
475
|
name: string
|
|
453
476
|
decimals: number
|
|
454
|
-
priceUsd:
|
|
477
|
+
priceUsd: number
|
|
478
|
+
price?: string
|
|
455
479
|
coinKey: string
|
|
456
480
|
logoUri: string
|
|
457
481
|
}
|
|
@@ -468,8 +492,8 @@ export interface GetLifiSwapQuoteParams {
|
|
|
468
492
|
walletAddress: string
|
|
469
493
|
fromTokenAddress: string
|
|
470
494
|
toTokenAddress: string
|
|
471
|
-
fromTokenAmount
|
|
472
|
-
toTokenAmount
|
|
495
|
+
fromTokenAmount?: string
|
|
496
|
+
toTokenAmount?: string
|
|
473
497
|
includeApprove: boolean
|
|
474
498
|
slippageBps: number
|
|
475
499
|
}
|
|
@@ -708,6 +732,26 @@ export interface TransakChain {
|
|
|
708
732
|
chainId: number
|
|
709
733
|
}
|
|
710
734
|
|
|
735
|
+
export interface CheckoutOptionsPrimaryParams {
|
|
736
|
+
quantity: string
|
|
737
|
+
tokenId: string
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
export interface CheckoutOptionsSecondaryParams {
|
|
741
|
+
collectionAddress: string
|
|
742
|
+
marketplaceAddress: string
|
|
743
|
+
currencyAddress: string
|
|
744
|
+
priceAmount: string
|
|
745
|
+
tokenId: string
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
export interface CheckoutOptions {
|
|
749
|
+
crypto: CheckoutOptionCrypto
|
|
750
|
+
swap: Array<CheckoutOptionSwapProvider>
|
|
751
|
+
nftCheckout: Array<CheckoutOptionNFTCheckoutProvider>
|
|
752
|
+
onRamp: Array<CheckoutOptionOnRampProvider>
|
|
753
|
+
}
|
|
754
|
+
|
|
711
755
|
export interface API {
|
|
712
756
|
/**
|
|
713
757
|
*
|
|
@@ -897,6 +941,9 @@ export interface API {
|
|
|
897
941
|
getPack(args: GetPackArgs, headers?: object, signal?: AbortSignal): Promise<GetPackReturn>
|
|
898
942
|
deletePack(args: DeletePackArgs, headers?: object, signal?: AbortSignal): Promise<DeletePackReturn>
|
|
899
943
|
updatePackContent(args: UpdatePackContentArgs, headers?: object, signal?: AbortSignal): Promise<UpdatePackContentReturn>
|
|
944
|
+
checkoutOptionsPrimary(args: CheckoutOptionsPrimaryArgs, headers?: object, signal?: AbortSignal): Promise<CheckoutOptionsPrimaryReturn>
|
|
945
|
+
checkoutOptionsSecondary(args: CheckoutOptionsSecondaryArgs, headers?: object, signal?: AbortSignal): Promise<CheckoutOptionsSecondaryReturn>
|
|
946
|
+
checkoutOptionsGetTransakContractID(args: CheckoutOptionsGetTransakContractIDArgs, headers?: object, signal?: AbortSignal): Promise<CheckoutOptionsGetTransakContractIDReturn>
|
|
900
947
|
}
|
|
901
948
|
|
|
902
949
|
export interface PingArgs {
|
|
@@ -1404,6 +1451,8 @@ export interface GetLifiTokensReturn {
|
|
|
1404
1451
|
export interface GetLifiSwapRoutesArgs {
|
|
1405
1452
|
chainId: number
|
|
1406
1453
|
toTokenAddress: string
|
|
1454
|
+
toTokenAmount: string
|
|
1455
|
+
walletAddress: string
|
|
1407
1456
|
}
|
|
1408
1457
|
|
|
1409
1458
|
export interface GetLifiSwapRoutesReturn {
|
|
@@ -1505,6 +1554,34 @@ export interface UpdatePackContentArgs {
|
|
|
1505
1554
|
export interface UpdatePackContentReturn {
|
|
1506
1555
|
merkleRoot: string
|
|
1507
1556
|
}
|
|
1557
|
+
export interface CheckoutOptionsPrimaryArgs {
|
|
1558
|
+
chainId: number
|
|
1559
|
+
wallet: string
|
|
1560
|
+
contractAddress: string
|
|
1561
|
+
collectionAddress: string
|
|
1562
|
+
params: Array<CheckoutOptionsPrimaryParams>
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1565
|
+
export interface CheckoutOptionsPrimaryReturn {
|
|
1566
|
+
options: CheckoutOptions
|
|
1567
|
+
}
|
|
1568
|
+
export interface CheckoutOptionsSecondaryArgs {
|
|
1569
|
+
chainId: number
|
|
1570
|
+
wallet: string
|
|
1571
|
+
params: Array<CheckoutOptionsSecondaryParams>
|
|
1572
|
+
}
|
|
1573
|
+
|
|
1574
|
+
export interface CheckoutOptionsSecondaryReturn {
|
|
1575
|
+
options: CheckoutOptions
|
|
1576
|
+
}
|
|
1577
|
+
export interface CheckoutOptionsGetTransakContractIDArgs {
|
|
1578
|
+
chainId: number
|
|
1579
|
+
contractAddress: string
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1582
|
+
export interface CheckoutOptionsGetTransakContractIDReturn {
|
|
1583
|
+
contractId: string
|
|
1584
|
+
}
|
|
1508
1585
|
|
|
1509
1586
|
|
|
1510
1587
|
|
|
@@ -2661,6 +2738,48 @@ export class API implements API {
|
|
|
2661
2738
|
})
|
|
2662
2739
|
}
|
|
2663
2740
|
|
|
2741
|
+
checkoutOptionsPrimary = (args: CheckoutOptionsPrimaryArgs, headers?: object, signal?: AbortSignal): Promise<CheckoutOptionsPrimaryReturn> => {
|
|
2742
|
+
return this.fetch(
|
|
2743
|
+
this.url('CheckoutOptionsPrimary'),
|
|
2744
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
2745
|
+
return buildResponse(res).then(_data => {
|
|
2746
|
+
return {
|
|
2747
|
+
options: <CheckoutOptions>(_data.options),
|
|
2748
|
+
}
|
|
2749
|
+
})
|
|
2750
|
+
}, (error) => {
|
|
2751
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2752
|
+
})
|
|
2753
|
+
}
|
|
2754
|
+
|
|
2755
|
+
checkoutOptionsSecondary = (args: CheckoutOptionsSecondaryArgs, headers?: object, signal?: AbortSignal): Promise<CheckoutOptionsSecondaryReturn> => {
|
|
2756
|
+
return this.fetch(
|
|
2757
|
+
this.url('CheckoutOptionsSecondary'),
|
|
2758
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
2759
|
+
return buildResponse(res).then(_data => {
|
|
2760
|
+
return {
|
|
2761
|
+
options: <CheckoutOptions>(_data.options),
|
|
2762
|
+
}
|
|
2763
|
+
})
|
|
2764
|
+
}, (error) => {
|
|
2765
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2766
|
+
})
|
|
2767
|
+
}
|
|
2768
|
+
|
|
2769
|
+
checkoutOptionsGetTransakContractID = (args: CheckoutOptionsGetTransakContractIDArgs, headers?: object, signal?: AbortSignal): Promise<CheckoutOptionsGetTransakContractIDReturn> => {
|
|
2770
|
+
return this.fetch(
|
|
2771
|
+
this.url('CheckoutOptionsGetTransakContractID'),
|
|
2772
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
2773
|
+
return buildResponse(res).then(_data => {
|
|
2774
|
+
return {
|
|
2775
|
+
contractId: <string>(_data.contractId),
|
|
2776
|
+
}
|
|
2777
|
+
})
|
|
2778
|
+
}, (error) => {
|
|
2779
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2780
|
+
})
|
|
2781
|
+
}
|
|
2782
|
+
|
|
2664
2783
|
}
|
|
2665
2784
|
|
|
2666
2785
|
const createHTTPRequest = (body: object = {}, headers: object = {}, signal: AbortSignal | null = null): object => {
|