@b3dotfun/sdk 0.0.51-alpha.1 → 0.0.51-alpha.3
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/dist/cjs/anyspend/abis/upsideStaking.d.ts +2058 -0
- package/dist/cjs/anyspend/abis/upsideStaking.js +1139 -0
- package/dist/cjs/anyspend/react/components/AnySpendStakeUpside.d.ts +11 -0
- package/dist/cjs/anyspend/react/components/AnySpendStakeUpside.js +44 -0
- package/dist/cjs/anyspend/types/chain.d.ts +1 -0
- package/dist/cjs/anyspend/utils/chain.js +56 -47
- package/dist/cjs/global-account/react/components/B3DynamicModal.js +5 -0
- package/dist/cjs/global-account/react/stores/useModalStore.d.ts +21 -1
- package/dist/cjs/shared/constants/chains/b3Chain.d.ts +9 -3
- package/dist/cjs/shared/utils/simplehash.d.ts +1 -1
- package/dist/esm/anyspend/abis/upsideStaking.d.ts +2058 -0
- package/dist/esm/anyspend/abis/upsideStaking.js +1136 -0
- package/dist/esm/anyspend/react/components/AnySpendStakeUpside.d.ts +11 -0
- package/dist/esm/anyspend/react/components/AnySpendStakeUpside.js +38 -0
- package/dist/esm/anyspend/types/chain.d.ts +1 -0
- package/dist/esm/anyspend/utils/chain.js +57 -48
- package/dist/esm/global-account/react/components/B3DynamicModal.js +5 -0
- package/dist/esm/global-account/react/stores/useModalStore.d.ts +21 -1
- package/dist/esm/shared/constants/chains/b3Chain.d.ts +9 -3
- package/dist/esm/shared/utils/simplehash.d.ts +1 -1
- package/dist/styles/index.css +1 -1
- package/dist/types/anyspend/abis/upsideStaking.d.ts +2058 -0
- package/dist/types/anyspend/react/components/AnySpendStakeUpside.d.ts +11 -0
- package/dist/types/anyspend/types/chain.d.ts +1 -0
- package/dist/types/global-account/react/stores/useModalStore.d.ts +21 -1
- package/dist/types/shared/constants/chains/b3Chain.d.ts +9 -3
- package/dist/types/shared/utils/simplehash.d.ts +1 -1
- package/package.json +1 -1
- package/src/anyspend/abis/upsideStaking.ts +1137 -0
- package/src/anyspend/react/components/AnySpendStakeUpside.tsx +96 -0
- package/src/anyspend/types/chain.ts +1 -0
- package/src/anyspend/utils/chain.ts +49 -53
- package/src/global-account/react/components/B3DynamicModal.tsx +5 -0
- package/src/global-account/react/stores/useModalStore.ts +22 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { components } from "../../../anyspend/types/api";
|
|
2
|
+
export declare function AnySpendStakeUpside({ loadOrder, mode, beneficiaryAddress, stakeAmount, stakingContractAddress, token, poolType, onSuccess, }: {
|
|
3
|
+
loadOrder?: string;
|
|
4
|
+
mode?: "modal" | "page";
|
|
5
|
+
beneficiaryAddress: string;
|
|
6
|
+
stakeAmount: string;
|
|
7
|
+
stakingContractAddress: string;
|
|
8
|
+
token: components["schemas"]["Token"];
|
|
9
|
+
poolType: "b3" | "weth";
|
|
10
|
+
onSuccess?: () => void;
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AnySpendStakeUpside = AnySpendStakeUpside;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = require("../../../global-account/react");
|
|
9
|
+
const number_1 = require("../../../shared/utils/number");
|
|
10
|
+
const invariant_1 = __importDefault(require("invariant"));
|
|
11
|
+
const viem_1 = require("viem");
|
|
12
|
+
const chains_1 = require("viem/chains");
|
|
13
|
+
const upsideStaking_1 = require("../../abis/upsideStaking");
|
|
14
|
+
const AnySpendCustom_1 = require("./AnySpendCustom");
|
|
15
|
+
function generateEncodedDataForStaking(amount, beneficiary, poolType) {
|
|
16
|
+
(0, invariant_1.default)(BigInt(amount) > 0, "Amount must be greater than zero");
|
|
17
|
+
if (poolType === "weth") {
|
|
18
|
+
return (0, viem_1.encodeFunctionData)({
|
|
19
|
+
abi: upsideStaking_1.WETH_STAKING_CONTRACT,
|
|
20
|
+
functionName: "stakeFor",
|
|
21
|
+
args: [beneficiary, BigInt(amount)],
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
else if (poolType === "b3") {
|
|
25
|
+
return (0, viem_1.encodeFunctionData)({
|
|
26
|
+
abi: upsideStaking_1.B3_STAKING_CONTRACT,
|
|
27
|
+
functionName: "stakeFor",
|
|
28
|
+
args: [beneficiary, BigInt(amount)],
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
throw new Error("Unsupported pool type");
|
|
32
|
+
}
|
|
33
|
+
function AnySpendStakeUpside({ loadOrder, mode = "modal", beneficiaryAddress, stakeAmount, stakingContractAddress, token, poolType, onSuccess, }) {
|
|
34
|
+
const header = () => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "relative mx-auto size-32", children: (0, jsx_runtime_1.jsx)("img", { alt: "token", className: "size-full", src: token.metadata.logoURI || "https://cdn.b3.fun/b3-coin-3d.png" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "from-b3-react-background to-as-on-surface-1 mt-[-60px] w-full rounded-t-lg bg-gradient-to-t", children: [(0, jsx_runtime_1.jsx)("div", { className: "h-[60px] w-full" }), (0, jsx_runtime_1.jsx)("div", { className: "mb-1 flex w-full flex-col items-center gap-2 p-5", children: (0, jsx_runtime_1.jsxs)("span", { className: "font-sf-rounded text-2xl font-semibold", children: ["Swap & Stake ", stakeAmount ? (0, number_1.formatTokenAmount)(BigInt(stakeAmount), token.decimals) : "", " ", token.symbol] }) })] })] }));
|
|
35
|
+
// Only generate encoded data if we have a valid beneficiary address
|
|
36
|
+
// This is used for the AnySpendCustom swap & stake flow
|
|
37
|
+
if (!beneficiaryAddress || beneficiaryAddress === "") {
|
|
38
|
+
return ((0, jsx_runtime_1.jsx)(react_1.StyleRoot, { children: (0, jsx_runtime_1.jsx)("div", { className: "bg-b3-react-background flex w-full flex-col items-center justify-center p-8", children: (0, jsx_runtime_1.jsx)("p", { className: "font-medium text-yellow-600 dark:text-yellow-400", children: "\u26A0\uFE0F Please connect your wallet to continue." }) }) }));
|
|
39
|
+
}
|
|
40
|
+
const encodedData = generateEncodedDataForStaking(stakeAmount, beneficiaryAddress, poolType);
|
|
41
|
+
return ((0, jsx_runtime_1.jsx)(AnySpendCustom_1.AnySpendCustom, { loadOrder: loadOrder, mode: mode, recipientAddress: beneficiaryAddress, orderType: "custom", dstChainId: chains_1.base.id, dstToken: token, dstAmount: stakeAmount, contractAddress: stakingContractAddress, encodedData: encodedData, metadata: {
|
|
42
|
+
action: `stake ${token.symbol}`,
|
|
43
|
+
}, header: header, onSuccess: onSuccess, showRecipient: true }));
|
|
44
|
+
}
|
|
@@ -52,6 +52,7 @@ exports.EVM_MAINNET = {
|
|
|
52
52
|
pollingInterval: 4000, // 4 seconds for Ethereum mainnet
|
|
53
53
|
zapperEnum: "ETHEREUM_MAINNET",
|
|
54
54
|
coingeckoName: "eth",
|
|
55
|
+
wethAddress: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
|
|
55
56
|
},
|
|
56
57
|
[chains_1.arbitrum.id]: {
|
|
57
58
|
id: chains_1.arbitrum.id,
|
|
@@ -66,6 +67,7 @@ exports.EVM_MAINNET = {
|
|
|
66
67
|
pollingInterval: 500, // 500ms for Arbitrum's fast blocks
|
|
67
68
|
zapperEnum: "ARBITRUM_MAINNET",
|
|
68
69
|
coingeckoName: "arbitrum",
|
|
70
|
+
wethAddress: "0x82af49447d8a07e3bd95bd0d56f35241523fbab1",
|
|
69
71
|
},
|
|
70
72
|
[chains_1.base.id]: {
|
|
71
73
|
id: chains_1.base.id,
|
|
@@ -80,6 +82,7 @@ exports.EVM_MAINNET = {
|
|
|
80
82
|
pollingInterval: 1000, // 1 second for Base
|
|
81
83
|
zapperEnum: "BASE_MAINNET",
|
|
82
84
|
coingeckoName: "base",
|
|
85
|
+
wethAddress: "0x4200000000000000000000000000000000000006",
|
|
83
86
|
},
|
|
84
87
|
[chains_1.optimism.id]: {
|
|
85
88
|
id: chains_1.optimism.id,
|
|
@@ -94,6 +97,7 @@ exports.EVM_MAINNET = {
|
|
|
94
97
|
pollingInterval: 1000, // 1 second for Optimism
|
|
95
98
|
zapperEnum: "OPTIMISM_MAINNET",
|
|
96
99
|
coingeckoName: "optimism",
|
|
100
|
+
wethAddress: "0x4200000000000000000000000000000000000006",
|
|
97
101
|
},
|
|
98
102
|
[chains_1.polygon.id]: {
|
|
99
103
|
id: chains_1.polygon.id,
|
|
@@ -108,6 +112,7 @@ exports.EVM_MAINNET = {
|
|
|
108
112
|
pollingInterval: 1000, // 1 second for Polygon
|
|
109
113
|
zapperEnum: "POLYGON_MAINNET",
|
|
110
114
|
coingeckoName: "polygon_pos",
|
|
115
|
+
wethAddress: "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",
|
|
111
116
|
},
|
|
112
117
|
[chains_1.avalanche.id]: {
|
|
113
118
|
id: chains_1.avalanche.id,
|
|
@@ -122,6 +127,7 @@ exports.EVM_MAINNET = {
|
|
|
122
127
|
pollingInterval: 1000, // 1 second for Avalanche
|
|
123
128
|
zapperEnum: "AVALANCHE_MAINNET",
|
|
124
129
|
coingeckoName: "avax",
|
|
130
|
+
wethAddress: "0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7",
|
|
125
131
|
},
|
|
126
132
|
[chains_1.bsc.id]: {
|
|
127
133
|
id: chains_1.bsc.id,
|
|
@@ -136,6 +142,7 @@ exports.EVM_MAINNET = {
|
|
|
136
142
|
pollingInterval: 1000, // 1 second for BSC
|
|
137
143
|
zapperEnum: "BSC_MAINNET",
|
|
138
144
|
coingeckoName: "bsc",
|
|
145
|
+
wethAddress: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c",
|
|
139
146
|
},
|
|
140
147
|
[chains_1.b3.id]: {
|
|
141
148
|
id: chains_1.b3.id,
|
|
@@ -150,6 +157,7 @@ exports.EVM_MAINNET = {
|
|
|
150
157
|
pollingInterval: 1000, // 1 second for B3
|
|
151
158
|
zapperEnum: "B3_MAINNET",
|
|
152
159
|
coingeckoName: "b3",
|
|
160
|
+
wethAddress: "0x4200000000000000000000000000000000000006",
|
|
153
161
|
},
|
|
154
162
|
[chains_1.abstract.id]: {
|
|
155
163
|
id: chains_1.abstract.id,
|
|
@@ -164,56 +172,57 @@ exports.EVM_MAINNET = {
|
|
|
164
172
|
pollingInterval: 3000, // 3 seconds for Abstract
|
|
165
173
|
zapperEnum: "ABSTRACT_MAINNET",
|
|
166
174
|
coingeckoName: "abstract",
|
|
175
|
+
wethAddress: "0x3439153eb7af838ad19d56e1571fbd09333c2809",
|
|
167
176
|
},
|
|
168
177
|
};
|
|
169
178
|
exports.EVM_TESTNET = {
|
|
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
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
179
|
+
// [sepolia.id]: {
|
|
180
|
+
// id: sepolia.id,
|
|
181
|
+
// name: sepolia.name,
|
|
182
|
+
// logoUrl: "https://assets.relay.link/icons/square/1/light.png",
|
|
183
|
+
// type: ChainType.EVM,
|
|
184
|
+
// nativeRequired: parseEther("0.00001"),
|
|
185
|
+
// canDepositNative: true,
|
|
186
|
+
// defaultToken: getEthToken(sepolia.id),
|
|
187
|
+
// nativeToken: getEthToken(sepolia.id),
|
|
188
|
+
// viem: sepolia,
|
|
189
|
+
// pollingInterval: 1000, // 1 second for Sepolia
|
|
190
|
+
// coingeckoName: "sepolia-testnet",
|
|
191
|
+
// },
|
|
192
|
+
// [baseSepolia.id]: {
|
|
193
|
+
// id: baseSepolia.id,
|
|
194
|
+
// name: baseSepolia.name,
|
|
195
|
+
// logoUrl: "https://assets.relay.link/icons/square/8453/light.png",
|
|
196
|
+
// type: ChainType.EVM,
|
|
197
|
+
// nativeRequired: parseEther("0.00001"),
|
|
198
|
+
// canDepositNative: true,
|
|
199
|
+
// defaultToken: getEthToken(baseSepolia.id),
|
|
200
|
+
// nativeToken: getEthToken(baseSepolia.id),
|
|
201
|
+
// viem: baseSepolia,
|
|
202
|
+
// pollingInterval: 1000, // 1 second for Base Sepolia
|
|
203
|
+
// coingeckoName: null,
|
|
204
|
+
// },
|
|
205
|
+
// [b3Sepolia.id]: {
|
|
206
|
+
// id: b3Sepolia.id,
|
|
207
|
+
// name: b3Sepolia.name,
|
|
208
|
+
// logoUrl: "https://assets.relay.link/icons/square/8333/light.png",
|
|
209
|
+
// type: ChainType.EVM,
|
|
210
|
+
// nativeRequired: parseEther("0.00001"),
|
|
211
|
+
// canDepositNative: true,
|
|
212
|
+
// defaultToken: getEthToken(b3Sepolia.id),
|
|
213
|
+
// nativeToken: getEthToken(b3Sepolia.id),
|
|
214
|
+
// viem: b3Sepolia,
|
|
215
|
+
// pollingInterval: 1000, // 1 second for B3 Sepolia
|
|
216
|
+
// coingeckoName: null,
|
|
217
|
+
// },
|
|
218
|
+
// [b4testnet.id]: {
|
|
219
|
+
// id: b4testnet.id,
|
|
220
|
+
// logoUrl: "https://cdn.b3.fun/b4-logo.png",
|
|
221
|
+
// type: ChainType.EVM,
|
|
222
|
+
// viem: b4testnet,
|
|
223
|
+
// requireNativeBalance: parseEther("0.00001"),
|
|
224
|
+
// supportDepositNative: true,
|
|
225
|
+
// },
|
|
217
226
|
};
|
|
218
227
|
exports.SOLANA_MAINNET = {
|
|
219
228
|
id: constants_1.RELAY_SOLANA_MAINNET_CHAIN_ID,
|
|
@@ -4,6 +4,7 @@ exports.B3DynamicModal = B3DynamicModal;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("../../../anyspend/react");
|
|
6
6
|
const AnyspendDepositHype_1 = require("../../../anyspend/react/components/AnyspendDepositHype");
|
|
7
|
+
const AnySpendStakeUpside_1 = require("../../../anyspend/react/components/AnySpendStakeUpside");
|
|
7
8
|
const react_2 = require("../../../global-account/react");
|
|
8
9
|
const cn_1 = require("../../../shared/utils/cn");
|
|
9
10
|
const debug_1 = require("../../../shared/utils/debug");
|
|
@@ -27,6 +28,7 @@ function B3DynamicModal() {
|
|
|
27
28
|
"anySpendJoinTournament",
|
|
28
29
|
"anySpendFundTournament",
|
|
29
30
|
"anySpendStakeB3",
|
|
31
|
+
"anySpendStakeUpside",
|
|
30
32
|
"anySpendBuySpin",
|
|
31
33
|
"anySpendOrderHistory",
|
|
32
34
|
"signInWithB3",
|
|
@@ -40,6 +42,7 @@ function B3DynamicModal() {
|
|
|
40
42
|
"anySpendJoinTournament",
|
|
41
43
|
"anySpendFundTournament",
|
|
42
44
|
"anySpendStakeB3",
|
|
45
|
+
"anySpendStakeUpside",
|
|
43
46
|
"anySpendBuySpin",
|
|
44
47
|
"anySpendSignatureMint",
|
|
45
48
|
"anySpendBondKit",
|
|
@@ -75,6 +78,8 @@ function B3DynamicModal() {
|
|
|
75
78
|
return (0, jsx_runtime_1.jsx)(react_1.OrderHistory, { onBack: () => { }, mode: "modal" });
|
|
76
79
|
case "anySpendStakeB3":
|
|
77
80
|
return (0, jsx_runtime_1.jsx)(react_1.AnySpendStakeB3, { ...contentType, mode: "modal" });
|
|
81
|
+
case "anySpendStakeUpside":
|
|
82
|
+
return (0, jsx_runtime_1.jsx)(AnySpendStakeUpside_1.AnySpendStakeUpside, { ...contentType, mode: "modal" });
|
|
78
83
|
case "anySpendBuySpin":
|
|
79
84
|
return (0, jsx_runtime_1.jsx)(react_1.AnySpendBuySpin, { ...contentType, mode: "modal" });
|
|
80
85
|
case "anySpendSignatureMint":
|
|
@@ -210,6 +210,26 @@ export interface AnySpendStakeB3Props extends BaseModalProps {
|
|
|
210
210
|
/** Callback function called when the stake is successful */
|
|
211
211
|
onSuccess?: () => void;
|
|
212
212
|
}
|
|
213
|
+
/**
|
|
214
|
+
* Props for the AnySpend Stake Contract modal
|
|
215
|
+
* Handles token staking operations to a given contract
|
|
216
|
+
*/
|
|
217
|
+
export interface AnySpendStakeUpsideProps extends BaseModalProps {
|
|
218
|
+
/** Modal type identifier */
|
|
219
|
+
type: "anySpendStakeUpside";
|
|
220
|
+
/** Recipient address to stake B3 for */
|
|
221
|
+
beneficiaryAddress: string;
|
|
222
|
+
/** Stake amount */
|
|
223
|
+
stakeAmount: string;
|
|
224
|
+
/** Staking contract address */
|
|
225
|
+
stakingContractAddress: string;
|
|
226
|
+
/** Pool type for staking */
|
|
227
|
+
poolType: "b3" | "weth";
|
|
228
|
+
/** Token address to stake */
|
|
229
|
+
token: components["schemas"]["Token"];
|
|
230
|
+
/** Callback function called when the stake is successful */
|
|
231
|
+
onSuccess?: () => void;
|
|
232
|
+
}
|
|
213
233
|
/**
|
|
214
234
|
* Props for the AnySpend Buy Spin modal
|
|
215
235
|
* Handles spin wheel entry purchases
|
|
@@ -302,7 +322,7 @@ export interface AvatarEditorModalProps extends BaseModalProps {
|
|
|
302
322
|
/**
|
|
303
323
|
* Union type of all possible modal content types
|
|
304
324
|
*/
|
|
305
|
-
export type ModalContentType = SignInWithB3ModalProps | RequestPermissionsModalProps | ManageAccountModalProps | AnySpendModalProps | AnyspendOrderDetailsProps | AnySpendNftProps | AnySpendJoinTournamentProps | AnySpendFundTournamentProps | AnySpendOrderHistoryProps | AnySpendStakeB3Props | AnySpendBuySpinProps | AnySpendSignatureMintProps | AnySpendBondKitProps | LinkAccountModalProps | AnySpendDepositHypeProps | AvatarEditorModalProps;
|
|
325
|
+
export type ModalContentType = SignInWithB3ModalProps | RequestPermissionsModalProps | ManageAccountModalProps | AnySpendModalProps | AnyspendOrderDetailsProps | AnySpendNftProps | AnySpendJoinTournamentProps | AnySpendFundTournamentProps | AnySpendOrderHistoryProps | AnySpendStakeB3Props | AnySpendStakeUpsideProps | AnySpendBuySpinProps | AnySpendSignatureMintProps | AnySpendBondKitProps | LinkAccountModalProps | AnySpendDepositHypeProps | AvatarEditorModalProps;
|
|
306
326
|
/**
|
|
307
327
|
* State interface for the modal store
|
|
308
328
|
*/
|
|
@@ -12,6 +12,7 @@ export declare const b3Mainnet: {
|
|
|
12
12
|
readonly url: "https://explorer.b3.fun";
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
|
+
blockTime?: number | undefined | undefined;
|
|
15
16
|
contracts?: {
|
|
16
17
|
[x: string]: import("viem").ChainContract | {
|
|
17
18
|
[sourceId: number]: import("viem").ChainContract | undefined;
|
|
@@ -19,7 +20,7 @@ export declare const b3Mainnet: {
|
|
|
19
20
|
ensRegistry?: import("viem").ChainContract | undefined;
|
|
20
21
|
ensUniversalResolver?: import("viem").ChainContract | undefined;
|
|
21
22
|
multicall3?: import("viem").ChainContract | undefined;
|
|
22
|
-
|
|
23
|
+
erc6492Verifier?: import("viem").ChainContract | undefined;
|
|
23
24
|
} | undefined;
|
|
24
25
|
ensTlds?: readonly string[] | undefined;
|
|
25
26
|
id: 8333;
|
|
@@ -29,6 +30,7 @@ export declare const b3Mainnet: {
|
|
|
29
30
|
readonly symbol: "ETH";
|
|
30
31
|
readonly decimals: 18;
|
|
31
32
|
};
|
|
33
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
32
34
|
rpcUrls: {
|
|
33
35
|
readonly default: {
|
|
34
36
|
readonly http: readonly ["https://mainnet-rpc.b3.fun"];
|
|
@@ -56,6 +58,7 @@ export declare const getViemChainConfig: (config: ChainNetworks) => {
|
|
|
56
58
|
readonly url: string;
|
|
57
59
|
};
|
|
58
60
|
};
|
|
61
|
+
blockTime?: number | undefined | undefined;
|
|
59
62
|
contracts?: {
|
|
60
63
|
[x: string]: import("viem").ChainContract | {
|
|
61
64
|
[sourceId: number]: import("viem").ChainContract | undefined;
|
|
@@ -63,7 +66,7 @@ export declare const getViemChainConfig: (config: ChainNetworks) => {
|
|
|
63
66
|
ensRegistry?: import("viem").ChainContract | undefined;
|
|
64
67
|
ensUniversalResolver?: import("viem").ChainContract | undefined;
|
|
65
68
|
multicall3?: import("viem").ChainContract | undefined;
|
|
66
|
-
|
|
69
|
+
erc6492Verifier?: import("viem").ChainContract | undefined;
|
|
67
70
|
} | undefined;
|
|
68
71
|
ensTlds?: readonly string[] | undefined;
|
|
69
72
|
id: number;
|
|
@@ -73,6 +76,7 @@ export declare const getViemChainConfig: (config: ChainNetworks) => {
|
|
|
73
76
|
name: string;
|
|
74
77
|
decimals: number;
|
|
75
78
|
};
|
|
79
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
76
80
|
rpcUrls: {
|
|
77
81
|
readonly default: {
|
|
78
82
|
readonly http: readonly [string];
|
|
@@ -103,6 +107,7 @@ export declare const b3Chain: Chain | {
|
|
|
103
107
|
readonly url: "https://explorer.b3.fun";
|
|
104
108
|
};
|
|
105
109
|
};
|
|
110
|
+
blockTime?: number | undefined | undefined;
|
|
106
111
|
contracts?: {
|
|
107
112
|
[x: string]: import("viem").ChainContract | {
|
|
108
113
|
[sourceId: number]: import("viem").ChainContract | undefined;
|
|
@@ -110,7 +115,7 @@ export declare const b3Chain: Chain | {
|
|
|
110
115
|
ensRegistry?: import("viem").ChainContract | undefined;
|
|
111
116
|
ensUniversalResolver?: import("viem").ChainContract | undefined;
|
|
112
117
|
multicall3?: import("viem").ChainContract | undefined;
|
|
113
|
-
|
|
118
|
+
erc6492Verifier?: import("viem").ChainContract | undefined;
|
|
114
119
|
} | undefined;
|
|
115
120
|
ensTlds?: readonly string[] | undefined;
|
|
116
121
|
id: 8333;
|
|
@@ -120,6 +125,7 @@ export declare const b3Chain: Chain | {
|
|
|
120
125
|
readonly symbol: "ETH";
|
|
121
126
|
readonly decimals: 18;
|
|
122
127
|
};
|
|
128
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
123
129
|
rpcUrls: {
|
|
124
130
|
readonly default: {
|
|
125
131
|
readonly http: readonly ["https://mainnet-rpc.b3.fun"];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as SimpleHashTypes from "../../global-account/types/simplehash.types";
|
|
2
2
|
export * from "../../global-account/types/simplehash.types";
|
|
3
|
-
export declare const simpleHashChainToChainId: (chain: string) => 8453 | 8333 |
|
|
3
|
+
export declare const simpleHashChainToChainId: (chain: string) => 8453 | 8333 | 1993 | 84532 | null;
|
|
4
4
|
export declare const simpleHashChainToChainName: (chain: number) => "base" | "b3" | "b3-sepolia" | "base-sepolia" | null;
|
|
5
5
|
type SimpleHashRoute = `/v0/nfts/${string}/${string}/${string}` | `/v0/nfts/${string}` | `/v0/nfts/collections/${string}/${string}` | `/v0/nfts/transfers/${string}/${string}` | `/v0/fungibles/assets` | `/v0/native_tokens/balances` | string;
|
|
6
6
|
type RouteReturnType<T extends SimpleHashRoute> = T extends `/v0/nfts/collections/${string}/${string}` ? SimpleHashTypes.SimpleHashNFTResponse : T extends `/v0/nfts/transfers/${string}/${string}` ? {
|