@coinflowlabs/react 5.1.0 → 5.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.
Files changed (64) hide show
  1. package/build/cjs/common/CoinflowTypes.d.ts +65 -37
  2. package/build/cjs/common/CoinflowTypes.js.map +1 -1
  3. package/build/cjs/common/CoinflowUtils.js +1 -1
  4. package/build/cjs/common/CoinflowUtils.js.map +1 -1
  5. package/build/cjs/common/index.d.ts +5 -1
  6. package/build/cjs/common/index.js +5 -1
  7. package/build/cjs/common/index.js.map +1 -1
  8. package/build/cjs/common/types/AnyObject.d.ts +5 -0
  9. package/build/cjs/common/types/AnyObject.js +3 -0
  10. package/build/cjs/common/types/AnyObject.js.map +1 -0
  11. package/build/cjs/common/types/CartitemCommon.d.ts +163 -0
  12. package/build/cjs/common/types/CartitemCommon.js +3 -0
  13. package/build/cjs/common/types/CartitemCommon.js.map +1 -0
  14. package/build/cjs/common/types/Subtotal.d.ts +173 -0
  15. package/build/cjs/common/types/Subtotal.js +150 -0
  16. package/build/cjs/common/types/Subtotal.js.map +1 -0
  17. package/build/cjs/common/types/cryptoCartItem.d.ts +62 -0
  18. package/build/cjs/common/types/cryptoCartItem.js +3 -0
  19. package/build/cjs/common/types/cryptoCartItem.js.map +1 -0
  20. package/build/cjs/common/types/giftCardCartItem.d.ts +58 -0
  21. package/build/cjs/common/types/giftCardCartItem.js +3 -0
  22. package/build/cjs/common/types/giftCardCartItem.js.map +1 -0
  23. package/build/cjs/common/types/moneyTopUpCartItem.d.ts +44 -0
  24. package/build/cjs/common/types/moneyTopUpCartItem.js +3 -0
  25. package/build/cjs/common/types/moneyTopUpCartItem.js.map +1 -0
  26. package/build/cjs/common/types/nftCartItem.d.ts +99 -0
  27. package/build/cjs/common/types/nftCartItem.js +47 -0
  28. package/build/cjs/common/types/nftCartItem.js.map +1 -0
  29. package/build/esm/common/CoinflowTypes.d.ts +65 -37
  30. package/build/esm/common/CoinflowTypes.js.map +1 -1
  31. package/build/esm/common/CoinflowUtils.js +1 -1
  32. package/build/esm/common/CoinflowUtils.js.map +1 -1
  33. package/build/esm/common/index.d.ts +5 -1
  34. package/build/esm/common/index.js +5 -1
  35. package/build/esm/common/index.js.map +1 -1
  36. package/build/esm/common/types/AnyObject.d.ts +5 -0
  37. package/build/esm/common/types/AnyObject.js +2 -0
  38. package/build/esm/common/types/AnyObject.js.map +1 -0
  39. package/build/esm/common/types/CartitemCommon.d.ts +163 -0
  40. package/build/esm/common/types/CartitemCommon.js +2 -0
  41. package/build/esm/common/types/CartitemCommon.js.map +1 -0
  42. package/build/esm/common/types/Subtotal.d.ts +173 -0
  43. package/build/esm/common/types/Subtotal.js +145 -0
  44. package/build/esm/common/types/Subtotal.js.map +1 -0
  45. package/build/esm/common/types/cryptoCartItem.d.ts +62 -0
  46. package/build/esm/common/types/cryptoCartItem.js +2 -0
  47. package/build/esm/common/types/cryptoCartItem.js.map +1 -0
  48. package/build/esm/common/types/giftCardCartItem.d.ts +58 -0
  49. package/build/esm/common/types/giftCardCartItem.js +2 -0
  50. package/build/esm/common/types/giftCardCartItem.js.map +1 -0
  51. package/build/esm/common/types/moneyTopUpCartItem.d.ts +44 -0
  52. package/build/esm/common/types/moneyTopUpCartItem.js +2 -0
  53. package/build/esm/common/types/moneyTopUpCartItem.js.map +1 -0
  54. package/build/esm/common/types/nftCartItem.d.ts +99 -0
  55. package/build/esm/common/types/nftCartItem.js +44 -0
  56. package/build/esm/common/types/nftCartItem.js.map +1 -0
  57. package/build/tsconfig.tsbuildinfo +1 -1
  58. package/package.json +1 -1
  59. package/build/cjs/common/Subtotal.d.ts +0 -86
  60. package/build/cjs/common/Subtotal.js +0 -63
  61. package/build/cjs/common/Subtotal.js.map +0 -1
  62. package/build/esm/common/Subtotal.d.ts +0 -86
  63. package/build/esm/common/Subtotal.js +0 -59
  64. package/build/esm/common/Subtotal.js.map +0 -1
@@ -0,0 +1,150 @@
1
+ "use strict";
2
+ var _a;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.WithdrawCurrencies = exports.Currency = void 0;
5
+ exports.isWithdrawCurrency = isWithdrawCurrency;
6
+ exports.isTypedCurrencyCents = isTypedCurrencyCents;
7
+ var Currency;
8
+ (function (Currency) {
9
+ Currency["AED"] = "AED";
10
+ Currency["AFN"] = "AFN";
11
+ Currency["ALL"] = "ALL";
12
+ Currency["ANG"] = "ANG";
13
+ Currency["AOA"] = "AOA";
14
+ Currency["AUD"] = "AUD";
15
+ Currency["AWG"] = "AWG";
16
+ Currency["AZN"] = "AZN";
17
+ Currency["BAM"] = "BAM";
18
+ Currency["BBD"] = "BBD";
19
+ Currency["BDT"] = "BDT";
20
+ Currency["BGN"] = "BGN";
21
+ Currency["BHD"] = "BHD";
22
+ Currency["BIF"] = "BIF";
23
+ Currency["BND"] = "BND";
24
+ Currency["BOB"] = "BOB";
25
+ Currency["BRL"] = "BRL";
26
+ Currency["BTN"] = "BTN";
27
+ Currency["BWP"] = "BWP";
28
+ Currency["BZD"] = "BZD";
29
+ Currency["CAD"] = "CAD";
30
+ Currency["CHF"] = "CHF";
31
+ Currency["CLP"] = "CLP";
32
+ Currency["CNY"] = "CNY";
33
+ Currency["COP"] = "COP";
34
+ Currency["CRC"] = "CRC";
35
+ Currency["CVE"] = "CVE";
36
+ Currency["CZK"] = "CZK";
37
+ Currency["DJF"] = "DJF";
38
+ Currency["DKK"] = "DKK";
39
+ Currency["DOP"] = "DOP";
40
+ Currency["DZD"] = "DZD";
41
+ Currency["EGP"] = "EGP";
42
+ Currency["ETB"] = "ETB";
43
+ Currency["EUR"] = "EUR";
44
+ Currency["GBP"] = "GBP";
45
+ Currency["GEL"] = "GEL";
46
+ Currency["GHS"] = "GHS";
47
+ Currency["GMD"] = "GMD";
48
+ Currency["GNF"] = "GNF";
49
+ Currency["GTQ"] = "GTQ";
50
+ Currency["GYD"] = "GYD";
51
+ Currency["HKD"] = "HKD";
52
+ Currency["HNL"] = "HNL";
53
+ Currency["HTG"] = "HTG";
54
+ Currency["HUF"] = "HUF";
55
+ Currency["IDR"] = "IDR";
56
+ Currency["INR"] = "INR";
57
+ Currency["IQD"] = "IQD";
58
+ Currency["IRR"] = "IRR";
59
+ Currency["ISK"] = "ISK";
60
+ Currency["JMD"] = "JMD";
61
+ Currency["JOD"] = "JOD";
62
+ Currency["JPY"] = "JPY";
63
+ Currency["KES"] = "KES";
64
+ Currency["KGS"] = "KGS";
65
+ Currency["KHR"] = "KHR";
66
+ Currency["KMF"] = "KMF";
67
+ Currency["KRW"] = "KRW";
68
+ Currency["KWD"] = "KWD";
69
+ Currency["KYD"] = "KYD";
70
+ Currency["KZT"] = "KZT";
71
+ Currency["LKR"] = "LKR";
72
+ Currency["LRD"] = "LRD";
73
+ Currency["LSL"] = "LSL";
74
+ Currency["LYD"] = "LYD";
75
+ Currency["MAD"] = "MAD";
76
+ Currency["MDL"] = "MDL";
77
+ Currency["MGA"] = "MGA";
78
+ Currency["MKD"] = "MKD";
79
+ Currency["MMK"] = "MMK";
80
+ Currency["MNT"] = "MNT";
81
+ Currency["MOP"] = "MOP";
82
+ Currency["MRU"] = "MRU";
83
+ Currency["MUR"] = "MUR";
84
+ Currency["MVR"] = "MVR";
85
+ Currency["MXN"] = "MXN";
86
+ Currency["MYR"] = "MYR";
87
+ Currency["NAD"] = "NAD";
88
+ Currency["NGN"] = "NGN";
89
+ Currency["NIO"] = "NIO";
90
+ Currency["NOK"] = "NOK";
91
+ Currency["NPR"] = "NPR";
92
+ Currency["NZD"] = "NZD";
93
+ Currency["OMR"] = "OMR";
94
+ Currency["PAB"] = "PAB";
95
+ Currency["PEN"] = "PEN";
96
+ Currency["PHP"] = "PHP";
97
+ Currency["PKR"] = "PKR";
98
+ Currency["PLN"] = "PLN";
99
+ Currency["PYG"] = "PYG";
100
+ Currency["QAR"] = "QAR";
101
+ Currency["RON"] = "RON";
102
+ Currency["RSD"] = "RSD";
103
+ Currency["RWF"] = "RWF";
104
+ Currency["SAR"] = "SAR";
105
+ Currency["SCR"] = "SCR";
106
+ Currency["SDG"] = "SDG";
107
+ Currency["SEK"] = "SEK";
108
+ Currency["SGD"] = "SGD";
109
+ Currency["SLE"] = "SLE";
110
+ Currency["SLL"] = "SLL";
111
+ Currency["SOS"] = "SOS";
112
+ Currency["STN"] = "STN";
113
+ Currency["SVC"] = "SVC";
114
+ Currency["SYP"] = "SYP";
115
+ Currency["SZL"] = "SZL";
116
+ Currency["THB"] = "THB";
117
+ Currency["TJS"] = "TJS";
118
+ Currency["TMT"] = "TMT";
119
+ Currency["TND"] = "TND";
120
+ Currency["TRY"] = "TRY";
121
+ Currency["TTD"] = "TTD";
122
+ Currency["TWD"] = "TWD";
123
+ Currency["TZS"] = "TZS";
124
+ Currency["UAH"] = "UAH";
125
+ Currency["UGX"] = "UGX";
126
+ Currency["USD"] = "USD";
127
+ Currency["UYU"] = "UYU";
128
+ Currency["UZS"] = "UZS";
129
+ Currency["VND"] = "VND";
130
+ Currency["XAF"] = "XAF";
131
+ Currency["XCD"] = "XCD";
132
+ Currency["XOF"] = "XOF";
133
+ Currency["XPF"] = "XPF";
134
+ Currency["YER"] = "YER";
135
+ Currency["ZAR"] = "ZAR";
136
+ Currency["ZMW"] = "ZMW";
137
+ })(Currency || (exports.Currency = Currency = {}));
138
+ exports.WithdrawCurrencies = (_a = {},
139
+ _a[Currency.USD] = Currency.USD,
140
+ _a[Currency.EUR] = Currency.EUR,
141
+ _a[Currency.GBP] = Currency.GBP,
142
+ _a[Currency.BRL] = Currency.BRL,
143
+ _a);
144
+ function isWithdrawCurrency(currency) {
145
+ return currency in exports.WithdrawCurrencies;
146
+ }
147
+ function isTypedCurrencyCents(cents, currency) {
148
+ return cents.currency === currency;
149
+ }
150
+ //# sourceMappingURL=Subtotal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Subtotal.js","sourceRoot":"","sources":["../../../../src/common/types/Subtotal.ts"],"names":[],"mappings":";;;;AAgJA,gDAIC;AAkBD,oDAKC;AA3KD,IAAY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AAC,GAAG;IAC5B,GAAC,QAAQ,CAAC,GAAG,IAAG,QAAQ,CAAC,GAAG;IAC5B,GAAC,QAAQ,CAAC,GAAG,IAAG,QAAQ,CAAC,GAAG;IAC5B,GAAC,QAAQ,CAAC,GAAG,IAAG,QAAQ,CAAC,GAAG;MACpB,CAAA,CAAC;AAEX,SAAgB,kBAAkB,CAChC,QAAkB;IAElB,OAAO,QAAQ,IAAI,0BAAkB,CAAC;AACxC,CAAC;AAkBD,SAAgB,oBAAoB,CAClC,KAAoB,EACpB,QAAW;IAEX,OAAO,KAAK,CAAC,QAAQ,KAAK,QAAQ,CAAC;AACrC,CAAC"}
@@ -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
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=cryptoCartItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cryptoCartItem.js","sourceRoot":"","sources":["../../../../src/common/types/cryptoCartItem.ts"],"names":[],"mappings":""}
@@ -0,0 +1,58 @@
1
+ import { RecipientInfo, SellerInfo } from './CartitemCommon';
2
+ export interface GiftCardCartItem {
3
+ itemClass: 'giftCard';
4
+ productType: 'giftCard';
5
+ /**
6
+ * The cart items’s unique ID
7
+ */
8
+ id: string;
9
+ /**
10
+ * The number of units sold
11
+ */
12
+ quantity: number;
13
+ /**
14
+ * How the product was fulfilled.
15
+ */
16
+ itemFulfillment: 'digital' | 'physical';
17
+ sellingPrice: {
18
+ valueInCurrency: number;
19
+ currency: string;
20
+ };
21
+ /**
22
+ * Any additional product data which can be provided, e.g. description, link to image, etc
23
+ */
24
+ rawProductData?: Record<string, any>;
25
+ /**
26
+ * The stock-keeping unit (SKU) number
27
+ */
28
+ sku?: string;
29
+ /**
30
+ * The name of the brand
31
+ */
32
+ brand?: string;
33
+ /**
34
+ * The category in the site/app in which the item was classified (e.g., fashion)
35
+ */
36
+ categories?: string[];
37
+ listPrice?: {
38
+ valueInCurrency: number;
39
+ currency: string;
40
+ };
41
+ isGift?: boolean;
42
+ /**
43
+ * The user's personal info
44
+ */
45
+ recipientInfo?: RecipientInfo;
46
+ /**
47
+ * The item's selling price
48
+ */
49
+ seller?: SellerInfo;
50
+ /**
51
+ * The expected delay in delivery, in hours
52
+ */
53
+ expectedDeliveryDelay?: number;
54
+ /**
55
+ * Represents whether the item amount is taken from a preset list, e.g. 25, 50, 100, etc. or whether it was a different amount, e.g. 27
56
+ */
57
+ isPresetAmount?: boolean;
58
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=giftCardCartItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"giftCardCartItem.js","sourceRoot":"","sources":["../../../../src/common/types/giftCardCartItem.ts"],"names":[],"mappings":""}
@@ -0,0 +1,44 @@
1
+ import { CurrencyAmount, RecipientInfo } from './CartitemCommon';
2
+ /**
3
+ * Represents a money top-up item in a shopping cart
4
+ */
5
+ export interface MoneyTopUpCartItem {
6
+ /**
7
+ * Denotes the cart item class. The item schema is chosen based on this value.
8
+ * Allowed value: moneyTopUp
9
+ * Example: moneyTopUp
10
+ */
11
+ itemClass: 'moneyTopUp';
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 item's selling price
24
+ */
25
+ sellingPrice: CurrencyAmount;
26
+ /**
27
+ * The user's personal info
28
+ */
29
+ recipientInfo?: RecipientInfo;
30
+ /**
31
+ * The item's topUp amount
32
+ */
33
+ topUpAmount: CurrencyAmount;
34
+ /**
35
+ * Quantity
36
+ * Example: 2
37
+ */
38
+ quantity: number;
39
+ /**
40
+ * Represents whether the item amount is taken from a preset list, e.g. 25, 50, 100, etc.
41
+ * or whether it was a different amount, e.g. 27
42
+ */
43
+ isPresetAmount: boolean;
44
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=moneyTopUpCartItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"moneyTopUpCartItem.js","sourceRoot":"","sources":["../../../../src/common/types/moneyTopUpCartItem.ts"],"names":[],"mappings":""}
@@ -0,0 +1,99 @@
1
+ import { AnyObject } from './AnyObject';
2
+ /**
3
+ * An nft cart item
4
+ */
5
+ export type nftCartItem = {
6
+ /**
7
+ * Denotes the cart item class. The item schema is chosen based on this value
8
+ */
9
+ itemClass: 'nft';
10
+ /**
11
+ * The name of the related product
12
+ *
13
+ * @minLength 1
14
+ */
15
+ productName: string;
16
+ /**
17
+ * 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
18
+ */
19
+ productType: productType;
20
+ /**
21
+ * The item's list price
22
+ */
23
+ listPrice?: {
24
+ /**
25
+ * The amount in the currency, which is specified in the `currency` property
26
+ */
27
+ valueInCurrency?: number;
28
+ /**
29
+ * Currency specified as a three letter code according to ISO 4217
30
+ */
31
+ currency?: string;
32
+ };
33
+ /**
34
+ * The item's list price
35
+ */
36
+ sellingPrice: {
37
+ /**
38
+ * The amount in the currency, which is specified in the `currency` property
39
+ */
40
+ valueInCurrency?: number;
41
+ /**
42
+ * Currency specified as a three-letter code according to ISO 4217
43
+ */
44
+ currency?: string;
45
+ };
46
+ /**
47
+ * The number of units sold
48
+ */
49
+ quantity: number;
50
+ /**
51
+ * Any additional data that the store can provide on the product, e.g. description, link to image, etc.
52
+ */
53
+ rawProductData?: AnyObject;
54
+ seller?: {
55
+ id: string;
56
+ email: string;
57
+ firstName: string;
58
+ lastName: string;
59
+ dob: string;
60
+ rawSellerData: Record<string, any>;
61
+ };
62
+ };
63
+ export type productType = 'inGameProduct' | 'gameOfSkill' | 'dataStorage' | 'computingResources' | 'sportsTicket' | 'eSportsTicket' | 'musicTicket' | 'conferenceTicket' | 'virtualSportsTicket' | 'virtualESportsTicket' | 'virtualMusicTicket' | 'virtualConferenceTicket' | 'alcohol' | 'DLC' | 'subscription' | 'fundACause' | 'realEstate' | 'computingContract' | 'digitalArt' | 'topUp' | 'ownershipContract' | 'inGameCurrency';
64
+ export declare namespace nftCartItem {
65
+ /**
66
+ * Denotes the cart item class. The item schema is chosen based on this value
67
+ */
68
+ enum itemClass {
69
+ NFT = "nft"
70
+ }
71
+ /**
72
+ * 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
73
+ */
74
+ enum productType {
75
+ IN_GAME_PRODUCT = "inGameProduct",
76
+ GAME_OF_SKILL = "gameOfSkill",
77
+ DATA_STORAGE = "dataStorage",
78
+ COMPUTING_RESOURCES = "computingResources",
79
+ SPORTS_TICKET = "sportsTicket",
80
+ E_SPORTS_TICKET = "eSportsTicket",
81
+ MUSIC_TICKET = "musicTicket",
82
+ CONFERENCE_TICKET = "conferenceTicket",
83
+ VIRTUAL_SPORTS_TICKET = "virtualSportsTicket",
84
+ VIRTUAL_ESPORTS_TICKET = "virtualESportsTicket",
85
+ VIRTUAL_MUSIC_TICKET = "virtualMusicTicket",
86
+ VIRTUAL_CONFERENCE_TICKET = "virtualConferenceTicket",
87
+ ALCOHOL = "alcohol",
88
+ DLC = "DLC",
89
+ SUBSCRIPTION = "subscription",
90
+ FUND_ACAUSE = "fundACause",
91
+ REAL_ESTATE = "realEstate",
92
+ COMPUTING_CONTRACT = "computingContract",
93
+ DIGITAL_ART = "digitalArt",
94
+ TOP_UP = "topUp",
95
+ OWNERSHIP_CONTRACT = "ownershipContract",
96
+ IN_GAME_CURRENCY = "inGameCurrency",
97
+ MONEY_TOP_UP_CART_ITEM = "moneyTopUpCartItem"
98
+ }
99
+ }
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ /* generated using openapi-typescript-codegen -- do no edit */
3
+ /* istanbul ignore file */
4
+ /* tslint:disable */
5
+ /* eslint-disable */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.nftCartItem = void 0;
8
+ var nftCartItem;
9
+ (function (nftCartItem) {
10
+ /**
11
+ * Denotes the cart item class. The item schema is chosen based on this value
12
+ */
13
+ var itemClass;
14
+ (function (itemClass) {
15
+ itemClass["NFT"] = "nft";
16
+ })(itemClass = nftCartItem.itemClass || (nftCartItem.itemClass = {}));
17
+ /**
18
+ * 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
19
+ */
20
+ var productType;
21
+ (function (productType) {
22
+ productType["IN_GAME_PRODUCT"] = "inGameProduct";
23
+ productType["GAME_OF_SKILL"] = "gameOfSkill";
24
+ productType["DATA_STORAGE"] = "dataStorage";
25
+ productType["COMPUTING_RESOURCES"] = "computingResources";
26
+ productType["SPORTS_TICKET"] = "sportsTicket";
27
+ productType["E_SPORTS_TICKET"] = "eSportsTicket";
28
+ productType["MUSIC_TICKET"] = "musicTicket";
29
+ productType["CONFERENCE_TICKET"] = "conferenceTicket";
30
+ productType["VIRTUAL_SPORTS_TICKET"] = "virtualSportsTicket";
31
+ productType["VIRTUAL_ESPORTS_TICKET"] = "virtualESportsTicket";
32
+ productType["VIRTUAL_MUSIC_TICKET"] = "virtualMusicTicket";
33
+ productType["VIRTUAL_CONFERENCE_TICKET"] = "virtualConferenceTicket";
34
+ productType["ALCOHOL"] = "alcohol";
35
+ productType["DLC"] = "DLC";
36
+ productType["SUBSCRIPTION"] = "subscription";
37
+ productType["FUND_ACAUSE"] = "fundACause";
38
+ productType["REAL_ESTATE"] = "realEstate";
39
+ productType["COMPUTING_CONTRACT"] = "computingContract";
40
+ productType["DIGITAL_ART"] = "digitalArt";
41
+ productType["TOP_UP"] = "topUp";
42
+ productType["OWNERSHIP_CONTRACT"] = "ownershipContract";
43
+ productType["IN_GAME_CURRENCY"] = "inGameCurrency";
44
+ productType["MONEY_TOP_UP_CART_ITEM"] = "moneyTopUpCartItem";
45
+ })(productType = nftCartItem.productType || (nftCartItem.productType = {}));
46
+ })(nftCartItem || (exports.nftCartItem = nftCartItem = {}));
47
+ //# sourceMappingURL=nftCartItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nftCartItem.js","sourceRoot":"","sources":["../../../../src/common/types/nftCartItem.ts"],"names":[],"mappings":";AAAA,8DAA8D;AAC9D,0BAA0B;AAC1B,oBAAoB;AACpB,oBAAoB;;;AA0FpB,IAAiB,WAAW,CAoC3B;AApCD,WAAiB,WAAW;IAC1B;;OAEG;IACH,IAAY,SAEX;IAFD,WAAY,SAAS;QACnB,wBAAW,CAAA;IACb,CAAC,EAFW,SAAS,GAAT,qBAAS,KAAT,qBAAS,QAEpB;IAED;;OAEG;IACH,IAAY,WAwBX;IAxBD,WAAY,WAAW;QACrB,gDAAiC,CAAA;QACjC,4CAA6B,CAAA;QAC7B,2CAA4B,CAAA;QAC5B,yDAA0C,CAAA;QAC1C,6CAA8B,CAAA;QAC9B,gDAAiC,CAAA;QACjC,2CAA4B,CAAA;QAC5B,qDAAsC,CAAA;QACtC,4DAA6C,CAAA;QAC7C,8DAA+C,CAAA;QAC/C,0DAA2C,CAAA;QAC3C,oEAAqD,CAAA;QACrD,kCAAmB,CAAA;QACnB,0BAAW,CAAA;QACX,4CAA6B,CAAA;QAC7B,yCAA0B,CAAA;QAC1B,yCAA0B,CAAA;QAC1B,uDAAwC,CAAA;QACxC,yCAA0B,CAAA;QAC1B,+BAAgB,CAAA;QAChB,uDAAwC,CAAA;QACxC,kDAAmC,CAAA;QACnC,4DAA6C,CAAA;IAC/C,CAAC,EAxBW,WAAW,GAAX,uBAAW,KAAX,uBAAW,QAwBtB;AACH,CAAC,EApCgB,WAAW,2BAAX,WAAW,QAoC3B"}
@@ -1,5 +1,9 @@
1
1
  import type { Connection, VersionedTransaction, PublicKey, Signer, Transaction } from '@solana/web3.js';
2
- import { Currency, 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",
@@ -353,6 +337,11 @@ export interface ArbitrumWalletProps {
353
337
  export type CoinflowArbitrumWithdrawProps = CoinflowEvmWithdrawProps & ArbitrumWalletProps;
354
338
  export type CoinflowWithdrawProps = CoinflowSolanaWithdrawProps | CoinflowNearWithdrawProps | CoinflowEthWithdrawProps | CoinflowPolygonWithdrawProps | CoinflowBaseWithdrawProps | CoinflowArbitrumWithdrawProps;
355
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
+ */
356
345
  waitForHash?: boolean;
357
346
  }
358
347
  export interface NormalRedeem extends CommonEvmRedeem {
@@ -362,7 +351,14 @@ export interface NormalRedeem extends CommonEvmRedeem {
362
351
  };
363
352
  }
364
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
+ */
365
358
  nftContract: string;
359
+ /**
360
+ * @minLength 1 Please provide a valid Nft Id
361
+ */
366
362
  nftId: string;
367
363
  }
368
364
  export interface SafeMintRedeem extends NormalRedeem {
@@ -373,12 +369,12 @@ export interface ReturnedTokenIdRedeem extends NormalRedeem {
373
369
  type: 'returned';
374
370
  nftContract?: string;
375
371
  }
376
- type ReservoirNftIdItem = Omit<KnownTokenIdRedeem, keyof NormalRedeem>;
377
- interface ReservoirOrderIdItem {
372
+ export type ReservoirNftIdItem = Omit<KnownTokenIdRedeem, keyof NormalRedeem>;
373
+ export interface ReservoirOrderIdItem {
378
374
  orderId: string;
379
375
  }
380
- type ReservoirItem = ReservoirNftIdItem | ReservoirOrderIdItem;
381
- type ReservoirItems = ReservoirItem | ReservoirItem[];
376
+ export type ReservoirItem = ReservoirNftIdItem | ReservoirOrderIdItem;
377
+ export type ReservoirItems = ReservoirItem | ReservoirItem[];
382
378
  export interface ReservoirRedeem extends CommonEvmRedeem {
383
379
  type: 'reservoir';
384
380
  items: ReservoirItems;
@@ -388,7 +384,39 @@ export interface TokenRedeem extends CommonEvmRedeem {
388
384
  type: 'token';
389
385
  destination: string;
390
386
  }
391
- export type EvmTransactionData = SafeMintRedeem | ReturnedTokenIdRedeem | ReservoirRedeem | KnownTokenIdRedeem | NormalRedeem | TokenRedeem;
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;
392
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'> {
393
421
  walletPubkey: string | null | undefined;
394
422
  sessionKey?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"CoinflowTypes.js","sourceRoot":"","sources":["../../../src/common/CoinflowTypes.ts"],"names":[],"mappings":"AASA,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,qCAAmB,CAAA;IACnB,+BAAa,CAAA;IACb,+BAAa,CAAA;AACf,CAAC,EAJW,cAAc,KAAd,cAAc,QAIzB;AAED,MAAM,CAAN,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,oCAAmB,CAAA;IACnB,gCAAe,CAAA;IACf,8BAAa,CAAA;AACf,CAAC,EAJW,aAAa,KAAb,aAAa,QAIxB;AAwQD,MAAM,CAAN,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IACpC,2DAA6B,CAAA;IAC7B,2DAA6B,CAAA;IAC7B,qDAAuB,CAAA;AACzB,C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