@funkit/connect 5.3.3 → 5.3.4
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/CHANGELOG.md +32 -0
- package/dist/{chunk-ZX757M5P.js → chunk-CRTRMZFT.js} +8 -1
- package/dist/{chunk-AIST42FG.js → chunk-KCSHTK5R.js} +8 -1
- package/dist/components/Box/Box.d.ts +21 -21
- package/dist/components/FunCheckoutHistory/FunCheckoutHistoryContent.d.ts +0 -1
- package/dist/components/FunCheckoutHistory/FunDirectExecutionHistoryDetail.d.ts +6 -3
- package/dist/components/FunTransactionSummary/PaymentMethodSummary.d.ts +1 -2
- package/dist/config/getDefaultConfig.d.ts +33 -0
- package/dist/css/sprinkles.css.d.ts +37 -23
- package/dist/domains/asset.d.ts +3 -2
- package/dist/domains/wallet.d.ts +1 -1
- package/dist/hooks/useCheckoutDirectExecution.d.ts +10 -1
- package/dist/hooks/useCheckoutDirectExecutionHistory.d.ts +3 -3
- package/dist/hooks/useFrogAccount.d.ts +1 -0
- package/dist/hooks/useReceiveAmountLabel.d.ts +2 -1
- package/dist/hooks/useRelayBypass.d.ts +2 -0
- package/dist/hooks/useRelayExecutionInfo.d.ts +1 -2
- package/dist/hooks/useWalletLabel.d.ts +5 -0
- package/dist/index.css +2023 -1582
- package/dist/index.js +2007 -2088
- package/dist/modals/CheckoutModal/InputAmount/InputAmountLoaded.d.ts +1 -1
- package/dist/modals/CheckoutModal/InputAmount/state.d.ts +2 -1
- package/dist/modals/CheckoutModal/LoadingAccount.d.ts +3 -1
- package/dist/modals/CheckoutModal/stepTransition.d.ts +2 -1
- package/dist/modals/ProfileDetails/ActivityTraversalContext.d.ts +4 -3
- package/dist/modals/ProfileDetails/FunProfileViews/Home/HomeCheckoutDisplayRow.d.ts +4 -4
- package/dist/providers/FunkitConfigContext.d.ts +1 -0
- package/dist/providers/FunkitHistoryContext.d.ts +4 -7
- package/dist/providers/FunkitThemeProvider.d.ts +24 -3
- package/dist/themes/darkTheme.js +1 -1
- package/dist/themes/lightTheme.js +1 -1
- package/dist/utils/checkout.d.ts +15 -14
- package/dist/utils/consts.d.ts +1 -0
- package/dist/utils/flags/config.d.ts +0 -20
- package/dist/wallets/walletConnectors/chunk-25VW5TZP.js +92 -0
- package/dist/wallets/walletConnectors/chunk-3NC26XLM.js +92 -0
- package/dist/wallets/walletConnectors/chunk-3U3BMEH5.js +94 -0
- package/dist/wallets/walletConnectors/chunk-4UM4GTKZ.js +103 -0
- package/dist/wallets/walletConnectors/chunk-545L7Y4M.js +69 -0
- package/dist/wallets/walletConnectors/chunk-6LPM6LUQ.js +110 -0
- package/dist/wallets/walletConnectors/chunk-7GSNBOD3.js +99 -0
- package/dist/wallets/walletConnectors/chunk-ETTNDQQG.js +100 -0
- package/dist/wallets/walletConnectors/chunk-FRGSRLTS.js +93 -0
- package/dist/wallets/walletConnectors/chunk-HKV7EMYZ.js +96 -0
- package/dist/wallets/walletConnectors/chunk-IPOC2VJX.js +106 -0
- package/dist/wallets/walletConnectors/chunk-JXP2QPW7.js +95 -0
- package/dist/wallets/walletConnectors/chunk-KFFJPS5R.js +96 -0
- package/dist/wallets/walletConnectors/chunk-LEXSM5KI.js +87 -0
- package/dist/wallets/walletConnectors/chunk-MOOBCMMB.js +70 -0
- package/dist/wallets/walletConnectors/chunk-N2NIIUW6.js +146 -0
- package/dist/wallets/walletConnectors/chunk-W5O4YSZN.js +98 -0
- package/dist/wallets/walletConnectors/chunk-XYBEMO3C.js +66 -0
- package/dist/wallets/walletConnectors/index.js +34 -34
- package/package.json +12 -12
- package/dist/domains/relay.d.ts +0 -53
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
getInjectedConnector,
|
|
4
|
+
hasInjectedProvider
|
|
5
|
+
} from "./chunk-WRA2DVJ7.js";
|
|
6
|
+
import {
|
|
7
|
+
getWalletConnectConnector
|
|
8
|
+
} from "./chunk-23WIEY36.js";
|
|
9
|
+
|
|
10
|
+
// src/wallets/walletConnectors/bybitWallet/bybitWallet.ts
|
|
11
|
+
var bybitWallet = ({
|
|
12
|
+
projectId,
|
|
13
|
+
walletConnectParameters
|
|
14
|
+
}) => {
|
|
15
|
+
const isBybitInjected = hasInjectedProvider({
|
|
16
|
+
namespace: "bybitWallet"
|
|
17
|
+
});
|
|
18
|
+
const shouldUseWalletConnect = !isBybitInjected;
|
|
19
|
+
const getUri = (uri) => {
|
|
20
|
+
return `bybitapp://open/route?targetUrl=by://web3/walletconnect/wc?uri=${encodeURIComponent(
|
|
21
|
+
uri
|
|
22
|
+
)}`;
|
|
23
|
+
};
|
|
24
|
+
return {
|
|
25
|
+
id: "bybit",
|
|
26
|
+
name: "Bybit Wallet",
|
|
27
|
+
rdns: "com.bybit",
|
|
28
|
+
iconUrl: async () => (await import("./bybitWallet-GOPAS32Q.js")).default,
|
|
29
|
+
installed: !shouldUseWalletConnect ? isBybitInjected : void 0,
|
|
30
|
+
iconBackground: "#000000",
|
|
31
|
+
downloadUrls: {
|
|
32
|
+
chrome: "https://chromewebstore.google.com/detail/bybit-wallet/pdliaogehgdbhbnmkklieghmmjkpigpa",
|
|
33
|
+
browserExtension: "https://www.bybit.com/en/web3",
|
|
34
|
+
android: "https://play.google.com/store/apps/details?id=com.bybit.app",
|
|
35
|
+
ios: "https://apps.apple.com/us/app/bybit-buy-trade-crypto/id1488296980",
|
|
36
|
+
mobile: "https://www.bybit.com/en/web3",
|
|
37
|
+
qrCode: "https://www.bybit.com/en/web3"
|
|
38
|
+
},
|
|
39
|
+
mobile: {
|
|
40
|
+
getUri: shouldUseWalletConnect ? getUri : void 0
|
|
41
|
+
},
|
|
42
|
+
qrCode: shouldUseWalletConnect ? {
|
|
43
|
+
getUri: (uri) => uri,
|
|
44
|
+
instructions: {
|
|
45
|
+
learnMoreUrl: "https://www.bybit.com/en/web3",
|
|
46
|
+
steps: [
|
|
47
|
+
{
|
|
48
|
+
description: "wallet_connectors.bybit.qr_code.step1.description",
|
|
49
|
+
step: "install",
|
|
50
|
+
title: "wallet_connectors.bybit.qr_code.step1.title"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
description: "wallet_connectors.bybit.qr_code.step2.description",
|
|
54
|
+
step: "create",
|
|
55
|
+
title: "wallet_connectors.bybit.qr_code.step2.title"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
description: "wallet_connectors.bybit.qr_code.step3.description",
|
|
59
|
+
step: "scan",
|
|
60
|
+
title: "wallet_connectors.bybit.qr_code.step3.title"
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
} : void 0,
|
|
65
|
+
extension: {
|
|
66
|
+
instructions: {
|
|
67
|
+
learnMoreUrl: "https://www.bybit.com/en/web3",
|
|
68
|
+
steps: [
|
|
69
|
+
{
|
|
70
|
+
description: "wallet_connectors.bybit.extension.step1.description",
|
|
71
|
+
step: "install",
|
|
72
|
+
title: "wallet_connectors.bybit.extension.step1.title"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
description: "wallet_connectors.bybit.extension.step2.description",
|
|
76
|
+
step: "create",
|
|
77
|
+
title: "wallet_connectors.bybit.extension.step2.title"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
description: "wallet_connectors.bybit.extension.step3.description",
|
|
81
|
+
step: "refresh",
|
|
82
|
+
title: "wallet_connectors.bybit.extension.step3.title"
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
|
|
88
|
+
projectId,
|
|
89
|
+
walletConnectParameters
|
|
90
|
+
}) : getInjectedConnector({
|
|
91
|
+
namespace: "bybitWallet"
|
|
92
|
+
})
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export {
|
|
97
|
+
bybitWallet
|
|
98
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
getInjectedConnector,
|
|
4
|
+
hasInjectedProvider
|
|
5
|
+
} from "./chunk-WRA2DVJ7.js";
|
|
6
|
+
import {
|
|
7
|
+
getWalletConnectConnector
|
|
8
|
+
} from "./chunk-23WIEY36.js";
|
|
9
|
+
|
|
10
|
+
// src/wallets/walletConnectors/foxWallet/foxWallet.ts
|
|
11
|
+
var foxWallet = ({
|
|
12
|
+
projectId,
|
|
13
|
+
walletConnectParameters
|
|
14
|
+
}) => {
|
|
15
|
+
const isFoxInjected = hasInjectedProvider({
|
|
16
|
+
namespace: "foxwallet.ethereum"
|
|
17
|
+
});
|
|
18
|
+
const shouldUseWalletConnect = !isFoxInjected;
|
|
19
|
+
return {
|
|
20
|
+
id: "foxwallet",
|
|
21
|
+
name: "FoxWallet",
|
|
22
|
+
iconUrl: async () => (await import("./foxWallet-I7D5KIW4.js")).default,
|
|
23
|
+
iconBackground: "#fff",
|
|
24
|
+
downloadUrls: {
|
|
25
|
+
android: "https://play.google.com/store/apps/details?id=com.foxwallet.play",
|
|
26
|
+
ios: "https://apps.apple.com/app/foxwallet-crypto-web3/id1590983231",
|
|
27
|
+
qrCode: "https://foxwallet.com/download"
|
|
28
|
+
},
|
|
29
|
+
mobile: {
|
|
30
|
+
getUri: shouldUseWalletConnect ? (uri) => {
|
|
31
|
+
return `foxwallet://wc?uri=${encodeURIComponent(uri)}`;
|
|
32
|
+
} : void 0
|
|
33
|
+
},
|
|
34
|
+
qrCode: shouldUseWalletConnect ? {
|
|
35
|
+
getUri: (uri) => uri,
|
|
36
|
+
instructions: {
|
|
37
|
+
learnMoreUrl: "https://foxwallet.com",
|
|
38
|
+
steps: [
|
|
39
|
+
{
|
|
40
|
+
description: "wallet_connectors.fox.qr_code.step1.description",
|
|
41
|
+
step: "install",
|
|
42
|
+
title: "wallet_connectors.fox.qr_code.step1.title"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
description: "wallet_connectors.fox.qr_code.step2.description",
|
|
46
|
+
step: "create",
|
|
47
|
+
title: "wallet_connectors.fox.qr_code.step2.title"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
description: "wallet_connectors.fox.qr_code.step3.description",
|
|
51
|
+
step: "scan",
|
|
52
|
+
title: "wallet_connectors.fox.qr_code.step3.title"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
} : void 0,
|
|
57
|
+
createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
|
|
58
|
+
projectId,
|
|
59
|
+
walletConnectParameters
|
|
60
|
+
}) : getInjectedConnector({ namespace: "foxwallet.ethereum" })
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export {
|
|
65
|
+
foxWallet
|
|
66
|
+
};
|
|
@@ -1,52 +1,52 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
xdefiWallet
|
|
4
|
-
} from "./chunk-NO7XMBB5.js";
|
|
5
2
|
import {
|
|
6
3
|
zerionWallet
|
|
7
4
|
} from "./chunk-AXWP3GD4.js";
|
|
5
|
+
import {
|
|
6
|
+
walletConnectWallet
|
|
7
|
+
} from "./chunk-NP5QGWNL.js";
|
|
8
8
|
import {
|
|
9
9
|
zealWallet
|
|
10
10
|
} from "./chunk-JROWU5BP.js";
|
|
11
11
|
import {
|
|
12
|
-
|
|
13
|
-
} from "./chunk-
|
|
12
|
+
subWallet
|
|
13
|
+
} from "./chunk-AD2KIJB6.js";
|
|
14
14
|
import {
|
|
15
15
|
tahoWallet
|
|
16
16
|
} from "./chunk-6P2EMPZI.js";
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
} from "./chunk-
|
|
18
|
+
talismanWallet
|
|
19
|
+
} from "./chunk-ABFSXBE6.js";
|
|
20
20
|
import {
|
|
21
21
|
tokenPocketWallet
|
|
22
22
|
} from "./chunk-IDKVN5CF.js";
|
|
23
23
|
import {
|
|
24
|
-
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import {
|
|
27
|
-
walletConnectWallet
|
|
28
|
-
} from "./chunk-NP5QGWNL.js";
|
|
24
|
+
xdefiWallet
|
|
25
|
+
} from "./chunk-NO7XMBB5.js";
|
|
29
26
|
import {
|
|
30
27
|
trustWallet
|
|
31
28
|
} from "./chunk-ISIBREBO.js";
|
|
32
29
|
import {
|
|
33
30
|
uniswapWallet
|
|
34
31
|
} from "./chunk-LH7BMNFZ.js";
|
|
32
|
+
import {
|
|
33
|
+
tokenaryWallet
|
|
34
|
+
} from "./chunk-SLOIIJGP.js";
|
|
35
35
|
import {
|
|
36
36
|
phantomWallet
|
|
37
37
|
} from "./chunk-ZSVTX6EK.js";
|
|
38
38
|
import {
|
|
39
|
-
|
|
40
|
-
} from "./chunk-
|
|
39
|
+
oneKeyWallet
|
|
40
|
+
} from "./chunk-4AD7VI2P.js";
|
|
41
41
|
import {
|
|
42
42
|
rainbowWallet
|
|
43
43
|
} from "./chunk-2UCNRD7H.js";
|
|
44
|
-
import {
|
|
45
|
-
roninWallet
|
|
46
|
-
} from "./chunk-63YLN6R5.js";
|
|
47
44
|
import {
|
|
48
45
|
ramperWallet
|
|
49
46
|
} from "./chunk-PIUNLQJG.js";
|
|
47
|
+
import {
|
|
48
|
+
roninWallet
|
|
49
|
+
} from "./chunk-63YLN6R5.js";
|
|
50
50
|
import {
|
|
51
51
|
safeheronWallet
|
|
52
52
|
} from "./chunk-R6RWZRFF.js";
|
|
@@ -56,9 +56,6 @@ import {
|
|
|
56
56
|
import {
|
|
57
57
|
safepalWallet
|
|
58
58
|
} from "./chunk-MSFKSQBY.js";
|
|
59
|
-
import {
|
|
60
|
-
ledgerWallet
|
|
61
|
-
} from "./chunk-BRBKM4PW.js";
|
|
62
59
|
import {
|
|
63
60
|
metaMaskWallet
|
|
64
61
|
} from "./chunk-G73C6P5P.js";
|
|
@@ -69,17 +66,20 @@ import {
|
|
|
69
66
|
oktoWallet
|
|
70
67
|
} from "./chunk-ADIXAKUL.js";
|
|
71
68
|
import {
|
|
72
|
-
|
|
73
|
-
} from "./chunk-
|
|
69
|
+
ledgerWallet
|
|
70
|
+
} from "./chunk-BRBKM4PW.js";
|
|
74
71
|
import {
|
|
75
72
|
oneInchWallet
|
|
76
73
|
} from "./chunk-OESTDX6I.js";
|
|
77
74
|
import {
|
|
78
|
-
|
|
79
|
-
} from "./chunk-
|
|
75
|
+
okxWallet
|
|
76
|
+
} from "./chunk-4WEHDI4Y.js";
|
|
80
77
|
import {
|
|
81
78
|
omniWallet
|
|
82
79
|
} from "./chunk-7CUY5G6R.js";
|
|
80
|
+
import {
|
|
81
|
+
rabbyWallet
|
|
82
|
+
} from "./chunk-BVX4XGNP.js";
|
|
83
83
|
import {
|
|
84
84
|
frameWallet
|
|
85
85
|
} from "./chunk-ZMYVTWDF.js";
|
|
@@ -102,23 +102,23 @@ import {
|
|
|
102
102
|
kresusWallet
|
|
103
103
|
} from "./chunk-MJXPRJZT.js";
|
|
104
104
|
import {
|
|
105
|
-
|
|
106
|
-
} from "./chunk-
|
|
105
|
+
coin98Wallet
|
|
106
|
+
} from "./chunk-DTRYS3MO.js";
|
|
107
107
|
import {
|
|
108
108
|
clvWallet
|
|
109
109
|
} from "./chunk-KR6JBW5E.js";
|
|
110
110
|
import {
|
|
111
|
-
|
|
112
|
-
} from "./chunk-
|
|
111
|
+
bybitWallet
|
|
112
|
+
} from "./chunk-6ONTSPEY.js";
|
|
113
113
|
import {
|
|
114
114
|
coinbaseWallet
|
|
115
115
|
} from "./chunk-H4IRCEZN.js";
|
|
116
|
-
import {
|
|
117
|
-
coreWallet
|
|
118
|
-
} from "./chunk-HBA36GW3.js";
|
|
119
116
|
import {
|
|
120
117
|
dawnWallet
|
|
121
118
|
} from "./chunk-LN7OD5EC.js";
|
|
119
|
+
import {
|
|
120
|
+
coreWallet
|
|
121
|
+
} from "./chunk-HBA36GW3.js";
|
|
122
122
|
import {
|
|
123
123
|
desigWallet
|
|
124
124
|
} from "./chunk-CTU6JCOK.js";
|
|
@@ -134,15 +134,15 @@ import {
|
|
|
134
134
|
import {
|
|
135
135
|
bitskiWallet
|
|
136
136
|
} from "./chunk-P74YPRF6.js";
|
|
137
|
-
import {
|
|
138
|
-
bitverseWallet
|
|
139
|
-
} from "./chunk-3HZRRP4Y.js";
|
|
140
137
|
import {
|
|
141
138
|
bitgetWallet
|
|
142
139
|
} from "./chunk-A5APNTGL.js";
|
|
143
140
|
import {
|
|
144
141
|
bloomWallet
|
|
145
142
|
} from "./chunk-S27IADFU.js";
|
|
143
|
+
import {
|
|
144
|
+
bitverseWallet
|
|
145
|
+
} from "./chunk-3HZRRP4Y.js";
|
|
146
146
|
import "./chunk-23WIEY36.js";
|
|
147
147
|
import {
|
|
148
148
|
braveWallet
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funkit/connect",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.4",
|
|
4
4
|
"description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"wagmi": "2.x"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@aws-sdk/client-s3": "3.645.0",
|
|
48
47
|
"@aws-sdk/client-cloudfront": "3.645.0",
|
|
48
|
+
"@aws-sdk/client-s3": "3.645.0",
|
|
49
49
|
"@chromatic-com/storybook": "^3.2.6",
|
|
50
50
|
"@meshconnect/node-api": "2.0.14",
|
|
51
51
|
"@storybook/addon-essentials": "^8.6.7",
|
|
@@ -60,12 +60,12 @@
|
|
|
60
60
|
"@testing-library/user-event": "^14.5.2",
|
|
61
61
|
"@types/qrcode": "^1.5.5",
|
|
62
62
|
"@types/ua-parser-js": "^0.7.39",
|
|
63
|
-
"@vanilla-extract/css-utils": "0.1.4",
|
|
64
|
-
"@vanilla-extract/private": "^1.0.
|
|
65
|
-
"@vanilla-extract/vite-plugin": "^5.0.
|
|
63
|
+
"@vanilla-extract/css-utils": "^0.1.4",
|
|
64
|
+
"@vanilla-extract/private": "^1.0.7",
|
|
65
|
+
"@vanilla-extract/vite-plugin": "^5.0.3",
|
|
66
66
|
"@vitejs/plugin-react": "^4.3.1",
|
|
67
67
|
"autoprefixer": "^10.4.16",
|
|
68
|
-
"jsdom": "^
|
|
68
|
+
"jsdom": "^26.1.0",
|
|
69
69
|
"postcss": "^8.4.33",
|
|
70
70
|
"react": "^18.3.0",
|
|
71
71
|
"storybook": "^8.6.7",
|
|
@@ -78,7 +78,6 @@
|
|
|
78
78
|
"@moonpay/moonpay-react": "^1.6.1",
|
|
79
79
|
"@number-flow/react": "^0.5.5",
|
|
80
80
|
"@privy-io/js-sdk-core": "^0.21.0",
|
|
81
|
-
"@reservoir0x/relay-sdk": "^2.0.3",
|
|
82
81
|
"@types/uuid": "^9.0.8",
|
|
83
82
|
"@vanilla-extract/css": "1.15.3",
|
|
84
83
|
"@vanilla-extract/dynamic": "2.1.0",
|
|
@@ -92,11 +91,12 @@
|
|
|
92
91
|
"react-virtuoso": "4.10.1",
|
|
93
92
|
"ua-parser-js": "^1.0.37",
|
|
94
93
|
"uuid": "^9.0.1",
|
|
95
|
-
"@funkit/api-base": "1.8.
|
|
96
|
-
"@funkit/
|
|
97
|
-
"@funkit/
|
|
98
|
-
"@funkit/
|
|
99
|
-
"@funkit/
|
|
94
|
+
"@funkit/api-base": "1.8.2",
|
|
95
|
+
"@funkit/chains": "0.2.3",
|
|
96
|
+
"@funkit/utils": "1.0.13",
|
|
97
|
+
"@funkit/core": "2.3.19",
|
|
98
|
+
"@funkit/fun-relay": "0.1.0",
|
|
99
|
+
"@funkit/wagmi-tools": "3.0.41"
|
|
100
100
|
},
|
|
101
101
|
"repository": {
|
|
102
102
|
"type": "git",
|
package/dist/domains/relay.d.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import type { CheckoutQuoteResponse } from '@funkit/api-base';
|
|
2
|
-
import { type Execute } from '@reservoir0x/relay-sdk';
|
|
3
|
-
import type { Address, WalletClient } from 'viem';
|
|
4
|
-
export declare const RELAY_QUOTE_CHECKOUT_TIME_BUFFER_MS = 3000;
|
|
5
|
-
export type RelayExecutionStatus = 'refund' | 'delayed' | 'waiting' | 'failure' | 'pending' | 'success';
|
|
6
|
-
export interface RelayExecutionInfo {
|
|
7
|
-
status: RelayExecutionStatus;
|
|
8
|
-
details: string;
|
|
9
|
-
/** Incoming transaction hashes */
|
|
10
|
-
inTxHashes: string[];
|
|
11
|
-
/** Outgoing transaction hashes */
|
|
12
|
-
txHashes: string[];
|
|
13
|
-
/** The last timestamp the data was updated in milliseconds */
|
|
14
|
-
time: number;
|
|
15
|
-
originChainId: number;
|
|
16
|
-
destinationChainId: number;
|
|
17
|
-
}
|
|
18
|
-
export declare const TERMINAL_RELAY_STATUSES: RelayExecutionStatus[];
|
|
19
|
-
export declare const RELAY_TRANSACTION_PAGE_URL = "https://relay.link/transaction/";
|
|
20
|
-
export declare const FUN_RELAY_REVENUE_WALLET = "0xb61562d83aEC43a050A06BED12Ac2bD8f9BFfd5E";
|
|
21
|
-
export declare const FUN_RELAY_REFERRER = "funxyz";
|
|
22
|
-
export declare const RELAY_NATIVE_TOKEN = "0x0000000000000000000000000000000000000000";
|
|
23
|
-
/**
|
|
24
|
-
* Convert a token address within Funkit the corresponding Relay token address.
|
|
25
|
-
*/
|
|
26
|
-
export declare function convertFunToRelayTokenAddress(address: string): string;
|
|
27
|
-
export declare function parseRelayFees({ relayFeeItem, }: {
|
|
28
|
-
relayFeeItem: Execute['fees'];
|
|
29
|
-
}): {
|
|
30
|
-
relayGasFeesUsd: number;
|
|
31
|
-
totalLpFeesUsd: number;
|
|
32
|
-
totalFeesUsd: number;
|
|
33
|
-
totalFeesFromAmount: number;
|
|
34
|
-
totalFeesFromAmountBaseUnit: bigint;
|
|
35
|
-
};
|
|
36
|
-
export declare function computeFunRelayFeeBps(): string;
|
|
37
|
-
export declare function getRelayQuote({ toChainId, toTokenAddress, toTokenAmount, toTokenDecimals, fromChainId, fromTokenAddress, recipientAddress, userAddress, }: {
|
|
38
|
-
toChainId: string;
|
|
39
|
-
toTokenAddress: Address;
|
|
40
|
-
toTokenAmount: number;
|
|
41
|
-
toTokenDecimals: number;
|
|
42
|
-
fromChainId: string;
|
|
43
|
-
fromTokenAddress: Address;
|
|
44
|
-
recipientAddress: Address | undefined;
|
|
45
|
-
userAddress: Address | undefined;
|
|
46
|
-
}): Promise<CheckoutQuoteResponse>;
|
|
47
|
-
export declare function executeRelayQuote({ relayQuote, walletClient, stepMessageSetter, onConfirmed, onError, }: {
|
|
48
|
-
relayQuote: Execute;
|
|
49
|
-
walletClient: WalletClient | undefined;
|
|
50
|
-
stepMessageSetter: (m: string) => void;
|
|
51
|
-
onConfirmed: (txHash: string) => Promise<void>;
|
|
52
|
-
onError: (error: Error) => Promise<void>;
|
|
53
|
-
}): Promise<void>;
|