@coinflowlabs/vue 1.0.7 → 1.2.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.
@@ -23,6 +23,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
23
23
  lamports: string | number;
24
24
  };
25
25
  subtotal?: import('../lib/common').Subtotal;
26
+ presentment?: import('../lib/common').Currency;
26
27
  onSuccess?: import('../lib/common').OnSuccessMethod;
27
28
  onAuthDeclined?: import('../lib/common').OnAuthDeclinedMethod;
28
29
  webhookInfo?: {
@@ -54,6 +55,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
54
55
  wallet?: undefined;
55
56
  blockchain?: import('../lib/common').CoinflowBlockchain | undefined;
56
57
  subtotal?: import('../lib/common').Subtotal;
58
+ presentment?: import('../lib/common').Currency;
57
59
  onSuccess?: import('../lib/common').OnSuccessMethod;
58
60
  onAuthDeclined?: import('../lib/common').OnAuthDeclinedMethod;
59
61
  webhookInfo?: {
@@ -86,6 +88,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
86
88
  action?: import('../lib/common').NearFtTransferCallAction;
87
89
  nearDeposit?: string;
88
90
  subtotal?: import('../lib/common').Subtotal;
91
+ presentment?: import('../lib/common').Currency;
89
92
  onSuccess?: import('../lib/common').OnSuccessMethod;
90
93
  onAuthDeclined?: import('../lib/common').OnAuthDeclinedMethod;
91
94
  webhookInfo?: {
@@ -116,6 +119,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
116
119
  blockchain: "polygon";
117
120
  wallet: import('../lib/common').EthWallet;
118
121
  subtotal?: import('../lib/common').Subtotal;
122
+ presentment?: import('../lib/common').Currency;
119
123
  onSuccess?: import('../lib/common').OnSuccessMethod;
120
124
  onAuthDeclined?: import('../lib/common').OnAuthDeclinedMethod;
121
125
  webhookInfo?: {
@@ -146,6 +150,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
146
150
  blockchain: "eth";
147
151
  wallet: import('../lib/common').EthWallet;
148
152
  subtotal?: import('../lib/common').Subtotal;
153
+ presentment?: import('../lib/common').Currency;
149
154
  onSuccess?: import('../lib/common').OnSuccessMethod;
150
155
  onAuthDeclined?: import('../lib/common').OnAuthDeclinedMethod;
151
156
  webhookInfo?: {
@@ -176,6 +181,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
176
181
  blockchain: "base";
177
182
  wallet: import('../lib/common').EthWallet;
178
183
  subtotal?: import('../lib/common').Subtotal;
184
+ presentment?: import('../lib/common').Currency;
179
185
  onSuccess?: import('../lib/common').OnSuccessMethod;
180
186
  onAuthDeclined?: import('../lib/common').OnAuthDeclinedMethod;
181
187
  webhookInfo?: {
@@ -206,6 +212,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
206
212
  blockchain: "arbitrum";
207
213
  wallet: import('../lib/common').EthWallet;
208
214
  subtotal?: import('../lib/common').Subtotal;
215
+ presentment?: import('../lib/common').Currency;
209
216
  onSuccess?: import('../lib/common').OnSuccessMethod;
210
217
  onAuthDeclined?: import('../lib/common').OnAuthDeclinedMethod;
211
218
  webhookInfo?: {
@@ -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 { 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
  /**
@@ -157,38 +165,14 @@ export type NearFtTransferCallAction = {
157
165
  };
158
166
  type Bytes = ArrayLike<number>;
159
167
  type BytesLike = Bytes | string;
160
- type RawProductData = any;
161
168
  /** 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
- }
169
+ export type CartClassOmitted = CartItemClassOmitted[];
170
+ export type ChargebackProtectionData = CartClassOmitted;
171
+ export type CartItemClassOmitted = NftCartItemClassOmitted | Omit<GiftCardCartItem, 'listPrice'> | CryptoCartItem | MoneyTopUpCartItem;
172
+ export type ChargebackProtectionItem = CartItemClassOmitted;
173
+ export type NftCartItemClassOmitted = Omit<nftCartItem, 'listPrice' | 'sellingPrice' | 'itemClass'>;
174
+ export type Cart = CartItem[];
175
+ export type CartItem = Omit<nftCartItem, 'listPrice' | 'sellingPrice'> | Omit<GiftCardCartItem, 'listPrice'> | CryptoCartItem | MoneyTopUpCartItem;
192
176
  export declare enum ThreeDsChallengePreference {
193
177
  NoPreference = "NoPreference",
194
178
  Frictionless = "Frictionless",
@@ -208,6 +192,7 @@ export declare enum PaymentMethods {
208
192
  }
209
193
  export interface CoinflowCommonPurchaseProps extends CoinflowTypes {
210
194
  subtotal?: Subtotal;
195
+ presentment?: Currency;
211
196
  onSuccess?: OnSuccessMethod;
212
197
  onAuthDeclined?: OnAuthDeclinedMethod;
213
198
  webhookInfo?: {
@@ -352,6 +337,11 @@ export interface ArbitrumWalletProps {
352
337
  export type CoinflowArbitrumWithdrawProps = CoinflowEvmWithdrawProps & ArbitrumWalletProps;
353
338
  export type CoinflowWithdrawProps = CoinflowSolanaWithdrawProps | CoinflowNearWithdrawProps | CoinflowEthWithdrawProps | CoinflowPolygonWithdrawProps | CoinflowBaseWithdrawProps | CoinflowArbitrumWithdrawProps;
354
339
  export interface CommonEvmRedeem {
340
+ /**
341
+ * Whether the UI should wait
342
+ * for the transaction to be sent and
343
+ * the hash to be returned.
344
+ */
355
345
  waitForHash?: boolean;
356
346
  }
357
347
  export interface NormalRedeem extends CommonEvmRedeem {
@@ -361,7 +351,14 @@ export interface NormalRedeem extends CommonEvmRedeem {
361
351
  };
362
352
  }
363
353
  export interface KnownTokenIdRedeem extends NormalRedeem {
354
+ /**
355
+ * @minLength 42 Please provide a valid EVM Public Key (42 Characters Long)
356
+ * @maxLength 42 Please provide a valid EVM Public Key (42 Characters Long)
357
+ */
364
358
  nftContract: string;
359
+ /**
360
+ * @minLength 1 Please provide a valid Nft Id
361
+ */
365
362
  nftId: string;
366
363
  }
367
364
  export interface SafeMintRedeem extends NormalRedeem {
@@ -372,12 +369,12 @@ export interface ReturnedTokenIdRedeem extends NormalRedeem {
372
369
  type: 'returned';
373
370
  nftContract?: string;
374
371
  }
375
- type ReservoirNftIdItem = Omit<KnownTokenIdRedeem, keyof NormalRedeem>;
376
- interface ReservoirOrderIdItem {
372
+ export type ReservoirNftIdItem = Omit<KnownTokenIdRedeem, keyof NormalRedeem>;
373
+ export interface ReservoirOrderIdItem {
377
374
  orderId: string;
378
375
  }
379
- type ReservoirItem = ReservoirNftIdItem | ReservoirOrderIdItem;
380
- type ReservoirItems = ReservoirItem | ReservoirItem[];
376
+ export type ReservoirItem = ReservoirNftIdItem | ReservoirOrderIdItem;
377
+ export type ReservoirItems = ReservoirItem | ReservoirItem[];
381
378
  export interface ReservoirRedeem extends CommonEvmRedeem {
382
379
  type: 'reservoir';
383
380
  items: ReservoirItems;
@@ -387,8 +384,40 @@ export interface TokenRedeem extends CommonEvmRedeem {
387
384
  type: 'token';
388
385
  destination: string;
389
386
  }
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'> {
387
+ export interface DecentRedeem extends CommonEvmRedeem {
388
+ type: 'decent';
389
+ /**
390
+ * ID of the destination chain you will be using
391
+ * Find your chain ID here: https://chainlist.org/
392
+ */
393
+ dstChainId: number;
394
+ /**
395
+ * Address on that chain of the token you will be receiving
396
+ */
397
+ dstToken: string;
398
+ /**
399
+ * The contract address which will be called on the destination chain
400
+ */
401
+ contractAddress: string;
402
+ contractData: string;
403
+ /**
404
+ * Amount of the token on the destination chain you will be receiving
405
+ */
406
+ cost: {
407
+ /**
408
+ * This is the raw amount of the token
409
+ * ex: 50000000000000n
410
+ */
411
+ amount: string;
412
+ /**
413
+ * Whether or not the token is the native token for the chain (ex: Ethereum - ETH, Polygon - POL).
414
+ * If native dstToken should be the 0 address (0x00...)
415
+ */
416
+ isNative: boolean;
417
+ };
418
+ }
419
+ export type EvmTransactionData = SafeMintRedeem | ReturnedTokenIdRedeem | ReservoirRedeem | KnownTokenIdRedeem | NormalRedeem | TokenRedeem | DecentRedeem;
420
+ 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
421
  walletPubkey: string | null | undefined;
393
422
  sessionKey?: string;
394
423
  route: string;
@@ -6,7 +6,7 @@ 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, 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;
10
10
  static getTransaction(props: CoinflowPurchaseProps): string | undefined;
11
11
  static byBlockchain<T>(blockchain: CoinflowBlockchain, args: {
12
12
  solana: T;
@@ -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 Address {
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?: Address;
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,173 @@
1
+ export declare enum Currency {
2
+ AED = "AED",
3
+ AFN = "AFN",
4
+ ALL = "ALL",
5
+ ANG = "ANG",
6
+ AOA = "AOA",
7
+ AUD = "AUD",
8
+ AWG = "AWG",
9
+ AZN = "AZN",
10
+ BAM = "BAM",
11
+ BBD = "BBD",
12
+ BDT = "BDT",
13
+ BGN = "BGN",
14
+ BHD = "BHD",
15
+ BIF = "BIF",
16
+ BND = "BND",
17
+ BOB = "BOB",
18
+ BRL = "BRL",
19
+ BTN = "BTN",
20
+ BWP = "BWP",
21
+ BZD = "BZD",
22
+ CAD = "CAD",
23
+ CHF = "CHF",
24
+ CLP = "CLP",
25
+ CNY = "CNY",
26
+ COP = "COP",
27
+ CRC = "CRC",
28
+ CVE = "CVE",
29
+ CZK = "CZK",
30
+ DJF = "DJF",
31
+ DKK = "DKK",
32
+ DOP = "DOP",
33
+ DZD = "DZD",
34
+ EGP = "EGP",
35
+ ETB = "ETB",
36
+ EUR = "EUR",
37
+ GBP = "GBP",
38
+ GEL = "GEL",
39
+ GHS = "GHS",
40
+ GMD = "GMD",
41
+ GNF = "GNF",
42
+ GTQ = "GTQ",
43
+ GYD = "GYD",
44
+ HKD = "HKD",
45
+ HNL = "HNL",
46
+ HTG = "HTG",
47
+ HUF = "HUF",
48
+ IDR = "IDR",
49
+ INR = "INR",
50
+ IQD = "IQD",
51
+ IRR = "IRR",
52
+ ISK = "ISK",
53
+ JMD = "JMD",
54
+ JOD = "JOD",
55
+ JPY = "JPY",
56
+ KES = "KES",
57
+ KGS = "KGS",
58
+ KHR = "KHR",
59
+ KMF = "KMF",
60
+ KRW = "KRW",
61
+ KWD = "KWD",
62
+ KYD = "KYD",
63
+ KZT = "KZT",
64
+ LKR = "LKR",
65
+ LRD = "LRD",
66
+ LSL = "LSL",
67
+ LYD = "LYD",
68
+ MAD = "MAD",
69
+ MDL = "MDL",
70
+ MGA = "MGA",
71
+ MKD = "MKD",
72
+ MMK = "MMK",
73
+ MNT = "MNT",
74
+ MOP = "MOP",
75
+ MRU = "MRU",
76
+ MUR = "MUR",
77
+ MVR = "MVR",
78
+ MXN = "MXN",
79
+ MYR = "MYR",
80
+ NAD = "NAD",
81
+ NGN = "NGN",
82
+ NIO = "NIO",
83
+ NOK = "NOK",
84
+ NPR = "NPR",
85
+ NZD = "NZD",
86
+ OMR = "OMR",
87
+ PAB = "PAB",
88
+ PEN = "PEN",
89
+ PHP = "PHP",
90
+ PKR = "PKR",
91
+ PLN = "PLN",
92
+ PYG = "PYG",
93
+ QAR = "QAR",
94
+ RON = "RON",
95
+ RSD = "RSD",
96
+ RWF = "RWF",
97
+ SAR = "SAR",
98
+ SCR = "SCR",
99
+ SDG = "SDG",
100
+ SEK = "SEK",
101
+ SGD = "SGD",
102
+ SLE = "SLE",
103
+ SLL = "SLL",
104
+ SOS = "SOS",
105
+ STN = "STN",
106
+ SVC = "SVC",
107
+ SYP = "SYP",
108
+ SZL = "SZL",
109
+ THB = "THB",
110
+ TJS = "TJS",
111
+ TMT = "TMT",
112
+ TND = "TND",
113
+ TRY = "TRY",
114
+ TTD = "TTD",
115
+ TWD = "TWD",
116
+ TZS = "TZS",
117
+ UAH = "UAH",
118
+ UGX = "UGX",
119
+ USD = "USD",
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 type WithdrawCurrency = Currency.USD | Currency.EUR | Currency.GBP | Currency.BRL;
132
+ export declare const WithdrawCurrencies: {
133
+ readonly USD: Currency.USD;
134
+ readonly EUR: Currency.EUR;
135
+ readonly GBP: Currency.GBP;
136
+ readonly BRL: Currency.BRL;
137
+ };
138
+ export declare function isWithdrawCurrency(currency: Currency): currency is WithdrawCurrency;
139
+ export interface Cents {
140
+ /**
141
+ * @isInt Cents must be an integer
142
+ * @minimum 0 Minimum Cents is 0
143
+ */
144
+ cents: number;
145
+ }
146
+ export interface CurrencyCents extends Cents {
147
+ currency: Currency;
148
+ }
149
+ export interface TypedCurrencyCents<T extends Currency> extends Cents {
150
+ currency: T;
151
+ }
152
+ export declare function isTypedCurrencyCents<T extends Currency>(cents: CurrencyCents, currency: T): cents is TypedCurrencyCents<T>;
153
+ export interface TokenSubtotal {
154
+ /**
155
+ * The tokens address
156
+ *
157
+ * Solana - Token Mint Address
158
+ * Evm - Token Contract Address
159
+ */
160
+ address: string;
161
+ /**
162
+ * Number of tokens
163
+ */
164
+ amount: number | string;
165
+ /**
166
+ * Number of decimals for the token
167
+ */
168
+ decimals?: number;
169
+ }
170
+ export type Subtotal = CurrencyCents | Cents | TokenSubtotal;
171
+ export interface NearDeposit {
172
+ yocto: string;
173
+ }
@@ -0,0 +1,62 @@
1
+ import { RecipientInfo, SellerInfo } from './CartitemCommon';
2
+ /**
3
+ * Represents a crypto item in a shopping cart
4
+ */
5
+ export interface CryptoCartItem {
6
+ /**
7
+ * Denotes the cart item class. The item schema is chosen based on this value.
8
+ * Allowed value: crypto
9
+ * Example: crypto
10
+ */
11
+ itemClass: 'crypto';
12
+ /**
13
+ * The cart items's unique ID
14
+ * Example: 5de33332-546a-4171-8988-2a43d2bfe9c6
15
+ */
16
+ id?: string;
17
+ /**
18
+ * Any additional product data which can be provided, e.g. description, link to image, etc
19
+ * Example: {"any":"data","description":"This is the product description"}
20
+ */
21
+ rawProductData?: Record<string, any>;
22
+ /**
23
+ * The amount in the crypto currency which is specified in the `cryptoCurrency` property
24
+ * Example: 1.04112
25
+ * Pattern: ^[0-9]+(\.[0-9]+)?$
26
+ */
27
+ units: string;
28
+ /**
29
+ * The crypto-currency symbol (uppercase)
30
+ * Example: BTC
31
+ * Pattern: ^[A-Z0-9-]+$
32
+ */
33
+ cryptoCurrency: string;
34
+ /**
35
+ * The price per 1 unit
36
+ */
37
+ unitPrice: {
38
+ /**
39
+ * The amount in the currency, which is specified in the `currency` property
40
+ * Example: 90
41
+ */
42
+ valueInCurrency: number;
43
+ /**
44
+ * Currency specified as a three letter code according to ISO 4217
45
+ * Example: USD
46
+ */
47
+ currency: string;
48
+ };
49
+ /**
50
+ * The expected delay in delivery, in hours
51
+ * Min value: 0
52
+ */
53
+ expectedDeliveryDelay?: number;
54
+ /**
55
+ * The user's personal info
56
+ */
57
+ recipientInfo: RecipientInfo;
58
+ /**
59
+ * Seller info
60
+ */
61
+ seller?: SellerInfo;
62
+ }