@coinflowlabs/react 5.8.1 → 5.9.2
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.
- package/README.md +8 -0
- package/build/cjs/CoinflowApplePayButton.d.ts +1 -1
- package/build/cjs/CoinflowApplePayButton.js +5 -6
- package/build/cjs/CoinflowApplePayButton.js.map +1 -1
- package/build/cjs/CoinflowGooglePayButton.js +4 -5
- package/build/cjs/CoinflowGooglePayButton.js.map +1 -1
- package/build/cjs/CoinflowIFrame.js +42 -53
- package/build/cjs/CoinflowIFrame.js.map +1 -1
- package/build/cjs/CoinflowPurchase.js +55 -42
- package/build/cjs/CoinflowPurchase.js.map +1 -1
- package/build/cjs/CoinflowPurchaseHistory.js +20 -11
- package/build/cjs/CoinflowPurchaseHistory.js.map +1 -1
- package/build/cjs/CoinflowPurchaseProtection.d.ts +1 -1
- package/build/cjs/CoinflowPurchaseProtection.js +10 -11
- package/build/cjs/CoinflowPurchaseProtection.js.map +1 -1
- package/build/cjs/CoinflowWithdraw.js +20 -11
- package/build/cjs/CoinflowWithdraw.js.map +1 -1
- package/build/cjs/CoinflowWithdrawHistory.js +20 -11
- package/build/cjs/CoinflowWithdrawHistory.js.map +1 -1
- package/build/cjs/MobileWalletButton.d.ts +1 -1
- package/build/cjs/MobileWalletButton.js +35 -26
- package/build/cjs/MobileWalletButton.js.map +1 -1
- package/build/cjs/card-form/CoinflowCardForm.js +42 -54
- package/build/cjs/card-form/CoinflowCardForm.js.map +1 -1
- package/build/cjs/card-form/CoinflowCardFormHeader.js +5 -5
- package/build/cjs/card-form/CoinflowCardFormHeader.js.map +1 -1
- package/build/cjs/card-form/useCardFormIframe.d.ts +5 -5
- package/build/cjs/card-form/useCardFormIframe.js +57 -57
- package/build/cjs/card-form/useCardFormIframe.js.map +1 -1
- package/build/cjs/common/CoinflowLibMessageHandlers.js +119 -193
- package/build/cjs/common/CoinflowLibMessageHandlers.js.map +1 -1
- package/build/cjs/common/CoinflowTypes.d.ts +11 -2
- package/build/cjs/common/CoinflowTypes.js +21 -16
- package/build/cjs/common/CoinflowTypes.js.map +1 -1
- package/build/cjs/common/CoinflowUtils.d.ts +1 -1
- package/build/cjs/common/CoinflowUtils.js +62 -64
- package/build/cjs/common/CoinflowUtils.js.map +1 -1
- package/build/cjs/common/EventBus.js +8 -11
- package/build/cjs/common/EventBus.js.map +1 -1
- package/build/cjs/common/NSure.js +2 -2
- package/build/cjs/common/NSure.js.map +1 -1
- package/build/cjs/common/NSure.native.js.map +1 -1
- package/build/cjs/common/SolanaPeerDeps.js +5 -5
- package/build/cjs/common/SolanaPeerDeps.js.map +1 -1
- package/build/cjs/common/card-form/TokenEx.js +7 -8
- package/build/cjs/common/card-form/TokenEx.js.map +1 -1
- package/build/cjs/common/card-form/tokenexHelpers.d.ts +1 -1
- package/build/cjs/common/card-form/tokenexHelpers.js +97 -150
- package/build/cjs/common/card-form/tokenexHelpers.js.map +1 -1
- package/build/cjs/common/index.js +1 -1
- package/build/cjs/common/types/Subtotal.js +175 -176
- package/build/cjs/common/types/Subtotal.js.map +1 -1
- package/build/cjs/common/types/nftCartItem.js +2 -2
- package/build/cjs/common/types/nftCartItem.js.map +1 -1
- package/build/cjs/index.js +1 -1
- package/build/cjs/useOverlay.js +13 -12
- package/build/cjs/useOverlay.js.map +1 -1
- package/build/esm/CoinflowApplePayButton.d.ts +1 -1
- package/build/esm/CoinflowApplePayButton.js +2 -3
- package/build/esm/CoinflowApplePayButton.js.map +1 -1
- package/build/esm/CoinflowGooglePayButton.js +1 -2
- package/build/esm/CoinflowGooglePayButton.js.map +1 -1
- package/build/esm/CoinflowIFrame.js +39 -51
- package/build/esm/CoinflowIFrame.js.map +1 -1
- package/build/esm/CoinflowPurchase.js +50 -38
- package/build/esm/CoinflowPurchase.js.map +1 -1
- package/build/esm/CoinflowPurchaseHistory.js +16 -8
- package/build/esm/CoinflowPurchaseHistory.js.map +1 -1
- package/build/esm/CoinflowPurchaseProtection.d.ts +1 -1
- package/build/esm/CoinflowPurchaseProtection.js +6 -7
- package/build/esm/CoinflowPurchaseProtection.js.map +1 -1
- package/build/esm/CoinflowWithdraw.js +16 -8
- package/build/esm/CoinflowWithdraw.js.map +1 -1
- package/build/esm/CoinflowWithdrawHistory.js +16 -8
- package/build/esm/CoinflowWithdrawHistory.js.map +1 -1
- package/build/esm/MobileWalletButton.d.ts +1 -1
- package/build/esm/MobileWalletButton.js +30 -22
- package/build/esm/MobileWalletButton.js.map +1 -1
- package/build/esm/card-form/CoinflowCardForm.js +41 -54
- package/build/esm/card-form/CoinflowCardForm.js.map +1 -1
- package/build/esm/card-form/CoinflowCardFormHeader.js +3 -3
- package/build/esm/card-form/CoinflowCardFormHeader.js.map +1 -1
- package/build/esm/card-form/useCardFormIframe.d.ts +5 -5
- package/build/esm/card-form/useCardFormIframe.js +56 -56
- package/build/esm/card-form/useCardFormIframe.js.map +1 -1
- package/build/esm/common/CoinflowLibMessageHandlers.js +117 -191
- package/build/esm/common/CoinflowLibMessageHandlers.js.map +1 -1
- package/build/esm/common/CoinflowTypes.d.ts +11 -2
- package/build/esm/common/CoinflowTypes.js +21 -16
- package/build/esm/common/CoinflowTypes.js.map +1 -1
- package/build/esm/common/CoinflowUtils.d.ts +1 -1
- package/build/esm/common/CoinflowUtils.js +57 -61
- package/build/esm/common/CoinflowUtils.js.map +1 -1
- package/build/esm/common/EventBus.js +8 -12
- package/build/esm/common/EventBus.js.map +1 -1
- package/build/esm/common/SolanaPeerDeps.js +2 -2
- package/build/esm/common/SolanaPeerDeps.js.map +1 -1
- package/build/esm/common/card-form/TokenEx.js +8 -9
- package/build/esm/common/card-form/TokenEx.js.map +1 -1
- package/build/esm/common/card-form/tokenexHelpers.d.ts +1 -1
- package/build/esm/common/card-form/tokenexHelpers.js +95 -148
- package/build/esm/common/card-form/tokenexHelpers.js.map +1 -1
- package/build/esm/common/types/Subtotal.js +175 -176
- package/build/esm/common/types/Subtotal.js.map +1 -1
- package/build/esm/common/types/nftCartItem.js +2 -2
- package/build/esm/common/types/nftCartItem.js.map +1 -1
- package/build/esm/useOverlay.js +11 -10
- package/build/esm/useOverlay.js.map +1 -1
- package/build/tsconfig.cjs.tsbuildinfo +1 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __awaiter, __generator } from "tslib";
|
|
2
1
|
import { CoinflowUtils } from './CoinflowUtils';
|
|
3
2
|
import { web3, base58 } from './SolanaPeerDeps';
|
|
4
3
|
export var IFrameMessageMethods;
|
|
@@ -13,7 +12,7 @@ export var IFrameMessageMethods;
|
|
|
13
12
|
IFrameMessageMethods["AccountLinked"] = "accountLinked";
|
|
14
13
|
})(IFrameMessageMethods || (IFrameMessageMethods = {}));
|
|
15
14
|
export function getWalletPubkey(input) {
|
|
16
|
-
|
|
15
|
+
let wallet;
|
|
17
16
|
if ('signer' in input &&
|
|
18
17
|
typeof input.signer === 'object' &&
|
|
19
18
|
input.signer &&
|
|
@@ -34,7 +33,7 @@ export function getWalletPubkey(input) {
|
|
|
34
33
|
return null;
|
|
35
34
|
}
|
|
36
35
|
export function handleIFrameMessage(rawMessage, handlers, handleHeightChangeId) {
|
|
37
|
-
|
|
36
|
+
let walletCall;
|
|
38
37
|
try {
|
|
39
38
|
walletCall = JSON.parse(rawMessage);
|
|
40
39
|
if (!('method' in walletCall) || !('data' in walletCall))
|
|
@@ -44,7 +43,7 @@ export function handleIFrameMessage(rawMessage, handlers, handleHeightChangeId)
|
|
|
44
43
|
console.error('handleIFrameMessage JSON parse', e);
|
|
45
44
|
return;
|
|
46
45
|
}
|
|
47
|
-
|
|
46
|
+
const { data, method } = walletCall;
|
|
48
47
|
switch (method) {
|
|
49
48
|
case IFrameMessageMethods.SignMessage:
|
|
50
49
|
if (!handlers.handleSignMessage)
|
|
@@ -75,11 +74,11 @@ export function handleIFrameMessage(rawMessage, handlers, handleHeightChangeId)
|
|
|
75
74
|
case IFrameMessageMethods.AccountLinked:
|
|
76
75
|
return;
|
|
77
76
|
}
|
|
78
|
-
console.warn(
|
|
77
|
+
console.warn(`Didn't expect to get here, handleIFrameMessage method:${method} is not one of ${Object.values(IFrameMessageMethods)}`);
|
|
79
78
|
}
|
|
80
79
|
export function getHandlers(props) {
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
let chain;
|
|
81
|
+
let wallet;
|
|
83
82
|
if ('signer' in props &&
|
|
84
83
|
typeof props.signer === 'object' &&
|
|
85
84
|
props.signer &&
|
|
@@ -94,13 +93,13 @@ export function getHandlers(props) {
|
|
|
94
93
|
}
|
|
95
94
|
if (!chain) {
|
|
96
95
|
return {
|
|
97
|
-
handleSendTransaction:
|
|
96
|
+
handleSendTransaction: () => {
|
|
98
97
|
throw new Error('handleSendTransaction Not Implemented');
|
|
99
98
|
},
|
|
100
|
-
handleSignMessage:
|
|
99
|
+
handleSignMessage: () => {
|
|
101
100
|
throw new Error('handleSendTransaction Not Implemented');
|
|
102
101
|
},
|
|
103
|
-
handleSignTransaction:
|
|
102
|
+
handleSignTransaction: () => {
|
|
104
103
|
throw new Error('handleSendTransaction Not Implemented');
|
|
105
104
|
},
|
|
106
105
|
onSuccess: props.onSuccess,
|
|
@@ -108,115 +107,76 @@ export function getHandlers(props) {
|
|
|
108
107
|
};
|
|
109
108
|
}
|
|
110
109
|
return CoinflowUtils.byBlockchain(chain, {
|
|
111
|
-
solana:
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
},
|
|
146
|
-
|
|
147
|
-
return getStellarWalletHandlers({
|
|
148
|
-
wallet: wallet,
|
|
149
|
-
onSuccess: props.onSuccess,
|
|
150
|
-
onAuthDeclined: props.onAuthDeclined,
|
|
151
|
-
});
|
|
152
|
-
},
|
|
153
|
-
monad: function () {
|
|
154
|
-
return getEvmWalletHandlers({
|
|
155
|
-
wallet: wallet,
|
|
156
|
-
onSuccess: props.onSuccess,
|
|
157
|
-
onAuthDeclined: props.onAuthDeclined,
|
|
158
|
-
});
|
|
159
|
-
},
|
|
160
|
-
user: function () { return getSessionKeyHandlers(props); },
|
|
110
|
+
solana: () => getSolanaWalletHandlers({
|
|
111
|
+
wallet: wallet,
|
|
112
|
+
onSuccess: props.onSuccess,
|
|
113
|
+
onAuthDeclined: props.onAuthDeclined,
|
|
114
|
+
}),
|
|
115
|
+
eth: () => getEvmWalletHandlers({
|
|
116
|
+
wallet: wallet,
|
|
117
|
+
onSuccess: props.onSuccess,
|
|
118
|
+
onAuthDeclined: props.onAuthDeclined,
|
|
119
|
+
}),
|
|
120
|
+
polygon: () => getEvmWalletHandlers({
|
|
121
|
+
wallet: wallet,
|
|
122
|
+
onSuccess: props.onSuccess,
|
|
123
|
+
onAuthDeclined: props.onAuthDeclined,
|
|
124
|
+
}),
|
|
125
|
+
base: () => getEvmWalletHandlers({
|
|
126
|
+
wallet: wallet,
|
|
127
|
+
onSuccess: props.onSuccess,
|
|
128
|
+
onAuthDeclined: props.onAuthDeclined,
|
|
129
|
+
}),
|
|
130
|
+
arbitrum: () => getEvmWalletHandlers({
|
|
131
|
+
wallet: wallet,
|
|
132
|
+
onSuccess: props.onSuccess,
|
|
133
|
+
onAuthDeclined: props.onAuthDeclined,
|
|
134
|
+
}),
|
|
135
|
+
stellar: () => getStellarWalletHandlers({
|
|
136
|
+
wallet: wallet,
|
|
137
|
+
onSuccess: props.onSuccess,
|
|
138
|
+
onAuthDeclined: props.onAuthDeclined,
|
|
139
|
+
}),
|
|
140
|
+
monad: () => getEvmWalletHandlers({
|
|
141
|
+
wallet: wallet,
|
|
142
|
+
onSuccess: props.onSuccess,
|
|
143
|
+
onAuthDeclined: props.onAuthDeclined,
|
|
144
|
+
}),
|
|
145
|
+
user: () => getSessionKeyHandlers(props),
|
|
161
146
|
})();
|
|
162
147
|
}
|
|
163
|
-
function getSolanaWalletHandlers(
|
|
164
|
-
var _this = this;
|
|
165
|
-
var wallet = _a.wallet, onSuccess = _a.onSuccess, onAuthDeclined = _a.onAuthDeclined;
|
|
148
|
+
function getSolanaWalletHandlers({ wallet, onSuccess, onAuthDeclined, }) {
|
|
166
149
|
return {
|
|
167
|
-
handleSendTransaction:
|
|
168
|
-
|
|
169
|
-
return
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
var signTransaction, tx, signedTransaction;
|
|
198
|
-
return __generator(this, function (_a) {
|
|
199
|
-
switch (_a.label) {
|
|
200
|
-
case 0:
|
|
201
|
-
signTransaction = wallet.signTransaction;
|
|
202
|
-
if (!signTransaction) {
|
|
203
|
-
throw new Error('signTransaction is not supported by this wallet');
|
|
204
|
-
}
|
|
205
|
-
tx = getSolanaTransaction(transaction);
|
|
206
|
-
return [4 /*yield*/, signTransaction(tx)];
|
|
207
|
-
case 1:
|
|
208
|
-
signedTransaction = _a.sent();
|
|
209
|
-
if (!base58)
|
|
210
|
-
throw new Error('bs58 dependency is required');
|
|
211
|
-
return [2 /*return*/, base58.encode(Uint8Array.from(signedTransaction.serialize({
|
|
212
|
-
requireAllSignatures: false,
|
|
213
|
-
verifySignatures: false,
|
|
214
|
-
})))];
|
|
215
|
-
}
|
|
216
|
-
});
|
|
217
|
-
}); },
|
|
218
|
-
onSuccess: onSuccess,
|
|
219
|
-
onAuthDeclined: onAuthDeclined,
|
|
150
|
+
handleSendTransaction: async (transaction) => {
|
|
151
|
+
const tx = getSolanaTransaction(transaction);
|
|
152
|
+
return await wallet.sendTransaction(tx);
|
|
153
|
+
},
|
|
154
|
+
handleSignMessage: async (message) => {
|
|
155
|
+
const signMessage = wallet.signMessage;
|
|
156
|
+
if (!signMessage) {
|
|
157
|
+
throw new Error('signMessage is not supported by this wallet');
|
|
158
|
+
}
|
|
159
|
+
const signedMessage = await signMessage(new TextEncoder().encode(message));
|
|
160
|
+
if (!base58)
|
|
161
|
+
throw new Error('bs58 dependency is required');
|
|
162
|
+
return base58.encode(signedMessage);
|
|
163
|
+
},
|
|
164
|
+
handleSignTransaction: async (transaction) => {
|
|
165
|
+
const signTransaction = wallet.signTransaction;
|
|
166
|
+
if (!signTransaction) {
|
|
167
|
+
throw new Error('signTransaction is not supported by this wallet');
|
|
168
|
+
}
|
|
169
|
+
const tx = getSolanaTransaction(transaction);
|
|
170
|
+
const signedTransaction = await signTransaction(tx);
|
|
171
|
+
if (!base58)
|
|
172
|
+
throw new Error('bs58 dependency is required');
|
|
173
|
+
return base58.encode(Uint8Array.from(signedTransaction.serialize({
|
|
174
|
+
requireAllSignatures: false,
|
|
175
|
+
verifySignatures: false,
|
|
176
|
+
})));
|
|
177
|
+
},
|
|
178
|
+
onSuccess,
|
|
179
|
+
onAuthDeclined,
|
|
220
180
|
};
|
|
221
181
|
}
|
|
222
182
|
function getSolanaTransaction(data) {
|
|
@@ -224,92 +184,58 @@ function getSolanaTransaction(data) {
|
|
|
224
184
|
throw new Error('@solana/web3.js is not defined. Please install @solana/web3.js into your project');
|
|
225
185
|
if (!base58)
|
|
226
186
|
throw new Error('bs58 is not defined. Please install bs58 into your project');
|
|
227
|
-
|
|
228
|
-
|
|
187
|
+
const parsedUInt8Array = base58.decode(data);
|
|
188
|
+
const vtx = web3.VersionedTransaction.deserialize(parsedUInt8Array);
|
|
229
189
|
if (vtx.version === 'legacy')
|
|
230
190
|
return web3.Transaction.from(parsedUInt8Array);
|
|
231
191
|
return vtx;
|
|
232
192
|
}
|
|
233
|
-
function getEvmWalletHandlers(
|
|
234
|
-
var _this = this;
|
|
235
|
-
var wallet = _a.wallet, onSuccess = _a.onSuccess, onAuthDeclined = _a.onAuthDeclined;
|
|
193
|
+
function getEvmWalletHandlers({ wallet, onSuccess, onAuthDeclined, }) {
|
|
236
194
|
return {
|
|
237
|
-
handleSendTransaction:
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
}
|
|
248
|
-
});
|
|
249
|
-
}); },
|
|
250
|
-
handleSignMessage: function (message) { return __awaiter(_this, void 0, void 0, function () {
|
|
251
|
-
return __generator(this, function (_a) {
|
|
252
|
-
return [2 /*return*/, wallet.signMessage(message)];
|
|
253
|
-
});
|
|
254
|
-
}); },
|
|
255
|
-
onSuccess: onSuccess,
|
|
256
|
-
onAuthDeclined: onAuthDeclined,
|
|
195
|
+
handleSendTransaction: async (transaction) => {
|
|
196
|
+
const tx = JSON.parse(Buffer.from(transaction, 'base64').toString());
|
|
197
|
+
const { hash } = await wallet.sendTransaction(tx);
|
|
198
|
+
return hash;
|
|
199
|
+
},
|
|
200
|
+
handleSignMessage: async (message) => {
|
|
201
|
+
return wallet.signMessage(message);
|
|
202
|
+
},
|
|
203
|
+
onSuccess,
|
|
204
|
+
onAuthDeclined,
|
|
257
205
|
};
|
|
258
206
|
}
|
|
259
|
-
function getStellarWalletHandlers(
|
|
260
|
-
var _this = this;
|
|
261
|
-
var wallet = _a.wallet, onSuccess = _a.onSuccess, onAuthDeclined = _a.onAuthDeclined;
|
|
207
|
+
function getStellarWalletHandlers({ wallet, onSuccess, onAuthDeclined, }) {
|
|
262
208
|
return {
|
|
263
|
-
handleSendTransaction:
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
handleSignTransaction: function (transaction) { return __awaiter(_this, void 0, void 0, function () {
|
|
285
|
-
return __generator(this, function (_a) {
|
|
286
|
-
switch (_a.label) {
|
|
287
|
-
case 0:
|
|
288
|
-
if (!wallet.signTransaction) {
|
|
289
|
-
throw new Error('signTransaction is not supported by this wallet');
|
|
290
|
-
}
|
|
291
|
-
return [4 /*yield*/, wallet.signTransaction(transaction)];
|
|
292
|
-
case 1:
|
|
293
|
-
// Returns signed base64 XDR
|
|
294
|
-
return [2 /*return*/, _a.sent()];
|
|
295
|
-
}
|
|
296
|
-
});
|
|
297
|
-
}); },
|
|
298
|
-
onSuccess: onSuccess,
|
|
299
|
-
onAuthDeclined: onAuthDeclined,
|
|
209
|
+
handleSendTransaction: async (transaction) => {
|
|
210
|
+
// transaction is unsigned base64 XDR
|
|
211
|
+
// dapp needs to handle sending and confirming
|
|
212
|
+
throw new Error(`sendTransaction is not supported on stellar, error when sending: ${transaction}`);
|
|
213
|
+
},
|
|
214
|
+
handleSignMessage: async (message) => {
|
|
215
|
+
if (!wallet.signMessage) {
|
|
216
|
+
throw new Error('signMessage is not supported by this wallet');
|
|
217
|
+
}
|
|
218
|
+
// Returns base64-encoded signature
|
|
219
|
+
return await wallet.signMessage(message);
|
|
220
|
+
},
|
|
221
|
+
handleSignTransaction: async (transaction) => {
|
|
222
|
+
if (!wallet.signTransaction) {
|
|
223
|
+
throw new Error('signTransaction is not supported by this wallet');
|
|
224
|
+
}
|
|
225
|
+
// Returns signed base64 XDR
|
|
226
|
+
return await wallet.signTransaction(transaction);
|
|
227
|
+
},
|
|
228
|
+
onSuccess,
|
|
229
|
+
onAuthDeclined,
|
|
300
230
|
};
|
|
301
231
|
}
|
|
302
|
-
function getSessionKeyHandlers(
|
|
303
|
-
var _this = this;
|
|
304
|
-
var onSuccess = _a.onSuccess, onAuthDeclined = _a.onAuthDeclined;
|
|
232
|
+
function getSessionKeyHandlers({ onSuccess, onAuthDeclined, }) {
|
|
305
233
|
return {
|
|
306
|
-
handleSendTransaction:
|
|
307
|
-
return
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
onSuccess: onSuccess,
|
|
312
|
-
onAuthDeclined: onAuthDeclined,
|
|
234
|
+
handleSendTransaction: async () => {
|
|
235
|
+
return Promise.resolve('');
|
|
236
|
+
},
|
|
237
|
+
onSuccess,
|
|
238
|
+
onAuthDeclined,
|
|
313
239
|
};
|
|
314
240
|
}
|
|
315
241
|
//# sourceMappingURL=CoinflowLibMessageHandlers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoinflowLibMessageHandlers.js","sourceRoot":"","sources":["../../../src/common/CoinflowLibMessageHandlers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CoinflowLibMessageHandlers.js","sourceRoot":"","sources":["../../../src/common/CoinflowLibMessageHandlers.ts"],"names":[],"mappings":"AAWA,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAC,IAAI,EAAE,MAAM,EAAC,MAAM,kBAAkB,CAAC;AA2B9C,MAAM,CAAN,IAAY,oBASX;AATD,WAAY,oBAAoB;IAC9B,mDAA2B,CAAA;IAC3B,2DAAmC,CAAA;IACnC,2DAAmC,CAAA;IACnC,qDAA6B,CAAA;IAC7B,2CAAmB,CAAA;IACnB,qDAA6B,CAAA;IAC7B,yCAAiB,CAAA;IACjB,uDAA+B,CAAA;AAC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AAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;YACjE,CAAC;YACD,mCAAmC;YACnC,OAAO,MAAM,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAC3C,CAAC;QACD,qBAAqB,EAAE,KAAK,EAAE,WAAmB,EAAE,EAAE;YACnD,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE,CAAC;gBAC5B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;YACrE,CAAC;YACD,4BAA4B;YAC5B,OAAO,MAAM,MAAM,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;QACnD,CAAC;QACD,SAAS;QACT,cAAc;KACf,CAAC;AACJ,CAAC;AAED,SAAS,qBAAqB,CAAC,EAC7B,SAAS,EACT,cAAc,GAC8C;IAI5D,OAAO;QACL,qBAAqB,EAAE,KAAK,IAAI,EAAE;YAChC,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAC7B,CAAC;QACD,SAAS;QACT,cAAc;KACf,CAAC;AACJ,CAAC"}
|
|
@@ -222,9 +222,16 @@ export interface CoinflowMonadHistoryProps extends CoinflowEvmHistoryProps {
|
|
|
222
222
|
export type CoinflowHistoryProps = CoinflowSolanaHistoryProps | CoinflowPolygonHistoryProps | CoinflowEthHistoryProps | CoinflowBaseHistoryProps | CoinflowArbitrumHistoryProps | CoinflowStellarHistoryProps | CoinflowMonadHistoryProps | CoinflowSessionKeyHistoryProps;
|
|
223
223
|
type Bytes = ArrayLike<number>;
|
|
224
224
|
type BytesLike = Bytes | string;
|
|
225
|
-
/**
|
|
225
|
+
/**
|
|
226
|
+
* Cart item details required for Coinflow Chargeback Protection. Required if the merchant uses chargeback protection.
|
|
227
|
+
*/
|
|
226
228
|
export type CartClassOmitted = CartItemClassOmitted[];
|
|
227
229
|
export type ChargebackProtectionData = CartClassOmitted;
|
|
230
|
+
export declare enum ChargebackProtectionAccountType {
|
|
231
|
+
GUEST = "guest",
|
|
232
|
+
PRIVATE = "private",
|
|
233
|
+
BUSINESS = "business"
|
|
234
|
+
}
|
|
228
235
|
export type CartItemClassOmitted = NftCartItemClassOmitted | Omit<GiftCardCartItem, 'listPrice'> | CryptoCartItem | MoneyTopUpCartItem;
|
|
229
236
|
export type ChargebackProtectionItem = CartItemClassOmitted;
|
|
230
237
|
export type NftCartItemClassOmitted = Omit<nftCartItem, 'sellingPrice' | 'itemClass'>;
|
|
@@ -259,12 +266,14 @@ export interface CoinflowCommonPurchaseProps extends CoinflowTypes {
|
|
|
259
266
|
customPayInFees?: PurchaseCustomPayInFee[];
|
|
260
267
|
presentment?: Currency;
|
|
261
268
|
onSuccess?: OnSuccessMethod;
|
|
269
|
+
sessionKey?: string;
|
|
262
270
|
onAuthDeclined?: OnAuthDeclinedMethod;
|
|
263
271
|
webhookInfo?: {
|
|
264
272
|
[key: string]: any;
|
|
265
273
|
};
|
|
266
274
|
email?: string;
|
|
267
275
|
chargebackProtectionData?: ChargebackProtectionData;
|
|
276
|
+
chargebackProtectionAccountType?: ChargebackProtectionAccountType;
|
|
268
277
|
planCode?: string;
|
|
269
278
|
/**
|
|
270
279
|
* The payment methods displayed on the UI. If omitted, all available payment methods will be displayed.
|
|
@@ -551,7 +560,7 @@ export interface DecentRedeem extends CommonEvmRedeem {
|
|
|
551
560
|
* Gas fees for the transaction will be automatically calculated and added to the total charged to the customer. Optionally the merchant can opt to pay for these gas fees.
|
|
552
561
|
*/
|
|
553
562
|
export type EvmTransactionData = SafeMintRedeem | ReturnedTokenIdRedeem | KnownTokenIdRedeem | NormalRedeem | TokenRedeem | DecentRedeem;
|
|
554
|
-
export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId' | 'handleHeightChange'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'webhookInfo' | 'subtotal' | 'customPayInFees' | 'presentment' | 'customerInfo' | 'settlementType' | 'email' | 'planCode' | 'deviceId' | 'jwtToken' | 'origins' | 'threeDsChallengePreference' | 'supportEmail' | 'allowedPaymentMethods' | 'accountFundingTransaction' | 'partialUsdcChecked' | 'isZeroAuthorization' | 'zeroAuthorizationConfig'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets' | 'transactionSigner' | 'lockAmount' | 'lockDefaultToken' | 'origins' | 'allowedWithdrawSpeeds'>, Pick<CoinflowEvmPurchaseProps, 'authOnly'>, Pick<CoinflowSolanaPurchaseProps, 'rent' | 'nativeSolToConvert' | 'destinationAuthKey' | 'redemptionCheck'> {
|
|
563
|
+
export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId' | 'handleHeightChange'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'chargebackProtectionAccountType' | 'webhookInfo' | 'subtotal' | 'customPayInFees' | 'presentment' | 'customerInfo' | 'settlementType' | 'email' | 'planCode' | 'deviceId' | 'jwtToken' | 'origins' | 'threeDsChallengePreference' | 'supportEmail' | 'allowedPaymentMethods' | 'accountFundingTransaction' | 'partialUsdcChecked' | 'isZeroAuthorization' | 'zeroAuthorizationConfig'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets' | 'transactionSigner' | 'lockAmount' | 'lockDefaultToken' | 'origins' | 'allowedWithdrawSpeeds'>, Pick<CoinflowEvmPurchaseProps, 'authOnly'>, Pick<CoinflowSolanaPurchaseProps, 'rent' | 'nativeSolToConvert' | 'destinationAuthKey' | 'redemptionCheck'> {
|
|
555
564
|
walletPubkey: string | null | undefined;
|
|
556
565
|
sessionKey?: string;
|
|
557
566
|
route: string;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
var _a;
|
|
2
1
|
export var WithdrawCategory;
|
|
3
2
|
(function (WithdrawCategory) {
|
|
4
3
|
WithdrawCategory["USER"] = "user";
|
|
@@ -36,6 +35,12 @@ export var MerchantStyle;
|
|
|
36
35
|
MerchantStyle["Sharp"] = "sharp";
|
|
37
36
|
MerchantStyle["Pill"] = "pill";
|
|
38
37
|
})(MerchantStyle || (MerchantStyle = {}));
|
|
38
|
+
export var ChargebackProtectionAccountType;
|
|
39
|
+
(function (ChargebackProtectionAccountType) {
|
|
40
|
+
ChargebackProtectionAccountType["GUEST"] = "guest";
|
|
41
|
+
ChargebackProtectionAccountType["PRIVATE"] = "private";
|
|
42
|
+
ChargebackProtectionAccountType["BUSINESS"] = "business";
|
|
43
|
+
})(ChargebackProtectionAccountType || (ChargebackProtectionAccountType = {}));
|
|
39
44
|
export var ThreeDsChallengePreference;
|
|
40
45
|
(function (ThreeDsChallengePreference) {
|
|
41
46
|
ThreeDsChallengePreference["NoPreference"] = "NoPreference";
|
|
@@ -57,20 +62,20 @@ export var PaymentMethods;
|
|
|
57
62
|
PaymentMethods["instantBankTransfer"] = "instantBankTransfer";
|
|
58
63
|
PaymentMethods["wire"] = "wire";
|
|
59
64
|
})(PaymentMethods || (PaymentMethods = {}));
|
|
60
|
-
export
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
65
|
+
export const paymentMethodLabels = {
|
|
66
|
+
[PaymentMethods.card]: 'Card',
|
|
67
|
+
[PaymentMethods.ach]: 'ACH',
|
|
68
|
+
[PaymentMethods.fasterPayments]: 'Faster Payments',
|
|
69
|
+
[PaymentMethods.sepa]: 'SEPA',
|
|
70
|
+
[PaymentMethods.pix]: 'PIX',
|
|
71
|
+
[PaymentMethods.usdc]: 'USDC',
|
|
72
|
+
[PaymentMethods.googlePay]: 'Google Pay',
|
|
73
|
+
[PaymentMethods.applePay]: 'Apple Pay',
|
|
74
|
+
[PaymentMethods.credits]: 'Credits',
|
|
75
|
+
[PaymentMethods.crypto]: 'Crypto',
|
|
76
|
+
[PaymentMethods.instantBankTransfer]: 'Instant Bank Transfer',
|
|
77
|
+
[PaymentMethods.wire]: 'Wire Transfer',
|
|
78
|
+
};
|
|
74
79
|
export var CardType;
|
|
75
80
|
(function (CardType) {
|
|
76
81
|
CardType["VISA"] = "VISA";
|
|
@@ -78,5 +83,5 @@ export var CardType;
|
|
|
78
83
|
CardType["AMEX"] = "AMEX";
|
|
79
84
|
CardType["DISCOVER"] = "DISC";
|
|
80
85
|
})(CardType || (CardType = {}));
|
|
81
|
-
export
|
|
86
|
+
export const RN_REDIRECT_MESSAGE_NAME = 'rnredirect'; // DO NOT CHANGE
|
|
82
87
|
//# sourceMappingURL=CoinflowTypes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoinflowTypes.js","sourceRoot":"","sources":["../../../src/common/CoinflowTypes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CoinflowTypes.js","sourceRoot":"","sources":["../../../src/common/CoinflowTypes.ts"],"names":[],"mappings":"AAaA,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,iCAAa,CAAA;IACb,yCAAqB,CAAA;AACvB,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B;AAED,MAAM,CAAN,IAAY,aAYX;AAZD,WAAY,aAAa;IACvB,8BAAa,CAAA;IACb,sCAAqB,CAAA;IACrB,sCAAqB,CAAA;IACrB,8BAAa,CAAA;IACb,8BAAa,CAAA;IACb,4BAAW,CAAA;IACX,4BAAW,CAAA;IACX,gCAAe,CAAA;IACf,kCAAiB,CAAA;IACjB,8BAAa,CAAA;IACb,oCAAmB,CAAA;AACrB,CAAC,EAZW,aAAa,KAAb,aAAa,QAYxB;AAED,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,qCAAmB,CAAA;IACnB,+BAAa,CAAA;IACb,+BAAa,CAAA;AACf,CAAC,EAJW,cAAc,KAAd,cAAc,QAIzB;AAoDD,MAAM,UAAU,oBAAoB,CAClC,MAA+B;IAE/B,OAAO,WAAW,IAAI,MAAM,CAAC;AAC/B,CAAC;AAED,MAAM,UAAU,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AS,CAAC,EAAE,YAAY;IACxC,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,WAAW;IACtC,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,SAAS;IACnC,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,QAAQ;IACjC,CAAC,cAAc,CAAC,mBAAmB,CAAC,EAAE,uBAAuB;IAC7D,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,eAAe;CACvC,CAAC;AAgbF,MAAM,CAAN,IAAY,QAKX;AALD,WAAY,QAAQ;IAClB,yBAAa,CAAA;IACb,+BAAmB,CAAA;IACnB,yBAAa,CAAA;IACb,6BAAiB,CAAA;AACnB,CAAC,EALW,QAAQ,KAAR,QAAQ,QAKnB;AA4CD,MAAM,CAAC,MAAM,wBAAwB,GAAG,YAAY,CAAC,CAAC,gBAAgB"}
|
|
@@ -7,7 +7,7 @@ export declare class CoinflowUtils {
|
|
|
7
7
|
static getCoinflowBaseUrl(env?: CoinflowEnvs): string;
|
|
8
8
|
static getCoinflowAppBaseUrl(env?: CoinflowEnvs): string;
|
|
9
9
|
static getCoinflowApiUrl(env?: CoinflowEnvs): string;
|
|
10
|
-
static getCoinflowUrl({ walletPubkey, sessionKey, route, routePrefix, env, subtotal, customPayInFees, 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, accountFundingTransaction, partialUsdcChecked, redemptionCheck, allowedWithdrawSpeeds, isZeroAuthorization, zeroAuthorizationConfig, baseUrl
|
|
10
|
+
static getCoinflowUrl({ walletPubkey, sessionKey, route, routePrefix, env, subtotal, customPayInFees, presentment, transaction, blockchain, webhookInfo, email, loaderBackground, handleHeightChangeId, bankAccountLinkRedirect, additionalWallets, chargebackProtectionData, chargebackProtectionAccountType, merchantCss, color, rent, lockDefaultToken, tokens, planCode, disableApplePay, disableGooglePay, customerInfo, settlementType, lockAmount, nativeSolToConvert, theme, usePermit, transactionSigner, authOnly, deviceId, jwtToken, origins, threeDsChallengePreference, supportEmail, destinationAuthKey, allowedPaymentMethods, accountFundingTransaction, partialUsdcChecked, redemptionCheck, allowedWithdrawSpeeds, isZeroAuthorization, zeroAuthorizationConfig, baseUrl }: CoinflowIFrameProps & {
|
|
11
11
|
baseUrl?: string;
|
|
12
12
|
}): string;
|
|
13
13
|
static getTransaction(props: CoinflowPurchaseProps): string | undefined;
|