@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.
Files changed (34) hide show
  1. package/dist/cjs/anyspend/abis/upsideStaking.d.ts +2058 -0
  2. package/dist/cjs/anyspend/abis/upsideStaking.js +1139 -0
  3. package/dist/cjs/anyspend/react/components/AnySpendStakeUpside.d.ts +11 -0
  4. package/dist/cjs/anyspend/react/components/AnySpendStakeUpside.js +44 -0
  5. package/dist/cjs/anyspend/types/chain.d.ts +1 -0
  6. package/dist/cjs/anyspend/utils/chain.js +56 -47
  7. package/dist/cjs/global-account/react/components/B3DynamicModal.js +5 -0
  8. package/dist/cjs/global-account/react/components/ManageAccount/BalanceContent.js +5 -3
  9. package/dist/cjs/global-account/react/stores/useModalStore.d.ts +21 -1
  10. package/dist/cjs/shared/utils/simplehash.d.ts +1 -1
  11. package/dist/esm/anyspend/abis/upsideStaking.d.ts +2058 -0
  12. package/dist/esm/anyspend/abis/upsideStaking.js +1136 -0
  13. package/dist/esm/anyspend/react/components/AnySpendStakeUpside.d.ts +11 -0
  14. package/dist/esm/anyspend/react/components/AnySpendStakeUpside.js +38 -0
  15. package/dist/esm/anyspend/types/chain.d.ts +1 -0
  16. package/dist/esm/anyspend/utils/chain.js +57 -48
  17. package/dist/esm/global-account/react/components/B3DynamicModal.js +5 -0
  18. package/dist/esm/global-account/react/components/ManageAccount/BalanceContent.js +6 -4
  19. package/dist/esm/global-account/react/stores/useModalStore.d.ts +21 -1
  20. package/dist/esm/shared/utils/simplehash.d.ts +1 -1
  21. package/dist/styles/index.css +1 -1
  22. package/dist/types/anyspend/abis/upsideStaking.d.ts +2058 -0
  23. package/dist/types/anyspend/react/components/AnySpendStakeUpside.d.ts +11 -0
  24. package/dist/types/anyspend/types/chain.d.ts +1 -0
  25. package/dist/types/global-account/react/stores/useModalStore.d.ts +21 -1
  26. package/dist/types/shared/utils/simplehash.d.ts +1 -1
  27. package/package.json +1 -1
  28. package/src/anyspend/abis/upsideStaking.ts +1137 -0
  29. package/src/anyspend/react/components/AnySpendStakeUpside.tsx +96 -0
  30. package/src/anyspend/types/chain.ts +1 -0
  31. package/src/anyspend/utils/chain.ts +49 -53
  32. package/src/global-account/react/components/B3DynamicModal.tsx +5 -0
  33. package/src/global-account/react/components/ManageAccount/BalanceContent.tsx +7 -4
  34. 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;
@@ -19,6 +19,7 @@ export interface IEVMChain extends IBaseChain {
19
19
  type: ChainType.EVM;
20
20
  viem: Chain;
21
21
  pollingInterval: number;
22
+ wethAddress: string;
22
23
  zapperEnum?: string;
23
24
  }
24
25
  export interface ISolanaChain extends IBaseChain {
@@ -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 | 84532 | 1993 | null;
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}` ? {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@b3dotfun/sdk",
3
- "version": "0.0.51",
3
+ "version": "0.0.52-alpha.1",
4
4
  "source": "src/index.ts",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "react-native": "./dist/cjs/index.native.js",