@coinflowlabs/react 4.5.0 → 4.5.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/CoinflowWithdrawHistory.d.ts +3 -3
- package/build/cjs/CoinflowWithdrawHistory.js.map +1 -1
- package/build/cjs/common/CoinflowLibMessageHandlers.d.ts +4 -4
- package/build/cjs/common/CoinflowLibMessageHandlers.js +82 -30
- package/build/cjs/common/CoinflowLibMessageHandlers.js.map +1 -1
- package/build/cjs/common/CoinflowTypes.d.ts +39 -13
- package/build/cjs/common/CoinflowTypes.js.map +1 -1
- package/build/cjs/common/CoinflowUtils.d.ts +2 -15
- package/build/cjs/common/CoinflowUtils.js +3 -106
- package/build/cjs/common/CoinflowUtils.js.map +1 -1
- package/build/esm/CoinflowWithdrawHistory.d.ts +3 -3
- package/build/esm/CoinflowWithdrawHistory.js +2 -2
- package/build/esm/CoinflowWithdrawHistory.js.map +1 -1
- package/build/esm/common/CoinflowLibMessageHandlers.d.ts +4 -4
- package/build/esm/common/CoinflowLibMessageHandlers.js +82 -30
- package/build/esm/common/CoinflowLibMessageHandlers.js.map +1 -1
- package/build/esm/common/CoinflowTypes.d.ts +39 -13
- package/build/esm/common/CoinflowTypes.js.map +1 -1
- package/build/esm/common/CoinflowUtils.d.ts +2 -15
- package/build/esm/common/CoinflowUtils.js +3 -106
- package/build/esm/common/CoinflowUtils.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -7
package/README.md
CHANGED
|
@@ -72,6 +72,14 @@ Props:
|
|
|
72
72
|
|
|
73
73
|
# Changelog
|
|
74
74
|
|
|
75
|
+
## 4.5.2
|
|
76
|
+
|
|
77
|
+
- Updating optional peer dependencies to play nice with various bundlers
|
|
78
|
+
|
|
79
|
+
## 4.5.1
|
|
80
|
+
|
|
81
|
+
- Added sessionKey authentication mechanism to `CoinflowWithdraw`
|
|
82
|
+
|
|
75
83
|
## 4.5.0
|
|
76
84
|
|
|
77
85
|
- Added sessionKey authentication mechanism to `CoinflowPurchase`
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import {
|
|
3
|
-
export declare function CoinflowWithdrawHistory(props:
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CoinflowHistoryProps } from './common';
|
|
3
|
+
export declare function CoinflowWithdrawHistory(props: CoinflowHistoryProps): React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoinflowWithdrawHistory.js","sourceRoot":"","sources":["../../src/CoinflowWithdrawHistory.tsx"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"CoinflowWithdrawHistory.js","sourceRoot":"","sources":["../../src/CoinflowWithdrawHistory.tsx"],"names":[],"mappings":";;AAUA,0DAmBC;;AA7BD,mDAAgD;AAChD,qDAAqC;AACrC,mCAMkB;AAElB,SAAgB,uBAAuB,CAAC,KAA2B;IACjE,IAAM,WAAW,GAAG,IAAA,eAAO,EAAsB;QAC/C,IAAM,YAAY,GAAG,IAAA,wBAAe,EAAC,KAAK,CAAC,CAAC;QAC5C,6CACK,KAAK,KACR,YAAY,cAAA,EACZ,KAAK,EAAE,4BAAqB,KAAK,CAAC,UAAU,CAAE,EAC9C,WAAW,EAAE,SAAS,IACtB;IACJ,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,IAAM,eAAe,GAAG,IAAA,eAAO,EAAwB;QACrD,6CACK,IAAA,oBAAW,EAAC,KAAK,CAAC,KACrB,kBAAkB,EAAE,KAAK,CAAC,kBAAkB,IAC5C;IACJ,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,OAAO,8BAAC,+BAAc,uBAAK,WAAW,EAAM,eAAe,EAAI,CAAC;AAClE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CoinflowPurchaseProps,
|
|
1
|
+
import { CoinflowPurchaseProps, OnSuccessMethod } from './CoinflowTypes';
|
|
2
2
|
export type WalletCall = {
|
|
3
3
|
method: IFrameMessageMethods;
|
|
4
4
|
data: string;
|
|
@@ -24,9 +24,9 @@ declare enum IFrameMessageMethods {
|
|
|
24
24
|
SendTransaction = "sendTransaction",
|
|
25
25
|
HeightChange = "heightChange",
|
|
26
26
|
Success = "success",
|
|
27
|
-
|
|
27
|
+
Loaded = "loaded"
|
|
28
28
|
}
|
|
29
|
-
export declare function getWalletPubkey(input:
|
|
29
|
+
export declare function getWalletPubkey(input: CoinflowPurchaseProps): string | null | undefined;
|
|
30
30
|
export declare function handleIFrameMessage(rawMessage: string, handlers: IFrameMessageHandlers): Promise<string> | void;
|
|
31
|
-
export declare function getHandlers(props:
|
|
31
|
+
export declare function getHandlers(props: CoinflowPurchaseProps): Omit<IFrameMessageHandlers, 'handleHeightChange'>;
|
|
32
32
|
export {};
|
|
@@ -13,20 +13,28 @@ var IFrameMessageMethods;
|
|
|
13
13
|
IFrameMessageMethods["SendTransaction"] = "sendTransaction";
|
|
14
14
|
IFrameMessageMethods["HeightChange"] = "heightChange";
|
|
15
15
|
IFrameMessageMethods["Success"] = "success";
|
|
16
|
-
IFrameMessageMethods["
|
|
16
|
+
IFrameMessageMethods["Loaded"] = "loaded";
|
|
17
17
|
})(IFrameMessageMethods || (IFrameMessageMethods = {}));
|
|
18
18
|
function getWalletPubkey(input) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
var wallet;
|
|
20
|
+
if ('signer' in input &&
|
|
21
|
+
typeof input.signer === 'object' &&
|
|
22
|
+
input.signer &&
|
|
23
|
+
'wallet' in input.signer)
|
|
24
|
+
wallet = input.signer.wallet;
|
|
25
|
+
else if ('wallet' in input && input.wallet)
|
|
26
|
+
wallet = input.wallet;
|
|
27
|
+
if (!wallet)
|
|
28
|
+
return;
|
|
29
|
+
if (typeof wallet === 'string')
|
|
30
|
+
return wallet;
|
|
31
|
+
if (typeof wallet === 'object') {
|
|
32
|
+
if ('publicKey' in wallet)
|
|
33
|
+
return wallet.publicKey ? wallet.publicKey.toString() : undefined;
|
|
34
|
+
if ('address' in wallet)
|
|
35
|
+
return wallet.address ? wallet.address : undefined;
|
|
36
|
+
if ('accountId' in wallet)
|
|
37
|
+
return wallet.accountId ? wallet.accountId : undefined;
|
|
30
38
|
}
|
|
31
39
|
return null;
|
|
32
40
|
}
|
|
@@ -62,32 +70,78 @@ function handleIFrameMessage(rawMessage, handlers) {
|
|
|
62
70
|
return;
|
|
63
71
|
handlers.onSuccess(walletCall.info);
|
|
64
72
|
return;
|
|
73
|
+
case IFrameMessageMethods.Loaded:
|
|
74
|
+
return;
|
|
65
75
|
}
|
|
66
76
|
console.warn("Didn't expect to get here, handleIFrameMessage method:".concat(method, " is not one of ").concat(Object.values(IFrameMessageMethods)));
|
|
67
77
|
}
|
|
68
78
|
function getHandlers(props) {
|
|
69
|
-
|
|
79
|
+
var chain;
|
|
80
|
+
var wallet;
|
|
81
|
+
if ('signer' in props &&
|
|
82
|
+
typeof props.signer === 'object' &&
|
|
83
|
+
props.signer &&
|
|
84
|
+
'blockchain' in props.signer &&
|
|
85
|
+
'wallet' in props.signer) {
|
|
86
|
+
chain = props.signer.blockchain;
|
|
87
|
+
wallet = props.signer.wallet;
|
|
88
|
+
}
|
|
89
|
+
else if ('blockchain' in props && props.blockchain) {
|
|
90
|
+
chain = props.blockchain;
|
|
91
|
+
wallet = props.wallet;
|
|
92
|
+
}
|
|
93
|
+
if (!chain) {
|
|
70
94
|
return {
|
|
71
95
|
handleSendTransaction: function () {
|
|
72
|
-
throw new Error('handleSendTransaction Not Implemented
|
|
96
|
+
throw new Error('handleSendTransaction Not Implemented');
|
|
73
97
|
},
|
|
74
98
|
handleSignMessage: function () {
|
|
75
|
-
throw new Error('handleSendTransaction Not Implemented
|
|
99
|
+
throw new Error('handleSendTransaction Not Implemented');
|
|
76
100
|
},
|
|
77
101
|
handleSignTransaction: function () {
|
|
78
|
-
throw new Error('handleSendTransaction Not Implemented
|
|
102
|
+
throw new Error('handleSendTransaction Not Implemented');
|
|
79
103
|
},
|
|
80
104
|
onSuccess: props.onSuccess,
|
|
81
105
|
};
|
|
82
106
|
}
|
|
83
|
-
return CoinflowUtils_1.CoinflowUtils.byBlockchain(
|
|
84
|
-
solana: function () {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
107
|
+
return CoinflowUtils_1.CoinflowUtils.byBlockchain(chain, {
|
|
108
|
+
solana: function () {
|
|
109
|
+
return getSolanaWalletHandlers({
|
|
110
|
+
wallet: wallet,
|
|
111
|
+
onSuccess: props.onSuccess,
|
|
112
|
+
});
|
|
113
|
+
},
|
|
114
|
+
near: function () {
|
|
115
|
+
return getNearWalletHandlers({
|
|
116
|
+
wallet: wallet,
|
|
117
|
+
onSuccess: props.onSuccess,
|
|
118
|
+
});
|
|
119
|
+
},
|
|
120
|
+
eth: function () {
|
|
121
|
+
return getEvmWalletHandlers({
|
|
122
|
+
wallet: wallet,
|
|
123
|
+
onSuccess: props.onSuccess,
|
|
124
|
+
});
|
|
125
|
+
},
|
|
126
|
+
polygon: function () {
|
|
127
|
+
return getEvmWalletHandlers({
|
|
128
|
+
wallet: wallet,
|
|
129
|
+
onSuccess: props.onSuccess,
|
|
130
|
+
});
|
|
131
|
+
},
|
|
132
|
+
base: function () {
|
|
133
|
+
return getEvmWalletHandlers({
|
|
134
|
+
wallet: wallet,
|
|
135
|
+
onSuccess: props.onSuccess,
|
|
136
|
+
});
|
|
137
|
+
},
|
|
138
|
+
arbitrum: function () {
|
|
139
|
+
return getEvmWalletHandlers({
|
|
140
|
+
wallet: wallet,
|
|
141
|
+
onSuccess: props.onSuccess,
|
|
142
|
+
});
|
|
143
|
+
},
|
|
144
|
+
user: function () { return getSessionKeyHandlers(props); },
|
|
91
145
|
})();
|
|
92
146
|
}
|
|
93
147
|
function getSolanaWalletHandlers(_a) {
|
|
@@ -162,7 +216,6 @@ function getSolanaTransaction(data) {
|
|
|
162
216
|
function getNearWalletHandlers(_a) {
|
|
163
217
|
var _this = this;
|
|
164
218
|
var wallet = _a.wallet, onSuccess = _a.onSuccess;
|
|
165
|
-
var nearWallet = wallet;
|
|
166
219
|
return {
|
|
167
220
|
handleSendTransaction: function (transaction) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
168
221
|
var action, executionOutcome, transactionResult;
|
|
@@ -170,7 +223,7 @@ function getNearWalletHandlers(_a) {
|
|
|
170
223
|
switch (_a.label) {
|
|
171
224
|
case 0:
|
|
172
225
|
action = JSON.parse(Buffer.from(transaction, 'base64').toString());
|
|
173
|
-
return [4 /*yield*/,
|
|
226
|
+
return [4 /*yield*/, wallet.signAndSendTransaction(action)];
|
|
174
227
|
case 1:
|
|
175
228
|
executionOutcome = _a.sent();
|
|
176
229
|
if (!executionOutcome)
|
|
@@ -186,7 +239,6 @@ function getNearWalletHandlers(_a) {
|
|
|
186
239
|
function getEvmWalletHandlers(_a) {
|
|
187
240
|
var _this = this;
|
|
188
241
|
var wallet = _a.wallet, onSuccess = _a.onSuccess;
|
|
189
|
-
var evmWallet = wallet;
|
|
190
242
|
return {
|
|
191
243
|
handleSendTransaction: function (transaction) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
192
244
|
var tx, hash;
|
|
@@ -194,7 +246,7 @@ function getEvmWalletHandlers(_a) {
|
|
|
194
246
|
switch (_a.label) {
|
|
195
247
|
case 0:
|
|
196
248
|
tx = JSON.parse(Buffer.from(transaction, 'base64').toString());
|
|
197
|
-
return [4 /*yield*/,
|
|
249
|
+
return [4 /*yield*/, wallet.sendTransaction(tx)];
|
|
198
250
|
case 1:
|
|
199
251
|
hash = (_a.sent()).hash;
|
|
200
252
|
return [2 /*return*/, hash];
|
|
@@ -203,13 +255,13 @@ function getEvmWalletHandlers(_a) {
|
|
|
203
255
|
}); },
|
|
204
256
|
handleSignMessage: function (message) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
205
257
|
return tslib_1.__generator(this, function (_a) {
|
|
206
|
-
return [2 /*return*/,
|
|
258
|
+
return [2 /*return*/, wallet.signMessage(message)];
|
|
207
259
|
});
|
|
208
260
|
}); },
|
|
209
261
|
onSuccess: onSuccess,
|
|
210
262
|
};
|
|
211
263
|
}
|
|
212
|
-
function
|
|
264
|
+
function getSessionKeyHandlers(_a) {
|
|
213
265
|
var _this = this;
|
|
214
266
|
var onSuccess = _a.onSuccess;
|
|
215
267
|
return {
|
|
@@ -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":";;AAwCA,0CA6BC;AAED,kDAqCC;AAED,kCAmEC;;AAxKD,iDAA8C;AAE9C,mDAA8C;AAoB9C,IAAK,oBAOJ;AAPD,WAAK,oBAAoB;IACvB,mDAA2B,CAAA;IAC3B,2DAAmC,CAAA;IACnC,2DAAmC,CAAA;IACnC,qDAA6B,CAAA;IAC7B,2CAAmB,CAAA;IACnB,yCAAiB,CAAA;AACnB,CAAC,EAPI,oBAAoB,KAApB,oBAAoB,QAOxB;AAED,SAAgB,eAAe,CAC7B,KAA4B;IAE5B,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,GAA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AS,WAAA;KACV,CAAC;AACJ,CAAC;AAED,SAAS,oBAAoB,CAAC,EAM7B;IAND,iBAkBC;QAjBC,MAAM,YAAA,EACN,SAAS,eAAA;IAKT,OAAO;QACL,qBAAqB,EAAE,UAAO,WAAmB;;;;;wBACzC,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;wBACtD,qBAAM,MAAM,CAAC,eAAe,CAAC,EAAE,CAAC,EAAA;;wBAAxC,IAAI,GAAI,CAAA,SAAgC,CAAA,KAApC;wBACX,sBAAO,IAAI,EAAC;;;aACb;QACD,iBAAiB,EAAE,UAAO,OAAe;;gBACvC,sBAAO,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,EAAC;;aACpC;QACD,SAAS,WAAA;KACV,CAAC;AACJ,CAAC;AAED,SAAS,qBAAqB,CAAC,EAEY;IAF3C,iBAYC;QAXC,SAAS,eAAA;IAKT,OAAO;QACL,qBAAqB,EAAE;;gBACrB,sBAAO,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,EAAC;;aAC5B;QACD,SAAS,WAAA;KACV,CAAC;AACJ,CAAC"}
|
|
@@ -97,12 +97,17 @@ export interface CoinflowSolanaHistoryProps extends CoinflowTypes {
|
|
|
97
97
|
connection: Connection;
|
|
98
98
|
blockchain: 'solana';
|
|
99
99
|
}
|
|
100
|
+
export interface CoinflowSessionKeyHistoryProps extends CoinflowTypes {
|
|
101
|
+
sessionKey: string;
|
|
102
|
+
blockchain?: undefined;
|
|
103
|
+
}
|
|
100
104
|
export interface CoinflowNearHistoryProps extends CoinflowTypes {
|
|
101
105
|
wallet: NearWallet;
|
|
102
106
|
blockchain: 'near';
|
|
103
107
|
}
|
|
104
108
|
export interface CoinflowEvmHistoryProps extends CoinflowTypes {
|
|
105
109
|
wallet: EthWallet;
|
|
110
|
+
blockchain: 'eth' | 'polygon' | 'base' | 'arbitrum';
|
|
106
111
|
}
|
|
107
112
|
export interface CoinflowEthHistoryProps extends CoinflowEvmHistoryProps {
|
|
108
113
|
blockchain: 'eth';
|
|
@@ -116,7 +121,7 @@ export interface CoinflowBaseHistoryProps extends CoinflowEvmHistoryProps {
|
|
|
116
121
|
export interface CoinflowArbitrumHistoryProps extends CoinflowEvmHistoryProps {
|
|
117
122
|
blockchain: 'arbitrum';
|
|
118
123
|
}
|
|
119
|
-
export type CoinflowHistoryProps = CoinflowSolanaHistoryProps | CoinflowNearHistoryProps | CoinflowPolygonHistoryProps | CoinflowEthHistoryProps | CoinflowBaseHistoryProps | CoinflowArbitrumHistoryProps;
|
|
124
|
+
export type CoinflowHistoryProps = CoinflowSolanaHistoryProps | CoinflowNearHistoryProps | CoinflowPolygonHistoryProps | CoinflowEthHistoryProps | CoinflowBaseHistoryProps | CoinflowArbitrumHistoryProps | CoinflowSessionKeyHistoryProps;
|
|
120
125
|
/** Transactions **/
|
|
121
126
|
export type NearFtTransferCallAction = {
|
|
122
127
|
methodName: 'ft_transfer_call';
|
|
@@ -126,7 +131,7 @@ export type NearFtTransferCallAction = {
|
|
|
126
131
|
};
|
|
127
132
|
type Bytes = ArrayLike<number>;
|
|
128
133
|
type BytesLike = Bytes | string;
|
|
129
|
-
type RawProductData =
|
|
134
|
+
type RawProductData = any;
|
|
130
135
|
/** Purchase **/
|
|
131
136
|
export type ChargebackProtectionData = ChargebackProtectionItem[];
|
|
132
137
|
export interface ChargebackProtectionItem {
|
|
@@ -158,7 +163,9 @@ export declare enum ThreeDsChallengePreference {
|
|
|
158
163
|
export interface CoinflowCommonPurchaseProps extends CoinflowTypes {
|
|
159
164
|
amount?: number | string;
|
|
160
165
|
onSuccess?: OnSuccessMethod;
|
|
161
|
-
webhookInfo?:
|
|
166
|
+
webhookInfo?: {
|
|
167
|
+
[key: string]: any;
|
|
168
|
+
};
|
|
162
169
|
email?: string;
|
|
163
170
|
chargebackProtectionData?: ChargebackProtectionData;
|
|
164
171
|
planCode?: string;
|
|
@@ -167,6 +174,12 @@ export interface CoinflowCommonPurchaseProps extends CoinflowTypes {
|
|
|
167
174
|
customerInfo?: CustomerInfo;
|
|
168
175
|
settlementType?: SettlementType;
|
|
169
176
|
authOnly?: boolean;
|
|
177
|
+
/**
|
|
178
|
+
* The DeviceID gotten from the Coinflow SDK:
|
|
179
|
+
* https://docs.coinflow.cash/docs/implement-chargeback-protection#how-to-add-chargeback-protection
|
|
180
|
+
*
|
|
181
|
+
* window?.nSureSDK?.getDeviceId()
|
|
182
|
+
*/
|
|
170
183
|
deviceId?: string;
|
|
171
184
|
jwtToken?: string;
|
|
172
185
|
/**
|
|
@@ -183,6 +196,7 @@ export interface CoinflowCommonPurchaseProps extends CoinflowTypes {
|
|
|
183
196
|
*/
|
|
184
197
|
origins?: string[];
|
|
185
198
|
threeDsChallengePreference?: ThreeDsChallengePreference;
|
|
199
|
+
destinationAuthKey?: string;
|
|
186
200
|
}
|
|
187
201
|
export interface CoinflowSolanaPurchaseProps extends CoinflowCommonPurchaseProps {
|
|
188
202
|
wallet: SolanaWallet;
|
|
@@ -252,33 +266,45 @@ export interface CoinflowCommonWithdrawProps extends CoinflowTypes {
|
|
|
252
266
|
*/
|
|
253
267
|
origins?: string[];
|
|
254
268
|
}
|
|
255
|
-
export
|
|
269
|
+
export type WalletTypes = SolanaWallet | NearWallet | EthWallet;
|
|
270
|
+
export interface SolanaWalletProps {
|
|
256
271
|
wallet: SolanaWallet;
|
|
257
272
|
connection: Connection;
|
|
258
273
|
blockchain: 'solana';
|
|
259
274
|
}
|
|
260
|
-
export
|
|
275
|
+
export type CoinflowSolanaWithdrawProps = CoinflowCommonWithdrawProps & SolanaWalletProps;
|
|
276
|
+
export interface NearWalletProps {
|
|
261
277
|
wallet: NearWallet;
|
|
262
278
|
blockchain: 'near';
|
|
263
279
|
}
|
|
264
|
-
export
|
|
280
|
+
export type CoinflowNearWithdrawProps = CoinflowCommonWithdrawProps & NearWalletProps;
|
|
281
|
+
interface EvmWalletProps {
|
|
265
282
|
wallet: EthWallet;
|
|
266
283
|
usePermit?: boolean;
|
|
267
284
|
}
|
|
268
|
-
|
|
285
|
+
type CoinflowEvmWithdrawProps = CoinflowCommonWithdrawProps & EvmWalletProps;
|
|
286
|
+
export interface EthWalletProps {
|
|
269
287
|
blockchain: 'eth';
|
|
270
|
-
usePermit?: boolean;
|
|
271
288
|
}
|
|
272
|
-
export
|
|
289
|
+
export type CoinflowEthWithdrawProps = CoinflowEvmWithdrawProps & EthWalletProps;
|
|
290
|
+
export interface PolygonWalletProps {
|
|
273
291
|
blockchain: 'polygon';
|
|
274
292
|
}
|
|
275
|
-
export
|
|
293
|
+
export type CoinflowPolygonWithdrawProps = CoinflowEvmWithdrawProps & PolygonWalletProps;
|
|
294
|
+
export interface BaseWalletProps {
|
|
276
295
|
blockchain: 'base';
|
|
277
296
|
}
|
|
278
|
-
export
|
|
297
|
+
export type CoinflowBaseWithdrawProps = CoinflowEvmWithdrawProps & BaseWalletProps;
|
|
298
|
+
export interface ArbitrumWalletProps {
|
|
279
299
|
blockchain: 'arbitrum';
|
|
280
300
|
}
|
|
281
|
-
export type
|
|
301
|
+
export type CoinflowArbitrumWithdrawProps = CoinflowEvmWithdrawProps & ArbitrumWalletProps;
|
|
302
|
+
export interface CoinflowSessionKeyWithdrawProps extends CoinflowCommonWithdrawProps {
|
|
303
|
+
sessionKey: string;
|
|
304
|
+
signer: SolanaWalletProps | NearWalletProps | EthWalletProps | PolygonWalletProps | BaseWalletProps | ArbitrumWalletProps;
|
|
305
|
+
blockchain?: undefined;
|
|
306
|
+
}
|
|
307
|
+
export type CoinflowWithdrawProps = CoinflowSolanaWithdrawProps | CoinflowNearWithdrawProps | CoinflowEthWithdrawProps | CoinflowPolygonWithdrawProps | CoinflowBaseWithdrawProps | CoinflowArbitrumWithdrawProps | CoinflowSessionKeyWithdrawProps;
|
|
282
308
|
export interface CommonEvmRedeem {
|
|
283
309
|
waitForHash?: boolean;
|
|
284
310
|
}
|
|
@@ -316,7 +342,7 @@ export interface TokenRedeem extends CommonEvmRedeem {
|
|
|
316
342
|
destination: string;
|
|
317
343
|
}
|
|
318
344
|
export type EvmTransactionData = SafeMintRedeem | ReturnedTokenIdRedeem | ReservoirRedeem | KnownTokenIdRedeem | NormalRedeem | TokenRedeem;
|
|
319
|
-
export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'webhookInfo' | 'amount' | 'customerInfo' | 'settlementType' | 'email' | 'planCode' | 'deviceId' | 'jwtToken' | 'origins' | 'threeDsChallengePreference' | 'supportEmail'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets' | 'transactionSigner' | 'lockAmount' | 'lockDefaultToken' | 'origins'>, Pick<CoinflowEvmPurchaseProps, 'authOnly'>, Pick<CoinflowSolanaPurchaseProps, 'rent' | 'nativeSolToConvert' | 'token'> {
|
|
345
|
+
export interface CoinflowIFrameProps extends Omit<CoinflowTypes, 'merchantId'>, Pick<CoinflowCommonPurchaseProps, 'chargebackProtectionData' | 'webhookInfo' | 'amount' | 'customerInfo' | 'settlementType' | 'email' | 'planCode' | 'deviceId' | 'jwtToken' | 'origins' | 'threeDsChallengePreference' | 'supportEmail'>, Pick<CoinflowCommonWithdrawProps, 'bankAccountLinkRedirect' | 'additionalWallets' | 'transactionSigner' | 'lockAmount' | 'lockDefaultToken' | 'origins'>, Pick<CoinflowEvmPurchaseProps, 'authOnly'>, Pick<CoinflowSolanaPurchaseProps, 'rent' | 'nativeSolToConvert' | 'token' | 'destinationAuthKey'> {
|
|
320
346
|
walletPubkey: string | null | undefined;
|
|
321
347
|
sessionKey?: string;
|
|
322
348
|
route: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoinflowTypes.js","sourceRoot":"","sources":["../../../src/common/CoinflowTypes.ts"],"names":[],"mappings":";;;AAQA,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,qCAAmB,CAAA;IACnB,+BAAa,CAAA;IACb,+BAAa,CAAA;AACf,CAAC,EAJW,cAAc,8BAAd,cAAc,QAIzB;AAED,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,oCAAmB,CAAA;IACnB,gCAAe,CAAA;IACf,8BAAa,CAAA;AACf,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB;
|
|
1
|
+
{"version":3,"file":"CoinflowTypes.js","sourceRoot":"","sources":["../../../src/common/CoinflowTypes.ts"],"names":[],"mappings":";;;AAQA,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,qCAAmB,CAAA;IACnB,+BAAa,CAAA;IACb,+BAAa,CAAA;AACf,CAAC,EAJW,cAAc,8BAAd,cAAc,QAIzB;AAED,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,oCAAmB,CAAA;IACnB,gCAAe,CAAA;IACf,8BAAa,CAAA;AACf,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB;AA+ND,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IACpC,2DAA6B,CAAA;IAC7B,2DAA6B,CAAA;IAC7B,qDAAuB,CAAA;AACzB,CAAC,EAJW,0BAA0B,0CAA1B,0BAA0B,QAIrC;AAySD,IAAY,QAKX;AALD,WAAY,QAAQ;IAClB,yBAAa,CAAA;IACb,+BAAmB,CAAA;IACnB,yBAAa,CAAA;IACb,6BAAiB,CAAA;AACnB,CAAC,EALW,QAAQ,wBAAR,QAAQ,QAKnB"}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
import { CoinflowBlockchain, CoinflowEnvs, CoinflowIFrameProps, CoinflowPurchaseProps
|
|
1
|
+
import { CoinflowBlockchain, CoinflowEnvs, CoinflowIFrameProps, CoinflowPurchaseProps } from './CoinflowTypes';
|
|
2
2
|
export declare class CoinflowUtils {
|
|
3
3
|
env: CoinflowEnvs;
|
|
4
4
|
url: string;
|
|
5
5
|
constructor(env?: CoinflowEnvs);
|
|
6
6
|
getNSurePartnerId(merchantId: string): Promise<string | undefined>;
|
|
7
|
-
getCreditBalance(publicKey: string, merchantId: string, blockchain: 'solana' | 'near'): Promise<{
|
|
8
|
-
cents: number;
|
|
9
|
-
}>;
|
|
10
7
|
static getCoinflowBaseUrl(env?: CoinflowEnvs): string;
|
|
11
8
|
static getCoinflowApiUrl(env?: CoinflowEnvs): string;
|
|
12
|
-
static getCoinflowUrl({ walletPubkey, sessionKey, route, routePrefix, env, amount, transaction, blockchain, webhookInfo, email, loaderBackground, handleHeightChange, bankAccountLinkRedirect, additionalWallets, nearDeposit, chargebackProtectionData, merchantCss, color, rent, lockDefaultToken, token, tokens, planCode, disableApplePay, disableGooglePay, customerInfo, settlementType, lockAmount, nativeSolToConvert, theme, usePermit, transactionSigner, authOnly, deviceId, jwtToken, origins, threeDsChallengePreference, supportEmail, }: CoinflowIFrameProps): string;
|
|
9
|
+
static getCoinflowUrl({ walletPubkey, sessionKey, route, routePrefix, env, amount, transaction, blockchain, webhookInfo, email, loaderBackground, handleHeightChange, bankAccountLinkRedirect, additionalWallets, nearDeposit, chargebackProtectionData, merchantCss, color, rent, lockDefaultToken, token, tokens, planCode, disableApplePay, disableGooglePay, customerInfo, settlementType, lockAmount, nativeSolToConvert, theme, usePermit, transactionSigner, authOnly, deviceId, jwtToken, origins, threeDsChallengePreference, supportEmail, destinationAuthKey, }: CoinflowIFrameProps): string;
|
|
13
10
|
static getTransaction(props: CoinflowPurchaseProps): string | undefined;
|
|
14
11
|
static byBlockchain<T>(blockchain: CoinflowBlockchain, args: {
|
|
15
12
|
solana: T;
|
|
@@ -20,14 +17,4 @@ export declare class CoinflowUtils {
|
|
|
20
17
|
arbitrum: T;
|
|
21
18
|
user: T;
|
|
22
19
|
}): T;
|
|
23
|
-
static getWalletFromUserId({ userId, merchantId, env, }: {
|
|
24
|
-
userId: string;
|
|
25
|
-
merchantId: string;
|
|
26
|
-
env: CoinflowEnvs;
|
|
27
|
-
}): Promise<SolanaWallet>;
|
|
28
|
-
static getWalletFromEmail({ email, merchantId, env, }: {
|
|
29
|
-
email: string;
|
|
30
|
-
merchantId: string;
|
|
31
|
-
env: CoinflowEnvs;
|
|
32
|
-
}): Promise<SolanaWallet>;
|
|
33
20
|
}
|
|
@@ -4,8 +4,6 @@ exports.CoinflowUtils = void 0;
|
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var SolanaPeerDeps_1 = require("./SolanaPeerDeps");
|
|
6
6
|
var lz_string_1 = tslib_1.__importDefault(require("lz-string"));
|
|
7
|
-
var web3_js_1 = require("@solana/web3.js");
|
|
8
|
-
var tweetnacl_1 = require("tweetnacl");
|
|
9
7
|
var CoinflowUtils = /** @class */ (function () {
|
|
10
8
|
function CoinflowUtils(env) {
|
|
11
9
|
this.env = env !== null && env !== void 0 ? env : 'prod';
|
|
@@ -29,28 +27,6 @@ var CoinflowUtils = /** @class */ (function () {
|
|
|
29
27
|
});
|
|
30
28
|
});
|
|
31
29
|
};
|
|
32
|
-
CoinflowUtils.prototype.getCreditBalance = function (publicKey, merchantId, blockchain) {
|
|
33
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
34
|
-
var response, credits;
|
|
35
|
-
return tslib_1.__generator(this, function (_a) {
|
|
36
|
-
switch (_a.label) {
|
|
37
|
-
case 0: return [4 /*yield*/, fetch(this.url + "/api/customer/balances/".concat(merchantId), {
|
|
38
|
-
method: 'GET',
|
|
39
|
-
headers: {
|
|
40
|
-
'x-coinflow-auth-wallet': publicKey,
|
|
41
|
-
'x-coinflow-auth-blockchain': blockchain,
|
|
42
|
-
},
|
|
43
|
-
})];
|
|
44
|
-
case 1:
|
|
45
|
-
response = _a.sent();
|
|
46
|
-
return [4 /*yield*/, response.json()];
|
|
47
|
-
case 2:
|
|
48
|
-
credits = (_a.sent()).credits;
|
|
49
|
-
return [2 /*return*/, credits];
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
30
|
CoinflowUtils.getCoinflowBaseUrl = function (env) {
|
|
55
31
|
if (!env || env === 'prod')
|
|
56
32
|
return 'https://coinflow.cash';
|
|
@@ -67,7 +43,7 @@ var CoinflowUtils = /** @class */ (function () {
|
|
|
67
43
|
};
|
|
68
44
|
CoinflowUtils.getCoinflowUrl = function (_a) {
|
|
69
45
|
var _b;
|
|
70
|
-
var walletPubkey = _a.walletPubkey, sessionKey = _a.sessionKey, route = _a.route, routePrefix = _a.routePrefix, env = _a.env, amount = _a.amount, transaction = _a.transaction, _c = _a.blockchain, blockchain = _c === void 0 ? 'solana' : _c, webhookInfo = _a.webhookInfo, email = _a.email, loaderBackground = _a.loaderBackground, handleHeightChange = _a.handleHeightChange, bankAccountLinkRedirect = _a.bankAccountLinkRedirect, additionalWallets = _a.additionalWallets, nearDeposit = _a.nearDeposit, chargebackProtectionData = _a.chargebackProtectionData, merchantCss = _a.merchantCss, color = _a.color, rent = _a.rent, lockDefaultToken = _a.lockDefaultToken, token = _a.token, tokens = _a.tokens, planCode = _a.planCode, disableApplePay = _a.disableApplePay, disableGooglePay = _a.disableGooglePay, customerInfo = _a.customerInfo, settlementType = _a.settlementType, lockAmount = _a.lockAmount, nativeSolToConvert = _a.nativeSolToConvert, theme = _a.theme, usePermit = _a.usePermit, transactionSigner = _a.transactionSigner, authOnly = _a.authOnly, deviceId = _a.deviceId, jwtToken = _a.jwtToken, origins = _a.origins, threeDsChallengePreference = _a.threeDsChallengePreference, supportEmail = _a.supportEmail;
|
|
46
|
+
var walletPubkey = _a.walletPubkey, sessionKey = _a.sessionKey, route = _a.route, routePrefix = _a.routePrefix, env = _a.env, amount = _a.amount, transaction = _a.transaction, _c = _a.blockchain, blockchain = _c === void 0 ? 'solana' : _c, webhookInfo = _a.webhookInfo, email = _a.email, loaderBackground = _a.loaderBackground, handleHeightChange = _a.handleHeightChange, bankAccountLinkRedirect = _a.bankAccountLinkRedirect, additionalWallets = _a.additionalWallets, nearDeposit = _a.nearDeposit, chargebackProtectionData = _a.chargebackProtectionData, merchantCss = _a.merchantCss, color = _a.color, rent = _a.rent, lockDefaultToken = _a.lockDefaultToken, token = _a.token, tokens = _a.tokens, planCode = _a.planCode, disableApplePay = _a.disableApplePay, disableGooglePay = _a.disableGooglePay, customerInfo = _a.customerInfo, settlementType = _a.settlementType, lockAmount = _a.lockAmount, nativeSolToConvert = _a.nativeSolToConvert, theme = _a.theme, usePermit = _a.usePermit, transactionSigner = _a.transactionSigner, authOnly = _a.authOnly, deviceId = _a.deviceId, jwtToken = _a.jwtToken, origins = _a.origins, threeDsChallengePreference = _a.threeDsChallengePreference, supportEmail = _a.supportEmail, destinationAuthKey = _a.destinationAuthKey;
|
|
71
47
|
var prefix = routePrefix
|
|
72
48
|
? "/".concat(routePrefix, "/").concat(blockchain)
|
|
73
49
|
: "/".concat(blockchain);
|
|
@@ -161,6 +137,8 @@ var CoinflowUtils = /** @class */ (function () {
|
|
|
161
137
|
url.searchParams.append('origins', lz_string_1.default.compressToEncodedURIComponent(JSON.stringify(origins)));
|
|
162
138
|
if (threeDsChallengePreference)
|
|
163
139
|
url.searchParams.append('threeDsChallengePreference', threeDsChallengePreference);
|
|
140
|
+
if (destinationAuthKey)
|
|
141
|
+
url.searchParams.append('destinationAuthKey', destinationAuthKey);
|
|
164
142
|
return url.toString();
|
|
165
143
|
};
|
|
166
144
|
CoinflowUtils.getTransaction = function (props) {
|
|
@@ -237,87 +215,6 @@ var CoinflowUtils = /** @class */ (function () {
|
|
|
237
215
|
throw new Error('blockchain not supported!');
|
|
238
216
|
}
|
|
239
217
|
};
|
|
240
|
-
CoinflowUtils.getWalletFromUserId = function (_a) {
|
|
241
|
-
return tslib_1.__awaiter(this, arguments, void 0, function (_b) {
|
|
242
|
-
var userId = _b.userId, merchantId = _b.merchantId, env = _b.env;
|
|
243
|
-
return tslib_1.__generator(this, function (_c) {
|
|
244
|
-
return [2 /*return*/, this.getWalletFromEmail({
|
|
245
|
-
email: userId,
|
|
246
|
-
merchantId: merchantId,
|
|
247
|
-
env: env,
|
|
248
|
-
})];
|
|
249
|
-
});
|
|
250
|
-
});
|
|
251
|
-
};
|
|
252
|
-
CoinflowUtils.getWalletFromEmail = function (_a) {
|
|
253
|
-
return tslib_1.__awaiter(this, arguments, void 0, function (_b) {
|
|
254
|
-
var buffer, crypto, hash, seed, keypair;
|
|
255
|
-
var _this = this;
|
|
256
|
-
var email = _b.email, merchantId = _b.merchantId, env = _b.env;
|
|
257
|
-
return tslib_1.__generator(this, function (_c) {
|
|
258
|
-
switch (_c.label) {
|
|
259
|
-
case 0:
|
|
260
|
-
buffer = new TextEncoder().encode(email);
|
|
261
|
-
crypto = window.crypto.subtle;
|
|
262
|
-
return [4 /*yield*/, crypto.digest('SHA-256', buffer)];
|
|
263
|
-
case 1:
|
|
264
|
-
hash = _c.sent();
|
|
265
|
-
seed = new Uint8Array(hash);
|
|
266
|
-
keypair = web3_js_1.Keypair.fromSeed(seed);
|
|
267
|
-
return [2 /*return*/, {
|
|
268
|
-
publicKey: keypair.publicKey,
|
|
269
|
-
signMessage: function (message) {
|
|
270
|
-
return Promise.resolve(tweetnacl_1.sign.detached(message, keypair.secretKey));
|
|
271
|
-
},
|
|
272
|
-
signTransaction: function (transaction) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
273
|
-
return tslib_1.__generator(this, function (_a) {
|
|
274
|
-
if (transaction instanceof web3_js_1.Transaction) {
|
|
275
|
-
transaction.sign(keypair);
|
|
276
|
-
return [2 /*return*/, transaction];
|
|
277
|
-
}
|
|
278
|
-
else {
|
|
279
|
-
transaction.sign([keypair]);
|
|
280
|
-
return [2 /*return*/, transaction];
|
|
281
|
-
}
|
|
282
|
-
return [2 /*return*/];
|
|
283
|
-
});
|
|
284
|
-
}); },
|
|
285
|
-
sendTransaction: function (transaction) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
286
|
-
var coinflowBaseUrl, options, signature;
|
|
287
|
-
return tslib_1.__generator(this, function (_a) {
|
|
288
|
-
switch (_a.label) {
|
|
289
|
-
case 0:
|
|
290
|
-
if (transaction instanceof web3_js_1.Transaction) {
|
|
291
|
-
transaction.sign(keypair);
|
|
292
|
-
}
|
|
293
|
-
else {
|
|
294
|
-
transaction.sign([keypair]);
|
|
295
|
-
}
|
|
296
|
-
coinflowBaseUrl = this.getCoinflowApiUrl(env);
|
|
297
|
-
options = {
|
|
298
|
-
method: 'POST',
|
|
299
|
-
headers: {
|
|
300
|
-
'content-type': 'application/json',
|
|
301
|
-
'x-coinflow-auth-wallet': keypair.publicKey.toString(),
|
|
302
|
-
'x-coinflow-auth-blockchain': 'solana',
|
|
303
|
-
},
|
|
304
|
-
body: JSON.stringify({
|
|
305
|
-
merchantId: merchantId,
|
|
306
|
-
signedTransaction: SolanaPeerDeps_1.base58 === null || SolanaPeerDeps_1.base58 === void 0 ? void 0 : SolanaPeerDeps_1.base58.encode(transaction.serialize()),
|
|
307
|
-
}),
|
|
308
|
-
};
|
|
309
|
-
return [4 /*yield*/, fetch(coinflowBaseUrl + '/api/utils/send-coinflow-tx', options).then(function (res) { return res.json(); })];
|
|
310
|
-
case 1:
|
|
311
|
-
signature = (_a.sent()).signature;
|
|
312
|
-
return [2 /*return*/, signature];
|
|
313
|
-
}
|
|
314
|
-
});
|
|
315
|
-
}); },
|
|
316
|
-
}];
|
|
317
|
-
}
|
|
318
|
-
});
|
|
319
|
-
});
|
|
320
|
-
};
|
|
321
218
|
return CoinflowUtils;
|
|
322
219
|
}());
|
|
323
220
|
exports.CoinflowUtils = CoinflowUtils;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoinflowUtils.js","sourceRoot":"","sources":["../../../src/common/CoinflowUtils.ts"],"names":[],"mappings":";;;;AAOA,mDAA8C;AAC9C,gEAAiC;AACjC,2CAA2E;AAC3E,uCAA+B;AAE/B;IAIE,uBAAY,GAAkB;QAC5B,IAAI,CAAC,GAAG,GAAG,GAAG,aAAH,GAAG,cAAH,GAAG,GAAI,MAAM,CAAC;QACzB,IAAI,IAAI,CAAC,GAAG,KAAK,MAAM;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 -1,3 +1,3 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import {
|
|
3
|
-
export declare function CoinflowWithdrawHistory(props:
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CoinflowHistoryProps } from './common';
|
|
3
|
+
export declare function CoinflowWithdrawHistory(props: CoinflowHistoryProps): React.JSX.Element;
|