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