@b3dotfun/sdk 0.1.6-test.0 → 0.1.6

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.
@@ -39,9 +39,9 @@ export interface AnySpendCollectorClubPurchaseProps {
39
39
  */
40
40
  spenderAddress?: string;
41
41
  /**
42
- * Use staging contract address instead of production
42
+ * Collector Club Shop contract address (defaults to Base mainnet shop)
43
43
  */
44
- isStaging?: boolean;
44
+ ccShopAddress?: string;
45
45
  /**
46
46
  * Success callback
47
47
  */
@@ -70,4 +70,4 @@ export interface AnySpendCollectorClubPurchaseProps {
70
70
  */
71
71
  forceFiatPayment?: boolean;
72
72
  }
73
- export declare function AnySpendCollectorClubPurchase({ loadOrder, mode, activeTab, packId, packAmount, pricePerPack, paymentToken, recipientAddress, spenderAddress, isStaging, onSuccess, header, showRecipient, vendingMachineId, packType, forceFiatPayment, }: AnySpendCollectorClubPurchaseProps): import("react/jsx-runtime").JSX.Element;
73
+ export declare function AnySpendCollectorClubPurchase({ loadOrder, mode, activeTab, packId, packAmount, pricePerPack, paymentToken, recipientAddress, ccShopAddress, spenderAddress, onSuccess, header, showRecipient, vendingMachineId, packType, forceFiatPayment, }: AnySpendCollectorClubPurchaseProps): import("react/jsx-runtime").JSX.Element;
@@ -33,9 +33,8 @@ const number_1 = require("../../../shared/utils/number");
33
33
  const react_1 = require("react");
34
34
  const viem_1 = require("viem");
35
35
  const AnySpendCustom_1 = require("./AnySpendCustom");
36
- // Collector Club Shop contract addresses on Base
37
- const CC_SHOP_ADDRESS = "0x47366E64E4917dd4DdC04Fb9DC507c1dD2b87294";
38
- const CC_SHOP_ADDRESS_STAGING = "0x8b751143342ac41eB965E55430e3F7Adf6BE01fA";
36
+ // Default Collector Club Shop contract on Base
37
+ const DEFAULT_CC_SHOP_ADDRESS = "0x47366E64E4917dd4DdC04Fb9DC507c1dD2b87294";
39
38
  const BASE_CHAIN_ID = 8453;
40
39
  // ABI for buyPacksFor function only
41
40
  const BUY_PACKS_FOR_ABI = {
@@ -49,8 +48,7 @@ const BUY_PACKS_FOR_ABI = {
49
48
  stateMutability: "nonpayable",
50
49
  type: "function",
51
50
  };
52
- function AnySpendCollectorClubPurchase({ loadOrder, mode = "modal", activeTab = "crypto", packId, packAmount, pricePerPack, paymentToken = constants_1.USDC_BASE, recipientAddress, spenderAddress, isStaging = false, onSuccess, header, showRecipient = true, vendingMachineId, packType, forceFiatPayment, }) {
53
- const ccShopAddress = isStaging ? CC_SHOP_ADDRESS_STAGING : CC_SHOP_ADDRESS;
51
+ function AnySpendCollectorClubPurchase({ loadOrder, mode = "modal", activeTab = "crypto", packId, packAmount, pricePerPack, paymentToken = constants_1.USDC_BASE, recipientAddress, ccShopAddress = DEFAULT_CC_SHOP_ADDRESS, spenderAddress, onSuccess, header, showRecipient = true, vendingMachineId, packType, forceFiatPayment, }) {
54
52
  // Calculate total amount needed (pricePerPack * packAmount)
55
53
  const totalAmount = (0, react_1.useMemo)(() => {
56
54
  try {
@@ -131,8 +131,6 @@ export interface AnySpendModalProps extends BaseModalProps {
131
131
  hideHeader?: boolean;
132
132
  /** When true, disables URL parameter management for swap configuration */
133
133
  disableUrlParamManagement?: boolean;
134
- /** Staging environment support */
135
- isStaging?: boolean;
136
134
  }
137
135
  /**
138
136
  * Props for the AnySpend NFT modal
@@ -39,9 +39,9 @@ export interface AnySpendCollectorClubPurchaseProps {
39
39
  */
40
40
  spenderAddress?: string;
41
41
  /**
42
- * Use staging contract address instead of production
42
+ * Collector Club Shop contract address (defaults to Base mainnet shop)
43
43
  */
44
- isStaging?: boolean;
44
+ ccShopAddress?: string;
45
45
  /**
46
46
  * Success callback
47
47
  */
@@ -70,4 +70,4 @@ export interface AnySpendCollectorClubPurchaseProps {
70
70
  */
71
71
  forceFiatPayment?: boolean;
72
72
  }
73
- export declare function AnySpendCollectorClubPurchase({ loadOrder, mode, activeTab, packId, packAmount, pricePerPack, paymentToken, recipientAddress, spenderAddress, isStaging, onSuccess, header, showRecipient, vendingMachineId, packType, forceFiatPayment, }: AnySpendCollectorClubPurchaseProps): import("react/jsx-runtime").JSX.Element;
73
+ export declare function AnySpendCollectorClubPurchase({ loadOrder, mode, activeTab, packId, packAmount, pricePerPack, paymentToken, recipientAddress, ccShopAddress, spenderAddress, onSuccess, header, showRecipient, vendingMachineId, packType, forceFiatPayment, }: AnySpendCollectorClubPurchaseProps): import("react/jsx-runtime").JSX.Element;
@@ -30,9 +30,8 @@ import { formatUnits } from "../../../shared/utils/number.js";
30
30
  import { useMemo } from "react";
31
31
  import { encodeFunctionData } from "viem";
32
32
  import { AnySpendCustom } from "./AnySpendCustom.js";
33
- // Collector Club Shop contract addresses on Base
34
- const CC_SHOP_ADDRESS = "0x47366E64E4917dd4DdC04Fb9DC507c1dD2b87294";
35
- const CC_SHOP_ADDRESS_STAGING = "0x8b751143342ac41eB965E55430e3F7Adf6BE01fA";
33
+ // Default Collector Club Shop contract on Base
34
+ const DEFAULT_CC_SHOP_ADDRESS = "0x47366E64E4917dd4DdC04Fb9DC507c1dD2b87294";
36
35
  const BASE_CHAIN_ID = 8453;
37
36
  // ABI for buyPacksFor function only
38
37
  const BUY_PACKS_FOR_ABI = {
@@ -46,8 +45,7 @@ const BUY_PACKS_FOR_ABI = {
46
45
  stateMutability: "nonpayable",
47
46
  type: "function",
48
47
  };
49
- export function AnySpendCollectorClubPurchase({ loadOrder, mode = "modal", activeTab = "crypto", packId, packAmount, pricePerPack, paymentToken = USDC_BASE, recipientAddress, spenderAddress, isStaging = false, onSuccess, header, showRecipient = true, vendingMachineId, packType, forceFiatPayment, }) {
50
- const ccShopAddress = isStaging ? CC_SHOP_ADDRESS_STAGING : CC_SHOP_ADDRESS;
48
+ export function AnySpendCollectorClubPurchase({ loadOrder, mode = "modal", activeTab = "crypto", packId, packAmount, pricePerPack, paymentToken = USDC_BASE, recipientAddress, ccShopAddress = DEFAULT_CC_SHOP_ADDRESS, spenderAddress, onSuccess, header, showRecipient = true, vendingMachineId, packType, forceFiatPayment, }) {
51
49
  // Calculate total amount needed (pricePerPack * packAmount)
52
50
  const totalAmount = useMemo(() => {
53
51
  try {
@@ -131,8 +131,6 @@ export interface AnySpendModalProps extends BaseModalProps {
131
131
  hideHeader?: boolean;
132
132
  /** When true, disables URL parameter management for swap configuration */
133
133
  disableUrlParamManagement?: boolean;
134
- /** Staging environment support */
135
- isStaging?: boolean;
136
134
  }
137
135
  /**
138
136
  * Props for the AnySpend NFT modal
@@ -39,9 +39,9 @@ export interface AnySpendCollectorClubPurchaseProps {
39
39
  */
40
40
  spenderAddress?: string;
41
41
  /**
42
- * Use staging contract address instead of production
42
+ * Collector Club Shop contract address (defaults to Base mainnet shop)
43
43
  */
44
- isStaging?: boolean;
44
+ ccShopAddress?: string;
45
45
  /**
46
46
  * Success callback
47
47
  */
@@ -70,4 +70,4 @@ export interface AnySpendCollectorClubPurchaseProps {
70
70
  */
71
71
  forceFiatPayment?: boolean;
72
72
  }
73
- export declare function AnySpendCollectorClubPurchase({ loadOrder, mode, activeTab, packId, packAmount, pricePerPack, paymentToken, recipientAddress, spenderAddress, isStaging, onSuccess, header, showRecipient, vendingMachineId, packType, forceFiatPayment, }: AnySpendCollectorClubPurchaseProps): import("react/jsx-runtime").JSX.Element;
73
+ export declare function AnySpendCollectorClubPurchase({ loadOrder, mode, activeTab, packId, packAmount, pricePerPack, paymentToken, recipientAddress, ccShopAddress, spenderAddress, onSuccess, header, showRecipient, vendingMachineId, packType, forceFiatPayment, }: AnySpendCollectorClubPurchaseProps): import("react/jsx-runtime").JSX.Element;
@@ -131,8 +131,6 @@ export interface AnySpendModalProps extends BaseModalProps {
131
131
  hideHeader?: boolean;
132
132
  /** When true, disables URL parameter management for swap configuration */
133
133
  disableUrlParamManagement?: boolean;
134
- /** Staging environment support */
135
- isStaging?: boolean;
136
134
  }
137
135
  /**
138
136
  * Props for the AnySpend NFT modal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@b3dotfun/sdk",
3
- "version": "0.1.6-test.0",
3
+ "version": "0.1.6",
4
4
  "source": "src/index.ts",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "react-native": "./dist/cjs/index.native.js",
@@ -32,9 +32,8 @@ import React, { useMemo } from "react";
32
32
  import { encodeFunctionData } from "viem";
33
33
  import { AnySpendCustom } from "./AnySpendCustom";
34
34
 
35
- // Collector Club Shop contract addresses on Base
36
- const CC_SHOP_ADDRESS = "0x47366E64E4917dd4DdC04Fb9DC507c1dD2b87294";
37
- const CC_SHOP_ADDRESS_STAGING = "0x8b751143342ac41eB965E55430e3F7Adf6BE01fA";
35
+ // Default Collector Club Shop contract on Base
36
+ const DEFAULT_CC_SHOP_ADDRESS = "0x47366E64E4917dd4DdC04Fb9DC507c1dD2b87294";
38
37
  const BASE_CHAIN_ID = 8453;
39
38
 
40
39
  // ABI for buyPacksFor function only
@@ -88,9 +87,9 @@ export interface AnySpendCollectorClubPurchaseProps {
88
87
  */
89
88
  spenderAddress?: string;
90
89
  /**
91
- * Use staging contract address instead of production
90
+ * Collector Club Shop contract address (defaults to Base mainnet shop)
92
91
  */
93
- isStaging?: boolean;
92
+ ccShopAddress?: string;
94
93
  /**
95
94
  * Success callback
96
95
  */
@@ -129,8 +128,8 @@ export function AnySpendCollectorClubPurchase({
129
128
  pricePerPack,
130
129
  paymentToken = USDC_BASE,
131
130
  recipientAddress,
131
+ ccShopAddress = DEFAULT_CC_SHOP_ADDRESS,
132
132
  spenderAddress,
133
- isStaging = false,
134
133
  onSuccess,
135
134
  header,
136
135
  showRecipient = true,
@@ -138,8 +137,6 @@ export function AnySpendCollectorClubPurchase({
138
137
  packType,
139
138
  forceFiatPayment,
140
139
  }: AnySpendCollectorClubPurchaseProps) {
141
- const ccShopAddress = isStaging ? CC_SHOP_ADDRESS_STAGING : CC_SHOP_ADDRESS;
142
-
143
140
  // Calculate total amount needed (pricePerPack * packAmount)
144
141
  const totalAmount = useMemo(() => {
145
142
  try {
@@ -137,8 +137,6 @@ export interface AnySpendModalProps extends BaseModalProps {
137
137
  hideHeader?: boolean;
138
138
  /** When true, disables URL parameter management for swap configuration */
139
139
  disableUrlParamManagement?: boolean;
140
- /** Staging environment support */
141
- isStaging?: boolean;
142
140
  }
143
141
 
144
142
  /**