@@ -69,6 +69,31 @@ export type FiatCurrencyCode =
6969
7070export type FiatCurrenciesProps = Record < FiatCurrencyCode , number > ;
7171
72+ export interface ClientVersion {
73+ client : string ;
74+ version : string ;
75+ }
76+
77+ export interface ProviderMetadata {
78+ name : string ; // unique internal name, e.g. "changenow"
79+ companyName : string ; // name visible to clients, e.g. "ChangeNow"
80+ logo : string ; // logo image filename, e.g. "changenow-icon.jpg"
81+ isActive : boolean ;
82+ isDisabled ?: boolean ;
83+ disabledCurrencies ?: string [ ] ; // ['BTC', 'USD']
84+ supportedCountries ?: string [ ] ; // ['CZ', 'NL']
85+ disabledCountries ?: string [ ] ;
86+ supportUrl ?: string ; // https://www.simplex.com/support/
87+ statusUrl ?: string ; // https://payment-status.simplex.com/api/v1/user/payments?uuid={{paymentId}}
88+ termsUrl ?: string ; // https://www.simplex.com/terms-of-use/payment-terms
89+ disabledClientVersions ?: ClientVersion [ ] ;
90+ }
91+
92+ export interface BuySellProviderMetadata extends ProviderMetadata {
93+ supportedCountries : string [ ] ; // ['AT', 'BE']
94+ tradedCoins : CryptoId [ ] ; // ['BTC', 'BCH', 'LTC', 'XRP', 'ETH', 'bitcoin', 'ethereum', 'litecoin', 'ethereum--0xdac17f958d2ee523a2206206994597c13d831ec7']
95+ }
96+
7297// buy types
7398
7499export type BuyTradeFinalStatus =
@@ -119,22 +144,12 @@ export type BuyTradeTag =
119144 | "widget"
120145 | "noExternalAddress" ;
121146
122- export interface BuyProviderInfo {
123- name : string ; // simplex
124- companyName : string ; // UAB Invity Finance
125- brandName ?: string ; // Invity
126- logo : string ; // simplex-icon.jpg
127- isActive : boolean ;
128- isDisabled ?: boolean ;
129- tradedCoins : CryptoId [ ] ; // ['bitcoin', 'ethereum', 'litecoin', 'ethereum--0xdac17f958d2ee523a2206206994597c13d831ec7']
147+ export interface BuyProviderInfo extends BuySellProviderMetadata {
130148 tradedFiatCurrencies : string [ ] ; // ['EUR', 'USD']
131- disabledCurrencies ?: string [ ] ;
132- supportedCountries : string [ ] ; // ['CZ', 'NL']
133- disabledCountries ?: string [ ] ;
134149 paymentMethods : BuyCryptoPaymentMethod [ ] ;
135- statusUrl ?: string ; // https://payment-status.simplex.com/api/v1/user/payments?uuid={{paymentId}}
136- supportUrl ?: string ; // https://www.simplex.com/support/
137- pendingTimeoutSeconds ?: number ; // Time until a SUBMITTED transaction automatically changes to APPROVAL_PENDING. Null means it does not change.
150+ disabledPaymentMethods ?: BuyCryptoPaymentMethod [ ] ;
151+ brandName ?: string ; // Invity
152+ pendingTimeoutSeconds ?: number ; // time until a SUBMITTED transaction automatically changes to APPROVAL_PENDING, null means it does not change
138153}
139154
140155export interface BuyListResponse {
@@ -250,23 +265,18 @@ export type ExchangeMaximum =
250265export type ExchangeTradeTag = "renewed" | "bestRate" | "favorite" | "kyc" | "widget" | "noExternalAddress" ;
251266export type ExchangeKYCType = "KYC-required" | "KYC-norefund" | "KYC-yesrefund" | "noKYC" | "DEX" ;
252267
253- export interface ExchangeProviderInfo {
254- name : string ; // changenow
255- companyName : string ; // ChangeNow
256- logo : string ; // changenow-icon.jpg
257- isActive : boolean ;
268+ export interface ExchangeProviderInfo extends ProviderMetadata {
258269 isFixedRate : boolean ;
259270 isDex : boolean ;
260271 buyTickers : CryptoId [ ] ;
261272 sellTickers : CryptoId [ ] ;
262- addressFormats : StringMap ; // specification of formats required by selected exchange
263- statusUrl : string ; // https://changenow.io/exchange/txs/{{orderId}}
273+ addressFormats : StringMap ;
264274 kycUrl ?: string ; // https://changenow.io/faq#kyc
265275 supportUrl : string ; // https://support.changenow.io
266276 // TODO region of operation
267- kycPolicy ?: string | undefined ;
277+ kycPolicy ?: string ;
268278 kycPolicyType : ExchangeKYCType ;
269- isRefundRequired ?: boolean | undefined ;
279+ isRefundRequired ?: boolean ;
270280}
271281
272282export type ExchangeListResponse = ExchangeProviderInfo [ ] ;
@@ -463,25 +473,16 @@ export type SellProviderType = "Fiat" | "Voucher";
463473
464474export type SellFiatFlowType = "BANK_ACCOUNT" | "PAYMENT_GATE" | "N/A" ;
465475
466- export interface SellProviderInfo {
467- name : string ; // simplex
468- companyName : string ; // Simplex
469- logo : string ; // simplex-icon.jpg
476+ export interface SellProviderInfo extends BuySellProviderMetadata {
470477 type : SellProviderType ;
471- isActive : boolean ;
472- tradedCoins : CryptoId [ ] ; // ['bitcoin', 'bitcoin-cash', 'litecoin']
473- tradedFiatCurrencies ?: string [ ] | undefined ; // ['EUR', 'USD']
474- supportedCountries : string [ ] ; // ['AT', 'BE']
475- statusUrl ?: string | undefined ; // https://payment-status.simplex.com/api/v1/user/payments?uuid={{paymentId}}
476- supportUrl ?: string | undefined ; // https://www.simplex.com/support/
477- quoteInfo ?: string | undefined ; // some info text shown on quote
478- voucherSiteOrigin ?: string | undefined ;
479- paymentMethods ?: SellCryptoPaymentMethod [ ] | undefined ;
480- flow ?: SellFiatFlowType | undefined ;
481- isRefundAddressRequired ?: boolean | undefined ;
482- pendingTimeout ?: number | undefined ; // Time until a SUBMITTED transaction automatically changes to PENDING. Null means it does not change.
483- /** Should be used when it's necessary to have the exact amount match between the trade and the transaction */
484- lockSendAmount ?: boolean ;
478+ tradedFiatCurrencies ?: string [ ] ; // ['EUR', 'USD']
479+ quoteInfo ?: string ; // some info text shown on quote
480+ paymentMethods ?: SellCryptoPaymentMethod [ ] ;
481+ disabledPaymentMethods ?: SellCryptoPaymentMethod [ ] ;
482+ flow ?: SellFiatFlowType ;
483+ isRefundAddressRequired ?: boolean ;
484+ pendingTimeout ?: number ; // time until a SUBMITTED transaction automatically changes to PENDING, null means it does not change
485+ lockSendAmount ?: boolean ; // should be used when it's necessary to have the exact amount match between the trade and the transaction */
485486}
486487
487488export interface SellListResponse {
0 commit comments