@b3dotfun/sdk 0.0.51 → 0.0.52-alpha.1
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/components/ManageAccount/BalanceContent.js +5 -3
- package/dist/cjs/global-account/react/stores/useModalStore.d.ts +21 -1
- 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/components/ManageAccount/BalanceContent.js +6 -4
- package/dist/esm/global-account/react/stores/useModalStore.d.ts +21 -1
- 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/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/components/ManageAccount/BalanceContent.tsx +7 -4
- package/src/global-account/react/stores/useModalStore.ts +22 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { components } from "@b3dotfun/sdk/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;
|
|
@@ -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
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as SimpleHashTypes from "@b3dotfun/sdk/global-account/types/simplehash.types";
|
|
2
2
|
export * from "@b3dotfun/sdk/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}` ? {
|