@coinflowlabs/angular 1.0.7 → 1.1.1

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.
@@ -1,4 +1,4 @@
1
- import { doInitializeCvvOnlyTokenExIframe, doInitializeTokenExCardOnlyIframe, doInitializeTokenExIframe, TokenExIframe, MerchantIdOrCheckoutJwt } from '../common';
1
+ import { doInitializeCvvOnlyTokenExIframe, doInitializeTokenExCardOnlyIframe, doInitializeTokenExIframe, MerchantIdOrCheckoutJwt, TokenExIframe } from '../common';
2
2
  import * as i0 from "@angular/core";
3
3
  export declare class CardFormService {
4
4
  loaded: boolean;
@@ -19,14 +19,15 @@ export interface IFrameMessageHandlers {
19
19
  onSuccess: OnSuccessMethod | undefined;
20
20
  onAuthDeclined: OnAuthDeclinedMethod | undefined;
21
21
  }
22
- declare enum IFrameMessageMethods {
22
+ export declare enum IFrameMessageMethods {
23
23
  SignMessage = "signMessage",
24
24
  SignTransaction = "signTransaction",
25
25
  SendTransaction = "sendTransaction",
26
26
  HeightChange = "heightChange",
27
27
  Success = "success",
28
28
  AuthDeclined = "authDeclined",
29
- Loaded = "loaded"
29
+ Loaded = "loaded",
30
+ AccountLinked = "accountLinked"
30
31
  }
31
32
  export declare function getWalletPubkey(input: Pick<CoinflowPurchaseProps, 'wallet' | 'blockchain'>): string | null | undefined;
32
33
  export declare function handleIFrameMessage(rawMessage: string, handlers: IFrameMessageHandlers, handleHeightChangeId: string | number): Promise<string> | void;
@@ -1,5 +1,9 @@
1
1
  import type { Connection, VersionedTransaction, PublicKey, Signer, Transaction } from '@solana/web3.js';
2
- import { Subtotal } from './Subtotal';
2
+ import { Currency, Subtotal } from './types/Subtotal';
3
+ import { GiftCardCartItem } from './types/giftCardCartItem';
4
+ import { nftCartItem } from './types/nftCartItem';
5
+ import { CryptoCartItem } from './types/cryptoCartItem';
6
+ import { MoneyTopUpCartItem } from './types/moneyTopUpCartItem';
3
7
  export declare enum SettlementType {
4
8
  Credits = "Credits",
5
9
  USDC = "USDC",
@@ -33,6 +37,10 @@ interface BaseCustomerInfo {
33
37
  ip?: string;
34
38
  lat?: string;
35
39
  lng?: string;
40
+ /**
41
+ * Date of birth in YYYY-MM-DD format
42
+ */
43
+ dob?: string;
36
44
  }
37
45
  export interface NameCustomerInfo extends BaseCustomerInfo {
38
46
  /**
@@ -52,7 +60,7 @@ export interface SplitNameCustomerInfo extends BaseCustomerInfo {
52
60
  }
53
61
  export type CustomerInfo = SplitNameCustomerInfo | NameCustomerInfo;
54
62
  /** Coinflow Types **/
55
- export type CoinflowBlockchain = 'solana' | 'near' | 'eth' | 'polygon' | 'base' | 'arbitrum' | 'user';
63
+ export type CoinflowBlockchain = 'solana' | 'eth' | 'polygon' | 'base' | 'arbitrum' | 'user';
56
64
  export type CoinflowEnvs = 'prod' | 'staging' | 'staging-live' | 'sandbox' | 'local';
57
65
  export interface CoinflowTypes {
58
66
  merchantId: string;
@@ -82,14 +90,6 @@ export interface SolanaWallet {
82
90
  sendTransaction: <T extends Transaction | VersionedTransaction>(transaction: T) => Promise<string>;
83
91
  signMessage?: (message: Uint8Array) => Promise<Uint8Array>;
84
92
  }
85
- export interface NearWallet {
86
- accountId: string;
87
- signAndSendTransaction: (transaction: unknown) => Promise<{
88
- transaction: {
89
- hash: string;
90
- };
91
- }>;
92
- }
93
93
  type AccessList = Array<{
94
94
  address: string;
95
95
  storageKeys: Array<string>;
@@ -127,10 +127,6 @@ export interface CoinflowSessionKeyHistoryProps extends CoinflowTypes {
127
127
  sessionKey: string;
128
128
  blockchain?: undefined;
129
129
  }
130
- export interface CoinflowNearHistoryProps extends CoinflowTypes {
131
- wallet: NearWallet;
132
- blockchain: 'near';
133
- }
134
130
  export interface CoinflowEvmHistoryProps extends CoinflowTypes {
135
131
  wallet: EthWallet;
136
132
  blockchain: 'eth' | 'polygon' | 'base' | 'arbitrum';
@@ -147,48 +143,17 @@ export interface CoinflowBaseHistoryProps extends CoinflowEvmHistoryProps {
147
143
  export interface CoinflowArbitrumHistoryProps extends CoinflowEvmHistoryProps {
148
144
  blockchain: 'arbitrum';
149
145
  }
150
- export type CoinflowHistoryProps = CoinflowSolanaHistoryProps | CoinflowNearHistoryProps | CoinflowPolygonHistoryProps | CoinflowEthHistoryProps | CoinflowBaseHistoryProps | CoinflowArbitrumHistoryProps | CoinflowSessionKeyHistoryProps;
151
- /** Transactions **/
152
- export type NearFtTransferCallAction = {
153
- methodName: 'ft_transfer_call';
154
- args: object;
155
- gas: string;
156
- deposit: string;
157
- };
146
+ export type CoinflowHistoryProps = CoinflowSolanaHistoryProps | CoinflowPolygonHistoryProps | CoinflowEthHistoryProps | CoinflowBaseHistoryProps | CoinflowArbitrumHistoryProps | CoinflowSessionKeyHistoryProps;
158
147
  type Bytes = ArrayLike<number>;
159
148
  type BytesLike = Bytes | string;
160
- type RawProductData = any;
161
149
  /** Purchase **/
162
- export type ChargebackProtectionData = ChargebackProtectionItem[];
163
- export interface ChargebackProtectionItem {
164
- /**
165
- * The name of the product
166
- */
167
- productName: string;
168
- /**
169
- * The product type. Possible values include: inGameProduct, gameOfSkill, dataStorage, computingResources, sportsTicket, eSportsTicket, musicTicket, conferenceTicket, virtualSportsTicket, virtualESportsTicket, virtualMusicTicket, virtualConferenceTicket, alcohol, DLC, subscription, fundACause, realEstate, computingContract, digitalArt, topUp
170
- */
171
- productType: 'inGameProduct' | 'gameOfSkill' | 'dataStorage' | 'computingResources' | 'sportsTicket' | 'eSportsTicket' | 'musicTicket' | 'conferenceTicket' | 'virtualSportsTicket' | 'virtualESportsTicket' | 'virtualMusicTicket' | 'virtualConferenceTicket' | 'alcohol' | 'DLC' | 'subscription' | 'fundACause' | 'realEstate' | 'computingContract' | 'digitalArt' | 'topUp' | 'ownershipContract';
172
- /**
173
- * The item's list price
174
- */
175
- /**
176
- * The number of units sold
177
- */
178
- quantity: number;
179
- /**
180
- * Any additional data that the store can provide on the product, e.g. description, link to image, etc.
181
- */
182
- rawProductData?: RawProductData;
183
- seller?: {
184
- dob: string;
185
- firstName: string;
186
- lastName: string;
187
- email: string;
188
- id: string;
189
- rawSellerData: RawProductData;
190
- };
191
- }
150
+ export type CartClassOmitted = CartItemClassOmitted[];
151
+ export type ChargebackProtectionData = CartClassOmitted;
152
+ export type CartItemClassOmitted = NftCartItemClassOmitted | Omit<GiftCardCartItem, 'listPrice'> | CryptoCartItem | MoneyTopUpCartItem;
153
+ export type ChargebackProtectionItem = CartItemClassOmitted;
154
+ export type NftCartItemClassOmitted = Omit<nftCartItem, 'listPrice' | 'sellingPrice' | 'itemClass'>;
155
+ export type Cart = CartItem[];
156
+ export type CartItem = Omit<nftCartItem, 'listPrice' | 'sellingPrice'> | Omit<GiftCardCartItem, 'listPrice'> | CryptoCartItem | MoneyTopUpCartItem;
192
157
  export declare enum ThreeDsChallengePreference {
193
158
  NoPreference = "NoPreference",
194
159
  Frictionless = "Frictionless",
@@ -208,6 +173,7 @@ export declare enum PaymentMethods {
208
173
  }
209
174
  export interface CoinflowCommonPurchaseProps extends CoinflowTypes {
210
175
  subtotal?: Subtotal;
176
+ presentment?: Currency;
211
177
  onSuccess?: OnSuccessMethod;
212
178
  onAuthDeclined?: OnAuthDeclinedMethod;
213
179
  webhookInfo?: {
@@ -266,12 +232,6 @@ export interface CoinflowSessionKeyPurchaseProps extends CoinflowCommonPurchaseP
266
232
  wallet?: undefined;
267
233
  blockchain?: CoinflowBlockchain | undefined;
268
234
  }
269
- export interface CoinflowNearPurchaseProps extends CoinflowCommonPurchaseProps {
270
- wallet: NearWallet;
271
- blockchain: 'near';
272
- action?: NearFtTransferCallAction;
273
- nearDeposit?: string;
274
- }
275
235
  export interface CoinflowEvmPurchaseProps extends CoinflowCommonPurchaseProps {
276
236
  transaction?: EvmTransactionData;
277
237
  wallet: EthWallet;
@@ -288,7 +248,7 @@ export interface CoinflowBasePurchaseProps extends CoinflowEvmPurchaseProps {
288
248
  export interface CoinflowArbitrumPurchaseProps extends CoinflowEvmPurchaseProps {
289
249
  blockchain: 'arbitrum';
290
250
  }
291
- export type CoinflowPurchaseProps = CoinflowSolanaPurchaseProps | CoinflowSessionKeyPurchaseProps | CoinflowNearPurchaseProps | CoinflowPolygonPurchaseProps | CoinflowEthPurchaseProps | CoinflowBasePurchaseProps | CoinflowArbitrumPurchaseProps;
251
+ export type CoinflowPurchaseProps = CoinflowSolanaPurchaseProps | CoinflowSessionKeyPurchaseProps | CoinflowPolygonPurchaseProps | CoinflowEthPurchaseProps | CoinflowBasePurchaseProps | CoinflowArbitrumPurchaseProps;
292
252
  /** Withdraw **/
293
253
  export interface CoinflowCommonWithdrawProps extends CoinflowTypes {
294
254
  onSuccess?: OnSuccessMethod;
@@ -299,7 +259,7 @@ export interface CoinflowCommonWithdrawProps extends CoinflowTypes {
299
259
  bankAccountLinkRedirect?: string;
300
260
  additionalWallets?: {
301
261
  wallet: string;
302
- blockchain: 'solana' | 'eth' | 'near' | 'polygon' | 'base' | 'arbitrum';
262
+ blockchain: 'solana' | 'eth' | 'polygon' | 'base' | 'arbitrum';
303
263
  }[];
304
264
  lockAmount?: boolean;
305
265
  transactionSigner?: string;
@@ -317,18 +277,13 @@ export interface CoinflowCommonWithdrawProps extends CoinflowTypes {
317
277
  */
318
278
  sessionKey?: string;
319
279
  }
320
- export type WalletTypes = SolanaWallet | NearWallet | EthWallet;
280
+ export type WalletTypes = SolanaWallet | EthWallet;
321
281
  export interface SolanaWalletProps {
322
282
  wallet: SolanaWallet;
323
283
  connection: Connection;
324
284
  blockchain: 'solana';
325
285
  }
326
286
  export type CoinflowSolanaWithdrawProps = CoinflowCommonWithdrawProps & SolanaWalletProps;
327
- export interface NearWalletProps {
328
- wallet: NearWallet;
329
- blockchain: 'near';
330
- }
331
- export type CoinflowNearWithdrawProps = CoinflowCommonWithdrawProps & NearWalletProps;
332
287
  interface EvmWalletProps {
333
288
  wallet: EthWallet;
334
289
  usePermit?: boolean;
@@ -350,8 +305,13 @@ export interface ArbitrumWalletProps {
350
305
  blockchain: 'arbitrum';
351
306
  }
352
307
  export type CoinflowArbitrumWithdrawProps = CoinflowEvmWithdrawProps & ArbitrumWalletProps;
353
- export type CoinflowWithdrawProps = CoinflowSolanaWithdrawProps | CoinflowNearWithdrawProps | CoinflowEthWithdrawProps | CoinflowPolygonWithdrawProps | CoinflowBaseWithdrawProps | CoinflowArbitrumWithdrawProps;
308
+ export type CoinflowWithdrawProps = CoinflowSolanaWithdrawProps | CoinflowEthWithdrawProps | CoinflowPolygonWithdrawProps | CoinflowBaseWithdrawProps | CoinflowArbitrumWithdrawProps;
354
309
  export interface CommonEvmRedeem {
310
+ /**
311
+ * Whether the UI should wait
312
+ * for the transaction to be sent and
313
+ * the hash to be returned.
314
+ */
355
315
  waitForHash?: boolean;
356
316
  }
357
317
  export interface NormalRedeem extends CommonEvmRedeem {
@@ -361,7 +321,14 @@ export interface NormalRedeem extends CommonEvmRedeem {
361
321
  };
362
322
  }
363
323
  export interface KnownTokenIdRedeem extends NormalRedeem {
324
+ /**
325
+ * @minLength 42 Please provide a valid EVM Public Key (42 Characters Long)
326
+ * @maxLength 42 Please provide a valid EVM Public Key (42 Characters Long)
327
+ */
364
328
  nftContract: string;
329
+ /**
330
+ * @minLength 1 Please provide a valid Nft Id
331
+ */
365
332
  nftId: string;
366
333
  }
367
334
  export interface SafeMintRedeem extends NormalRedeem {
@@ -372,30 +339,73 @@ export interface ReturnedTokenIdRedeem extends NormalRedeem {
372
339
  type: 'returned';
373
340
  nftContract?: string;
374
341
  }
375
- type ReservoirNftIdItem = Omit<KnownTokenIdRedeem, keyof NormalRedeem>;
376
- interface ReservoirOrderIdItem {
342
+ /** @deprecated Reservoir decided to sunset Reservoir NFT, including their API and associated services, effective October 15, 2025. */
343
+ export type ReservoirNftIdItem = Omit<KnownTokenIdRedeem, keyof NormalRedeem>;
344
+ /** @deprecated Reservoir decided to sunset Reservoir NFT, including their API and associated services, effective October 15, 2025. */
345
+ export interface ReservoirOrderIdItem {
346
+ /** @deprecated Reservoir decided to sunset Reservoir NFT, including their API and associated services, effective October 15, 2025. */
377
347
  orderId: string;
378
348
  }
379
- type ReservoirItem = ReservoirNftIdItem | ReservoirOrderIdItem;
380
- type ReservoirItems = ReservoirItem | ReservoirItem[];
349
+ /** @deprecated Reservoir decided to sunset Reservoir NFT, including their API and associated services, effective October 15, 2025. */
350
+ export type ReservoirItem = ReservoirNftIdItem | ReservoirOrderIdItem;
351
+ /** @deprecated Reservoir decided to sunset Reservoir NFT, including their API and associated services, effective October 15, 2025. */
352
+ export type ReservoirItems = ReservoirItem | ReservoirItem[];
353
+ /** @deprecated Reservoir decided to sunset Reservoir NFT, including their API and associated services, effective October 15, 2025. */
381
354
  export interface ReservoirRedeem extends CommonEvmRedeem {
355
+ /** @deprecated Reservoir decided to sunset Reservoir NFT, including their API and associated services, effective October 15, 2025. */
382
356
  type: 'reservoir';
357
+ /** @deprecated Reservoir decided to sunset Reservoir NFT, including their API and associated services, effective October 15, 2025. */
383
358
  items: ReservoirItems;
359
+ /** @deprecated Reservoir decided to sunset Reservoir NFT, including their API and associated services, effective October 15, 2025. */
384
360
  taker?: string;
385
361
  }
362
+ /** @deprecated */
386
363
  export interface TokenRedeem extends CommonEvmRedeem {
364
+ /** @deprecated */
387
365
  type: 'token';
366
+ /** @deprecated */
388
367
  destination: string;
389
368
  }
390
- export type EvmTransactionData = SafeMintRedeem | ReturnedTokenIdRedeem | ReservoirRedeem | KnownTokenIdRedeem | NormalRedeem | TokenRedeem;
391
- export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId' | 'handleHeightChange'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'webhookInfo' | 'subtotal' | 'customerInfo' | 'settlementType' | 'email' | 'planCode' | 'deviceId' | 'jwtToken' | 'origins' | 'threeDsChallengePreference' | 'supportEmail' | 'allowedPaymentMethods'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets' | 'transactionSigner' | 'lockAmount' | 'lockDefaultToken' | 'origins'>, Pick<CoinflowEvmPurchaseProps, 'authOnly'>, Pick<CoinflowSolanaPurchaseProps, 'rent' | 'nativeSolToConvert' | 'destinationAuthKey'> {
369
+ export interface DecentRedeem extends CommonEvmRedeem {
370
+ type: 'decent';
371
+ /**
372
+ * ID of the destination chain you will be using
373
+ * Find your chain ID here: https://chainlist.org/
374
+ */
375
+ dstChainId: number;
376
+ /**
377
+ * Address on that chain of the token you will be receiving
378
+ */
379
+ dstToken: string;
380
+ /**
381
+ * The contract address which will be called on the destination chain
382
+ */
383
+ contractAddress: string;
384
+ contractData: string;
385
+ /**
386
+ * Amount of the token on the destination chain you will be receiving
387
+ */
388
+ cost: {
389
+ /**
390
+ * This is the raw amount of the token
391
+ * ex: 50000000000000n
392
+ */
393
+ amount: string;
394
+ /**
395
+ * Whether or not the token is the native token for the chain (ex: Ethereum - ETH, Polygon - POL).
396
+ * If native dstToken should be the 0 address (0x00...)
397
+ */
398
+ isNative: boolean;
399
+ };
400
+ }
401
+ export type EvmTransactionData = SafeMintRedeem | ReturnedTokenIdRedeem | KnownTokenIdRedeem | NormalRedeem | TokenRedeem | DecentRedeem | ReservoirRedeem;
402
+ export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId' | 'handleHeightChange'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'webhookInfo' | 'subtotal' | 'presentment' | 'customerInfo' | 'settlementType' | 'email' | 'planCode' | 'deviceId' | 'jwtToken' | 'origins' | 'threeDsChallengePreference' | 'supportEmail' | 'allowedPaymentMethods'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets' | 'transactionSigner' | 'lockAmount' | 'lockDefaultToken' | 'origins'>, Pick<CoinflowEvmPurchaseProps, 'authOnly'>, Pick<CoinflowSolanaPurchaseProps, 'rent' | 'nativeSolToConvert' | 'destinationAuthKey'> {
392
403
  walletPubkey: string | null | undefined;
393
404
  sessionKey?: string;
394
405
  route: string;
395
406
  routePrefix?: string;
396
407
  transaction?: string;
397
408
  tokens?: string[] | PublicKey[];
398
- nearDeposit?: string;
399
409
  merchantCss?: string;
400
410
  color?: 'white' | 'black';
401
411
  disableApplePay?: boolean;
@@ -6,11 +6,10 @@ export declare class CoinflowUtils {
6
6
  getNSurePartnerId(merchantId: string): Promise<string | undefined>;
7
7
  static getCoinflowBaseUrl(env?: CoinflowEnvs): string;
8
8
  static getCoinflowApiUrl(env?: CoinflowEnvs): string;
9
- static getCoinflowUrl({ walletPubkey, sessionKey, route, routePrefix, env, subtotal, transaction, blockchain, webhookInfo, email, loaderBackground, handleHeightChangeId, bankAccountLinkRedirect, additionalWallets, nearDeposit, chargebackProtectionData, merchantCss, color, rent, lockDefaultToken, tokens, planCode, disableApplePay, disableGooglePay, customerInfo, settlementType, lockAmount, nativeSolToConvert, theme, usePermit, transactionSigner, authOnly, deviceId, jwtToken, origins, threeDsChallengePreference, supportEmail, destinationAuthKey, allowedPaymentMethods, }: CoinflowIFrameProps): string;
9
+ static getCoinflowUrl({ walletPubkey, sessionKey, route, routePrefix, env, subtotal, presentment, transaction, blockchain, webhookInfo, email, loaderBackground, handleHeightChangeId, bankAccountLinkRedirect, additionalWallets, chargebackProtectionData, merchantCss, color, rent, lockDefaultToken, tokens, planCode, disableApplePay, disableGooglePay, customerInfo, settlementType, lockAmount, nativeSolToConvert, theme, usePermit, transactionSigner, authOnly, deviceId, jwtToken, origins, threeDsChallengePreference, supportEmail, destinationAuthKey, allowedPaymentMethods, }: CoinflowIFrameProps): string;
10
10
  static getTransaction(props: CoinflowPurchaseProps): string | undefined;
11
11
  static byBlockchain<T>(blockchain: CoinflowBlockchain, args: {
12
12
  solana: T;
13
- near: T;
14
13
  eth: T;
15
14
  polygon: T;
16
15
  base: T;
@@ -1,5 +1,5 @@
1
1
  import { CardType, CoinflowEnvs } from '../CoinflowTypes';
2
- import { CSSProperties } from 'react';
2
+ import type { CSSProperties } from 'react';
3
3
  export declare const TokenExCardNumberIframeId = "tokenExCardNumber";
4
4
  export declare const TokenExCvvContainerID = "tokenExCardCvv";
5
5
  export interface TokenExIframe extends ReturnType<typeof TokenEx.Iframe> {
@@ -3,4 +3,8 @@ export * from './CoinflowUtils';
3
3
  export * from './CoinflowLibMessageHandlers';
4
4
  export * from './card-form/TokenEx';
5
5
  export * from './card-form/tokenexHelpers';
6
- export * from './Subtotal';
6
+ export * from './types/Subtotal';
7
+ export * from './types/AnyObject';
8
+ export * from './types/giftCardCartItem';
9
+ export * from './types/nftCartItem';
10
+ export * from './types/cryptoCartItem';
@@ -0,0 +1,5 @@
1
+ export type AnyObject = {
2
+ [key: string]: any;
3
+ } & {
4
+ example?: string;
5
+ };
@@ -0,0 +1,163 @@
1
+ /**
2
+ * Address structure
3
+ */
4
+ export interface CartItemAddress {
5
+ /**
6
+ * Country code specified as a two letter code according to ISO 3166 Alpha-2
7
+ * Between 2 and 2 characters
8
+ * Example: US
9
+ * Pattern: ^[A-Z]{2}$
10
+ */
11
+ country?: string;
12
+ /**
13
+ * The state or province
14
+ * Example: PA
15
+ */
16
+ state?: string;
17
+ /**
18
+ * The city or locality
19
+ * Example: Pittsburgh
20
+ */
21
+ city?: string;
22
+ /**
23
+ * The street name
24
+ * Example: Baker St
25
+ */
26
+ street?: string;
27
+ /**
28
+ * The address postal code
29
+ */
30
+ postalCode?: string;
31
+ }
32
+ /**
33
+ * Phone information structure
34
+ */
35
+ export interface PhoneInfo {
36
+ /**
37
+ * The mobile carrier
38
+ * Example: T-Mobile
39
+ */
40
+ carrier?: string;
41
+ /**
42
+ * The country code (leading `+` is optional)
43
+ * Example: 42
44
+ * Pattern: ^\+?[0-9]+$
45
+ */
46
+ countryCode: string;
47
+ /**
48
+ * The phone number without the country code or hyphens
49
+ * Example: 2025550169
50
+ * Pattern: ^[0-9]+$
51
+ */
52
+ phone: string;
53
+ }
54
+ /**
55
+ * Common currency amount structure
56
+ */
57
+ export interface CurrencyAmount {
58
+ /**
59
+ * The amount in the currency, which is specified in the `currency` property
60
+ * Example: 90
61
+ */
62
+ valueInCurrency: number;
63
+ /**
64
+ * Currency specified as a three letter code according to ISO 4217
65
+ * Example: USD
66
+ */
67
+ currency: string;
68
+ }
69
+ export interface RecipientInfo {
70
+ /**
71
+ * The ID of the account that will receive the purchased goods
72
+ */
73
+ accountId?: string;
74
+ /**
75
+ * Date of birth, formatted as YYYY-MM-DD. If only the year is known, use YYYY
76
+ * Pattern: ^\d{4}(-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01]))?$
77
+ */
78
+ dob?: string;
79
+ /**
80
+ * Email
81
+ * Example: lois.lane@dailyplanet.com
82
+ */
83
+ email?: string | null;
84
+ /**
85
+ * First name
86
+ * Example: Lois
87
+ */
88
+ firstName?: string;
89
+ /**
90
+ * Gender
91
+ * Example: female
92
+ */
93
+ gender?: string;
94
+ /**
95
+ * Last name
96
+ * Example: Lois
97
+ */
98
+ lastName?: string;
99
+ /**
100
+ * The message that the recipient will receive
101
+ */
102
+ message?: string;
103
+ /**
104
+ * A phone number descriptor
105
+ */
106
+ phoneInfo?: PhoneInfo;
107
+ /**
108
+ * Shipping address
109
+ */
110
+ shippingAddress?: CartItemAddress;
111
+ /**
112
+ * The crypto wallet that will receive the funds
113
+ */
114
+ wallet?: {
115
+ /**
116
+ * The crypto wallet address that will receive the funds
117
+ */
118
+ address: string;
119
+ /**
120
+ * The blockchain on which the transaction was made
121
+ * Example: BTC
122
+ * Pattern: ^[A-Z0-9-]+$
123
+ */
124
+ blockchain: string;
125
+ /**
126
+ * The type of the wallet
127
+ * Allowed values: custodial, nonCustodial, unknown
128
+ * Example: custodial
129
+ */
130
+ custodialType: 'custodial' | 'nonCustodial' | 'unknown';
131
+ };
132
+ }
133
+ export interface SellerInfo {
134
+ /**
135
+ * Id of the seller
136
+ */
137
+ id?: string;
138
+ /**
139
+ * Email
140
+ * Example: lois.lane@dailyplanet.com
141
+ */
142
+ email?: string | null;
143
+ /**
144
+ * First name
145
+ * Example: Lois
146
+ */
147
+ firstName?: string;
148
+ /**
149
+ * Last name
150
+ * Example: Lois
151
+ */
152
+ lastName?: string;
153
+ /**
154
+ * Date of birth, formatted as YYYY-MM-DD. If only the year is known, use YYYY
155
+ * Pattern: ^\d{4}(-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01]))?$
156
+ */
157
+ dob?: string;
158
+ /**
159
+ * Additional raw data about the seller
160
+ * Example: {"FeedbackCount":100,"FeedbackScore":99.5,"FirstSeenTimestamp":1731841819965,"LatestWithdrawal":3263,"OrderCount":101,"DisputeCount":2}
161
+ */
162
+ rawSellerData?: Record<string, any>;
163
+ }
@@ -0,0 +1,172 @@
1
+ export declare enum Currency {
2
+ USD = "USD",
3
+ AED = "AED",
4
+ AFN = "AFN",
5
+ ALL = "ALL",
6
+ ANG = "ANG",
7
+ AOA = "AOA",
8
+ AUD = "AUD",
9
+ AWG = "AWG",
10
+ AZN = "AZN",
11
+ BAM = "BAM",
12
+ BBD = "BBD",
13
+ BDT = "BDT",
14
+ BGN = "BGN",
15
+ BHD = "BHD",
16
+ BIF = "BIF",
17
+ BND = "BND",
18
+ BOB = "BOB",
19
+ BRL = "BRL",
20
+ BTN = "BTN",
21
+ BWP = "BWP",
22
+ BZD = "BZD",
23
+ CAD = "CAD",
24
+ CHF = "CHF",
25
+ CLP = "CLP",
26
+ CNY = "CNY",
27
+ COP = "COP",
28
+ CRC = "CRC",
29
+ CVE = "CVE",
30
+ CZK = "CZK",
31
+ DJF = "DJF",
32
+ DKK = "DKK",
33
+ DOP = "DOP",
34
+ DZD = "DZD",
35
+ EGP = "EGP",
36
+ ETB = "ETB",
37
+ EUR = "EUR",
38
+ GBP = "GBP",
39
+ GEL = "GEL",
40
+ GHS = "GHS",
41
+ GMD = "GMD",
42
+ GNF = "GNF",
43
+ GTQ = "GTQ",
44
+ GYD = "GYD",
45
+ HKD = "HKD",
46
+ HNL = "HNL",
47
+ HTG = "HTG",
48
+ HUF = "HUF",
49
+ IDR = "IDR",
50
+ INR = "INR",
51
+ IQD = "IQD",
52
+ IRR = "IRR",
53
+ ISK = "ISK",
54
+ JMD = "JMD",
55
+ JOD = "JOD",
56
+ JPY = "JPY",
57
+ KES = "KES",
58
+ KGS = "KGS",
59
+ KHR = "KHR",
60
+ KMF = "KMF",
61
+ KRW = "KRW",
62
+ KWD = "KWD",
63
+ KYD = "KYD",
64
+ KZT = "KZT",
65
+ LKR = "LKR",
66
+ LRD = "LRD",
67
+ LSL = "LSL",
68
+ LYD = "LYD",
69
+ MAD = "MAD",
70
+ MDL = "MDL",
71
+ MGA = "MGA",
72
+ MKD = "MKD",
73
+ MMK = "MMK",
74
+ MNT = "MNT",
75
+ MOP = "MOP",
76
+ MRU = "MRU",
77
+ MUR = "MUR",
78
+ MVR = "MVR",
79
+ MXN = "MXN",
80
+ MYR = "MYR",
81
+ NAD = "NAD",
82
+ NGN = "NGN",
83
+ NIO = "NIO",
84
+ NOK = "NOK",
85
+ NPR = "NPR",
86
+ NZD = "NZD",
87
+ OMR = "OMR",
88
+ PAB = "PAB",
89
+ PEN = "PEN",
90
+ PHP = "PHP",
91
+ PKR = "PKR",
92
+ PLN = "PLN",
93
+ PYG = "PYG",
94
+ QAR = "QAR",
95
+ RON = "RON",
96
+ RSD = "RSD",
97
+ RWF = "RWF",
98
+ SAR = "SAR",
99
+ SCR = "SCR",
100
+ SDG = "SDG",
101
+ SEK = "SEK",
102
+ SGD = "SGD",
103
+ SLE = "SLE",
104
+ SLL = "SLL",
105
+ SOS = "SOS",
106
+ STN = "STN",
107
+ SVC = "SVC",
108
+ SYP = "SYP",
109
+ SZL = "SZL",
110
+ THB = "THB",
111
+ TJS = "TJS",
112
+ TMT = "TMT",
113
+ TND = "TND",
114
+ TRY = "TRY",
115
+ TTD = "TTD",
116
+ TWD = "TWD",
117
+ TZS = "TZS",
118
+ UAH = "UAH",
119
+ UGX = "UGX",
120
+ UYU = "UYU",
121
+ UZS = "UZS",
122
+ VND = "VND",
123
+ XAF = "XAF",
124
+ XCD = "XCD",
125
+ XOF = "XOF",
126
+ XPF = "XPF",
127
+ YER = "YER",
128
+ ZAR = "ZAR",
129
+ ZMW = "ZMW"
130
+ }
131
+ export declare const CurrencyToISO4217: Record<Currency, string>;
132
+ export type WithdrawCurrency = Currency.USD | Currency.EUR | Currency.GBP | Currency.BRL | Currency.CAD;
133
+ export declare const WithdrawCurrencies: {
134
+ readonly USD: Currency.USD;
135
+ readonly EUR: Currency.EUR;
136
+ readonly GBP: Currency.GBP;
137
+ readonly BRL: Currency.BRL;
138
+ readonly CAD: Currency.CAD;
139
+ };
140
+ export declare function isWithdrawCurrency(currency: Currency): currency is WithdrawCurrency;
141
+ export interface Cents {
142
+ /**
143
+ * @isInt Cents must be an integer
144
+ * @minimum 0 Minimum Cents is 0
145
+ */
146
+ cents: number;
147
+ }
148
+ export interface CurrencyCents extends Cents {
149
+ currency: Currency;
150
+ }
151
+ export interface TypedCurrencyCents<T extends Currency> extends Cents {
152
+ currency: T;
153
+ }
154
+ export declare function isTypedCurrencyCents<T extends Currency>(cents: CurrencyCents, currency: T): cents is TypedCurrencyCents<T>;
155
+ export interface TokenSubtotal {
156
+ /**
157
+ * The tokens address
158
+ *
159
+ * Solana - Token Mint Address
160
+ * Evm - Token Contract Address
161
+ */
162
+ address: string;
163
+ /**
164
+ * Number of tokens
165
+ */
166
+ amount: number | string;
167
+ /**
168
+ * Number of decimals for the token
169
+ */
170
+ decimals?: number;
171
+ }
172
+ export type Subtotal = CurrencyCents | Cents | TokenSubtotal;