@0xsequence/api 2.2.14 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/0xsequence-api.cjs.dev.js +234 -45
- package/dist/0xsequence-api.cjs.prod.js +234 -45
- package/dist/0xsequence-api.esm.js +234 -46
- package/dist/declarations/src/api.gen.d.ts +315 -3
- package/package.json +1 -1
- package/src/api.gen.ts +610 -49
package/src/api.gen.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
// sequence-api v0.4.0
|
|
2
|
+
// sequence-api v0.4.0 2409c101bc62a1b7aa797e099d913b1c4046e9f6
|
|
3
3
|
// --
|
|
4
|
-
// Code generated by webrpc-gen@v0.
|
|
4
|
+
// Code generated by webrpc-gen@v0.24.0 with typescript generator. DO NOT EDIT.
|
|
5
5
|
//
|
|
6
6
|
// webrpc-gen -schema=api.ridl -target=typescript -client -out=./clients/api.gen.ts
|
|
7
7
|
|
|
8
8
|
export const WebrpcHeader = 'Webrpc'
|
|
9
9
|
|
|
10
|
-
export const WebrpcHeaderValue = 'webrpc@v0.
|
|
10
|
+
export const WebrpcHeaderValue = 'webrpc@v0.24.0;gen-typescript@v0.16.3;sequence-api@v0.4.0'
|
|
11
11
|
|
|
12
12
|
// WebRPC description and code-gen version
|
|
13
13
|
export const WebRPCVersion = 'v1'
|
|
@@ -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 = '2409c101bc62a1b7aa797e099d913b1c4046e9f6'
|
|
20
20
|
|
|
21
21
|
type WebrpcGenVersions = {
|
|
22
22
|
webrpcGenVersion: string
|
|
@@ -53,16 +53,16 @@ function parseWebrpcGenVersions(header: string): WebrpcGenVersions {
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
const [_, webrpcGenVersion] = versions[0]
|
|
57
|
-
const [codeGenName, codeGenVersion] = versions[1]
|
|
58
|
-
const [schemaName, schemaVersion] = versions[2]
|
|
56
|
+
const [_, webrpcGenVersion] = versions[0]!.split('@')
|
|
57
|
+
const [codeGenName, codeGenVersion] = versions[1]!.split('@')
|
|
58
|
+
const [schemaName, schemaVersion] = versions[2]!.split('@')
|
|
59
59
|
|
|
60
60
|
return {
|
|
61
|
-
webrpcGenVersion,
|
|
62
|
-
codeGenName,
|
|
63
|
-
codeGenVersion,
|
|
64
|
-
schemaName,
|
|
65
|
-
schemaVersion
|
|
61
|
+
webrpcGenVersion: webrpcGenVersion ?? '',
|
|
62
|
+
codeGenName: codeGenName ?? '',
|
|
63
|
+
codeGenVersion: codeGenVersion ?? '',
|
|
64
|
+
schemaName: schemaName ?? '',
|
|
65
|
+
schemaVersion: schemaVersion ?? ''
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
|
|
@@ -95,6 +95,12 @@ export enum TokenType {
|
|
|
95
95
|
ERC1155 = 'ERC1155'
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
+
export enum TransakBuySell {
|
|
99
|
+
UNKNOWN = 'UNKNOWN',
|
|
100
|
+
BUY = 'BUY',
|
|
101
|
+
SELL = 'SELL'
|
|
102
|
+
}
|
|
103
|
+
|
|
98
104
|
export interface Version {
|
|
99
105
|
webrpcVersion: string
|
|
100
106
|
schemaVersion: string
|
|
@@ -200,6 +206,22 @@ export interface TupleComponent {
|
|
|
200
206
|
value: any
|
|
201
207
|
}
|
|
202
208
|
|
|
209
|
+
export interface IntentPrecondition {
|
|
210
|
+
type: string
|
|
211
|
+
chainID: string
|
|
212
|
+
data: any
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export interface IntentSolution {
|
|
216
|
+
transactions: Array<Transactions>
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export interface Transactions {
|
|
220
|
+
chainID: string
|
|
221
|
+
transactions: Array<Transaction>
|
|
222
|
+
preconditions?: Array<IntentPrecondition>
|
|
223
|
+
}
|
|
224
|
+
|
|
203
225
|
export interface Transaction {
|
|
204
226
|
delegateCall: boolean
|
|
205
227
|
revertOnError: boolean
|
|
@@ -207,7 +229,6 @@ export interface Transaction {
|
|
|
207
229
|
target: string
|
|
208
230
|
value: string
|
|
209
231
|
data: string
|
|
210
|
-
call?: ContractCall
|
|
211
232
|
}
|
|
212
233
|
|
|
213
234
|
export interface UserStorage {
|
|
@@ -422,6 +443,25 @@ export interface SardinePaymentOption {
|
|
|
422
443
|
processingTime: string
|
|
423
444
|
}
|
|
424
445
|
|
|
446
|
+
export interface SwapPermit2Price {
|
|
447
|
+
currencyAddress: string
|
|
448
|
+
currencyBalance: string
|
|
449
|
+
price: string
|
|
450
|
+
maxPrice: string
|
|
451
|
+
transactionValue: string
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
export interface SwapPermit2Quote {
|
|
455
|
+
currencyAddress: string
|
|
456
|
+
currencyBalance: string
|
|
457
|
+
price: string
|
|
458
|
+
maxPrice: string
|
|
459
|
+
to: string
|
|
460
|
+
transactionData: string
|
|
461
|
+
transactionValue: string
|
|
462
|
+
approveData: string
|
|
463
|
+
}
|
|
464
|
+
|
|
425
465
|
export interface SwapPrice {
|
|
426
466
|
currencyAddress: string
|
|
427
467
|
currencyBalance: string
|
|
@@ -500,6 +540,168 @@ export interface AdoptedChildWallet {
|
|
|
500
540
|
address: string
|
|
501
541
|
}
|
|
502
542
|
|
|
543
|
+
export interface Pack {
|
|
544
|
+
id: number
|
|
545
|
+
chainId: number
|
|
546
|
+
projectId: number
|
|
547
|
+
contractAddress: string
|
|
548
|
+
content: Array<PackContent>
|
|
549
|
+
createdAt?: string
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
export interface PackContent {
|
|
553
|
+
tokenAddresses: Array<string>
|
|
554
|
+
tokenIds: Array<Array<string>>
|
|
555
|
+
amounts: Array<Array<string>>
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
export interface TransakCountry {
|
|
559
|
+
alpha2: string
|
|
560
|
+
alpha3: string
|
|
561
|
+
isAllowed: boolean
|
|
562
|
+
isLightKycAllowed: boolean
|
|
563
|
+
name: string
|
|
564
|
+
currencyCode: string
|
|
565
|
+
supportedDocuments: Array<string>
|
|
566
|
+
partners: Array<TransakPartner>
|
|
567
|
+
states: Array<TransakState>
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
export interface TransakPartner {
|
|
571
|
+
name: string
|
|
572
|
+
isCardPayment: boolean
|
|
573
|
+
currencyCode: string
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
export interface TransakState {
|
|
577
|
+
code: string
|
|
578
|
+
name: string
|
|
579
|
+
isAllowed: boolean
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
export interface TransakCryptoCurrency {
|
|
583
|
+
id: string
|
|
584
|
+
coinID: string
|
|
585
|
+
address: string
|
|
586
|
+
addressAdditionalData: any
|
|
587
|
+
createdAt: string
|
|
588
|
+
decimals: number
|
|
589
|
+
image: TransakCryptoCurrencyImage
|
|
590
|
+
isAllowed: boolean
|
|
591
|
+
isPopular: boolean
|
|
592
|
+
isStable: boolean
|
|
593
|
+
name: string
|
|
594
|
+
roundOff: number
|
|
595
|
+
symbol: string
|
|
596
|
+
isIgnorePriceVerification: boolean
|
|
597
|
+
imageBk: TransakCryptoCurrencyImage
|
|
598
|
+
kycCountriesNotSupported: Array<string>
|
|
599
|
+
network: TransakCryptoCurrencyNetwork
|
|
600
|
+
uniqueID: string
|
|
601
|
+
tokenType: string
|
|
602
|
+
tokenIdentifier: string
|
|
603
|
+
isPayInAllowed: boolean
|
|
604
|
+
isSuspended: boolean
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
export interface TransakCryptoCurrencyImage {
|
|
608
|
+
large: string
|
|
609
|
+
small: string
|
|
610
|
+
thumb: string
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
export interface TransakCryptoCurrencyNetwork {
|
|
614
|
+
name: string
|
|
615
|
+
fiatCurrenciesNotSupported: Array<any>
|
|
616
|
+
chainID: string
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
export interface TransakCryptoCurrencyNetworkFiatNotSupported {
|
|
620
|
+
fiatCurrency: string
|
|
621
|
+
paymentMethod: string
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
export interface TransakFiatCurrency {
|
|
625
|
+
symbol: string
|
|
626
|
+
supportingCountries: Array<string>
|
|
627
|
+
logoSymbol: string
|
|
628
|
+
name: string
|
|
629
|
+
paymentOptions: Array<TransakFiatCurrencyPaymentOption>
|
|
630
|
+
isPopular: boolean
|
|
631
|
+
isAllowed: boolean
|
|
632
|
+
roundOff: number
|
|
633
|
+
isPayOutAllowed: boolean
|
|
634
|
+
defaultCountryForNFT: string
|
|
635
|
+
icon: string
|
|
636
|
+
displayMessage: string
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
export interface TransakFiatCurrencyPaymentOption {
|
|
640
|
+
name: string
|
|
641
|
+
id: string
|
|
642
|
+
isNftAllowed: boolean
|
|
643
|
+
isNonCustodial: boolean
|
|
644
|
+
processingTime: string
|
|
645
|
+
displayText: boolean
|
|
646
|
+
icon: string
|
|
647
|
+
limitCurrency: string
|
|
648
|
+
isActive: boolean
|
|
649
|
+
provider: string
|
|
650
|
+
maxAmount: number
|
|
651
|
+
minAmount: number
|
|
652
|
+
defaultAmount: number
|
|
653
|
+
isConverted: boolean
|
|
654
|
+
visaPayoutCountries: Array<string>
|
|
655
|
+
mastercardPayoutCountries: Array<string>
|
|
656
|
+
isPayOutAllowed: boolean
|
|
657
|
+
minAmountForPayOut: number
|
|
658
|
+
maxAmountForPayOut: number
|
|
659
|
+
defaultAmountForPayOut: number
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
export interface TransakPrice {
|
|
663
|
+
quoteID: string
|
|
664
|
+
conversionPrice: number
|
|
665
|
+
marketConversionPrice: number
|
|
666
|
+
slippage: number
|
|
667
|
+
fiatCurrency: string
|
|
668
|
+
cryptoCurrency: string
|
|
669
|
+
paymentMethod: string
|
|
670
|
+
fiatAmount: number
|
|
671
|
+
cryptoAmount: number
|
|
672
|
+
isBuyOrSell: string
|
|
673
|
+
network: string
|
|
674
|
+
feeDecimal: number
|
|
675
|
+
totalFee: number
|
|
676
|
+
feeBreakdown: Array<TransakPriceFeeBreakdown>
|
|
677
|
+
nonce: number
|
|
678
|
+
cryptoLiquidityProvider: string
|
|
679
|
+
notes: Array<any>
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
export interface TransakPriceFeeBreakdown {
|
|
683
|
+
Name: string
|
|
684
|
+
Value: number
|
|
685
|
+
ID: string
|
|
686
|
+
Ids: Array<string>
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
export interface TransakGetPriceParams {
|
|
690
|
+
fiatCurrency: string
|
|
691
|
+
cryptoCurrency: string
|
|
692
|
+
isBuyOrSell: TransakBuySell
|
|
693
|
+
network: string
|
|
694
|
+
paymentMethod: string
|
|
695
|
+
fiatAmount: number
|
|
696
|
+
cryptoAmount: number
|
|
697
|
+
quoteCountryCode: string
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
export interface TransakChain {
|
|
701
|
+
name: string
|
|
702
|
+
chainId: number
|
|
703
|
+
}
|
|
704
|
+
|
|
503
705
|
export interface API {
|
|
504
706
|
ping(headers?: object, signal?: AbortSignal): Promise<PingReturn>
|
|
505
707
|
version(headers?: object, signal?: AbortSignal): Promise<VersionReturn>
|
|
@@ -582,6 +784,14 @@ export interface API {
|
|
|
582
784
|
headers?: object,
|
|
583
785
|
signal?: AbortSignal
|
|
584
786
|
): Promise<GetSardineNFTCheckoutOrderStatusReturn>
|
|
787
|
+
transakGetCountries(headers?: object, signal?: AbortSignal): Promise<TransakGetCountriesReturn>
|
|
788
|
+
transakGetCryptoCurrencies(headers?: object, signal?: AbortSignal): Promise<TransakGetCryptoCurrenciesReturn>
|
|
789
|
+
transakGetFiatCurrencies(headers?: object, signal?: AbortSignal): Promise<TransakGetFiatCurrenciesReturn>
|
|
790
|
+
transakGetPrice(args: TransakGetPriceArgs, headers?: object, signal?: AbortSignal): Promise<TransakGetPriceReturn>
|
|
791
|
+
transakGetSupportedNFTCheckoutChains(
|
|
792
|
+
headers?: object,
|
|
793
|
+
signal?: AbortSignal
|
|
794
|
+
): Promise<TransakGetSupportedNFTCheckoutChainsReturn>
|
|
585
795
|
getCoinPrices(args: GetCoinPricesArgs, headers?: object, signal?: AbortSignal): Promise<GetCoinPricesReturn>
|
|
586
796
|
getCollectiblePrices(
|
|
587
797
|
args: GetCollectiblePricesArgs,
|
|
@@ -615,9 +825,18 @@ export interface API {
|
|
|
615
825
|
signal?: AbortSignal
|
|
616
826
|
): Promise<ValidateWaaSVerificationNonceReturn>
|
|
617
827
|
listAdoptedWallets(args: ListAdoptedWalletsArgs, headers?: object, signal?: AbortSignal): Promise<ListAdoptedWalletsReturn>
|
|
828
|
+
getSwapPermit2Price(args: GetSwapPermit2PriceArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapPermit2PriceReturn>
|
|
829
|
+
getSwapPermit2Prices(
|
|
830
|
+
args: GetSwapPermit2PricesArgs,
|
|
831
|
+
headers?: object,
|
|
832
|
+
signal?: AbortSignal
|
|
833
|
+
): Promise<GetSwapPermit2PricesReturn>
|
|
834
|
+
getSwapPermit2Quote(args: GetSwapPermit2QuoteArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapPermit2QuoteReturn>
|
|
618
835
|
getSwapPrice(args: GetSwapPriceArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapPriceReturn>
|
|
619
836
|
getSwapPrices(args: GetSwapPricesArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapPricesReturn>
|
|
620
837
|
getSwapQuote(args: GetSwapQuoteArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapQuoteReturn>
|
|
838
|
+
getSwapQuoteV2(args: GetSwapQuoteV2Args, headers?: object, signal?: AbortSignal): Promise<GetSwapQuoteV2Return>
|
|
839
|
+
intentQuery(args: IntentQueryArgs, headers?: object, signal?: AbortSignal): Promise<IntentQueryReturn>
|
|
621
840
|
listCurrencyGroups(headers?: object, signal?: AbortSignal): Promise<ListCurrencyGroupsReturn>
|
|
622
841
|
addOffchainInventory(
|
|
623
842
|
args: AddOffchainInventoryArgs,
|
|
@@ -654,6 +873,10 @@ export interface API {
|
|
|
654
873
|
headers?: object,
|
|
655
874
|
signal?: AbortSignal
|
|
656
875
|
): Promise<ListOffchainPaymentsReturn>
|
|
876
|
+
savePack(args: SavePackArgs, headers?: object, signal?: AbortSignal): Promise<SavePackReturn>
|
|
877
|
+
getPack(args: GetPackArgs, headers?: object, signal?: AbortSignal): Promise<GetPackReturn>
|
|
878
|
+
deletePack(args: DeletePackArgs, headers?: object, signal?: AbortSignal): Promise<DeletePackReturn>
|
|
879
|
+
updatePackContent(args: UpdatePackContentArgs, headers?: object, signal?: AbortSignal): Promise<UpdatePackContentReturn>
|
|
657
880
|
}
|
|
658
881
|
|
|
659
882
|
export interface PingArgs {}
|
|
@@ -957,6 +1180,33 @@ export interface GetSardineNFTCheckoutOrderStatusArgs {
|
|
|
957
1180
|
export interface GetSardineNFTCheckoutOrderStatusReturn {
|
|
958
1181
|
resp: SardineOrder
|
|
959
1182
|
}
|
|
1183
|
+
export interface TransakGetCountriesArgs {}
|
|
1184
|
+
|
|
1185
|
+
export interface TransakGetCountriesReturn {
|
|
1186
|
+
regions: Array<TransakCountry>
|
|
1187
|
+
}
|
|
1188
|
+
export interface TransakGetCryptoCurrenciesArgs {}
|
|
1189
|
+
|
|
1190
|
+
export interface TransakGetCryptoCurrenciesReturn {
|
|
1191
|
+
currencies: Array<TransakCryptoCurrency>
|
|
1192
|
+
}
|
|
1193
|
+
export interface TransakGetFiatCurrenciesArgs {}
|
|
1194
|
+
|
|
1195
|
+
export interface TransakGetFiatCurrenciesReturn {
|
|
1196
|
+
currencies: Array<TransakFiatCurrency>
|
|
1197
|
+
}
|
|
1198
|
+
export interface TransakGetPriceArgs {
|
|
1199
|
+
params: TransakGetPriceParams
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
export interface TransakGetPriceReturn {
|
|
1203
|
+
price: TransakPrice
|
|
1204
|
+
}
|
|
1205
|
+
export interface TransakGetSupportedNFTCheckoutChainsArgs {}
|
|
1206
|
+
|
|
1207
|
+
export interface TransakGetSupportedNFTCheckoutChainsReturn {
|
|
1208
|
+
chains: Array<TransakChain>
|
|
1209
|
+
}
|
|
960
1210
|
export interface GetCoinPricesArgs {
|
|
961
1211
|
tokens: Array<Token>
|
|
962
1212
|
}
|
|
@@ -1102,6 +1352,41 @@ export interface ListAdoptedWalletsReturn {
|
|
|
1102
1352
|
page: Page
|
|
1103
1353
|
wallets: Array<AdoptedChildWallet>
|
|
1104
1354
|
}
|
|
1355
|
+
export interface GetSwapPermit2PriceArgs {
|
|
1356
|
+
buyCurrencyAddress: string
|
|
1357
|
+
sellCurrencyAddress: string
|
|
1358
|
+
buyAmount: string
|
|
1359
|
+
chainId: number
|
|
1360
|
+
slippagePercentage?: number
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
export interface GetSwapPermit2PriceReturn {
|
|
1364
|
+
swapPermit2Price: SwapPermit2Price
|
|
1365
|
+
}
|
|
1366
|
+
export interface GetSwapPermit2PricesArgs {
|
|
1367
|
+
userAddress: string
|
|
1368
|
+
buyCurrencyAddress: string
|
|
1369
|
+
buyAmount: string
|
|
1370
|
+
chainId: number
|
|
1371
|
+
slippagePercentage?: number
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
export interface GetSwapPermit2PricesReturn {
|
|
1375
|
+
swapPermit2Prices: Array<SwapPermit2Price>
|
|
1376
|
+
}
|
|
1377
|
+
export interface GetSwapPermit2QuoteArgs {
|
|
1378
|
+
userAddress: string
|
|
1379
|
+
buyCurrencyAddress: string
|
|
1380
|
+
sellCurrencyAddress: string
|
|
1381
|
+
buyAmount: string
|
|
1382
|
+
chainId: number
|
|
1383
|
+
includeApprove: boolean
|
|
1384
|
+
slippagePercentage?: number
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
export interface GetSwapPermit2QuoteReturn {
|
|
1388
|
+
swapPermit2Quote: SwapPermit2Quote
|
|
1389
|
+
}
|
|
1105
1390
|
export interface GetSwapPriceArgs {
|
|
1106
1391
|
buyCurrencyAddress: string
|
|
1107
1392
|
sellCurrencyAddress: string
|
|
@@ -1137,6 +1422,27 @@ export interface GetSwapQuoteArgs {
|
|
|
1137
1422
|
export interface GetSwapQuoteReturn {
|
|
1138
1423
|
swapQuote: SwapQuote
|
|
1139
1424
|
}
|
|
1425
|
+
export interface GetSwapQuoteV2Args {
|
|
1426
|
+
userAddress: string
|
|
1427
|
+
buyCurrencyAddress: string
|
|
1428
|
+
sellCurrencyAddress: string
|
|
1429
|
+
buyAmount: string
|
|
1430
|
+
chainId: number
|
|
1431
|
+
includeApprove: boolean
|
|
1432
|
+
slippagePercentage?: number
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
export interface GetSwapQuoteV2Return {
|
|
1436
|
+
swapQuote: SwapQuote
|
|
1437
|
+
}
|
|
1438
|
+
export interface IntentQueryArgs {
|
|
1439
|
+
wallet: string
|
|
1440
|
+
preconditions: Array<IntentPrecondition>
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
export interface IntentQueryReturn {
|
|
1444
|
+
solutions: Array<IntentSolution>
|
|
1445
|
+
}
|
|
1140
1446
|
export interface ListCurrencyGroupsArgs {}
|
|
1141
1447
|
|
|
1142
1448
|
export interface ListCurrencyGroupsReturn {
|
|
@@ -1194,6 +1500,36 @@ export interface ListOffchainPaymentsReturn {
|
|
|
1194
1500
|
page: Page
|
|
1195
1501
|
payments: Array<OffchainPayment>
|
|
1196
1502
|
}
|
|
1503
|
+
export interface SavePackArgs {
|
|
1504
|
+
pack: Pack
|
|
1505
|
+
}
|
|
1506
|
+
|
|
1507
|
+
export interface SavePackReturn {
|
|
1508
|
+
merkleRoot: string
|
|
1509
|
+
}
|
|
1510
|
+
export interface GetPackArgs {
|
|
1511
|
+
contractAddress: string
|
|
1512
|
+
chainId: number
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
export interface GetPackReturn {
|
|
1516
|
+
pack: Pack
|
|
1517
|
+
}
|
|
1518
|
+
export interface DeletePackArgs {
|
|
1519
|
+
contractAddress: string
|
|
1520
|
+
chainId: number
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1523
|
+
export interface DeletePackReturn {
|
|
1524
|
+
status: boolean
|
|
1525
|
+
}
|
|
1526
|
+
export interface UpdatePackContentArgs {
|
|
1527
|
+
pack: Pack
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
export interface UpdatePackContentReturn {
|
|
1531
|
+
merkleRoot: string
|
|
1532
|
+
}
|
|
1197
1533
|
|
|
1198
1534
|
//
|
|
1199
1535
|
// Client
|
|
@@ -1897,6 +2233,84 @@ export class API implements API {
|
|
|
1897
2233
|
)
|
|
1898
2234
|
}
|
|
1899
2235
|
|
|
2236
|
+
transakGetCountries = (headers?: object, signal?: AbortSignal): Promise<TransakGetCountriesReturn> => {
|
|
2237
|
+
return this.fetch(this.url('TransakGetCountries'), createHTTPRequest({}, headers, signal)).then(
|
|
2238
|
+
res => {
|
|
2239
|
+
return buildResponse(res).then(_data => {
|
|
2240
|
+
return {
|
|
2241
|
+
regions: <Array<TransakCountry>>_data.regions
|
|
2242
|
+
}
|
|
2243
|
+
})
|
|
2244
|
+
},
|
|
2245
|
+
error => {
|
|
2246
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2247
|
+
}
|
|
2248
|
+
)
|
|
2249
|
+
}
|
|
2250
|
+
|
|
2251
|
+
transakGetCryptoCurrencies = (headers?: object, signal?: AbortSignal): Promise<TransakGetCryptoCurrenciesReturn> => {
|
|
2252
|
+
return this.fetch(this.url('TransakGetCryptoCurrencies'), createHTTPRequest({}, headers, signal)).then(
|
|
2253
|
+
res => {
|
|
2254
|
+
return buildResponse(res).then(_data => {
|
|
2255
|
+
return {
|
|
2256
|
+
currencies: <Array<TransakCryptoCurrency>>_data.currencies
|
|
2257
|
+
}
|
|
2258
|
+
})
|
|
2259
|
+
},
|
|
2260
|
+
error => {
|
|
2261
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2262
|
+
}
|
|
2263
|
+
)
|
|
2264
|
+
}
|
|
2265
|
+
|
|
2266
|
+
transakGetFiatCurrencies = (headers?: object, signal?: AbortSignal): Promise<TransakGetFiatCurrenciesReturn> => {
|
|
2267
|
+
return this.fetch(this.url('TransakGetFiatCurrencies'), createHTTPRequest({}, headers, signal)).then(
|
|
2268
|
+
res => {
|
|
2269
|
+
return buildResponse(res).then(_data => {
|
|
2270
|
+
return {
|
|
2271
|
+
currencies: <Array<TransakFiatCurrency>>_data.currencies
|
|
2272
|
+
}
|
|
2273
|
+
})
|
|
2274
|
+
},
|
|
2275
|
+
error => {
|
|
2276
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2277
|
+
}
|
|
2278
|
+
)
|
|
2279
|
+
}
|
|
2280
|
+
|
|
2281
|
+
transakGetPrice = (args: TransakGetPriceArgs, headers?: object, signal?: AbortSignal): Promise<TransakGetPriceReturn> => {
|
|
2282
|
+
return this.fetch(this.url('TransakGetPrice'), createHTTPRequest(args, headers, signal)).then(
|
|
2283
|
+
res => {
|
|
2284
|
+
return buildResponse(res).then(_data => {
|
|
2285
|
+
return {
|
|
2286
|
+
price: <TransakPrice>_data.price
|
|
2287
|
+
}
|
|
2288
|
+
})
|
|
2289
|
+
},
|
|
2290
|
+
error => {
|
|
2291
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2292
|
+
}
|
|
2293
|
+
)
|
|
2294
|
+
}
|
|
2295
|
+
|
|
2296
|
+
transakGetSupportedNFTCheckoutChains = (
|
|
2297
|
+
headers?: object,
|
|
2298
|
+
signal?: AbortSignal
|
|
2299
|
+
): Promise<TransakGetSupportedNFTCheckoutChainsReturn> => {
|
|
2300
|
+
return this.fetch(this.url('TransakGetSupportedNFTCheckoutChains'), createHTTPRequest({}, headers, signal)).then(
|
|
2301
|
+
res => {
|
|
2302
|
+
return buildResponse(res).then(_data => {
|
|
2303
|
+
return {
|
|
2304
|
+
chains: <Array<TransakChain>>_data.chains
|
|
2305
|
+
}
|
|
2306
|
+
})
|
|
2307
|
+
},
|
|
2308
|
+
error => {
|
|
2309
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2310
|
+
}
|
|
2311
|
+
)
|
|
2312
|
+
}
|
|
2313
|
+
|
|
1900
2314
|
getCoinPrices = (args: GetCoinPricesArgs, headers?: object, signal?: AbortSignal): Promise<GetCoinPricesReturn> => {
|
|
1901
2315
|
return this.fetch(this.url('GetCoinPrices'), createHTTPRequest(args, headers, signal)).then(
|
|
1902
2316
|
res => {
|
|
@@ -2186,6 +2600,63 @@ export class API implements API {
|
|
|
2186
2600
|
)
|
|
2187
2601
|
}
|
|
2188
2602
|
|
|
2603
|
+
getSwapPermit2Price = (
|
|
2604
|
+
args: GetSwapPermit2PriceArgs,
|
|
2605
|
+
headers?: object,
|
|
2606
|
+
signal?: AbortSignal
|
|
2607
|
+
): Promise<GetSwapPermit2PriceReturn> => {
|
|
2608
|
+
return this.fetch(this.url('GetSwapPermit2Price'), createHTTPRequest(args, headers, signal)).then(
|
|
2609
|
+
res => {
|
|
2610
|
+
return buildResponse(res).then(_data => {
|
|
2611
|
+
return {
|
|
2612
|
+
swapPermit2Price: <SwapPermit2Price>_data.swapPermit2Price
|
|
2613
|
+
}
|
|
2614
|
+
})
|
|
2615
|
+
},
|
|
2616
|
+
error => {
|
|
2617
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2618
|
+
}
|
|
2619
|
+
)
|
|
2620
|
+
}
|
|
2621
|
+
|
|
2622
|
+
getSwapPermit2Prices = (
|
|
2623
|
+
args: GetSwapPermit2PricesArgs,
|
|
2624
|
+
headers?: object,
|
|
2625
|
+
signal?: AbortSignal
|
|
2626
|
+
): Promise<GetSwapPermit2PricesReturn> => {
|
|
2627
|
+
return this.fetch(this.url('GetSwapPermit2Prices'), createHTTPRequest(args, headers, signal)).then(
|
|
2628
|
+
res => {
|
|
2629
|
+
return buildResponse(res).then(_data => {
|
|
2630
|
+
return {
|
|
2631
|
+
swapPermit2Prices: <Array<SwapPermit2Price>>_data.swapPermit2Prices
|
|
2632
|
+
}
|
|
2633
|
+
})
|
|
2634
|
+
},
|
|
2635
|
+
error => {
|
|
2636
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2637
|
+
}
|
|
2638
|
+
)
|
|
2639
|
+
}
|
|
2640
|
+
|
|
2641
|
+
getSwapPermit2Quote = (
|
|
2642
|
+
args: GetSwapPermit2QuoteArgs,
|
|
2643
|
+
headers?: object,
|
|
2644
|
+
signal?: AbortSignal
|
|
2645
|
+
): Promise<GetSwapPermit2QuoteReturn> => {
|
|
2646
|
+
return this.fetch(this.url('GetSwapPermit2Quote'), createHTTPRequest(args, headers, signal)).then(
|
|
2647
|
+
res => {
|
|
2648
|
+
return buildResponse(res).then(_data => {
|
|
2649
|
+
return {
|
|
2650
|
+
swapPermit2Quote: <SwapPermit2Quote>_data.swapPermit2Quote
|
|
2651
|
+
}
|
|
2652
|
+
})
|
|
2653
|
+
},
|
|
2654
|
+
error => {
|
|
2655
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2656
|
+
}
|
|
2657
|
+
)
|
|
2658
|
+
}
|
|
2659
|
+
|
|
2189
2660
|
getSwapPrice = (args: GetSwapPriceArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapPriceReturn> => {
|
|
2190
2661
|
return this.fetch(this.url('GetSwapPrice'), createHTTPRequest(args, headers, signal)).then(
|
|
2191
2662
|
res => {
|
|
@@ -2231,6 +2702,36 @@ export class API implements API {
|
|
|
2231
2702
|
)
|
|
2232
2703
|
}
|
|
2233
2704
|
|
|
2705
|
+
getSwapQuoteV2 = (args: GetSwapQuoteV2Args, headers?: object, signal?: AbortSignal): Promise<GetSwapQuoteV2Return> => {
|
|
2706
|
+
return this.fetch(this.url('GetSwapQuoteV2'), createHTTPRequest(args, headers, signal)).then(
|
|
2707
|
+
res => {
|
|
2708
|
+
return buildResponse(res).then(_data => {
|
|
2709
|
+
return {
|
|
2710
|
+
swapQuote: <SwapQuote>_data.swapQuote
|
|
2711
|
+
}
|
|
2712
|
+
})
|
|
2713
|
+
},
|
|
2714
|
+
error => {
|
|
2715
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2716
|
+
}
|
|
2717
|
+
)
|
|
2718
|
+
}
|
|
2719
|
+
|
|
2720
|
+
intentQuery = (args: IntentQueryArgs, headers?: object, signal?: AbortSignal): Promise<IntentQueryReturn> => {
|
|
2721
|
+
return this.fetch(this.url('IntentQuery'), createHTTPRequest(args, headers, signal)).then(
|
|
2722
|
+
res => {
|
|
2723
|
+
return buildResponse(res).then(_data => {
|
|
2724
|
+
return {
|
|
2725
|
+
solutions: <Array<IntentSolution>>_data.solutions
|
|
2726
|
+
}
|
|
2727
|
+
})
|
|
2728
|
+
},
|
|
2729
|
+
error => {
|
|
2730
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2731
|
+
}
|
|
2732
|
+
)
|
|
2733
|
+
}
|
|
2734
|
+
|
|
2234
2735
|
listCurrencyGroups = (headers?: object, signal?: AbortSignal): Promise<ListCurrencyGroupsReturn> => {
|
|
2235
2736
|
return this.fetch(this.url('ListCurrencyGroups'), createHTTPRequest({}, headers, signal)).then(
|
|
2236
2737
|
res => {
|
|
@@ -2377,6 +2878,66 @@ export class API implements API {
|
|
|
2377
2878
|
}
|
|
2378
2879
|
)
|
|
2379
2880
|
}
|
|
2881
|
+
|
|
2882
|
+
savePack = (args: SavePackArgs, headers?: object, signal?: AbortSignal): Promise<SavePackReturn> => {
|
|
2883
|
+
return this.fetch(this.url('SavePack'), createHTTPRequest(args, headers, signal)).then(
|
|
2884
|
+
res => {
|
|
2885
|
+
return buildResponse(res).then(_data => {
|
|
2886
|
+
return {
|
|
2887
|
+
merkleRoot: <string>_data.merkleRoot
|
|
2888
|
+
}
|
|
2889
|
+
})
|
|
2890
|
+
},
|
|
2891
|
+
error => {
|
|
2892
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2893
|
+
}
|
|
2894
|
+
)
|
|
2895
|
+
}
|
|
2896
|
+
|
|
2897
|
+
getPack = (args: GetPackArgs, headers?: object, signal?: AbortSignal): Promise<GetPackReturn> => {
|
|
2898
|
+
return this.fetch(this.url('GetPack'), createHTTPRequest(args, headers, signal)).then(
|
|
2899
|
+
res => {
|
|
2900
|
+
return buildResponse(res).then(_data => {
|
|
2901
|
+
return {
|
|
2902
|
+
pack: <Pack>_data.pack
|
|
2903
|
+
}
|
|
2904
|
+
})
|
|
2905
|
+
},
|
|
2906
|
+
error => {
|
|
2907
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2908
|
+
}
|
|
2909
|
+
)
|
|
2910
|
+
}
|
|
2911
|
+
|
|
2912
|
+
deletePack = (args: DeletePackArgs, headers?: object, signal?: AbortSignal): Promise<DeletePackReturn> => {
|
|
2913
|
+
return this.fetch(this.url('DeletePack'), createHTTPRequest(args, headers, signal)).then(
|
|
2914
|
+
res => {
|
|
2915
|
+
return buildResponse(res).then(_data => {
|
|
2916
|
+
return {
|
|
2917
|
+
status: <boolean>_data.status
|
|
2918
|
+
}
|
|
2919
|
+
})
|
|
2920
|
+
},
|
|
2921
|
+
error => {
|
|
2922
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2923
|
+
}
|
|
2924
|
+
)
|
|
2925
|
+
}
|
|
2926
|
+
|
|
2927
|
+
updatePackContent = (args: UpdatePackContentArgs, headers?: object, signal?: AbortSignal): Promise<UpdatePackContentReturn> => {
|
|
2928
|
+
return this.fetch(this.url('UpdatePackContent'), createHTTPRequest(args, headers, signal)).then(
|
|
2929
|
+
res => {
|
|
2930
|
+
return buildResponse(res).then(_data => {
|
|
2931
|
+
return {
|
|
2932
|
+
merkleRoot: <string>_data.merkleRoot
|
|
2933
|
+
}
|
|
2934
|
+
})
|
|
2935
|
+
},
|
|
2936
|
+
error => {
|
|
2937
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
|
|
2938
|
+
}
|
|
2939
|
+
)
|
|
2940
|
+
}
|
|
2380
2941
|
}
|
|
2381
2942
|
|
|
2382
2943
|
const createHTTPRequest = (body: object = {}, headers: object = {}, signal: AbortSignal | null = null): object => {
|
|
@@ -2450,7 +3011,7 @@ export class WebrpcEndpointError extends WebrpcError {
|
|
|
2450
3011
|
constructor(
|
|
2451
3012
|
name: string = 'WebrpcEndpoint',
|
|
2452
3013
|
code: number = 0,
|
|
2453
|
-
message: string =
|
|
3014
|
+
message: string = `endpoint error`,
|
|
2454
3015
|
status: number = 0,
|
|
2455
3016
|
cause?: string
|
|
2456
3017
|
) {
|
|
@@ -2463,7 +3024,7 @@ export class WebrpcRequestFailedError extends WebrpcError {
|
|
|
2463
3024
|
constructor(
|
|
2464
3025
|
name: string = 'WebrpcRequestFailed',
|
|
2465
3026
|
code: number = -1,
|
|
2466
|
-
message: string =
|
|
3027
|
+
message: string = `request failed`,
|
|
2467
3028
|
status: number = 0,
|
|
2468
3029
|
cause?: string
|
|
2469
3030
|
) {
|
|
@@ -2476,7 +3037,7 @@ export class WebrpcBadRouteError extends WebrpcError {
|
|
|
2476
3037
|
constructor(
|
|
2477
3038
|
name: string = 'WebrpcBadRoute',
|
|
2478
3039
|
code: number = -2,
|
|
2479
|
-
message: string =
|
|
3040
|
+
message: string = `bad route`,
|
|
2480
3041
|
status: number = 0,
|
|
2481
3042
|
cause?: string
|
|
2482
3043
|
) {
|
|
@@ -2489,7 +3050,7 @@ export class WebrpcBadMethodError extends WebrpcError {
|
|
|
2489
3050
|
constructor(
|
|
2490
3051
|
name: string = 'WebrpcBadMethod',
|
|
2491
3052
|
code: number = -3,
|
|
2492
|
-
message: string =
|
|
3053
|
+
message: string = `bad method`,
|
|
2493
3054
|
status: number = 0,
|
|
2494
3055
|
cause?: string
|
|
2495
3056
|
) {
|
|
@@ -2502,7 +3063,7 @@ export class WebrpcBadRequestError extends WebrpcError {
|
|
|
2502
3063
|
constructor(
|
|
2503
3064
|
name: string = 'WebrpcBadRequest',
|
|
2504
3065
|
code: number = -4,
|
|
2505
|
-
message: string =
|
|
3066
|
+
message: string = `bad request`,
|
|
2506
3067
|
status: number = 0,
|
|
2507
3068
|
cause?: string
|
|
2508
3069
|
) {
|
|
@@ -2515,7 +3076,7 @@ export class WebrpcBadResponseError extends WebrpcError {
|
|
|
2515
3076
|
constructor(
|
|
2516
3077
|
name: string = 'WebrpcBadResponse',
|
|
2517
3078
|
code: number = -5,
|
|
2518
|
-
message: string =
|
|
3079
|
+
message: string = `bad response`,
|
|
2519
3080
|
status: number = 0,
|
|
2520
3081
|
cause?: string
|
|
2521
3082
|
) {
|
|
@@ -2528,7 +3089,7 @@ export class WebrpcServerPanicError extends WebrpcError {
|
|
|
2528
3089
|
constructor(
|
|
2529
3090
|
name: string = 'WebrpcServerPanic',
|
|
2530
3091
|
code: number = -6,
|
|
2531
|
-
message: string =
|
|
3092
|
+
message: string = `server panic`,
|
|
2532
3093
|
status: number = 0,
|
|
2533
3094
|
cause?: string
|
|
2534
3095
|
) {
|
|
@@ -2541,7 +3102,7 @@ export class WebrpcInternalErrorError extends WebrpcError {
|
|
|
2541
3102
|
constructor(
|
|
2542
3103
|
name: string = 'WebrpcInternalError',
|
|
2543
3104
|
code: number = -7,
|
|
2544
|
-
message: string =
|
|
3105
|
+
message: string = `internal error`,
|
|
2545
3106
|
status: number = 0,
|
|
2546
3107
|
cause?: string
|
|
2547
3108
|
) {
|
|
@@ -2554,7 +3115,7 @@ export class WebrpcClientDisconnectedError extends WebrpcError {
|
|
|
2554
3115
|
constructor(
|
|
2555
3116
|
name: string = 'WebrpcClientDisconnected',
|
|
2556
3117
|
code: number = -8,
|
|
2557
|
-
message: string =
|
|
3118
|
+
message: string = `client disconnected`,
|
|
2558
3119
|
status: number = 0,
|
|
2559
3120
|
cause?: string
|
|
2560
3121
|
) {
|
|
@@ -2567,7 +3128,7 @@ export class WebrpcStreamLostError extends WebrpcError {
|
|
|
2567
3128
|
constructor(
|
|
2568
3129
|
name: string = 'WebrpcStreamLost',
|
|
2569
3130
|
code: number = -9,
|
|
2570
|
-
message: string =
|
|
3131
|
+
message: string = `stream lost`,
|
|
2571
3132
|
status: number = 0,
|
|
2572
3133
|
cause?: string
|
|
2573
3134
|
) {
|
|
@@ -2580,7 +3141,7 @@ export class WebrpcStreamFinishedError extends WebrpcError {
|
|
|
2580
3141
|
constructor(
|
|
2581
3142
|
name: string = 'WebrpcStreamFinished',
|
|
2582
3143
|
code: number = -10,
|
|
2583
|
-
message: string =
|
|
3144
|
+
message: string = `stream finished`,
|
|
2584
3145
|
status: number = 0,
|
|
2585
3146
|
cause?: string
|
|
2586
3147
|
) {
|
|
@@ -2595,7 +3156,7 @@ export class UnauthorizedError extends WebrpcError {
|
|
|
2595
3156
|
constructor(
|
|
2596
3157
|
name: string = 'Unauthorized',
|
|
2597
3158
|
code: number = 1000,
|
|
2598
|
-
message: string =
|
|
3159
|
+
message: string = `Unauthorized access`,
|
|
2599
3160
|
status: number = 0,
|
|
2600
3161
|
cause?: string
|
|
2601
3162
|
) {
|
|
@@ -2608,7 +3169,7 @@ export class PermissionDeniedError extends WebrpcError {
|
|
|
2608
3169
|
constructor(
|
|
2609
3170
|
name: string = 'PermissionDenied',
|
|
2610
3171
|
code: number = 1001,
|
|
2611
|
-
message: string =
|
|
3172
|
+
message: string = `Permission denied`,
|
|
2612
3173
|
status: number = 0,
|
|
2613
3174
|
cause?: string
|
|
2614
3175
|
) {
|
|
@@ -2621,7 +3182,7 @@ export class SessionExpiredError extends WebrpcError {
|
|
|
2621
3182
|
constructor(
|
|
2622
3183
|
name: string = 'SessionExpired',
|
|
2623
3184
|
code: number = 1002,
|
|
2624
|
-
message: string =
|
|
3185
|
+
message: string = `Session expired`,
|
|
2625
3186
|
status: number = 0,
|
|
2626
3187
|
cause?: string
|
|
2627
3188
|
) {
|
|
@@ -2634,7 +3195,7 @@ export class MethodNotFoundError extends WebrpcError {
|
|
|
2634
3195
|
constructor(
|
|
2635
3196
|
name: string = 'MethodNotFound',
|
|
2636
3197
|
code: number = 1003,
|
|
2637
|
-
message: string =
|
|
3198
|
+
message: string = `Method not found`,
|
|
2638
3199
|
status: number = 0,
|
|
2639
3200
|
cause?: string
|
|
2640
3201
|
) {
|
|
@@ -2647,7 +3208,7 @@ export class RequestConflictError extends WebrpcError {
|
|
|
2647
3208
|
constructor(
|
|
2648
3209
|
name: string = 'RequestConflict',
|
|
2649
3210
|
code: number = 1004,
|
|
2650
|
-
message: string =
|
|
3211
|
+
message: string = `Conflict with target resource`,
|
|
2651
3212
|
status: number = 0,
|
|
2652
3213
|
cause?: string
|
|
2653
3214
|
) {
|
|
@@ -2660,7 +3221,7 @@ export class AbortedError extends WebrpcError {
|
|
|
2660
3221
|
constructor(
|
|
2661
3222
|
name: string = 'Aborted',
|
|
2662
3223
|
code: number = 1005,
|
|
2663
|
-
message: string =
|
|
3224
|
+
message: string = `Request aborted`,
|
|
2664
3225
|
status: number = 0,
|
|
2665
3226
|
cause?: string
|
|
2666
3227
|
) {
|
|
@@ -2673,7 +3234,7 @@ export class GeoblockedError extends WebrpcError {
|
|
|
2673
3234
|
constructor(
|
|
2674
3235
|
name: string = 'Geoblocked',
|
|
2675
3236
|
code: number = 1006,
|
|
2676
|
-
message: string =
|
|
3237
|
+
message: string = `Geoblocked region`,
|
|
2677
3238
|
status: number = 0,
|
|
2678
3239
|
cause?: string
|
|
2679
3240
|
) {
|
|
@@ -2686,7 +3247,7 @@ export class RateLimitedError extends WebrpcError {
|
|
|
2686
3247
|
constructor(
|
|
2687
3248
|
name: string = 'RateLimited',
|
|
2688
3249
|
code: number = 1007,
|
|
2689
|
-
message: string =
|
|
3250
|
+
message: string = `Rate-limited. Please slow down.`,
|
|
2690
3251
|
status: number = 0,
|
|
2691
3252
|
cause?: string
|
|
2692
3253
|
) {
|
|
@@ -2699,7 +3260,7 @@ export class ProjectNotFoundError extends WebrpcError {
|
|
|
2699
3260
|
constructor(
|
|
2700
3261
|
name: string = 'ProjectNotFound',
|
|
2701
3262
|
code: number = 1008,
|
|
2702
|
-
message: string =
|
|
3263
|
+
message: string = `Project not found`,
|
|
2703
3264
|
status: number = 0,
|
|
2704
3265
|
cause?: string
|
|
2705
3266
|
) {
|
|
@@ -2712,7 +3273,7 @@ export class AccessKeyNotFoundError extends WebrpcError {
|
|
|
2712
3273
|
constructor(
|
|
2713
3274
|
name: string = 'AccessKeyNotFound',
|
|
2714
3275
|
code: number = 1101,
|
|
2715
|
-
message: string =
|
|
3276
|
+
message: string = `Access key not found`,
|
|
2716
3277
|
status: number = 0,
|
|
2717
3278
|
cause?: string
|
|
2718
3279
|
) {
|
|
@@ -2725,7 +3286,7 @@ export class AccessKeyMismatchError extends WebrpcError {
|
|
|
2725
3286
|
constructor(
|
|
2726
3287
|
name: string = 'AccessKeyMismatch',
|
|
2727
3288
|
code: number = 1102,
|
|
2728
|
-
message: string =
|
|
3289
|
+
message: string = `Access key mismatch`,
|
|
2729
3290
|
status: number = 0,
|
|
2730
3291
|
cause?: string
|
|
2731
3292
|
) {
|
|
@@ -2738,7 +3299,7 @@ export class InvalidOriginError extends WebrpcError {
|
|
|
2738
3299
|
constructor(
|
|
2739
3300
|
name: string = 'InvalidOrigin',
|
|
2740
3301
|
code: number = 1103,
|
|
2741
|
-
message: string =
|
|
3302
|
+
message: string = `Invalid origin for Access Key`,
|
|
2742
3303
|
status: number = 0,
|
|
2743
3304
|
cause?: string
|
|
2744
3305
|
) {
|
|
@@ -2751,7 +3312,7 @@ export class InvalidServiceError extends WebrpcError {
|
|
|
2751
3312
|
constructor(
|
|
2752
3313
|
name: string = 'InvalidService',
|
|
2753
3314
|
code: number = 1104,
|
|
2754
|
-
message: string =
|
|
3315
|
+
message: string = `Service not enabled for Access key`,
|
|
2755
3316
|
status: number = 0,
|
|
2756
3317
|
cause?: string
|
|
2757
3318
|
) {
|
|
@@ -2764,7 +3325,7 @@ export class UnauthorizedUserError extends WebrpcError {
|
|
|
2764
3325
|
constructor(
|
|
2765
3326
|
name: string = 'UnauthorizedUser',
|
|
2766
3327
|
code: number = 1105,
|
|
2767
|
-
message: string =
|
|
3328
|
+
message: string = `Unauthorized user`,
|
|
2768
3329
|
status: number = 0,
|
|
2769
3330
|
cause?: string
|
|
2770
3331
|
) {
|
|
@@ -2777,7 +3338,7 @@ export class QuotaExceededError extends WebrpcError {
|
|
|
2777
3338
|
constructor(
|
|
2778
3339
|
name: string = 'QuotaExceeded',
|
|
2779
3340
|
code: number = 1200,
|
|
2780
|
-
message: string =
|
|
3341
|
+
message: string = `Quota request exceeded`,
|
|
2781
3342
|
status: number = 0,
|
|
2782
3343
|
cause?: string
|
|
2783
3344
|
) {
|
|
@@ -2790,7 +3351,7 @@ export class QuotaRateLimitError extends WebrpcError {
|
|
|
2790
3351
|
constructor(
|
|
2791
3352
|
name: string = 'QuotaRateLimit',
|
|
2792
3353
|
code: number = 1201,
|
|
2793
|
-
message: string =
|
|
3354
|
+
message: string = `Quota rate limit exceeded`,
|
|
2794
3355
|
status: number = 0,
|
|
2795
3356
|
cause?: string
|
|
2796
3357
|
) {
|
|
@@ -2803,7 +3364,7 @@ export class NoDefaultKeyError extends WebrpcError {
|
|
|
2803
3364
|
constructor(
|
|
2804
3365
|
name: string = 'NoDefaultKey',
|
|
2805
3366
|
code: number = 1300,
|
|
2806
|
-
message: string =
|
|
3367
|
+
message: string = `No default access key found`,
|
|
2807
3368
|
status: number = 0,
|
|
2808
3369
|
cause?: string
|
|
2809
3370
|
) {
|
|
@@ -2816,7 +3377,7 @@ export class MaxAccessKeysError extends WebrpcError {
|
|
|
2816
3377
|
constructor(
|
|
2817
3378
|
name: string = 'MaxAccessKeys',
|
|
2818
3379
|
code: number = 1301,
|
|
2819
|
-
message: string =
|
|
3380
|
+
message: string = `Access keys limit reached`,
|
|
2820
3381
|
status: number = 0,
|
|
2821
3382
|
cause?: string
|
|
2822
3383
|
) {
|
|
@@ -2829,7 +3390,7 @@ export class AtLeastOneKeyError extends WebrpcError {
|
|
|
2829
3390
|
constructor(
|
|
2830
3391
|
name: string = 'AtLeastOneKey',
|
|
2831
3392
|
code: number = 1302,
|
|
2832
|
-
message: string =
|
|
3393
|
+
message: string = `You need at least one Access Key`,
|
|
2833
3394
|
status: number = 0,
|
|
2834
3395
|
cause?: string
|
|
2835
3396
|
) {
|
|
@@ -2842,7 +3403,7 @@ export class TimeoutError extends WebrpcError {
|
|
|
2842
3403
|
constructor(
|
|
2843
3404
|
name: string = 'Timeout',
|
|
2844
3405
|
code: number = 1900,
|
|
2845
|
-
message: string =
|
|
3406
|
+
message: string = `Request timed out`,
|
|
2846
3407
|
status: number = 0,
|
|
2847
3408
|
cause?: string
|
|
2848
3409
|
) {
|
|
@@ -2855,7 +3416,7 @@ export class InvalidArgumentError extends WebrpcError {
|
|
|
2855
3416
|
constructor(
|
|
2856
3417
|
name: string = 'InvalidArgument',
|
|
2857
3418
|
code: number = 2000,
|
|
2858
|
-
message: string =
|
|
3419
|
+
message: string = `Invalid argument`,
|
|
2859
3420
|
status: number = 0,
|
|
2860
3421
|
cause?: string
|
|
2861
3422
|
) {
|
|
@@ -2868,7 +3429,7 @@ export class UnavailableError extends WebrpcError {
|
|
|
2868
3429
|
constructor(
|
|
2869
3430
|
name: string = 'Unavailable',
|
|
2870
3431
|
code: number = 2002,
|
|
2871
|
-
message: string =
|
|
3432
|
+
message: string = `Unavailable resource`,
|
|
2872
3433
|
status: number = 0,
|
|
2873
3434
|
cause?: string
|
|
2874
3435
|
) {
|
|
@@ -2881,7 +3442,7 @@ export class QueryFailedError extends WebrpcError {
|
|
|
2881
3442
|
constructor(
|
|
2882
3443
|
name: string = 'QueryFailed',
|
|
2883
3444
|
code: number = 2003,
|
|
2884
|
-
message: string =
|
|
3445
|
+
message: string = `Query failed`,
|
|
2885
3446
|
status: number = 0,
|
|
2886
3447
|
cause?: string
|
|
2887
3448
|
) {
|
|
@@ -2894,7 +3455,7 @@ export class NotFoundError extends WebrpcError {
|
|
|
2894
3455
|
constructor(
|
|
2895
3456
|
name: string = 'NotFound',
|
|
2896
3457
|
code: number = 3000,
|
|
2897
|
-
message: string =
|
|
3458
|
+
message: string = `Resource not found`,
|
|
2898
3459
|
status: number = 0,
|
|
2899
3460
|
cause?: string
|
|
2900
3461
|
) {
|
|
@@ -2907,7 +3468,7 @@ export class UnsupportedNetworkError extends WebrpcError {
|
|
|
2907
3468
|
constructor(
|
|
2908
3469
|
name: string = 'UnsupportedNetwork',
|
|
2909
3470
|
code: number = 3008,
|
|
2910
|
-
message: string =
|
|
3471
|
+
message: string = `Unsupported network`,
|
|
2911
3472
|
status: number = 0,
|
|
2912
3473
|
cause?: string
|
|
2913
3474
|
) {
|