@0xsequence/api 0.0.0-20220728141414 → 0.0.0-20220825181818
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/dist/0xsequence-api.cjs.d.ts +11 -1
- package/dist/0xsequence-api.cjs.js +15 -6
- package/package.json +1 -1
- package/src/api.gen.ts +136 -19
- package/dist/0xsequence-api.cjs.dev.js +0 -528
- package/dist/0xsequence-api.cjs.prod.js +0 -528
- package/dist/0xsequence-api.esm.js +0 -516
- package/dist/declarations/src/api.gen.d.ts +0 -573
- package/dist/declarations/src/index.d.ts +0 -7
|
@@ -1 +1,11 @@
|
|
|
1
|
-
export
|
|
1
|
+
// are you seeing an error that a default export doesn't exist but your source file has a default export?
|
|
2
|
+
// you should run `yarn` or `yarn preconstruct dev` if preconstruct dev isn't in your postinstall hook
|
|
3
|
+
|
|
4
|
+
// curious why you need to?
|
|
5
|
+
// this file exists so that you can import from the entrypoint normally
|
|
6
|
+
// except that it points to your source file and you don't need to run build constantly
|
|
7
|
+
// which means we need to re-export all of the modules from your source file
|
|
8
|
+
// and since export * doesn't include default exports, we need to read your source file
|
|
9
|
+
// to check for a default export and re-export it if it exists
|
|
10
|
+
// it's not ideal, but it works pretty well ¯\_(ツ)_/¯
|
|
11
|
+
export * from "../src/index";
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
// this file might look strange and you might be wondering what it's for
|
|
3
|
+
// it's lets you import your source files by importing this entrypoint
|
|
4
|
+
// as you would import it if it was built with preconstruct build
|
|
5
|
+
// this file is slightly different to some others though
|
|
6
|
+
// it has a require hook which compiles your code with Babel
|
|
7
|
+
// this means that you don't have to set up @babel/register or anything like that
|
|
8
|
+
// but you can still require this module and it'll be compiled
|
|
2
9
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
10
|
+
// this bit of code imports the require hook and registers it
|
|
11
|
+
let unregister = require("../../../node_modules/@preconstruct/hook").___internalHook(typeof __dirname === 'undefined' ? undefined : __dirname, "../../..", "..");
|
|
12
|
+
|
|
13
|
+
// this re-exports the source file
|
|
14
|
+
module.exports = require("../src/index.ts");
|
|
15
|
+
|
|
16
|
+
unregister();
|
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 d026b8c7eb9ac3c9c5ed52994a34e2463c1aaa14
|
|
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 = "d026b8c7eb9ac3c9c5ed52994a34e2463c1aaa14"
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
//
|
|
@@ -298,10 +298,13 @@ export interface API {
|
|
|
298
298
|
userStorageFetchAll(args: UserStorageFetchAllArgs, headers?: object): Promise<UserStorageFetchAllReturn>
|
|
299
299
|
getMoonpayLink(args: GetMoonpayLinkArgs, headers?: object): Promise<GetMoonpayLinkReturn>
|
|
300
300
|
isUsingGoogleMail(args: IsUsingGoogleMailArgs, headers?: object): Promise<IsUsingGoogleMailReturn>
|
|
301
|
+
isValidSignature(args: IsValidSignatureArgs, headers?: object): Promise<IsValidSignatureReturn>
|
|
302
|
+
isValidMessageSignature(args: IsValidMessageSignatureArgs, headers?: object): Promise<IsValidMessageSignatureReturn>
|
|
303
|
+
isValidTypedDataSignature(args: IsValidTypedDataSignatureArgs, headers?: object): Promise<IsValidTypedDataSignatureReturn>
|
|
304
|
+
isValidETHAuthProof(args: IsValidETHAuthProofArgs, headers?: object): Promise<IsValidETHAuthProofReturn>
|
|
301
305
|
getCoinPrices(args: GetCoinPricesArgs, headers?: object): Promise<GetCoinPricesReturn>
|
|
302
306
|
getCollectiblePrices(args: GetCollectiblePricesArgs, headers?: object): Promise<GetCollectiblePricesReturn>
|
|
303
307
|
getExchangeRate(args: GetExchangeRateArgs, headers?: object): Promise<GetExchangeRateReturn>
|
|
304
|
-
invalidateOriginToken(args: InvalidateOriginTokenArgs, headers?: object): Promise<InvalidateOriginTokenReturn>
|
|
305
308
|
listPayCardsOnFile(headers?: object): Promise<ListPayCardsOnFileReturn>
|
|
306
309
|
savePayCard(args: SavePayCardArgs, headers?: object): Promise<SavePayCardReturn>
|
|
307
310
|
updatePayCardCVC(args: UpdatePayCardCVCArgs, headers?: object): Promise<UpdatePayCardCVCReturn>
|
|
@@ -309,8 +312,10 @@ export interface API {
|
|
|
309
312
|
smartRampQuote(args: SmartRampQuoteArgs, headers?: object): Promise<SmartRampQuoteReturn>
|
|
310
313
|
smartRampPurchase(args: SmartRampPurchaseArgs, headers?: object): Promise<SmartRampPurchaseReturn>
|
|
311
314
|
smartRampWaitOrderConfirmation(args: SmartRampWaitOrderConfirmationArgs, headers?: object): Promise<SmartRampWaitOrderConfirmationReturn>
|
|
315
|
+
smartRampGetOrder(args: SmartRampGetOrderArgs, headers?: object): Promise<SmartRampGetOrderReturn>
|
|
312
316
|
smartRampCheckCardAuthorization(args: SmartRampCheckCardAuthorizationArgs, headers?: object): Promise<SmartRampCheckCardAuthorizationReturn>
|
|
313
317
|
smartRampSubmitCardAuthorization(args: SmartRampSubmitCardAuthorizationArgs, headers?: object): Promise<SmartRampSubmitCardAuthorizationReturn>
|
|
318
|
+
smartRampOrdersList(args: SmartRampOrdersListArgs, headers?: object): Promise<SmartRampOrdersListReturn>
|
|
314
319
|
getInviteInfo(headers?: object): Promise<GetInviteInfoReturn>
|
|
315
320
|
isValidAccessCode(args: IsValidAccessCodeArgs, headers?: object): Promise<IsValidAccessCodeReturn>
|
|
316
321
|
internalClaimAccessCode(args: InternalClaimAccessCodeArgs, headers?: object): Promise<InternalClaimAccessCodeReturn>
|
|
@@ -477,6 +482,45 @@ export interface IsUsingGoogleMailArgs {
|
|
|
477
482
|
export interface IsUsingGoogleMailReturn {
|
|
478
483
|
yes: boolean
|
|
479
484
|
}
|
|
485
|
+
export interface IsValidSignatureArgs {
|
|
486
|
+
chainId: string
|
|
487
|
+
walletAddress: string
|
|
488
|
+
digest: string
|
|
489
|
+
signature: string
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
export interface IsValidSignatureReturn {
|
|
493
|
+
isValid: boolean
|
|
494
|
+
}
|
|
495
|
+
export interface IsValidMessageSignatureArgs {
|
|
496
|
+
chainId: string
|
|
497
|
+
walletAddress: string
|
|
498
|
+
message: string
|
|
499
|
+
signature: string
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
export interface IsValidMessageSignatureReturn {
|
|
503
|
+
isValid: boolean
|
|
504
|
+
}
|
|
505
|
+
export interface IsValidTypedDataSignatureArgs {
|
|
506
|
+
chainId: string
|
|
507
|
+
walletAddress: string
|
|
508
|
+
typedData: any
|
|
509
|
+
signature: string
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
export interface IsValidTypedDataSignatureReturn {
|
|
513
|
+
isValid: boolean
|
|
514
|
+
}
|
|
515
|
+
export interface IsValidETHAuthProofArgs {
|
|
516
|
+
chainId: string
|
|
517
|
+
walletAddress: string
|
|
518
|
+
ethAuthProof: string
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
export interface IsValidETHAuthProofReturn {
|
|
522
|
+
isValid: boolean
|
|
523
|
+
}
|
|
480
524
|
export interface GetCoinPricesArgs {
|
|
481
525
|
tokens: Array<Token>
|
|
482
526
|
}
|
|
@@ -498,12 +542,6 @@ export interface GetExchangeRateArgs {
|
|
|
498
542
|
export interface GetExchangeRateReturn {
|
|
499
543
|
exchangeRate: ExchangeRate
|
|
500
544
|
}
|
|
501
|
-
export interface InvalidateOriginTokenArgs {
|
|
502
|
-
token: Token
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
export interface InvalidateOriginTokenReturn {
|
|
506
|
-
}
|
|
507
545
|
export interface ListPayCardsOnFileArgs {
|
|
508
546
|
}
|
|
509
547
|
|
|
@@ -559,6 +597,14 @@ export interface SmartRampWaitOrderConfirmationReturn {
|
|
|
559
597
|
done: boolean
|
|
560
598
|
receipt: SmartRampPurchaseReceipt
|
|
561
599
|
}
|
|
600
|
+
export interface SmartRampGetOrderArgs {
|
|
601
|
+
orderId?: string
|
|
602
|
+
id?: number
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
export interface SmartRampGetOrderReturn {
|
|
606
|
+
order: SmartRampOrder
|
|
607
|
+
}
|
|
562
608
|
export interface SmartRampCheckCardAuthorizationArgs {
|
|
563
609
|
orderId: string
|
|
564
610
|
}
|
|
@@ -575,6 +621,15 @@ export interface SmartRampSubmitCardAuthorizationArgs {
|
|
|
575
621
|
export interface SmartRampSubmitCardAuthorizationReturn {
|
|
576
622
|
status: boolean
|
|
577
623
|
}
|
|
624
|
+
export interface SmartRampOrdersListArgs {
|
|
625
|
+
page?: Page
|
|
626
|
+
userAddressFilter?: string
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
export interface SmartRampOrdersListReturn {
|
|
630
|
+
page: Page
|
|
631
|
+
orders: Array<SmartRampOrder>
|
|
632
|
+
}
|
|
578
633
|
export interface GetInviteInfoArgs {
|
|
579
634
|
}
|
|
580
635
|
|
|
@@ -887,21 +942,57 @@ export class API implements API {
|
|
|
887
942
|
})
|
|
888
943
|
}
|
|
889
944
|
|
|
890
|
-
|
|
945
|
+
isValidSignature = (args: IsValidSignatureArgs, headers?: object): Promise<IsValidSignatureReturn> => {
|
|
891
946
|
return this.fetch(
|
|
892
|
-
this.url('
|
|
947
|
+
this.url('IsValidSignature'),
|
|
893
948
|
createHTTPRequest(args, headers)).then((res) => {
|
|
894
949
|
return buildResponse(res).then(_data => {
|
|
895
950
|
return {
|
|
896
|
-
|
|
951
|
+
isValid: <boolean>(_data.isValid)
|
|
897
952
|
}
|
|
898
953
|
})
|
|
899
954
|
})
|
|
900
955
|
}
|
|
901
956
|
|
|
902
|
-
|
|
957
|
+
isValidMessageSignature = (args: IsValidMessageSignatureArgs, headers?: object): Promise<IsValidMessageSignatureReturn> => {
|
|
903
958
|
return this.fetch(
|
|
904
|
-
this.url('
|
|
959
|
+
this.url('IsValidMessageSignature'),
|
|
960
|
+
createHTTPRequest(args, headers)).then((res) => {
|
|
961
|
+
return buildResponse(res).then(_data => {
|
|
962
|
+
return {
|
|
963
|
+
isValid: <boolean>(_data.isValid)
|
|
964
|
+
}
|
|
965
|
+
})
|
|
966
|
+
})
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
isValidTypedDataSignature = (args: IsValidTypedDataSignatureArgs, headers?: object): Promise<IsValidTypedDataSignatureReturn> => {
|
|
970
|
+
return this.fetch(
|
|
971
|
+
this.url('IsValidTypedDataSignature'),
|
|
972
|
+
createHTTPRequest(args, headers)).then((res) => {
|
|
973
|
+
return buildResponse(res).then(_data => {
|
|
974
|
+
return {
|
|
975
|
+
isValid: <boolean>(_data.isValid)
|
|
976
|
+
}
|
|
977
|
+
})
|
|
978
|
+
})
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
isValidETHAuthProof = (args: IsValidETHAuthProofArgs, headers?: object): Promise<IsValidETHAuthProofReturn> => {
|
|
982
|
+
return this.fetch(
|
|
983
|
+
this.url('IsValidETHAuthProof'),
|
|
984
|
+
createHTTPRequest(args, headers)).then((res) => {
|
|
985
|
+
return buildResponse(res).then(_data => {
|
|
986
|
+
return {
|
|
987
|
+
isValid: <boolean>(_data.isValid)
|
|
988
|
+
}
|
|
989
|
+
})
|
|
990
|
+
})
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
getCoinPrices = (args: GetCoinPricesArgs, headers?: object): Promise<GetCoinPricesReturn> => {
|
|
994
|
+
return this.fetch(
|
|
995
|
+
this.url('GetCoinPrices'),
|
|
905
996
|
createHTTPRequest(args, headers)).then((res) => {
|
|
906
997
|
return buildResponse(res).then(_data => {
|
|
907
998
|
return {
|
|
@@ -911,24 +1002,25 @@ export class API implements API {
|
|
|
911
1002
|
})
|
|
912
1003
|
}
|
|
913
1004
|
|
|
914
|
-
|
|
1005
|
+
getCollectiblePrices = (args: GetCollectiblePricesArgs, headers?: object): Promise<GetCollectiblePricesReturn> => {
|
|
915
1006
|
return this.fetch(
|
|
916
|
-
this.url('
|
|
1007
|
+
this.url('GetCollectiblePrices'),
|
|
917
1008
|
createHTTPRequest(args, headers)).then((res) => {
|
|
918
1009
|
return buildResponse(res).then(_data => {
|
|
919
1010
|
return {
|
|
920
|
-
|
|
1011
|
+
tokenPrices: <Array<TokenPrice>>(_data.tokenPrices)
|
|
921
1012
|
}
|
|
922
1013
|
})
|
|
923
1014
|
})
|
|
924
1015
|
}
|
|
925
1016
|
|
|
926
|
-
|
|
1017
|
+
getExchangeRate = (args: GetExchangeRateArgs, headers?: object): Promise<GetExchangeRateReturn> => {
|
|
927
1018
|
return this.fetch(
|
|
928
|
-
this.url('
|
|
1019
|
+
this.url('GetExchangeRate'),
|
|
929
1020
|
createHTTPRequest(args, headers)).then((res) => {
|
|
930
1021
|
return buildResponse(res).then(_data => {
|
|
931
1022
|
return {
|
|
1023
|
+
exchangeRate: <ExchangeRate>(_data.exchangeRate)
|
|
932
1024
|
}
|
|
933
1025
|
})
|
|
934
1026
|
})
|
|
@@ -1023,6 +1115,18 @@ export class API implements API {
|
|
|
1023
1115
|
})
|
|
1024
1116
|
}
|
|
1025
1117
|
|
|
1118
|
+
smartRampGetOrder = (args: SmartRampGetOrderArgs, headers?: object): Promise<SmartRampGetOrderReturn> => {
|
|
1119
|
+
return this.fetch(
|
|
1120
|
+
this.url('SmartRampGetOrder'),
|
|
1121
|
+
createHTTPRequest(args, headers)).then((res) => {
|
|
1122
|
+
return buildResponse(res).then(_data => {
|
|
1123
|
+
return {
|
|
1124
|
+
order: <SmartRampOrder>(_data.order)
|
|
1125
|
+
}
|
|
1126
|
+
})
|
|
1127
|
+
})
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1026
1130
|
smartRampCheckCardAuthorization = (args: SmartRampCheckCardAuthorizationArgs, headers?: object): Promise<SmartRampCheckCardAuthorizationReturn> => {
|
|
1027
1131
|
return this.fetch(
|
|
1028
1132
|
this.url('SmartRampCheckCardAuthorization'),
|
|
@@ -1047,6 +1151,19 @@ export class API implements API {
|
|
|
1047
1151
|
})
|
|
1048
1152
|
}
|
|
1049
1153
|
|
|
1154
|
+
smartRampOrdersList = (args: SmartRampOrdersListArgs, headers?: object): Promise<SmartRampOrdersListReturn> => {
|
|
1155
|
+
return this.fetch(
|
|
1156
|
+
this.url('SmartRampOrdersList'),
|
|
1157
|
+
createHTTPRequest(args, headers)).then((res) => {
|
|
1158
|
+
return buildResponse(res).then(_data => {
|
|
1159
|
+
return {
|
|
1160
|
+
page: <Page>(_data.page),
|
|
1161
|
+
orders: <Array<SmartRampOrder>>(_data.orders)
|
|
1162
|
+
}
|
|
1163
|
+
})
|
|
1164
|
+
})
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1050
1167
|
getInviteInfo = (headers?: object): Promise<GetInviteInfoReturn> => {
|
|
1051
1168
|
return this.fetch(
|
|
1052
1169
|
this.url('GetInviteInfo'),
|