@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
|
@@ -4,9 +4,8 @@ exports.IFrameMessageMethods = void 0;
|
|
|
4
4
|
exports.getWalletPubkey = getWalletPubkey;
|
|
5
5
|
exports.handleIFrameMessage = handleIFrameMessage;
|
|
6
6
|
exports.getHandlers = getHandlers;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var SolanaPeerDeps_1 = require("./SolanaPeerDeps");
|
|
7
|
+
const CoinflowUtils_1 = require("./CoinflowUtils");
|
|
8
|
+
const SolanaPeerDeps_1 = require("./SolanaPeerDeps");
|
|
10
9
|
var IFrameMessageMethods;
|
|
11
10
|
(function (IFrameMessageMethods) {
|
|
12
11
|
IFrameMessageMethods["SignMessage"] = "signMessage";
|
|
@@ -19,7 +18,7 @@ var IFrameMessageMethods;
|
|
|
19
18
|
IFrameMessageMethods["AccountLinked"] = "accountLinked";
|
|
20
19
|
})(IFrameMessageMethods || (exports.IFrameMessageMethods = IFrameMessageMethods = {}));
|
|
21
20
|
function getWalletPubkey(input) {
|
|
22
|
-
|
|
21
|
+
let wallet;
|
|
23
22
|
if ('signer' in input &&
|
|
24
23
|
typeof input.signer === 'object' &&
|
|
25
24
|
input.signer &&
|
|
@@ -40,7 +39,7 @@ function getWalletPubkey(input) {
|
|
|
40
39
|
return null;
|
|
41
40
|
}
|
|
42
41
|
function handleIFrameMessage(rawMessage, handlers, handleHeightChangeId) {
|
|
43
|
-
|
|
42
|
+
let walletCall;
|
|
44
43
|
try {
|
|
45
44
|
walletCall = JSON.parse(rawMessage);
|
|
46
45
|
if (!('method' in walletCall) || !('data' in walletCall))
|
|
@@ -50,7 +49,7 @@ function handleIFrameMessage(rawMessage, handlers, handleHeightChangeId) {
|
|
|
50
49
|
console.error('handleIFrameMessage JSON parse', e);
|
|
51
50
|
return;
|
|
52
51
|
}
|
|
53
|
-
|
|
52
|
+
const { data, method } = walletCall;
|
|
54
53
|
switch (method) {
|
|
55
54
|
case IFrameMessageMethods.SignMessage:
|
|
56
55
|
if (!handlers.handleSignMessage)
|
|
@@ -81,11 +80,11 @@ function handleIFrameMessage(rawMessage, handlers, handleHeightChangeId) {
|
|
|
81
80
|
case IFrameMessageMethods.AccountLinked:
|
|
82
81
|
return;
|
|
83
82
|
}
|
|
84
|
-
console.warn(
|
|
83
|
+
console.warn(`Didn't expect to get here, handleIFrameMessage method:${method} is not one of ${Object.values(IFrameMessageMethods)}`);
|
|
85
84
|
}
|
|
86
85
|
function getHandlers(props) {
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
let chain;
|
|
87
|
+
let wallet;
|
|
89
88
|
if ('signer' in props &&
|
|
90
89
|
typeof props.signer === 'object' &&
|
|
91
90
|
props.signer &&
|
|
@@ -100,13 +99,13 @@ function getHandlers(props) {
|
|
|
100
99
|
}
|
|
101
100
|
if (!chain) {
|
|
102
101
|
return {
|
|
103
|
-
handleSendTransaction:
|
|
102
|
+
handleSendTransaction: () => {
|
|
104
103
|
throw new Error('handleSendTransaction Not Implemented');
|
|
105
104
|
},
|
|
106
|
-
handleSignMessage:
|
|
105
|
+
handleSignMessage: () => {
|
|
107
106
|
throw new Error('handleSendTransaction Not Implemented');
|
|
108
107
|
},
|
|
109
|
-
handleSignTransaction:
|
|
108
|
+
handleSignTransaction: () => {
|
|
110
109
|
throw new Error('handleSendTransaction Not Implemented');
|
|
111
110
|
},
|
|
112
111
|
onSuccess: props.onSuccess,
|
|
@@ -114,115 +113,76 @@ function getHandlers(props) {
|
|
|
114
113
|
};
|
|
115
114
|
}
|
|
116
115
|
return CoinflowUtils_1.CoinflowUtils.byBlockchain(chain, {
|
|
117
|
-
solana:
|
|
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
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
},
|
|
152
|
-
|
|
153
|
-
return getStellarWalletHandlers({
|
|
154
|
-
wallet: wallet,
|
|
155
|
-
onSuccess: props.onSuccess,
|
|
156
|
-
onAuthDeclined: props.onAuthDeclined,
|
|
157
|
-
});
|
|
158
|
-
},
|
|
159
|
-
monad: function () {
|
|
160
|
-
return getEvmWalletHandlers({
|
|
161
|
-
wallet: wallet,
|
|
162
|
-
onSuccess: props.onSuccess,
|
|
163
|
-
onAuthDeclined: props.onAuthDeclined,
|
|
164
|
-
});
|
|
165
|
-
},
|
|
166
|
-
user: function () { return getSessionKeyHandlers(props); },
|
|
116
|
+
solana: () => getSolanaWalletHandlers({
|
|
117
|
+
wallet: wallet,
|
|
118
|
+
onSuccess: props.onSuccess,
|
|
119
|
+
onAuthDeclined: props.onAuthDeclined,
|
|
120
|
+
}),
|
|
121
|
+
eth: () => getEvmWalletHandlers({
|
|
122
|
+
wallet: wallet,
|
|
123
|
+
onSuccess: props.onSuccess,
|
|
124
|
+
onAuthDeclined: props.onAuthDeclined,
|
|
125
|
+
}),
|
|
126
|
+
polygon: () => getEvmWalletHandlers({
|
|
127
|
+
wallet: wallet,
|
|
128
|
+
onSuccess: props.onSuccess,
|
|
129
|
+
onAuthDeclined: props.onAuthDeclined,
|
|
130
|
+
}),
|
|
131
|
+
base: () => getEvmWalletHandlers({
|
|
132
|
+
wallet: wallet,
|
|
133
|
+
onSuccess: props.onSuccess,
|
|
134
|
+
onAuthDeclined: props.onAuthDeclined,
|
|
135
|
+
}),
|
|
136
|
+
arbitrum: () => getEvmWalletHandlers({
|
|
137
|
+
wallet: wallet,
|
|
138
|
+
onSuccess: props.onSuccess,
|
|
139
|
+
onAuthDeclined: props.onAuthDeclined,
|
|
140
|
+
}),
|
|
141
|
+
stellar: () => getStellarWalletHandlers({
|
|
142
|
+
wallet: wallet,
|
|
143
|
+
onSuccess: props.onSuccess,
|
|
144
|
+
onAuthDeclined: props.onAuthDeclined,
|
|
145
|
+
}),
|
|
146
|
+
monad: () => getEvmWalletHandlers({
|
|
147
|
+
wallet: wallet,
|
|
148
|
+
onSuccess: props.onSuccess,
|
|
149
|
+
onAuthDeclined: props.onAuthDeclined,
|
|
150
|
+
}),
|
|
151
|
+
user: () => getSessionKeyHandlers(props),
|
|
167
152
|
})();
|
|
168
153
|
}
|
|
169
|
-
function getSolanaWalletHandlers(
|
|
170
|
-
var _this = this;
|
|
171
|
-
var wallet = _a.wallet, onSuccess = _a.onSuccess, onAuthDeclined = _a.onAuthDeclined;
|
|
154
|
+
function getSolanaWalletHandlers({ wallet, onSuccess, onAuthDeclined, }) {
|
|
172
155
|
return {
|
|
173
|
-
handleSendTransaction:
|
|
174
|
-
|
|
175
|
-
return
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
var signTransaction, tx, signedTransaction;
|
|
204
|
-
return tslib_1.__generator(this, function (_a) {
|
|
205
|
-
switch (_a.label) {
|
|
206
|
-
case 0:
|
|
207
|
-
signTransaction = wallet.signTransaction;
|
|
208
|
-
if (!signTransaction) {
|
|
209
|
-
throw new Error('signTransaction is not supported by this wallet');
|
|
210
|
-
}
|
|
211
|
-
tx = getSolanaTransaction(transaction);
|
|
212
|
-
return [4 /*yield*/, signTransaction(tx)];
|
|
213
|
-
case 1:
|
|
214
|
-
signedTransaction = _a.sent();
|
|
215
|
-
if (!SolanaPeerDeps_1.base58)
|
|
216
|
-
throw new Error('bs58 dependency is required');
|
|
217
|
-
return [2 /*return*/, SolanaPeerDeps_1.base58.encode(Uint8Array.from(signedTransaction.serialize({
|
|
218
|
-
requireAllSignatures: false,
|
|
219
|
-
verifySignatures: false,
|
|
220
|
-
})))];
|
|
221
|
-
}
|
|
222
|
-
});
|
|
223
|
-
}); },
|
|
224
|
-
onSuccess: onSuccess,
|
|
225
|
-
onAuthDeclined: onAuthDeclined,
|
|
156
|
+
handleSendTransaction: async (transaction) => {
|
|
157
|
+
const tx = getSolanaTransaction(transaction);
|
|
158
|
+
return await wallet.sendTransaction(tx);
|
|
159
|
+
},
|
|
160
|
+
handleSignMessage: async (message) => {
|
|
161
|
+
const signMessage = wallet.signMessage;
|
|
162
|
+
if (!signMessage) {
|
|
163
|
+
throw new Error('signMessage is not supported by this wallet');
|
|
164
|
+
}
|
|
165
|
+
const signedMessage = await signMessage(new TextEncoder().encode(message));
|
|
166
|
+
if (!SolanaPeerDeps_1.base58)
|
|
167
|
+
throw new Error('bs58 dependency is required');
|
|
168
|
+
return SolanaPeerDeps_1.base58.encode(signedMessage);
|
|
169
|
+
},
|
|
170
|
+
handleSignTransaction: async (transaction) => {
|
|
171
|
+
const signTransaction = wallet.signTransaction;
|
|
172
|
+
if (!signTransaction) {
|
|
173
|
+
throw new Error('signTransaction is not supported by this wallet');
|
|
174
|
+
}
|
|
175
|
+
const tx = getSolanaTransaction(transaction);
|
|
176
|
+
const signedTransaction = await signTransaction(tx);
|
|
177
|
+
if (!SolanaPeerDeps_1.base58)
|
|
178
|
+
throw new Error('bs58 dependency is required');
|
|
179
|
+
return SolanaPeerDeps_1.base58.encode(Uint8Array.from(signedTransaction.serialize({
|
|
180
|
+
requireAllSignatures: false,
|
|
181
|
+
verifySignatures: false,
|
|
182
|
+
})));
|
|
183
|
+
},
|
|
184
|
+
onSuccess,
|
|
185
|
+
onAuthDeclined,
|
|
226
186
|
};
|
|
227
187
|
}
|
|
228
188
|
function getSolanaTransaction(data) {
|
|
@@ -230,92 +190,58 @@ function getSolanaTransaction(data) {
|
|
|
230
190
|
throw new Error('@solana/web3.js is not defined. Please install @solana/web3.js into your project');
|
|
231
191
|
if (!SolanaPeerDeps_1.base58)
|
|
232
192
|
throw new Error('bs58 is not defined. Please install bs58 into your project');
|
|
233
|
-
|
|
234
|
-
|
|
193
|
+
const parsedUInt8Array = SolanaPeerDeps_1.base58.decode(data);
|
|
194
|
+
const vtx = SolanaPeerDeps_1.web3.VersionedTransaction.deserialize(parsedUInt8Array);
|
|
235
195
|
if (vtx.version === 'legacy')
|
|
236
196
|
return SolanaPeerDeps_1.web3.Transaction.from(parsedUInt8Array);
|
|
237
197
|
return vtx;
|
|
238
198
|
}
|
|
239
|
-
function getEvmWalletHandlers(
|
|
240
|
-
var _this = this;
|
|
241
|
-
var wallet = _a.wallet, onSuccess = _a.onSuccess, onAuthDeclined = _a.onAuthDeclined;
|
|
199
|
+
function getEvmWalletHandlers({ wallet, onSuccess, onAuthDeclined, }) {
|
|
242
200
|
return {
|
|
243
|
-
handleSendTransaction:
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
}
|
|
254
|
-
});
|
|
255
|
-
}); },
|
|
256
|
-
handleSignMessage: function (message) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
257
|
-
return tslib_1.__generator(this, function (_a) {
|
|
258
|
-
return [2 /*return*/, wallet.signMessage(message)];
|
|
259
|
-
});
|
|
260
|
-
}); },
|
|
261
|
-
onSuccess: onSuccess,
|
|
262
|
-
onAuthDeclined: onAuthDeclined,
|
|
201
|
+
handleSendTransaction: async (transaction) => {
|
|
202
|
+
const tx = JSON.parse(Buffer.from(transaction, 'base64').toString());
|
|
203
|
+
const { hash } = await wallet.sendTransaction(tx);
|
|
204
|
+
return hash;
|
|
205
|
+
},
|
|
206
|
+
handleSignMessage: async (message) => {
|
|
207
|
+
return wallet.signMessage(message);
|
|
208
|
+
},
|
|
209
|
+
onSuccess,
|
|
210
|
+
onAuthDeclined,
|
|
263
211
|
};
|
|
264
212
|
}
|
|
265
|
-
function getStellarWalletHandlers(
|
|
266
|
-
var _this = this;
|
|
267
|
-
var wallet = _a.wallet, onSuccess = _a.onSuccess, onAuthDeclined = _a.onAuthDeclined;
|
|
213
|
+
function getStellarWalletHandlers({ wallet, onSuccess, onAuthDeclined, }) {
|
|
268
214
|
return {
|
|
269
|
-
handleSendTransaction:
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
handleSignTransaction: function (transaction) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
291
|
-
return tslib_1.__generator(this, function (_a) {
|
|
292
|
-
switch (_a.label) {
|
|
293
|
-
case 0:
|
|
294
|
-
if (!wallet.signTransaction) {
|
|
295
|
-
throw new Error('signTransaction is not supported by this wallet');
|
|
296
|
-
}
|
|
297
|
-
return [4 /*yield*/, wallet.signTransaction(transaction)];
|
|
298
|
-
case 1:
|
|
299
|
-
// Returns signed base64 XDR
|
|
300
|
-
return [2 /*return*/, _a.sent()];
|
|
301
|
-
}
|
|
302
|
-
});
|
|
303
|
-
}); },
|
|
304
|
-
onSuccess: onSuccess,
|
|
305
|
-
onAuthDeclined: onAuthDeclined,
|
|
215
|
+
handleSendTransaction: async (transaction) => {
|
|
216
|
+
// transaction is unsigned base64 XDR
|
|
217
|
+
// dapp needs to handle sending and confirming
|
|
218
|
+
throw new Error(`sendTransaction is not supported on stellar, error when sending: ${transaction}`);
|
|
219
|
+
},
|
|
220
|
+
handleSignMessage: async (message) => {
|
|
221
|
+
if (!wallet.signMessage) {
|
|
222
|
+
throw new Error('signMessage is not supported by this wallet');
|
|
223
|
+
}
|
|
224
|
+
// Returns base64-encoded signature
|
|
225
|
+
return await wallet.signMessage(message);
|
|
226
|
+
},
|
|
227
|
+
handleSignTransaction: async (transaction) => {
|
|
228
|
+
if (!wallet.signTransaction) {
|
|
229
|
+
throw new Error('signTransaction is not supported by this wallet');
|
|
230
|
+
}
|
|
231
|
+
// Returns signed base64 XDR
|
|
232
|
+
return await wallet.signTransaction(transaction);
|
|
233
|
+
},
|
|
234
|
+
onSuccess,
|
|
235
|
+
onAuthDeclined,
|
|
306
236
|
};
|
|
307
237
|
}
|
|
308
|
-
function getSessionKeyHandlers(
|
|
309
|
-
var _this = this;
|
|
310
|
-
var onSuccess = _a.onSuccess, onAuthDeclined = _a.onAuthDeclined;
|
|
238
|
+
function getSessionKeyHandlers({ onSuccess, onAuthDeclined, }) {
|
|
311
239
|
return {
|
|
312
|
-
handleSendTransaction:
|
|
313
|
-
return
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
onSuccess: onSuccess,
|
|
318
|
-
onAuthDeclined: onAuthDeclined,
|
|
240
|
+
handleSendTransaction: async () => {
|
|
241
|
+
return Promise.resolve('');
|
|
242
|
+
},
|
|
243
|
+
onSuccess,
|
|
244
|
+
onAuthDeclined,
|
|
319
245
|
};
|
|
320
246
|
}
|
|
321
247
|
//# 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,mDAA8C;AAE9C,qDAA8C;AA2B9C,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;AACjC,CAAC,EATW,oBAAoB,aAApB,oBAAoB,GAApB,oBAAoB,QAS/B;AAED,yBACE,KAA2D;IAE3D,IAAI,MAA+B,CAAC;IACpC,IACE,QAAQ,IAAI,KAAK;QACjB,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ;QAChC,KAAK,CAAC,MAAM;QACZ,QAAQ,IAAI,KAAK,CAAC,MAAM;QAExB,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,MAAqB,CAAC;SACzC,IAAI,QAAQ,IAAI,KAAK,IAAI,KAAK,CAAC,MAAM;QAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAElE,IAAI,CAAC,MAAM;QAAE,OAAO;IAEpB,IAAI,OAAO,MAAM,KAAK,QAAQ;QAAE,OAAO,MAAM,CAAC;IAE9C,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC/B,IAAI,WAAW,IAAI,MAAM;YACvB,OAAO,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;QAEpE,IAAI,SAAS,IAAI,MAAM;YACrB,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAE,MAAM,CAAC,OAAkB,CAAC,CAAC,CAAC,SAAS,CAAC;IACnE,CAAC;IAED,OAAO,IAAI,CAAC;A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CAAC;AAED,SAAS,wBAAwB,CAAC,EAChC,MAAM,EACN,SAAS,EACT,cAAc,GAKf;IACC,OAAO;QACL,qBAAqB,EAAE,KAAK,EAAE,WAAmB,EAAE,EAAE;YACnD,qCAAqC;YACrC,8CAA8C;YAC9C,MAAM,IAAI,KAAK,CACb,oEAAoE,WAAW,EAAE,CAClF,CAAC;QACJ,CAAC;QACD,iBAAiB,EAAE,KAAK,EAAE,OAAe,EAAE,EAAE;YAC3C,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;gBACxB,MAAM,IAAI,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,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var _a;
|
|
3
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.RN_REDIRECT_MESSAGE_NAME = exports.CardType = exports.paymentMethodLabels = exports.PaymentMethods = exports.ThreeDsChallengePreference = exports.MerchantStyle = exports.SettlementType = exports.WithdrawSpeed = exports.WithdrawCategory = void 0;
|
|
3
|
+
exports.RN_REDIRECT_MESSAGE_NAME = exports.CardType = exports.paymentMethodLabels = exports.PaymentMethods = exports.ThreeDsChallengePreference = exports.ChargebackProtectionAccountType = exports.MerchantStyle = exports.SettlementType = exports.WithdrawSpeed = exports.WithdrawCategory = void 0;
|
|
5
4
|
exports.isZeroAuthVerifyCard = isZeroAuthVerifyCard;
|
|
6
5
|
exports.isZeroAuthSavedPaymentMethods = isZeroAuthSavedPaymentMethods;
|
|
7
6
|
var WithdrawCategory;
|
|
@@ -41,6 +40,12 @@ var MerchantStyle;
|
|
|
41
40
|
MerchantStyle["Sharp"] = "sharp";
|
|
42
41
|
MerchantStyle["Pill"] = "pill";
|
|
43
42
|
})(MerchantStyle || (exports.MerchantStyle = MerchantStyle = {}));
|
|
43
|
+
var ChargebackProtectionAccountType;
|
|
44
|
+
(function (ChargebackProtectionAccountType) {
|
|
45
|
+
ChargebackProtectionAccountType["GUEST"] = "guest";
|
|
46
|
+
ChargebackProtectionAccountType["PRIVATE"] = "private";
|
|
47
|
+
ChargebackProtectionAccountType["BUSINESS"] = "business";
|
|
48
|
+
})(ChargebackProtectionAccountType || (exports.ChargebackProtectionAccountType = ChargebackProtectionAccountType = {}));
|
|
44
49
|
var ThreeDsChallengePreference;
|
|
45
50
|
(function (ThreeDsChallengePreference) {
|
|
46
51
|
ThreeDsChallengePreference["NoPreference"] = "NoPreference";
|
|
@@ -62,20 +67,20 @@ var PaymentMethods;
|
|
|
62
67
|
PaymentMethods["instantBankTransfer"] = "instantBankTransfer";
|
|
63
68
|
PaymentMethods["wire"] = "wire";
|
|
64
69
|
})(PaymentMethods || (exports.PaymentMethods = PaymentMethods = {}));
|
|
65
|
-
exports.paymentMethodLabels =
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
70
|
+
exports.paymentMethodLabels = {
|
|
71
|
+
[PaymentMethods.card]: 'Card',
|
|
72
|
+
[PaymentMethods.ach]: 'ACH',
|
|
73
|
+
[PaymentMethods.fasterPayments]: 'Faster Payments',
|
|
74
|
+
[PaymentMethods.sepa]: 'SEPA',
|
|
75
|
+
[PaymentMethods.pix]: 'PIX',
|
|
76
|
+
[PaymentMethods.usdc]: 'USDC',
|
|
77
|
+
[PaymentMethods.googlePay]: 'Google Pay',
|
|
78
|
+
[PaymentMethods.applePay]: 'Apple Pay',
|
|
79
|
+
[PaymentMethods.credits]: 'Credits',
|
|
80
|
+
[PaymentMethods.crypto]: 'Crypto',
|
|
81
|
+
[PaymentMethods.instantBankTransfer]: 'Instant Bank Transfer',
|
|
82
|
+
[PaymentMethods.wire]: 'Wire Transfer',
|
|
83
|
+
};
|
|
79
84
|
var CardType;
|
|
80
85
|
(function (CardType) {
|
|
81
86
|
CardType["VISA"] = "VISA";
|
|
@@ -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,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,iCAAa,CAAA;IACb,yCAAqB,CAAA;AACvB,CAAC,EAH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iUrl(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;
|