@0xsequence/api 0.0.0-20220506195001 → 0.0.0-20220519202656
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.
|
@@ -27,7 +27,7 @@ function _extends() {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
/* eslint-disable */
|
|
30
|
-
// sequence-api v0.4.0
|
|
30
|
+
// sequence-api v0.4.0 06551d4e513b22502aa0e0e689b80ab1d88def27
|
|
31
31
|
// --
|
|
32
32
|
// This file has been generated by https://github.com/webrpc/webrpc using gen/typescript
|
|
33
33
|
// Do not edit by hand. Update your webrpc schema and re-generate.
|
|
@@ -36,7 +36,7 @@ const WebRPCVersion = "v1"; // Schema version of your RIDL schema
|
|
|
36
36
|
|
|
37
37
|
const WebRPCSchemaVersion = "v0.4.0"; // Schema hash generated from your RIDL schema
|
|
38
38
|
|
|
39
|
-
const WebRPCSchemaHash = "
|
|
39
|
+
const WebRPCSchemaHash = "06551d4e513b22502aa0e0e689b80ab1d88def27"; //
|
|
40
40
|
// Types
|
|
41
41
|
//
|
|
42
42
|
|
|
@@ -273,8 +273,8 @@ class API {
|
|
|
273
273
|
});
|
|
274
274
|
};
|
|
275
275
|
|
|
276
|
-
this.
|
|
277
|
-
return this.fetch(this.url('
|
|
276
|
+
this.getCoinPrices = (args, headers) => {
|
|
277
|
+
return this.fetch(this.url('GetCoinPrices'), createHTTPRequest(args, headers)).then(res => {
|
|
278
278
|
return buildResponse(res).then(_data => {
|
|
279
279
|
return {
|
|
280
280
|
tokenPrices: _data.tokenPrices
|
|
@@ -293,6 +293,57 @@ class API {
|
|
|
293
293
|
});
|
|
294
294
|
};
|
|
295
295
|
|
|
296
|
+
this.getExchangeRate = (args, headers) => {
|
|
297
|
+
return this.fetch(this.url('GetExchangeRate'), createHTTPRequest(args, headers)).then(res => {
|
|
298
|
+
return buildResponse(res).then(_data => {
|
|
299
|
+
return {
|
|
300
|
+
exchangeRate: _data.exchangeRate
|
|
301
|
+
};
|
|
302
|
+
});
|
|
303
|
+
});
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
this.listPayCardsOnFile = headers => {
|
|
307
|
+
return this.fetch(this.url('ListPayCardsOnFile'), createHTTPRequest({}, headers)).then(res => {
|
|
308
|
+
return buildResponse(res).then(_data => {
|
|
309
|
+
return {
|
|
310
|
+
payCards: _data.payCards
|
|
311
|
+
};
|
|
312
|
+
});
|
|
313
|
+
});
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
this.savePayCard = (args, headers) => {
|
|
317
|
+
return this.fetch(this.url('SavePayCard'), createHTTPRequest(args, headers)).then(res => {
|
|
318
|
+
return buildResponse(res).then(_data => {
|
|
319
|
+
return {
|
|
320
|
+
ok: _data.ok,
|
|
321
|
+
payCard: _data.payCard
|
|
322
|
+
};
|
|
323
|
+
});
|
|
324
|
+
});
|
|
325
|
+
};
|
|
326
|
+
|
|
327
|
+
this.deletePayCard = (args, headers) => {
|
|
328
|
+
return this.fetch(this.url('DeletePayCard'), createHTTPRequest(args, headers)).then(res => {
|
|
329
|
+
return buildResponse(res).then(_data => {
|
|
330
|
+
return {
|
|
331
|
+
ok: _data.ok
|
|
332
|
+
};
|
|
333
|
+
});
|
|
334
|
+
});
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
this.smartRampPurchase = (args, headers) => {
|
|
338
|
+
return this.fetch(this.url('SmartRampPurchase'), createHTTPRequest(args, headers)).then(res => {
|
|
339
|
+
return buildResponse(res).then(_data => {
|
|
340
|
+
return {
|
|
341
|
+
status: _data.status
|
|
342
|
+
};
|
|
343
|
+
});
|
|
344
|
+
});
|
|
345
|
+
};
|
|
346
|
+
|
|
296
347
|
this.getInviteInfo = headers => {
|
|
297
348
|
return this.fetch(this.url('GetInviteInfo'), createHTTPRequest({}, headers)).then(res => {
|
|
298
349
|
return buildResponse(res).then(_data => {
|
|
@@ -27,7 +27,7 @@ function _extends() {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
/* eslint-disable */
|
|
30
|
-
// sequence-api v0.4.0
|
|
30
|
+
// sequence-api v0.4.0 06551d4e513b22502aa0e0e689b80ab1d88def27
|
|
31
31
|
// --
|
|
32
32
|
// This file has been generated by https://github.com/webrpc/webrpc using gen/typescript
|
|
33
33
|
// Do not edit by hand. Update your webrpc schema and re-generate.
|
|
@@ -36,7 +36,7 @@ const WebRPCVersion = "v1"; // Schema version of your RIDL schema
|
|
|
36
36
|
|
|
37
37
|
const WebRPCSchemaVersion = "v0.4.0"; // Schema hash generated from your RIDL schema
|
|
38
38
|
|
|
39
|
-
const WebRPCSchemaHash = "
|
|
39
|
+
const WebRPCSchemaHash = "06551d4e513b22502aa0e0e689b80ab1d88def27"; //
|
|
40
40
|
// Types
|
|
41
41
|
//
|
|
42
42
|
|
|
@@ -273,8 +273,8 @@ class API {
|
|
|
273
273
|
});
|
|
274
274
|
};
|
|
275
275
|
|
|
276
|
-
this.
|
|
277
|
-
return this.fetch(this.url('
|
|
276
|
+
this.getCoinPrices = (args, headers) => {
|
|
277
|
+
return this.fetch(this.url('GetCoinPrices'), createHTTPRequest(args, headers)).then(res => {
|
|
278
278
|
return buildResponse(res).then(_data => {
|
|
279
279
|
return {
|
|
280
280
|
tokenPrices: _data.tokenPrices
|
|
@@ -293,6 +293,57 @@ class API {
|
|
|
293
293
|
});
|
|
294
294
|
};
|
|
295
295
|
|
|
296
|
+
this.getExchangeRate = (args, headers) => {
|
|
297
|
+
return this.fetch(this.url('GetExchangeRate'), createHTTPRequest(args, headers)).then(res => {
|
|
298
|
+
return buildResponse(res).then(_data => {
|
|
299
|
+
return {
|
|
300
|
+
exchangeRate: _data.exchangeRate
|
|
301
|
+
};
|
|
302
|
+
});
|
|
303
|
+
});
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
this.listPayCardsOnFile = headers => {
|
|
307
|
+
return this.fetch(this.url('ListPayCardsOnFile'), createHTTPRequest({}, headers)).then(res => {
|
|
308
|
+
return buildResponse(res).then(_data => {
|
|
309
|
+
return {
|
|
310
|
+
payCards: _data.payCards
|
|
311
|
+
};
|
|
312
|
+
});
|
|
313
|
+
});
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
this.savePayCard = (args, headers) => {
|
|
317
|
+
return this.fetch(this.url('SavePayCard'), createHTTPRequest(args, headers)).then(res => {
|
|
318
|
+
return buildResponse(res).then(_data => {
|
|
319
|
+
return {
|
|
320
|
+
ok: _data.ok,
|
|
321
|
+
payCard: _data.payCard
|
|
322
|
+
};
|
|
323
|
+
});
|
|
324
|
+
});
|
|
325
|
+
};
|
|
326
|
+
|
|
327
|
+
this.deletePayCard = (args, headers) => {
|
|
328
|
+
return this.fetch(this.url('DeletePayCard'), createHTTPRequest(args, headers)).then(res => {
|
|
329
|
+
return buildResponse(res).then(_data => {
|
|
330
|
+
return {
|
|
331
|
+
ok: _data.ok
|
|
332
|
+
};
|
|
333
|
+
});
|
|
334
|
+
});
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
this.smartRampPurchase = (args, headers) => {
|
|
338
|
+
return this.fetch(this.url('SmartRampPurchase'), createHTTPRequest(args, headers)).then(res => {
|
|
339
|
+
return buildResponse(res).then(_data => {
|
|
340
|
+
return {
|
|
341
|
+
status: _data.status
|
|
342
|
+
};
|
|
343
|
+
});
|
|
344
|
+
});
|
|
345
|
+
};
|
|
346
|
+
|
|
296
347
|
this.getInviteInfo = headers => {
|
|
297
348
|
return this.fetch(this.url('GetInviteInfo'), createHTTPRequest({}, headers)).then(res => {
|
|
298
349
|
return buildResponse(res).then(_data => {
|
|
@@ -19,7 +19,7 @@ function _extends() {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
/* eslint-disable */
|
|
22
|
-
// sequence-api v0.4.0
|
|
22
|
+
// sequence-api v0.4.0 06551d4e513b22502aa0e0e689b80ab1d88def27
|
|
23
23
|
// --
|
|
24
24
|
// This file has been generated by https://github.com/webrpc/webrpc using gen/typescript
|
|
25
25
|
// Do not edit by hand. Update your webrpc schema and re-generate.
|
|
@@ -28,7 +28,7 @@ const WebRPCVersion = "v1"; // Schema version of your RIDL schema
|
|
|
28
28
|
|
|
29
29
|
const WebRPCSchemaVersion = "v0.4.0"; // Schema hash generated from your RIDL schema
|
|
30
30
|
|
|
31
|
-
const WebRPCSchemaHash = "
|
|
31
|
+
const WebRPCSchemaHash = "06551d4e513b22502aa0e0e689b80ab1d88def27"; //
|
|
32
32
|
// Types
|
|
33
33
|
//
|
|
34
34
|
|
|
@@ -265,8 +265,8 @@ class API {
|
|
|
265
265
|
});
|
|
266
266
|
};
|
|
267
267
|
|
|
268
|
-
this.
|
|
269
|
-
return this.fetch(this.url('
|
|
268
|
+
this.getCoinPrices = (args, headers) => {
|
|
269
|
+
return this.fetch(this.url('GetCoinPrices'), createHTTPRequest(args, headers)).then(res => {
|
|
270
270
|
return buildResponse(res).then(_data => {
|
|
271
271
|
return {
|
|
272
272
|
tokenPrices: _data.tokenPrices
|
|
@@ -285,6 +285,57 @@ class API {
|
|
|
285
285
|
});
|
|
286
286
|
};
|
|
287
287
|
|
|
288
|
+
this.getExchangeRate = (args, headers) => {
|
|
289
|
+
return this.fetch(this.url('GetExchangeRate'), createHTTPRequest(args, headers)).then(res => {
|
|
290
|
+
return buildResponse(res).then(_data => {
|
|
291
|
+
return {
|
|
292
|
+
exchangeRate: _data.exchangeRate
|
|
293
|
+
};
|
|
294
|
+
});
|
|
295
|
+
});
|
|
296
|
+
};
|
|
297
|
+
|
|
298
|
+
this.listPayCardsOnFile = headers => {
|
|
299
|
+
return this.fetch(this.url('ListPayCardsOnFile'), createHTTPRequest({}, headers)).then(res => {
|
|
300
|
+
return buildResponse(res).then(_data => {
|
|
301
|
+
return {
|
|
302
|
+
payCards: _data.payCards
|
|
303
|
+
};
|
|
304
|
+
});
|
|
305
|
+
});
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
this.savePayCard = (args, headers) => {
|
|
309
|
+
return this.fetch(this.url('SavePayCard'), createHTTPRequest(args, headers)).then(res => {
|
|
310
|
+
return buildResponse(res).then(_data => {
|
|
311
|
+
return {
|
|
312
|
+
ok: _data.ok,
|
|
313
|
+
payCard: _data.payCard
|
|
314
|
+
};
|
|
315
|
+
});
|
|
316
|
+
});
|
|
317
|
+
};
|
|
318
|
+
|
|
319
|
+
this.deletePayCard = (args, headers) => {
|
|
320
|
+
return this.fetch(this.url('DeletePayCard'), createHTTPRequest(args, headers)).then(res => {
|
|
321
|
+
return buildResponse(res).then(_data => {
|
|
322
|
+
return {
|
|
323
|
+
ok: _data.ok
|
|
324
|
+
};
|
|
325
|
+
});
|
|
326
|
+
});
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
this.smartRampPurchase = (args, headers) => {
|
|
330
|
+
return this.fetch(this.url('SmartRampPurchase'), createHTTPRequest(args, headers)).then(res => {
|
|
331
|
+
return buildResponse(res).then(_data => {
|
|
332
|
+
return {
|
|
333
|
+
status: _data.status
|
|
334
|
+
};
|
|
335
|
+
});
|
|
336
|
+
});
|
|
337
|
+
};
|
|
338
|
+
|
|
288
339
|
this.getInviteInfo = headers => {
|
|
289
340
|
return this.fetch(this.url('GetInviteInfo'), createHTTPRequest({}, headers)).then(res => {
|
|
290
341
|
return buildResponse(res).then(_data => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const WebRPCVersion = "v1";
|
|
2
2
|
export declare const WebRPCSchemaVersion = "v0.4.0";
|
|
3
|
-
export declare const WebRPCSchemaHash = "
|
|
3
|
+
export declare const WebRPCSchemaHash = "06551d4e513b22502aa0e0e689b80ab1d88def27";
|
|
4
4
|
export declare enum SortOrder {
|
|
5
5
|
DESC = "DESC",
|
|
6
6
|
ASC = "ASC"
|
|
@@ -78,9 +78,9 @@ export interface InviteInfo {
|
|
|
78
78
|
export interface ContractCall {
|
|
79
79
|
signature: string;
|
|
80
80
|
function: string;
|
|
81
|
-
args: Array<
|
|
81
|
+
args: Array<TupleComponent>;
|
|
82
82
|
}
|
|
83
|
-
export interface
|
|
83
|
+
export interface TupleComponent {
|
|
84
84
|
name?: string;
|
|
85
85
|
type: string;
|
|
86
86
|
value: any;
|
|
@@ -117,12 +117,47 @@ export interface Token {
|
|
|
117
117
|
contractAddress: string;
|
|
118
118
|
tokenId?: string;
|
|
119
119
|
}
|
|
120
|
+
export interface Price {
|
|
121
|
+
value: number;
|
|
122
|
+
currency: string;
|
|
123
|
+
}
|
|
120
124
|
export interface TokenPrice {
|
|
121
125
|
token: Token;
|
|
122
|
-
|
|
123
|
-
|
|
126
|
+
price?: Price;
|
|
127
|
+
price24hChange?: Price;
|
|
128
|
+
floorPrice: Price;
|
|
129
|
+
buyPrice: Price;
|
|
130
|
+
sellPrice: Price;
|
|
124
131
|
updatedAt: string;
|
|
125
132
|
}
|
|
133
|
+
export interface ExchangeRate {
|
|
134
|
+
name: string;
|
|
135
|
+
symbol: string;
|
|
136
|
+
value: number;
|
|
137
|
+
vsCurrency: string;
|
|
138
|
+
currencyType: string;
|
|
139
|
+
}
|
|
140
|
+
export interface PayCard {
|
|
141
|
+
id: number;
|
|
142
|
+
userAddress: string;
|
|
143
|
+
cardType: string;
|
|
144
|
+
cardFirstName: string;
|
|
145
|
+
cardLastName: string;
|
|
146
|
+
cardNumberLastFourDigits: string;
|
|
147
|
+
cardNumberToken: string;
|
|
148
|
+
cardCVCToken: string;
|
|
149
|
+
cardExpMonth: number;
|
|
150
|
+
cardExpYear: number;
|
|
151
|
+
contactAddressToken: string;
|
|
152
|
+
contactCityToken: string;
|
|
153
|
+
contactProvinceToken: string;
|
|
154
|
+
contactPostalCodeToken: string;
|
|
155
|
+
contactCountryCodeToken: string;
|
|
156
|
+
contactEmailToken: string;
|
|
157
|
+
contactPhoneToken: string;
|
|
158
|
+
updatedAt?: string;
|
|
159
|
+
createdAt?: string;
|
|
160
|
+
}
|
|
126
161
|
export interface API {
|
|
127
162
|
ping(headers?: object): Promise<PingReturn>;
|
|
128
163
|
version(headers?: object): Promise<VersionReturn>;
|
|
@@ -145,8 +180,13 @@ export interface API {
|
|
|
145
180
|
userStorageFetchAll(args: UserStorageFetchAllArgs, headers?: object): Promise<UserStorageFetchAllReturn>;
|
|
146
181
|
getMoonpayLink(args: GetMoonpayLinkArgs, headers?: object): Promise<GetMoonpayLinkReturn>;
|
|
147
182
|
isUsingGoogleMail(args: IsUsingGoogleMailArgs, headers?: object): Promise<IsUsingGoogleMailReturn>;
|
|
148
|
-
|
|
183
|
+
getCoinPrices(args: GetCoinPricesArgs, headers?: object): Promise<GetCoinPricesReturn>;
|
|
149
184
|
getCollectiblePrices(args: GetCollectiblePricesArgs, headers?: object): Promise<GetCollectiblePricesReturn>;
|
|
185
|
+
getExchangeRate(args: GetExchangeRateArgs, headers?: object): Promise<GetExchangeRateReturn>;
|
|
186
|
+
listPayCardsOnFile(headers?: object): Promise<ListPayCardsOnFileReturn>;
|
|
187
|
+
savePayCard(args: SavePayCardArgs, headers?: object): Promise<SavePayCardReturn>;
|
|
188
|
+
deletePayCard(args: DeletePayCardArgs, headers?: object): Promise<DeletePayCardReturn>;
|
|
189
|
+
smartRampPurchase(args: SmartRampPurchaseArgs, headers?: object): Promise<SmartRampPurchaseReturn>;
|
|
150
190
|
getInviteInfo(headers?: object): Promise<GetInviteInfoReturn>;
|
|
151
191
|
isValidAccessCode(args: IsValidAccessCodeArgs, headers?: object): Promise<IsValidAccessCodeReturn>;
|
|
152
192
|
internalClaimAccessCode(args: InternalClaimAccessCodeArgs, headers?: object): Promise<InternalClaimAccessCodeReturn>;
|
|
@@ -293,10 +333,10 @@ export interface IsUsingGoogleMailArgs {
|
|
|
293
333
|
export interface IsUsingGoogleMailReturn {
|
|
294
334
|
yes: boolean;
|
|
295
335
|
}
|
|
296
|
-
export interface
|
|
336
|
+
export interface GetCoinPricesArgs {
|
|
297
337
|
tokens: Array<Token>;
|
|
298
338
|
}
|
|
299
|
-
export interface
|
|
339
|
+
export interface GetCoinPricesReturn {
|
|
300
340
|
tokenPrices: Array<TokenPrice>;
|
|
301
341
|
}
|
|
302
342
|
export interface GetCollectiblePricesArgs {
|
|
@@ -305,6 +345,37 @@ export interface GetCollectiblePricesArgs {
|
|
|
305
345
|
export interface GetCollectiblePricesReturn {
|
|
306
346
|
tokenPrices: Array<TokenPrice>;
|
|
307
347
|
}
|
|
348
|
+
export interface GetExchangeRateArgs {
|
|
349
|
+
toCurrency: string;
|
|
350
|
+
}
|
|
351
|
+
export interface GetExchangeRateReturn {
|
|
352
|
+
exchangeRate: ExchangeRate;
|
|
353
|
+
}
|
|
354
|
+
export interface ListPayCardsOnFileArgs {
|
|
355
|
+
}
|
|
356
|
+
export interface ListPayCardsOnFileReturn {
|
|
357
|
+
payCards: Array<PayCard>;
|
|
358
|
+
}
|
|
359
|
+
export interface SavePayCardArgs {
|
|
360
|
+
payCard: PayCard;
|
|
361
|
+
}
|
|
362
|
+
export interface SavePayCardReturn {
|
|
363
|
+
ok: boolean;
|
|
364
|
+
payCard: PayCard;
|
|
365
|
+
}
|
|
366
|
+
export interface DeletePayCardArgs {
|
|
367
|
+
payCardId: number;
|
|
368
|
+
}
|
|
369
|
+
export interface DeletePayCardReturn {
|
|
370
|
+
ok: boolean;
|
|
371
|
+
}
|
|
372
|
+
export interface SmartRampPurchaseArgs {
|
|
373
|
+
payCardId: number;
|
|
374
|
+
payload: any;
|
|
375
|
+
}
|
|
376
|
+
export interface SmartRampPurchaseReturn {
|
|
377
|
+
status: boolean;
|
|
378
|
+
}
|
|
308
379
|
export interface GetInviteInfoArgs {
|
|
309
380
|
}
|
|
310
381
|
export interface GetInviteInfoReturn {
|
|
@@ -357,8 +428,13 @@ export declare class API implements API {
|
|
|
357
428
|
userStorageFetchAll: (args: UserStorageFetchAllArgs, headers?: object | undefined) => Promise<UserStorageFetchAllReturn>;
|
|
358
429
|
getMoonpayLink: (args: GetMoonpayLinkArgs, headers?: object | undefined) => Promise<GetMoonpayLinkReturn>;
|
|
359
430
|
isUsingGoogleMail: (args: IsUsingGoogleMailArgs, headers?: object | undefined) => Promise<IsUsingGoogleMailReturn>;
|
|
360
|
-
|
|
431
|
+
getCoinPrices: (args: GetCoinPricesArgs, headers?: object | undefined) => Promise<GetCoinPricesReturn>;
|
|
361
432
|
getCollectiblePrices: (args: GetCollectiblePricesArgs, headers?: object | undefined) => Promise<GetCollectiblePricesReturn>;
|
|
433
|
+
getExchangeRate: (args: GetExchangeRateArgs, headers?: object | undefined) => Promise<GetExchangeRateReturn>;
|
|
434
|
+
listPayCardsOnFile: (headers?: object | undefined) => Promise<ListPayCardsOnFileReturn>;
|
|
435
|
+
savePayCard: (args: SavePayCardArgs, headers?: object | undefined) => Promise<SavePayCardReturn>;
|
|
436
|
+
deletePayCard: (args: DeletePayCardArgs, headers?: object | undefined) => Promise<DeletePayCardReturn>;
|
|
437
|
+
smartRampPurchase: (args: SmartRampPurchaseArgs, headers?: object | undefined) => Promise<SmartRampPurchaseReturn>;
|
|
362
438
|
getInviteInfo: (headers?: object | undefined) => Promise<GetInviteInfoReturn>;
|
|
363
439
|
isValidAccessCode: (args: IsValidAccessCodeArgs, headers?: object | undefined) => Promise<IsValidAccessCodeReturn>;
|
|
364
440
|
internalClaimAccessCode: (args: InternalClaimAccessCodeArgs, headers?: object | undefined) => Promise<InternalClaimAccessCodeReturn>;
|
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 06551d4e513b22502aa0e0e689b80ab1d88def27
|
|
3
3
|
// --
|
|
4
4
|
// This file has been generated by https://github.com/webrpc/webrpc using gen/typescript
|
|
5
5
|
// Do not edit by hand. Update your webrpc schema and re-generate.
|
|
@@ -11,7 +11,7 @@ export const WebRPCVersion = "v1"
|
|
|
11
11
|
export const WebRPCSchemaVersion = "v0.4.0"
|
|
12
12
|
|
|
13
13
|
// Schema hash generated from your RIDL schema
|
|
14
|
-
export const WebRPCSchemaHash = "
|
|
14
|
+
export const WebRPCSchemaHash = "06551d4e513b22502aa0e0e689b80ab1d88def27"
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
//
|
|
@@ -110,10 +110,10 @@ export interface InviteInfo {
|
|
|
110
110
|
export interface ContractCall {
|
|
111
111
|
signature: string
|
|
112
112
|
function: string
|
|
113
|
-
args: Array<
|
|
113
|
+
args: Array<TupleComponent>
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
export interface
|
|
116
|
+
export interface TupleComponent {
|
|
117
117
|
name?: string
|
|
118
118
|
type: string
|
|
119
119
|
value: any
|
|
@@ -156,13 +156,51 @@ export interface Token {
|
|
|
156
156
|
tokenId?: string
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
+
export interface Price {
|
|
160
|
+
value: number
|
|
161
|
+
currency: string
|
|
162
|
+
}
|
|
163
|
+
|
|
159
164
|
export interface TokenPrice {
|
|
160
165
|
token: Token
|
|
161
|
-
|
|
162
|
-
|
|
166
|
+
price?: Price
|
|
167
|
+
price24hChange?: Price
|
|
168
|
+
floorPrice: Price
|
|
169
|
+
buyPrice: Price
|
|
170
|
+
sellPrice: Price
|
|
163
171
|
updatedAt: string
|
|
164
172
|
}
|
|
165
173
|
|
|
174
|
+
export interface ExchangeRate {
|
|
175
|
+
name: string
|
|
176
|
+
symbol: string
|
|
177
|
+
value: number
|
|
178
|
+
vsCurrency: string
|
|
179
|
+
currencyType: string
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export interface PayCard {
|
|
183
|
+
id: number
|
|
184
|
+
userAddress: string
|
|
185
|
+
cardType: string
|
|
186
|
+
cardFirstName: string
|
|
187
|
+
cardLastName: string
|
|
188
|
+
cardNumberLastFourDigits: string
|
|
189
|
+
cardNumberToken: string
|
|
190
|
+
cardCVCToken: string
|
|
191
|
+
cardExpMonth: number
|
|
192
|
+
cardExpYear: number
|
|
193
|
+
contactAddressToken: string
|
|
194
|
+
contactCityToken: string
|
|
195
|
+
contactProvinceToken: string
|
|
196
|
+
contactPostalCodeToken: string
|
|
197
|
+
contactCountryCodeToken: string
|
|
198
|
+
contactEmailToken: string
|
|
199
|
+
contactPhoneToken: string
|
|
200
|
+
updatedAt?: string
|
|
201
|
+
createdAt?: string
|
|
202
|
+
}
|
|
203
|
+
|
|
166
204
|
export interface API {
|
|
167
205
|
ping(headers?: object): Promise<PingReturn>
|
|
168
206
|
version(headers?: object): Promise<VersionReturn>
|
|
@@ -185,8 +223,13 @@ export interface API {
|
|
|
185
223
|
userStorageFetchAll(args: UserStorageFetchAllArgs, headers?: object): Promise<UserStorageFetchAllReturn>
|
|
186
224
|
getMoonpayLink(args: GetMoonpayLinkArgs, headers?: object): Promise<GetMoonpayLinkReturn>
|
|
187
225
|
isUsingGoogleMail(args: IsUsingGoogleMailArgs, headers?: object): Promise<IsUsingGoogleMailReturn>
|
|
188
|
-
|
|
226
|
+
getCoinPrices(args: GetCoinPricesArgs, headers?: object): Promise<GetCoinPricesReturn>
|
|
189
227
|
getCollectiblePrices(args: GetCollectiblePricesArgs, headers?: object): Promise<GetCollectiblePricesReturn>
|
|
228
|
+
getExchangeRate(args: GetExchangeRateArgs, headers?: object): Promise<GetExchangeRateReturn>
|
|
229
|
+
listPayCardsOnFile(headers?: object): Promise<ListPayCardsOnFileReturn>
|
|
230
|
+
savePayCard(args: SavePayCardArgs, headers?: object): Promise<SavePayCardReturn>
|
|
231
|
+
deletePayCard(args: DeletePayCardArgs, headers?: object): Promise<DeletePayCardReturn>
|
|
232
|
+
smartRampPurchase(args: SmartRampPurchaseArgs, headers?: object): Promise<SmartRampPurchaseReturn>
|
|
190
233
|
getInviteInfo(headers?: object): Promise<GetInviteInfoReturn>
|
|
191
234
|
isValidAccessCode(args: IsValidAccessCodeArgs, headers?: object): Promise<IsValidAccessCodeReturn>
|
|
192
235
|
internalClaimAccessCode(args: InternalClaimAccessCodeArgs, headers?: object): Promise<InternalClaimAccessCodeReturn>
|
|
@@ -353,11 +396,11 @@ export interface IsUsingGoogleMailArgs {
|
|
|
353
396
|
export interface IsUsingGoogleMailReturn {
|
|
354
397
|
yes: boolean
|
|
355
398
|
}
|
|
356
|
-
export interface
|
|
399
|
+
export interface GetCoinPricesArgs {
|
|
357
400
|
tokens: Array<Token>
|
|
358
401
|
}
|
|
359
402
|
|
|
360
|
-
export interface
|
|
403
|
+
export interface GetCoinPricesReturn {
|
|
361
404
|
tokenPrices: Array<TokenPrice>
|
|
362
405
|
}
|
|
363
406
|
export interface GetCollectiblePricesArgs {
|
|
@@ -367,6 +410,42 @@ export interface GetCollectiblePricesArgs {
|
|
|
367
410
|
export interface GetCollectiblePricesReturn {
|
|
368
411
|
tokenPrices: Array<TokenPrice>
|
|
369
412
|
}
|
|
413
|
+
export interface GetExchangeRateArgs {
|
|
414
|
+
toCurrency: string
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
export interface GetExchangeRateReturn {
|
|
418
|
+
exchangeRate: ExchangeRate
|
|
419
|
+
}
|
|
420
|
+
export interface ListPayCardsOnFileArgs {
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
export interface ListPayCardsOnFileReturn {
|
|
424
|
+
payCards: Array<PayCard>
|
|
425
|
+
}
|
|
426
|
+
export interface SavePayCardArgs {
|
|
427
|
+
payCard: PayCard
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
export interface SavePayCardReturn {
|
|
431
|
+
ok: boolean
|
|
432
|
+
payCard: PayCard
|
|
433
|
+
}
|
|
434
|
+
export interface DeletePayCardArgs {
|
|
435
|
+
payCardId: number
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
export interface DeletePayCardReturn {
|
|
439
|
+
ok: boolean
|
|
440
|
+
}
|
|
441
|
+
export interface SmartRampPurchaseArgs {
|
|
442
|
+
payCardId: number
|
|
443
|
+
payload: any
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
export interface SmartRampPurchaseReturn {
|
|
447
|
+
status: boolean
|
|
448
|
+
}
|
|
370
449
|
export interface GetInviteInfoArgs {
|
|
371
450
|
}
|
|
372
451
|
|
|
@@ -679,9 +758,9 @@ export class API implements API {
|
|
|
679
758
|
})
|
|
680
759
|
}
|
|
681
760
|
|
|
682
|
-
|
|
761
|
+
getCoinPrices = (args: GetCoinPricesArgs, headers?: object): Promise<GetCoinPricesReturn> => {
|
|
683
762
|
return this.fetch(
|
|
684
|
-
this.url('
|
|
763
|
+
this.url('GetCoinPrices'),
|
|
685
764
|
createHTTPRequest(args, headers)).then((res) => {
|
|
686
765
|
return buildResponse(res).then(_data => {
|
|
687
766
|
return {
|
|
@@ -703,6 +782,68 @@ export class API implements API {
|
|
|
703
782
|
})
|
|
704
783
|
}
|
|
705
784
|
|
|
785
|
+
getExchangeRate = (args: GetExchangeRateArgs, headers?: object): Promise<GetExchangeRateReturn> => {
|
|
786
|
+
return this.fetch(
|
|
787
|
+
this.url('GetExchangeRate'),
|
|
788
|
+
createHTTPRequest(args, headers)).then((res) => {
|
|
789
|
+
return buildResponse(res).then(_data => {
|
|
790
|
+
return {
|
|
791
|
+
exchangeRate: <ExchangeRate>(_data.exchangeRate)
|
|
792
|
+
}
|
|
793
|
+
})
|
|
794
|
+
})
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
listPayCardsOnFile = (headers?: object): Promise<ListPayCardsOnFileReturn> => {
|
|
798
|
+
return this.fetch(
|
|
799
|
+
this.url('ListPayCardsOnFile'),
|
|
800
|
+
createHTTPRequest({}, headers)
|
|
801
|
+
).then((res) => {
|
|
802
|
+
return buildResponse(res).then(_data => {
|
|
803
|
+
return {
|
|
804
|
+
payCards: <Array<PayCard>>(_data.payCards)
|
|
805
|
+
}
|
|
806
|
+
})
|
|
807
|
+
})
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
savePayCard = (args: SavePayCardArgs, headers?: object): Promise<SavePayCardReturn> => {
|
|
811
|
+
return this.fetch(
|
|
812
|
+
this.url('SavePayCard'),
|
|
813
|
+
createHTTPRequest(args, headers)).then((res) => {
|
|
814
|
+
return buildResponse(res).then(_data => {
|
|
815
|
+
return {
|
|
816
|
+
ok: <boolean>(_data.ok),
|
|
817
|
+
payCard: <PayCard>(_data.payCard)
|
|
818
|
+
}
|
|
819
|
+
})
|
|
820
|
+
})
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
deletePayCard = (args: DeletePayCardArgs, headers?: object): Promise<DeletePayCardReturn> => {
|
|
824
|
+
return this.fetch(
|
|
825
|
+
this.url('DeletePayCard'),
|
|
826
|
+
createHTTPRequest(args, headers)).then((res) => {
|
|
827
|
+
return buildResponse(res).then(_data => {
|
|
828
|
+
return {
|
|
829
|
+
ok: <boolean>(_data.ok)
|
|
830
|
+
}
|
|
831
|
+
})
|
|
832
|
+
})
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
smartRampPurchase = (args: SmartRampPurchaseArgs, headers?: object): Promise<SmartRampPurchaseReturn> => {
|
|
836
|
+
return this.fetch(
|
|
837
|
+
this.url('SmartRampPurchase'),
|
|
838
|
+
createHTTPRequest(args, headers)).then((res) => {
|
|
839
|
+
return buildResponse(res).then(_data => {
|
|
840
|
+
return {
|
|
841
|
+
status: <boolean>(_data.status)
|
|
842
|
+
}
|
|
843
|
+
})
|
|
844
|
+
})
|
|
845
|
+
}
|
|
846
|
+
|
|
706
847
|
getInviteInfo = (headers?: object): Promise<GetInviteInfoReturn> => {
|
|
707
848
|
return this.fetch(
|
|
708
849
|
this.url('GetInviteInfo'),
|