-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AUTOMATED] Update: api/proto/clients/api.gen.ts
- Loading branch information
1 parent
ca71e65
commit 706ae27
Showing
1 changed file
with
236 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* eslint-disable */ | ||
// sequence-api v0.4.0 d0c7f1ab893283e358baff52cecf6a8cbabd641f | ||
// sequence-api v0.4.0 97e7fd1fda64f3f3edb7b980afd511cc93d1a9b9 | ||
// -- | ||
// Code generated by [email protected] with typescript generator. DO NOT EDIT. | ||
// | ||
|
@@ -16,7 +16,7 @@ export const WebRPCVersion = 'v1' | |
export const WebRPCSchemaVersion = 'v0.4.0' | ||
|
||
// Schema hash generated from your RIDL schema | ||
export const WebRPCSchemaHash = 'd0c7f1ab893283e358baff52cecf6a8cbabd641f' | ||
export const WebRPCSchemaHash = '97e7fd1fda64f3f3edb7b980afd511cc93d1a9b9' | ||
|
||
type WebrpcGenVersions = { | ||
webrpcGenVersion: string | ||
|
@@ -95,6 +95,12 @@ export enum TokenType { | |
ERC1155 = 'ERC1155' | ||
} | ||
|
||
export enum TransakBuySell { | ||
UNKNOWN = 'UNKNOWN', | ||
BUY = 'BUY', | ||
SELL = 'SELL' | ||
} | ||
|
||
export interface Version { | ||
webrpcVersion: string | ||
schemaVersion: string | ||
|
@@ -549,6 +555,148 @@ export interface LootboxContent { | |
amounts: Array<Array<string>> | ||
} | ||
|
||
export interface TransakCountry { | ||
alpha2: string | ||
alpha3: string | ||
isAllowed: boolean | ||
isLightKycAllowed: boolean | ||
name: string | ||
currencyCode: string | ||
supportedDocuments: Array<string> | ||
partners: Array<TransakPartner> | ||
states: Array<TransakState> | ||
} | ||
|
||
export interface TransakPartner { | ||
name: string | ||
isCardPayment: boolean | ||
currencyCode: string | ||
} | ||
|
||
export interface TransakState { | ||
code: string | ||
name: string | ||
isAllowed: boolean | ||
} | ||
|
||
export interface TransakCryptoCurrency { | ||
id: string | ||
coinID: string | ||
address: string | ||
addressAdditionalData: any | ||
createdAt: string | ||
decimals: number | ||
image: TransakCryptoCurrencyImage | ||
isAllowed: boolean | ||
isPopular: boolean | ||
isStable: boolean | ||
name: string | ||
roundOff: number | ||
symbol: string | ||
isIgnorePriceVerification: boolean | ||
imageBk: TransakCryptoCurrencyImage | ||
kycCountriesNotSupported: Array<string> | ||
network: TransakCryptoCurrencyNetwork | ||
uniqueID: string | ||
tokenType: string | ||
tokenIdentifier: string | ||
isPayInAllowed: boolean | ||
isSuspended: boolean | ||
} | ||
|
||
export interface TransakCryptoCurrencyImage { | ||
large: string | ||
small: string | ||
thumb: string | ||
} | ||
|
||
export interface TransakCryptoCurrencyNetwork { | ||
name: string | ||
fiatCurrenciesNotSupported: Array<any> | ||
chainID: string | ||
} | ||
|
||
export interface TransakCryptoCurrencyNetworkFiatNotSupported { | ||
fiatCurrency: string | ||
paymentMethod: string | ||
} | ||
|
||
export interface TransakFiatCurrency { | ||
symbol: string | ||
supportingCountries: Array<string> | ||
logoSymbol: string | ||
name: string | ||
paymentOptions: Array<TransakFiatCurrencyPaymentOption> | ||
isPopular: boolean | ||
isAllowed: boolean | ||
roundOff: number | ||
isPayOutAllowed: boolean | ||
defaultCountryForNFT: string | ||
icon: string | ||
displayMessage: string | ||
} | ||
|
||
export interface TransakFiatCurrencyPaymentOption { | ||
name: string | ||
id: string | ||
isNftAllowed: boolean | ||
isNonCustodial: boolean | ||
processingTime: string | ||
displayText: boolean | ||
icon: string | ||
limitCurrency: string | ||
isActive: boolean | ||
provider: string | ||
maxAmount: number | ||
minAmount: number | ||
defaultAmount: number | ||
isConverted: boolean | ||
visaPayoutCountries: Array<string> | ||
mastercardPayoutCountries: Array<string> | ||
isPayOutAllowed: boolean | ||
minAmountForPayOut: number | ||
maxAmountForPayOut: number | ||
defaultAmountForPayOut: number | ||
} | ||
|
||
export interface TransakPrice { | ||
quoteID: string | ||
conversionPrice: number | ||
marketConversionPrice: number | ||
slippage: number | ||
fiatCurrency: string | ||
cryptoCurrency: string | ||
paymentMethod: string | ||
fiatAmount: number | ||
cryptoAmount: number | ||
isBuyOrSell: string | ||
network: string | ||
feeDecimal: number | ||
totalFee: number | ||
feeBreakdown: Array<TransakPriceFeeBreakdown> | ||
nonce: number | ||
cryptoLiquidityProvider: string | ||
notes: Array<any> | ||
} | ||
|
||
export interface TransakPriceFeeBreakdown { | ||
Name: string | ||
Value: number | ||
ID: string | ||
Ids: Array<string> | ||
} | ||
|
||
export interface TransakGetPriceParams { | ||
fiatCurrency: string | ||
cryptoCurrency: string | ||
isBuyOrSell: TransakBuySell | ||
network: string | ||
paymentMethod: string | ||
fiatAmount: number | ||
cryptoAmount: number | ||
quoteCountryCode: string | ||
} | ||
|
||
export interface API { | ||
ping(headers?: object, signal?: AbortSignal): Promise<PingReturn> | ||
version(headers?: object, signal?: AbortSignal): Promise<VersionReturn> | ||
|
@@ -631,6 +779,10 @@ export interface API { | |
headers?: object, | ||
signal?: AbortSignal | ||
): Promise<GetSardineNFTCheckoutOrderStatusReturn> | ||
transakGetCountries(headers?: object, signal?: AbortSignal): Promise<TransakGetCountriesReturn> | ||
transakGetCryptoCurrencies(headers?: object, signal?: AbortSignal): Promise<TransakGetCryptoCurrenciesReturn> | ||
transakGetFiatCurrencies(headers?: object, signal?: AbortSignal): Promise<TransakGetFiatCurrenciesReturn> | ||
transakGetPrice(args: TransakGetPriceArgs, headers?: object, signal?: AbortSignal): Promise<TransakGetPriceReturn> | ||
getCoinPrices(args: GetCoinPricesArgs, headers?: object, signal?: AbortSignal): Promise<GetCoinPricesReturn> | ||
getCollectiblePrices( | ||
args: GetCollectiblePricesArgs, | ||
|
@@ -1022,6 +1174,28 @@ export interface GetSardineNFTCheckoutOrderStatusArgs { | |
export interface GetSardineNFTCheckoutOrderStatusReturn { | ||
resp: SardineOrder | ||
} | ||
export interface TransakGetCountriesArgs {} | ||
|
||
export interface TransakGetCountriesReturn { | ||
regions: Array<TransakCountry> | ||
} | ||
export interface TransakGetCryptoCurrenciesArgs {} | ||
|
||
export interface TransakGetCryptoCurrenciesReturn { | ||
currencies: Array<TransakCryptoCurrency> | ||
} | ||
export interface TransakGetFiatCurrenciesArgs {} | ||
|
||
export interface TransakGetFiatCurrenciesReturn { | ||
currencies: Array<TransakFiatCurrency> | ||
} | ||
export interface TransakGetPriceArgs { | ||
params: TransakGetPriceParams | ||
} | ||
|
||
export interface TransakGetPriceReturn { | ||
price: TransakPrice | ||
} | ||
export interface GetCoinPricesArgs { | ||
tokens: Array<Token> | ||
} | ||
|
@@ -2035,6 +2209,66 @@ export class API implements API { | |
) | ||
} | ||
|
||
transakGetCountries = (headers?: object, signal?: AbortSignal): Promise<TransakGetCountriesReturn> => { | ||
return this.fetch(this.url('TransakGetCountries'), createHTTPRequest({}, headers, signal)).then( | ||
res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
regions: <Array<TransakCountry>>_data.regions | ||
} | ||
}) | ||
}, | ||
error => { | ||
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) | ||
} | ||
) | ||
} | ||
|
||
transakGetCryptoCurrencies = (headers?: object, signal?: AbortSignal): Promise<TransakGetCryptoCurrenciesReturn> => { | ||
return this.fetch(this.url('TransakGetCryptoCurrencies'), createHTTPRequest({}, headers, signal)).then( | ||
res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
currencies: <Array<TransakCryptoCurrency>>_data.currencies | ||
} | ||
}) | ||
}, | ||
error => { | ||
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) | ||
} | ||
) | ||
} | ||
|
||
transakGetFiatCurrencies = (headers?: object, signal?: AbortSignal): Promise<TransakGetFiatCurrenciesReturn> => { | ||
return this.fetch(this.url('TransakGetFiatCurrencies'), createHTTPRequest({}, headers, signal)).then( | ||
res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
currencies: <Array<TransakFiatCurrency>>_data.currencies | ||
} | ||
}) | ||
}, | ||
error => { | ||
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) | ||
} | ||
) | ||
} | ||
|
||
transakGetPrice = (args: TransakGetPriceArgs, headers?: object, signal?: AbortSignal): Promise<TransakGetPriceReturn> => { | ||
return this.fetch(this.url('TransakGetPrice'), createHTTPRequest(args, headers, signal)).then( | ||
res => { | ||
return buildResponse(res).then(_data => { | ||
return { | ||
price: <TransakPrice>_data.price | ||
} | ||
}) | ||
}, | ||
error => { | ||
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` }) | ||
} | ||
) | ||
} | ||
|
||
getCoinPrices = (args: GetCoinPricesArgs, headers?: object, signal?: AbortSignal): Promise<GetCoinPricesReturn> => { | ||
return this.fetch(this.url('GetCoinPrices'), createHTTPRequest(args, headers, signal)).then( | ||
res => { | ||
|