@0xsequence/api 2.3.10 → 2.3.11
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 ab3b6841bf983fa51a24df4cee18536199f115c3
|
|
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 = "ab3b6841bf983fa51a24df4cee18536199f115c3";
|
|
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,32 @@ class API {
|
|
|
1148
1171
|
});
|
|
1149
1172
|
});
|
|
1150
1173
|
};
|
|
1174
|
+
this.checkoutOptionsSecondary = (args, headers, signal) => {
|
|
1175
|
+
return this.fetch(this.url('CheckoutOptionsSecondary'), 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.checkoutOptionsGetTransakContractID = (args, headers, signal) => {
|
|
1188
|
+
return this.fetch(this.url('CheckoutOptionsGetTransakContractID'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1189
|
+
return buildResponse(res).then(_data => {
|
|
1190
|
+
return {
|
|
1191
|
+
contractId: _data.contractId
|
|
1192
|
+
};
|
|
1193
|
+
});
|
|
1194
|
+
}, error => {
|
|
1195
|
+
throw WebrpcRequestFailedError.new({
|
|
1196
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1197
|
+
});
|
|
1198
|
+
});
|
|
1199
|
+
};
|
|
1151
1200
|
this.hostname = hostname.replace(/\/*$/, '');
|
|
1152
1201
|
this.fetch = (input, init) => fetch(input, init);
|
|
1153
1202
|
}
|
|
@@ -1586,6 +1635,10 @@ exports.AbortedError = AbortedError;
|
|
|
1586
1635
|
exports.AccessKeyMismatchError = AccessKeyMismatchError;
|
|
1587
1636
|
exports.AccessKeyNotFoundError = AccessKeyNotFoundError;
|
|
1588
1637
|
exports.AtLeastOneKeyError = AtLeastOneKeyError;
|
|
1638
|
+
exports.CheckoutOptionCrypto = CheckoutOptionCrypto;
|
|
1639
|
+
exports.CheckoutOptionNFTCheckoutProvider = CheckoutOptionNFTCheckoutProvider;
|
|
1640
|
+
exports.CheckoutOptionOnRampProvider = CheckoutOptionOnRampProvider;
|
|
1641
|
+
exports.CheckoutOptionSwapProvider = CheckoutOptionSwapProvider;
|
|
1589
1642
|
exports.GeoblockedError = GeoblockedError;
|
|
1590
1643
|
exports.InvalidArgumentError = InvalidArgumentError;
|
|
1591
1644
|
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 ab3b6841bf983fa51a24df4cee18536199f115c3
|
|
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 = "ab3b6841bf983fa51a24df4cee18536199f115c3";
|
|
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,32 @@ class API {
|
|
|
1148
1171
|
});
|
|
1149
1172
|
});
|
|
1150
1173
|
};
|
|
1174
|
+
this.checkoutOptionsSecondary = (args, headers, signal) => {
|
|
1175
|
+
return this.fetch(this.url('CheckoutOptionsSecondary'), 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.checkoutOptionsGetTransakContractID = (args, headers, signal) => {
|
|
1188
|
+
return this.fetch(this.url('CheckoutOptionsGetTransakContractID'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1189
|
+
return buildResponse(res).then(_data => {
|
|
1190
|
+
return {
|
|
1191
|
+
contractId: _data.contractId
|
|
1192
|
+
};
|
|
1193
|
+
});
|
|
1194
|
+
}, error => {
|
|
1195
|
+
throw WebrpcRequestFailedError.new({
|
|
1196
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1197
|
+
});
|
|
1198
|
+
});
|
|
1199
|
+
};
|
|
1151
1200
|
this.hostname = hostname.replace(/\/*$/, '');
|
|
1152
1201
|
this.fetch = (input, init) => fetch(input, init);
|
|
1153
1202
|
}
|
|
@@ -1586,6 +1635,10 @@ exports.AbortedError = AbortedError;
|
|
|
1586
1635
|
exports.AccessKeyMismatchError = AccessKeyMismatchError;
|
|
1587
1636
|
exports.AccessKeyNotFoundError = AccessKeyNotFoundError;
|
|
1588
1637
|
exports.AtLeastOneKeyError = AtLeastOneKeyError;
|
|
1638
|
+
exports.CheckoutOptionCrypto = CheckoutOptionCrypto;
|
|
1639
|
+
exports.CheckoutOptionNFTCheckoutProvider = CheckoutOptionNFTCheckoutProvider;
|
|
1640
|
+
exports.CheckoutOptionOnRampProvider = CheckoutOptionOnRampProvider;
|
|
1641
|
+
exports.CheckoutOptionSwapProvider = CheckoutOptionSwapProvider;
|
|
1589
1642
|
exports.GeoblockedError = GeoblockedError;
|
|
1590
1643
|
exports.InvalidArgumentError = InvalidArgumentError;
|
|
1591
1644
|
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 ab3b6841bf983fa51a24df4cee18536199f115c3
|
|
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 = "ab3b6841bf983fa51a24df4cee18536199f115c3";
|
|
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,32 @@ class API {
|
|
|
1144
1167
|
});
|
|
1145
1168
|
});
|
|
1146
1169
|
};
|
|
1170
|
+
this.checkoutOptionsSecondary = (args, headers, signal) => {
|
|
1171
|
+
return this.fetch(this.url('CheckoutOptionsSecondary'), 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.checkoutOptionsGetTransakContractID = (args, headers, signal) => {
|
|
1184
|
+
return this.fetch(this.url('CheckoutOptionsGetTransakContractID'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1185
|
+
return buildResponse(res).then(_data => {
|
|
1186
|
+
return {
|
|
1187
|
+
contractId: _data.contractId
|
|
1188
|
+
};
|
|
1189
|
+
});
|
|
1190
|
+
}, error => {
|
|
1191
|
+
throw WebrpcRequestFailedError.new({
|
|
1192
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1193
|
+
});
|
|
1194
|
+
});
|
|
1195
|
+
};
|
|
1147
1196
|
this.hostname = hostname.replace(/\/*$/, '');
|
|
1148
1197
|
this.fetch = (input, init) => fetch(input, init);
|
|
1149
1198
|
}
|
|
@@ -1577,4 +1626,4 @@ class SequenceAPIClient extends API {
|
|
|
1577
1626
|
}
|
|
1578
1627
|
}
|
|
1579
1628
|
|
|
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 };
|
|
1629
|
+
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 = "ab3b6841bf983fa51a24df4cee18536199f115c3";
|
|
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,19 @@ export interface TransakChain {
|
|
|
581
601
|
name: string;
|
|
582
602
|
chainId: number;
|
|
583
603
|
}
|
|
604
|
+
export interface SecondaryCheckoutOptionsParams {
|
|
605
|
+
collectionAddress: string;
|
|
606
|
+
marketplaceAddress: string;
|
|
607
|
+
currencyAddress: string;
|
|
608
|
+
priceAmount: string;
|
|
609
|
+
tokenId: string;
|
|
610
|
+
}
|
|
611
|
+
export interface CheckoutOptions {
|
|
612
|
+
crypto: CheckoutOptionCrypto;
|
|
613
|
+
swap: Array<CheckoutOptionSwapProvider>;
|
|
614
|
+
nftCheckout: Array<CheckoutOptionNFTCheckoutProvider>;
|
|
615
|
+
onRamp: Array<CheckoutOptionOnRampProvider>;
|
|
616
|
+
}
|
|
584
617
|
export interface API {
|
|
585
618
|
/**
|
|
586
619
|
*
|
|
@@ -770,6 +803,8 @@ export interface API {
|
|
|
770
803
|
getPack(args: GetPackArgs, headers?: object, signal?: AbortSignal): Promise<GetPackReturn>;
|
|
771
804
|
deletePack(args: DeletePackArgs, headers?: object, signal?: AbortSignal): Promise<DeletePackReturn>;
|
|
772
805
|
updatePackContent(args: UpdatePackContentArgs, headers?: object, signal?: AbortSignal): Promise<UpdatePackContentReturn>;
|
|
806
|
+
checkoutOptionsSecondary(args: CheckoutOptionsSecondaryArgs, headers?: object, signal?: AbortSignal): Promise<CheckoutOptionsSecondaryReturn>;
|
|
807
|
+
checkoutOptionsGetTransakContractID(args: CheckoutOptionsGetTransakContractIDArgs, headers?: object, signal?: AbortSignal): Promise<CheckoutOptionsGetTransakContractIDReturn>;
|
|
773
808
|
}
|
|
774
809
|
export interface PingArgs {
|
|
775
810
|
}
|
|
@@ -1213,6 +1248,8 @@ export interface GetLifiTokensReturn {
|
|
|
1213
1248
|
export interface GetLifiSwapRoutesArgs {
|
|
1214
1249
|
chainId: number;
|
|
1215
1250
|
toTokenAddress: string;
|
|
1251
|
+
toTokenAmount: string;
|
|
1252
|
+
walletAddress: string;
|
|
1216
1253
|
}
|
|
1217
1254
|
export interface GetLifiSwapRoutesReturn {
|
|
1218
1255
|
routes: Array<LifiSwapRoute>;
|
|
@@ -1300,6 +1337,21 @@ export interface UpdatePackContentArgs {
|
|
|
1300
1337
|
export interface UpdatePackContentReturn {
|
|
1301
1338
|
merkleRoot: string;
|
|
1302
1339
|
}
|
|
1340
|
+
export interface CheckoutOptionsSecondaryArgs {
|
|
1341
|
+
chainId: number;
|
|
1342
|
+
wallet: string;
|
|
1343
|
+
params: Array<SecondaryCheckoutOptionsParams>;
|
|
1344
|
+
}
|
|
1345
|
+
export interface CheckoutOptionsSecondaryReturn {
|
|
1346
|
+
options: CheckoutOptions;
|
|
1347
|
+
}
|
|
1348
|
+
export interface CheckoutOptionsGetTransakContractIDArgs {
|
|
1349
|
+
chainId: number;
|
|
1350
|
+
contractAddress: string;
|
|
1351
|
+
}
|
|
1352
|
+
export interface CheckoutOptionsGetTransakContractIDReturn {
|
|
1353
|
+
contractId: string;
|
|
1354
|
+
}
|
|
1303
1355
|
export declare class API implements API {
|
|
1304
1356
|
protected hostname: string;
|
|
1305
1357
|
protected fetch: Fetch;
|
|
@@ -1385,6 +1437,8 @@ export declare class API implements API {
|
|
|
1385
1437
|
getPack: (args: GetPackArgs, headers?: object, signal?: AbortSignal) => Promise<GetPackReturn>;
|
|
1386
1438
|
deletePack: (args: DeletePackArgs, headers?: object, signal?: AbortSignal) => Promise<DeletePackReturn>;
|
|
1387
1439
|
updatePackContent: (args: UpdatePackContentArgs, headers?: object, signal?: AbortSignal) => Promise<UpdatePackContentReturn>;
|
|
1440
|
+
checkoutOptionsSecondary: (args: CheckoutOptionsSecondaryArgs, headers?: object, signal?: AbortSignal) => Promise<CheckoutOptionsSecondaryReturn>;
|
|
1441
|
+
checkoutOptionsGetTransakContractID: (args: CheckoutOptionsGetTransakContractIDArgs, headers?: object, signal?: AbortSignal) => Promise<CheckoutOptionsGetTransakContractIDReturn>;
|
|
1388
1442
|
}
|
|
1389
1443
|
export declare class WebrpcError extends Error {
|
|
1390
1444
|
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 ab3b6841bf983fa51a24df4cee18536199f115c3
|
|
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 = "ab3b6841bf983fa51a24df4cee18536199f115c3"
|
|
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,21 @@ export interface TransakChain {
|
|
|
708
732
|
chainId: number
|
|
709
733
|
}
|
|
710
734
|
|
|
735
|
+
export interface SecondaryCheckoutOptionsParams {
|
|
736
|
+
collectionAddress: string
|
|
737
|
+
marketplaceAddress: string
|
|
738
|
+
currencyAddress: string
|
|
739
|
+
priceAmount: string
|
|
740
|
+
tokenId: string
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
export interface CheckoutOptions {
|
|
744
|
+
crypto: CheckoutOptionCrypto
|
|
745
|
+
swap: Array<CheckoutOptionSwapProvider>
|
|
746
|
+
nftCheckout: Array<CheckoutOptionNFTCheckoutProvider>
|
|
747
|
+
onRamp: Array<CheckoutOptionOnRampProvider>
|
|
748
|
+
}
|
|
749
|
+
|
|
711
750
|
export interface API {
|
|
712
751
|
/**
|
|
713
752
|
*
|
|
@@ -897,6 +936,8 @@ export interface API {
|
|
|
897
936
|
getPack(args: GetPackArgs, headers?: object, signal?: AbortSignal): Promise<GetPackReturn>
|
|
898
937
|
deletePack(args: DeletePackArgs, headers?: object, signal?: AbortSignal): Promise<DeletePackReturn>
|
|
899
938
|
updatePackContent(args: UpdatePackContentArgs, headers?: object, signal?: AbortSignal): Promise<UpdatePackContentReturn>
|
|
939
|
+
checkoutOptionsSecondary(args: CheckoutOptionsSecondaryArgs, headers?: object, signal?: AbortSignal): Promise<CheckoutOptionsSecondaryReturn>
|
|
940
|
+
checkoutOptionsGetTransakContractID(args: CheckoutOptionsGetTransakContractIDArgs, headers?: object, signal?: AbortSignal): Promise<CheckoutOptionsGetTransakContractIDReturn>
|
|
900
941
|
}
|
|
901
942
|
|
|
902
943
|
export interface PingArgs {
|
|
@@ -1404,6 +1445,8 @@ export interface GetLifiTokensReturn {
|
|
|
1404
1445
|
export interface GetLifiSwapRoutesArgs {
|
|
1405
1446
|
chainId: number
|
|
1406
1447
|
toTokenAddress: string
|
|
1448
|
+
toTokenAmount: string
|
|
1449
|
+
walletAddress: string
|
|
1407
1450
|
}
|
|
1408
1451
|
|
|
1409
1452
|
export interface GetLifiSwapRoutesReturn {
|
|
@@ -1505,6 +1548,23 @@ export interface UpdatePackContentArgs {
|
|
|
1505
1548
|
export interface UpdatePackContentReturn {
|
|
1506
1549
|
merkleRoot: string
|
|
1507
1550
|
}
|
|
1551
|
+
export interface CheckoutOptionsSecondaryArgs {
|
|
1552
|
+
chainId: number
|
|
1553
|
+
wallet: string
|
|
1554
|
+
params: Array<SecondaryCheckoutOptionsParams>
|
|
1555
|
+
}
|
|
1556
|
+
|
|
1557
|
+
export interface CheckoutOptionsSecondaryReturn {
|
|
1558
|
+
options: CheckoutOptions
|
|
1559
|
+
}
|
|
1560
|
+
export interface CheckoutOptionsGetTransakContractIDArgs {
|
|
1561
|
+
chainId: number
|
|
1562
|
+
contractAddress: string
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1565
|
+
export interface CheckoutOptionsGetTransakContractIDReturn {
|
|
1566
|
+
contractId: string
|
|
1567
|
+
}
|
|
1508
1568
|
|
|
1509
1569
|
|
|
1510
1570
|
|
|
@@ -2661,6 +2721,34 @@ export class API implements API {
|
|
|
2661
2721
|
})
|
|
2662
2722
|
}
|
|
2663
2723
|
|
|
2724
|
+
checkoutOptionsSecondary = (args: CheckoutOptionsSecondaryArgs, headers?: object, signal?: AbortSignal): Promise<CheckoutOptionsSecondaryReturn> => {
|
|
2725
|
+
return this.fetch(
|
|
2726
|
+
this.url('CheckoutOptionsSecondary'),
|
|
2727
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
2728
|
+
return buildResponse(res).then(_data => {
|
|
2729
|
+
return {
|
|
2730
|
+
options: <CheckoutOptions>(_data.options),
|
|
2731
|
+
}
|
|
2732
|
+
})
|
|
2733
|
+
}, (error) => {
|
|
2734
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2735
|
+
})
|
|
2736
|
+
}
|
|
2737
|
+
|
|
2738
|
+
checkoutOptionsGetTransakContractID = (args: CheckoutOptionsGetTransakContractIDArgs, headers?: object, signal?: AbortSignal): Promise<CheckoutOptionsGetTransakContractIDReturn> => {
|
|
2739
|
+
return this.fetch(
|
|
2740
|
+
this.url('CheckoutOptionsGetTransakContractID'),
|
|
2741
|
+
createHTTPRequest(args, headers, signal)).then((res) => {
|
|
2742
|
+
return buildResponse(res).then(_data => {
|
|
2743
|
+
return {
|
|
2744
|
+
contractId: <string>(_data.contractId),
|
|
2745
|
+
}
|
|
2746
|
+
})
|
|
2747
|
+
}, (error) => {
|
|
2748
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2749
|
+
})
|
|
2750
|
+
}
|
|
2751
|
+
|
|
2664
2752
|
}
|
|
2665
2753
|
|
|
2666
2754
|
const createHTTPRequest = (body: object = {}, headers: object = {}, signal: AbortSignal | null = null): object => {
|