@b3dotfun/sdk 0.0.7-alpha.1 → 0.0.7-alpha.11

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 (159) hide show
  1. package/dist/cjs/anyspend/constants/index.js +5 -2
  2. package/dist/cjs/anyspend/index.d.ts +1 -0
  3. package/dist/cjs/anyspend/index.js +1 -0
  4. package/dist/cjs/anyspend/react/components/AnySpendBuySpin.js +33 -33
  5. package/dist/cjs/anyspend/react/components/AnySpendCustom.d.ts +2 -2
  6. package/dist/cjs/anyspend/react/components/AnySpendCustom.js +89 -49
  7. package/dist/cjs/anyspend/react/components/AnySpendNFT.d.ts +3 -2
  8. package/dist/cjs/anyspend/react/components/AnySpendNFT.js +5 -3
  9. package/dist/cjs/anyspend/react/components/AnySpendStakeB3.js +4 -3
  10. package/dist/cjs/anyspend/react/components/AnySpendTournament.js +4 -1
  11. package/dist/cjs/anyspend/react/components/common/OrderDetails.js +2 -2
  12. package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +3 -18
  13. package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +1 -0
  14. package/dist/cjs/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +4 -0
  15. package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +4 -0
  16. package/dist/cjs/anyspend/services/anyspend.d.ts +3 -1
  17. package/dist/cjs/anyspend/services/anyspend.js +1 -1
  18. package/dist/cjs/anyspend/types/index.d.ts +1 -0
  19. package/dist/cjs/anyspend/types/index.js +1 -0
  20. package/dist/cjs/anyspend/types/metadata.d.ts +26 -0
  21. package/dist/cjs/anyspend/types/metadata.js +16 -0
  22. package/dist/cjs/anyspend/types/nft.d.ts +7 -0
  23. package/dist/cjs/anyspend/types/nft.js +2 -0
  24. package/dist/cjs/anyspend/types/order.d.ts +10 -0
  25. package/dist/cjs/anyspend/types/req-res/createOrder.d.ts +28 -0
  26. package/dist/cjs/anyspend/types/req-res/getOrderAndTransactions.d.ts +18 -0
  27. package/dist/cjs/anyspend/types/req-res/getOrderHistory.d.ts +14 -0
  28. package/dist/cjs/anyspend/types/req-res/getQuote.d.ts +11 -0
  29. package/dist/cjs/anyspend/types/req-res/getQuote.js +4 -1
  30. package/dist/cjs/anyspend/utils/orderPayload.d.ts +3 -3
  31. package/dist/cjs/anyspend/utils/orderPayload.js +18 -4
  32. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.d.ts +1 -1
  33. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +1 -1
  34. package/dist/cjs/global-account/react/components/SignInWithB3/SignIn.d.ts +14 -0
  35. package/dist/cjs/global-account/react/components/SignInWithB3/SignIn.js +50 -0
  36. package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3.d.ts +1 -2
  37. package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3.js +11 -16
  38. package/dist/cjs/global-account/react/components/StyleRoot.js +0 -1
  39. package/dist/cjs/global-account/react/components/custom/Icon.d.ts +7 -0
  40. package/dist/cjs/global-account/react/components/custom/Icon.js +52 -0
  41. package/dist/cjs/global-account/react/components/custom/ManageAccountButton.d.ts +4 -0
  42. package/dist/cjs/global-account/react/components/custom/ManageAccountButton.js +20 -0
  43. package/dist/cjs/global-account/react/hooks/useB3EnsName.d.ts +1 -4
  44. package/dist/cjs/global-account/react/hooks/useB3EnsName.js +22 -22
  45. package/dist/cjs/global-account/react/stores/useModalStore.d.ts +2 -0
  46. package/dist/cjs/index.d.ts +0 -0
  47. package/dist/cjs/index.js +2 -0
  48. package/dist/cjs/shared/constants/index.d.ts +1 -0
  49. package/dist/cjs/shared/constants/index.js +2 -1
  50. package/dist/cjs/shared/utils/index.d.ts +9 -0
  51. package/dist/cjs/shared/utils/index.js +17 -0
  52. package/dist/esm/anyspend/constants/index.js +5 -2
  53. package/dist/esm/anyspend/index.d.ts +1 -0
  54. package/dist/esm/anyspend/index.js +1 -0
  55. package/dist/esm/anyspend/react/components/AnySpendBuySpin.js +5 -5
  56. package/dist/esm/anyspend/react/components/AnySpendCustom.d.ts +2 -2
  57. package/dist/esm/anyspend/react/components/AnySpendCustom.js +66 -26
  58. package/dist/esm/anyspend/react/components/AnySpendNFT.d.ts +3 -2
  59. package/dist/esm/anyspend/react/components/AnySpendNFT.js +5 -3
  60. package/dist/esm/anyspend/react/components/AnySpendStakeB3.js +5 -4
  61. package/dist/esm/anyspend/react/components/AnySpendTournament.js +4 -1
  62. package/dist/esm/anyspend/react/components/common/OrderDetails.js +3 -3
  63. package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +3 -18
  64. package/dist/esm/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +1 -0
  65. package/dist/esm/anyspend/react/hooks/useAnyspendCreateOrder.js +1 -1
  66. package/dist/esm/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +4 -0
  67. package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +4 -0
  68. package/dist/esm/anyspend/services/anyspend.d.ts +3 -1
  69. package/dist/esm/anyspend/services/anyspend.js +1 -1
  70. package/dist/esm/anyspend/types/index.d.ts +1 -0
  71. package/dist/esm/anyspend/types/index.js +1 -0
  72. package/dist/esm/anyspend/types/metadata.d.ts +26 -0
  73. package/dist/esm/anyspend/types/metadata.js +11 -0
  74. package/dist/esm/anyspend/types/nft.d.ts +7 -0
  75. package/dist/esm/anyspend/types/nft.js +2 -0
  76. package/dist/esm/anyspend/types/order.d.ts +10 -0
  77. package/dist/esm/anyspend/types/req-res/createOrder.d.ts +28 -0
  78. package/dist/esm/anyspend/types/req-res/getOrderAndTransactions.d.ts +18 -0
  79. package/dist/esm/anyspend/types/req-res/getOrderHistory.d.ts +14 -0
  80. package/dist/esm/anyspend/types/req-res/getQuote.d.ts +11 -0
  81. package/dist/esm/anyspend/types/req-res/getQuote.js +4 -1
  82. package/dist/esm/anyspend/utils/orderPayload.d.ts +3 -3
  83. package/dist/esm/anyspend/utils/orderPayload.js +19 -5
  84. package/dist/esm/global-account/react/components/B3Provider/B3Provider.d.ts +1 -1
  85. package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +1 -1
  86. package/dist/esm/global-account/react/components/SignInWithB3/SignIn.d.ts +14 -0
  87. package/dist/esm/global-account/react/components/SignInWithB3/SignIn.js +44 -0
  88. package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3.d.ts +1 -2
  89. package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3.js +7 -12
  90. package/dist/esm/global-account/react/components/StyleRoot.js +0 -1
  91. package/dist/esm/global-account/react/components/custom/Icon.d.ts +7 -0
  92. package/dist/esm/global-account/react/components/custom/Icon.js +50 -0
  93. package/dist/esm/global-account/react/components/custom/ManageAccountButton.d.ts +4 -0
  94. package/dist/esm/global-account/react/components/custom/ManageAccountButton.js +17 -0
  95. package/dist/esm/global-account/react/hooks/useB3EnsName.d.ts +1 -4
  96. package/dist/esm/global-account/react/hooks/useB3EnsName.js +24 -21
  97. package/dist/esm/global-account/react/stores/useModalStore.d.ts +2 -0
  98. package/dist/esm/index.d.ts +0 -0
  99. package/dist/esm/index.js +2 -0
  100. package/dist/esm/shared/constants/index.d.ts +1 -0
  101. package/dist/esm/shared/constants/index.js +1 -0
  102. package/dist/esm/shared/utils/index.d.ts +9 -0
  103. package/dist/esm/shared/utils/index.js +15 -0
  104. package/dist/styles/index.css +1 -1
  105. package/dist/types/anyspend/index.d.ts +1 -0
  106. package/dist/types/anyspend/react/components/AnySpendCustom.d.ts +2 -2
  107. package/dist/types/anyspend/react/components/AnySpendNFT.d.ts +3 -2
  108. package/dist/types/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +3 -18
  109. package/dist/types/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +1 -0
  110. package/dist/types/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +4 -0
  111. package/dist/types/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +4 -0
  112. package/dist/types/anyspend/services/anyspend.d.ts +3 -1
  113. package/dist/types/anyspend/types/index.d.ts +1 -0
  114. package/dist/types/anyspend/types/metadata.d.ts +26 -0
  115. package/dist/types/anyspend/types/nft.d.ts +7 -0
  116. package/dist/types/anyspend/types/order.d.ts +10 -0
  117. package/dist/types/anyspend/types/req-res/createOrder.d.ts +28 -0
  118. package/dist/types/anyspend/types/req-res/getOrderAndTransactions.d.ts +18 -0
  119. package/dist/types/anyspend/types/req-res/getOrderHistory.d.ts +14 -0
  120. package/dist/types/anyspend/types/req-res/getQuote.d.ts +11 -0
  121. package/dist/types/anyspend/utils/orderPayload.d.ts +3 -3
  122. package/dist/types/global-account/react/components/B3Provider/B3Provider.d.ts +1 -1
  123. package/dist/types/global-account/react/components/SignInWithB3/SignIn.d.ts +14 -0
  124. package/dist/types/global-account/react/components/SignInWithB3/SignInWithB3.d.ts +1 -2
  125. package/dist/types/global-account/react/components/custom/Icon.d.ts +7 -0
  126. package/dist/types/global-account/react/components/custom/ManageAccountButton.d.ts +4 -0
  127. package/dist/types/global-account/react/hooks/useB3EnsName.d.ts +1 -4
  128. package/dist/types/global-account/react/stores/useModalStore.d.ts +2 -0
  129. package/dist/types/index.d.ts +0 -0
  130. package/dist/types/shared/constants/index.d.ts +1 -0
  131. package/dist/types/shared/utils/index.d.ts +9 -0
  132. package/package.json +22 -3
  133. package/src/anyspend/constants/index.ts +5 -3
  134. package/src/anyspend/index.ts +1 -0
  135. package/src/anyspend/react/components/AnySpendBuySpin.tsx +8 -7
  136. package/src/anyspend/react/components/AnySpendCustom.tsx +83 -30
  137. package/src/anyspend/react/components/AnySpendNFT.tsx +9 -4
  138. package/src/anyspend/react/components/AnySpendStakeB3.tsx +7 -6
  139. package/src/anyspend/react/components/AnySpendTournament.tsx +4 -1
  140. package/src/anyspend/react/components/common/OrderDetails.tsx +6 -6
  141. package/src/anyspend/react/hooks/useAnyspendCreateOnrampOrder.ts +3 -13
  142. package/src/anyspend/react/hooks/useAnyspendCreateOrder.ts +2 -1
  143. package/src/anyspend/services/anyspend.ts +2 -2
  144. package/src/anyspend/types/index.ts +1 -0
  145. package/src/anyspend/types/metadata.ts +41 -0
  146. package/src/anyspend/types/nft.ts +3 -0
  147. package/src/anyspend/types/req-res/getQuote.ts +4 -1
  148. package/src/anyspend/utils/orderPayload.ts +17 -5
  149. package/src/global-account/react/components/B3Provider/B3Provider.tsx +2 -3
  150. package/src/global-account/react/components/SignInWithB3/SignIn.tsx +190 -0
  151. package/src/global-account/react/components/SignInWithB3/SignInWithB3.tsx +15 -27
  152. package/src/global-account/react/components/StyleRoot.tsx +0 -1
  153. package/src/global-account/react/components/custom/Icon.tsx +102 -0
  154. package/src/global-account/react/components/custom/ManageAccountButton.tsx +33 -0
  155. package/src/global-account/react/hooks/useB3EnsName.ts +26 -32
  156. package/src/global-account/react/stores/useModalStore.ts +2 -0
  157. package/src/index.ts +1 -0
  158. package/src/shared/constants/index.ts +2 -0
  159. package/src/shared/utils/index.ts +16 -0
@@ -267,12 +267,18 @@ export declare const zCreateOrderRequest: z.ZodObject<{
267
267
  type: z.ZodLiteral<OrderType.MintNFT>;
268
268
  payload: z.ZodObject<{
269
269
  contractAddress: z.ZodString;
270
+ tokenId: z.ZodNullable<z.ZodNumber>;
271
+ contractType: z.ZodNativeEnum<typeof import("../nft").NftType>;
270
272
  nftPrice: z.ZodString;
271
273
  }, "strip", z.ZodTypeAny, {
272
274
  contractAddress: string;
275
+ tokenId: number | null;
276
+ contractType: import("../nft").NftType;
273
277
  nftPrice: string;
274
278
  }, {
275
279
  contractAddress: string;
280
+ tokenId: number | null;
281
+ contractType: import("../nft").NftType;
276
282
  nftPrice: string;
277
283
  }>;
278
284
  metadata: z.ZodObject<{
@@ -499,6 +505,8 @@ export declare const zCreateOrderRequest: z.ZodObject<{
499
505
  srcAmount: string;
500
506
  payload: {
501
507
  contractAddress: string;
508
+ tokenId: number | null;
509
+ contractType: import("../nft").NftType;
502
510
  nftPrice: string;
503
511
  };
504
512
  creatorAddress?: string | undefined;
@@ -556,6 +564,8 @@ export declare const zCreateOrderRequest: z.ZodObject<{
556
564
  srcAmount: string;
557
565
  payload: {
558
566
  contractAddress: string;
567
+ tokenId: number | null;
568
+ contractType: import("../nft").NftType;
559
569
  nftPrice: string;
560
570
  };
561
571
  creatorAddress?: string | undefined;
@@ -1455,6 +1465,8 @@ export declare const zCreateOrderRequest: z.ZodObject<{
1455
1465
  srcAmount: string;
1456
1466
  payload: {
1457
1467
  contractAddress: string;
1468
+ tokenId: number | null;
1469
+ contractType: import("../nft").NftType;
1458
1470
  nftPrice: string;
1459
1471
  };
1460
1472
  creatorAddress?: string | undefined;
@@ -1701,6 +1713,8 @@ export declare const zCreateOrderRequest: z.ZodObject<{
1701
1713
  srcAmount: string;
1702
1714
  payload: {
1703
1715
  contractAddress: string;
1716
+ tokenId: number | null;
1717
+ contractType: import("../nft").NftType;
1704
1718
  nftPrice: string;
1705
1719
  };
1706
1720
  creatorAddress?: string | undefined;
@@ -2212,12 +2226,18 @@ export declare const zCreateOrderResponse: z.ZodObject<{
2212
2226
  type: z.ZodLiteral<OrderType.MintNFT>;
2213
2227
  payload: z.ZodObject<{
2214
2228
  contractAddress: z.ZodString;
2229
+ tokenId: z.ZodNullable<z.ZodNumber>;
2230
+ contractType: z.ZodNativeEnum<typeof import("../nft").NftType>;
2215
2231
  nftPrice: z.ZodString;
2216
2232
  }, "strip", z.ZodTypeAny, {
2217
2233
  contractAddress: string;
2234
+ tokenId: number | null;
2235
+ contractType: import("../nft").NftType;
2218
2236
  nftPrice: string;
2219
2237
  }, {
2220
2238
  contractAddress: string;
2239
+ tokenId: number | null;
2240
+ contractType: import("../nft").NftType;
2221
2241
  nftPrice: string;
2222
2242
  }>;
2223
2243
  metadata: z.ZodObject<{
@@ -2468,6 +2488,8 @@ export declare const zCreateOrderResponse: z.ZodObject<{
2468
2488
  } | null;
2469
2489
  payload: {
2470
2490
  contractAddress: string;
2491
+ tokenId: number | null;
2492
+ contractType: import("../nft").NftType;
2471
2493
  nftPrice: string;
2472
2494
  };
2473
2495
  }, {
@@ -2540,6 +2562,8 @@ export declare const zCreateOrderResponse: z.ZodObject<{
2540
2562
  } | null;
2541
2563
  payload: {
2542
2564
  contractAddress: string;
2565
+ tokenId: number | null;
2566
+ contractType: import("../nft").NftType;
2543
2567
  nftPrice: string;
2544
2568
  };
2545
2569
  }>, z.ZodObject<{
@@ -3642,6 +3666,8 @@ export declare const zCreateOrderResponse: z.ZodObject<{
3642
3666
  } | null;
3643
3667
  payload: {
3644
3668
  contractAddress: string;
3669
+ tokenId: number | null;
3670
+ contractType: import("../nft").NftType;
3645
3671
  nftPrice: string;
3646
3672
  };
3647
3673
  } | {
@@ -3966,6 +3992,8 @@ export declare const zCreateOrderResponse: z.ZodObject<{
3966
3992
  } | null;
3967
3993
  payload: {
3968
3994
  contractAddress: string;
3995
+ tokenId: number | null;
3996
+ contractType: import("../nft").NftType;
3969
3997
  nftPrice: string;
3970
3998
  };
3971
3999
  } | {
@@ -370,12 +370,18 @@ export declare const zGetOrderAndTxsResponse: z.ZodObject<{
370
370
  type: z.ZodLiteral<import("../order").OrderType.MintNFT>;
371
371
  payload: z.ZodObject<{
372
372
  contractAddress: z.ZodString;
373
+ tokenId: z.ZodNullable<z.ZodNumber>;
374
+ contractType: z.ZodNativeEnum<typeof import("..").NftType>;
373
375
  nftPrice: z.ZodString;
374
376
  }, "strip", z.ZodTypeAny, {
375
377
  contractAddress: string;
378
+ tokenId: number | null;
379
+ contractType: import("..").NftType;
376
380
  nftPrice: string;
377
381
  }, {
378
382
  contractAddress: string;
383
+ tokenId: number | null;
384
+ contractType: import("..").NftType;
379
385
  nftPrice: string;
380
386
  }>;
381
387
  metadata: z.ZodObject<{
@@ -626,6 +632,8 @@ export declare const zGetOrderAndTxsResponse: z.ZodObject<{
626
632
  } | null;
627
633
  payload: {
628
634
  contractAddress: string;
635
+ tokenId: number | null;
636
+ contractType: import("..").NftType;
629
637
  nftPrice: string;
630
638
  };
631
639
  }, {
@@ -698,6 +706,8 @@ export declare const zGetOrderAndTxsResponse: z.ZodObject<{
698
706
  } | null;
699
707
  payload: {
700
708
  contractAddress: string;
709
+ tokenId: number | null;
710
+ contractType: import("..").NftType;
701
711
  nftPrice: string;
702
712
  };
703
713
  }>, z.ZodObject<{
@@ -1877,6 +1887,8 @@ export declare const zGetOrderAndTxsResponse: z.ZodObject<{
1877
1887
  } | null;
1878
1888
  payload: {
1879
1889
  contractAddress: string;
1890
+ tokenId: number | null;
1891
+ contractType: import("..").NftType;
1880
1892
  nftPrice: string;
1881
1893
  };
1882
1894
  } | {
@@ -2227,6 +2239,8 @@ export declare const zGetOrderAndTxsResponse: z.ZodObject<{
2227
2239
  } | null;
2228
2240
  payload: {
2229
2241
  contractAddress: string;
2242
+ tokenId: number | null;
2243
+ contractType: import("..").NftType;
2230
2244
  nftPrice: string;
2231
2245
  };
2232
2246
  } | {
@@ -2581,6 +2595,8 @@ export declare const zGetOrderAndTxsResponse: z.ZodObject<{
2581
2595
  } | null;
2582
2596
  payload: {
2583
2597
  contractAddress: string;
2598
+ tokenId: number | null;
2599
+ contractType: import("..").NftType;
2584
2600
  nftPrice: string;
2585
2601
  };
2586
2602
  } | {
@@ -2936,6 +2952,8 @@ export declare const zGetOrderAndTxsResponse: z.ZodObject<{
2936
2952
  } | null;
2937
2953
  payload: {
2938
2954
  contractAddress: string;
2955
+ tokenId: number | null;
2956
+ contractType: import("..").NftType;
2939
2957
  nftPrice: string;
2940
2958
  };
2941
2959
  } | {
@@ -352,12 +352,18 @@ export declare const zGetOrderHistoryResponse: z.ZodObject<{
352
352
  type: z.ZodLiteral<import("../order").OrderType.MintNFT>;
353
353
  payload: z.ZodObject<{
354
354
  contractAddress: z.ZodString;
355
+ tokenId: z.ZodNullable<z.ZodNumber>;
356
+ contractType: z.ZodNativeEnum<typeof import("..").NftType>;
355
357
  nftPrice: z.ZodString;
356
358
  }, "strip", z.ZodTypeAny, {
357
359
  contractAddress: string;
360
+ tokenId: number | null;
361
+ contractType: import("..").NftType;
358
362
  nftPrice: string;
359
363
  }, {
360
364
  contractAddress: string;
365
+ tokenId: number | null;
366
+ contractType: import("..").NftType;
361
367
  nftPrice: string;
362
368
  }>;
363
369
  metadata: z.ZodObject<{
@@ -608,6 +614,8 @@ export declare const zGetOrderHistoryResponse: z.ZodObject<{
608
614
  } | null;
609
615
  payload: {
610
616
  contractAddress: string;
617
+ tokenId: number | null;
618
+ contractType: import("..").NftType;
611
619
  nftPrice: string;
612
620
  };
613
621
  }, {
@@ -680,6 +688,8 @@ export declare const zGetOrderHistoryResponse: z.ZodObject<{
680
688
  } | null;
681
689
  payload: {
682
690
  contractAddress: string;
691
+ tokenId: number | null;
692
+ contractType: import("..").NftType;
683
693
  nftPrice: string;
684
694
  };
685
695
  }>, z.ZodObject<{
@@ -1782,6 +1792,8 @@ export declare const zGetOrderHistoryResponse: z.ZodObject<{
1782
1792
  } | null;
1783
1793
  payload: {
1784
1794
  contractAddress: string;
1795
+ tokenId: number | null;
1796
+ contractType: import("..").NftType;
1785
1797
  nftPrice: string;
1786
1798
  };
1787
1799
  } | {
@@ -2106,6 +2118,8 @@ export declare const zGetOrderHistoryResponse: z.ZodObject<{
2106
2118
  } | null;
2107
2119
  payload: {
2108
2120
  contractAddress: string;
2121
+ tokenId: number | null;
2122
+ contractType: import("..").NftType;
2109
2123
  nftPrice: string;
2110
2124
  };
2111
2125
  } | {
@@ -1,5 +1,6 @@
1
1
  import { QuoteDetails } from "@reservoir0x/relay-sdk";
2
2
  import { z } from "zod";
3
+ import { NftType } from "../nft";
3
4
  import { OrderType } from "../order";
4
5
  import { TradeType } from "../relay";
5
6
  export declare const zGetQuoteRequest: z.ZodObject<{
@@ -36,10 +37,14 @@ export declare const zGetQuoteRequest: z.ZodObject<{
36
37
  } & {
37
38
  type: z.ZodLiteral<OrderType.MintNFT>;
38
39
  contractAddress: z.ZodString;
40
+ tokenId: z.ZodNullable<z.ZodNumber>;
41
+ contractType: z.ZodNativeEnum<typeof NftType>;
39
42
  price: z.ZodString;
40
43
  }, "strip", z.ZodTypeAny, {
41
44
  type: OrderType.MintNFT;
42
45
  contractAddress: string;
46
+ tokenId: number | null;
47
+ contractType: NftType;
43
48
  srcChain: number;
44
49
  dstChain: number;
45
50
  srcTokenAddress: string;
@@ -48,6 +53,8 @@ export declare const zGetQuoteRequest: z.ZodObject<{
48
53
  }, {
49
54
  type: OrderType.MintNFT;
50
55
  contractAddress: string;
56
+ tokenId: number | null;
57
+ contractType: NftType;
51
58
  srcChain: number;
52
59
  dstChain: number;
53
60
  srcTokenAddress: string;
@@ -163,6 +170,8 @@ export declare const zGetQuoteRequest: z.ZodObject<{
163
170
  } | {
164
171
  type: OrderType.MintNFT;
165
172
  contractAddress: string;
173
+ tokenId: number | null;
174
+ contractType: NftType;
166
175
  srcChain: number;
167
176
  dstChain: number;
168
177
  srcTokenAddress: string;
@@ -209,6 +218,8 @@ export declare const zGetQuoteRequest: z.ZodObject<{
209
218
  } | {
210
219
  type: OrderType.MintNFT;
211
220
  contractAddress: string;
221
+ tokenId: number | null;
222
+ contractType: NftType;
212
223
  srcChain: number;
213
224
  dstChain: number;
214
225
  srcTokenAddress: string;
@@ -1,4 +1,4 @@
1
- import { Nft, OrderType, Token, Tournament } from "@b3dotfun/sdk/anyspend/types";
1
+ import { Nft, NftType, OrderType, Token, Tournament } from "@b3dotfun/sdk/anyspend/types";
2
2
  export type OrderParams = {
3
3
  orderType: OrderType;
4
4
  srcToken: Token;
@@ -38,13 +38,13 @@ export declare const buildMetadata: (orderType: OrderType, params: OrderParams)
38
38
  } | {
39
39
  nft: (({
40
40
  name: string;
41
- type: import("@b3dotfun/sdk/anyspend/types").NftType.ERC721;
41
+ type: NftType.ERC721;
42
42
  contractAddress: string;
43
43
  description: string;
44
44
  imageUrl: string;
45
45
  } | {
46
46
  name: string;
47
- type: import("@b3dotfun/sdk/anyspend/types").NftType.ERC1155;
47
+ type: NftType.ERC1155;
48
48
  contractAddress: string;
49
49
  description: string;
50
50
  imageUrl: string;
@@ -1,7 +1,7 @@
1
1
  import { PermissionsConfig } from "@b3dotfun/sdk/global-account/types/permissions";
2
2
  import { Account } from "thirdweb/wallets";
3
- import "@reservoir0x/relay-kit-ui/styles.css";
4
3
  import { B3ContextType } from "./types";
4
+ import "@reservoir0x/relay-kit-ui/styles.css";
5
5
  export declare const wagmiConfig: import("wagmi").Config<readonly [import("viem").Chain, ...import("viem").Chain[]], any, readonly import("wagmi").CreateConnectorFn[]>;
6
6
  /**
7
7
  * Main B3Provider component
@@ -0,0 +1,14 @@
1
+ import { SignInWithB3ModalProps } from "@b3dotfun/sdk/global-account/react";
2
+ import { ReactNode } from "react";
3
+ type SignInProps = {
4
+ className?: string;
5
+ isMobile?: boolean;
6
+ };
7
+ type SignInWithB3Props = Omit<SignInWithB3ModalProps, "type" | "showBackButton"> & {
8
+ buttonText?: string | ReactNode;
9
+ loggedInButtonText?: string | ReactNode;
10
+ loadingButtonText?: string | ReactNode;
11
+ withLogo?: boolean;
12
+ } & SignInProps;
13
+ export declare function SignIn(props: SignInWithB3Props): import("react/jsx-runtime").JSX.Element;
14
+ export default SignIn;
@@ -1,10 +1,9 @@
1
1
  import { SignInWithB3ModalProps } from "@b3dotfun/sdk/global-account/react";
2
2
  import { ReactNode } from "react";
3
- type SignInWithB3Props = Omit<SignInWithB3ModalProps, "type" | "showBackButton"> & {
3
+ export type SignInWithB3Props = Omit<SignInWithB3ModalProps, "type" | "showBackButton"> & {
4
4
  buttonText?: string | ReactNode;
5
5
  loggedInButtonText?: string | ReactNode;
6
6
  loadingButtonText?: string | ReactNode;
7
7
  withLogo?: boolean;
8
8
  };
9
9
  export declare function SignInWithB3(props: SignInWithB3Props): import("react/jsx-runtime").JSX.Element;
10
- export {};
@@ -0,0 +1,7 @@
1
+ type IconProps = {
2
+ className?: string;
3
+ name: any;
4
+ fill?: any;
5
+ };
6
+ declare const Icon: ({ className, name, fill }: IconProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default Icon;
@@ -0,0 +1,4 @@
1
+ import { SignInWithB3Props } from "../SignInWithB3/SignInWithB3";
2
+ export declare function ManageAccountButton(props: SignInWithB3Props & {
3
+ className?: string;
4
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -1,8 +1,5 @@
1
1
  export declare const useB3EnsName: () => {
2
- registerEns: (username: string, message: string, hash: string) => Promise<{
3
- success: boolean;
4
- error?: string;
5
- }>;
2
+ registerEns: (name: `${string}.b3.fun`, address: string, hash: string) => Promise<Response>;
6
3
  getEns: (address: string) => Promise<{
7
4
  name: string;
8
5
  }>;
@@ -124,6 +124,8 @@ export interface AnySpendNftProps extends BaseModalProps {
124
124
  nftContract: NftContract;
125
125
  /** Recipient address to receive the NFT */
126
126
  recipientAddress?: string;
127
+ /** Callback function called when the NFT is successfully transferred */
128
+ onSuccess?: (txHash?: string) => void;
127
129
  }
128
130
  /**
129
131
  * Props for the AnySpend tournament modal
File without changes
@@ -13,3 +13,4 @@ export declare const THIRDWEB_SECRET_KEY: string;
13
13
  export declare const THIRDWEB_CLIENT_ID: string;
14
14
  export declare const CLIENT_APP_BUNDLE_ID: string;
15
15
  export declare const B3_AUTH_COOKIE_NAME = "b3-auth";
16
+ export declare const ENS_GATEWAY_URL = "https://ens-gateway.b3.fun/";
@@ -1,2 +1,11 @@
1
1
  export declare function formatUsername(username: string): string;
2
+ /**
3
+ * Helper functions for formatting data
4
+ */
5
+ /**
6
+ * Truncates a wallet address to show first 4 and last 4 characters
7
+ * @param address Wallet address to truncate
8
+ * @returns Truncated address in format "0x1234...5678"
9
+ */
10
+ export declare const truncateAddress: (address: string) => string;
2
11
  export * from "./cn";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@b3dotfun/sdk",
3
- "version": "0.0.7-alpha.1",
3
+ "version": "0.0.7-alpha.11",
4
4
  "source": "src/index.ts",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "react-native": "./dist/cjs/index.native.js",
@@ -11,6 +11,13 @@
11
11
  ],
12
12
  "exports": {
13
13
  "./index.css": "./dist/styles/index.css",
14
+ ".": {
15
+ "default": {
16
+ "types": "./dist/types/index.d.ts",
17
+ "import": "./dist/esm/index.js",
18
+ "require": "./dist/cjs/index.js"
19
+ }
20
+ },
14
21
  "./anyspend": {
15
22
  "types": "./dist/types/anyspend/index.d.ts",
16
23
  "import": "./dist/esm/anyspend/index.js",
@@ -82,6 +89,18 @@
82
89
  "require": "./dist/cjs/global-account/react/index.js"
83
90
  }
84
91
  },
92
+ "./global-account/react/components/*": {
93
+ "react-native": {
94
+ "types": "./dist/types/global-account/react/components/*.native.d.ts",
95
+ "import": "./dist/esm/global-account/react/components/*.native.js",
96
+ "require": "./dist/cjs/global-account/react/components/*.native.js"
97
+ },
98
+ "default": {
99
+ "types": "./dist/types/global-account/react/components/*.d.ts",
100
+ "import": "./dist/esm/global-account/react/components/*.js",
101
+ "require": "./dist/cjs/global-account/react/components/*.js"
102
+ }
103
+ },
85
104
  "./global-account/types": {
86
105
  "types": "./dist/types/global-account/types.d.ts",
87
106
  "import": "./dist/esm/global-account/types.js",
@@ -218,8 +237,8 @@
218
237
  "vaul": "^1.1.2",
219
238
  "viem": "2.27.2",
220
239
  "wagmi": "2.14.15",
221
- "zustand": "4.5.6",
222
- "zod": "3.25.51"
240
+ "zod": "3.25.51",
241
+ "zustand": "4.5.6"
223
242
  },
224
243
  "devDependencies": {
225
244
  "@feathersjs/authentication-client": "5.0.33",
@@ -1,4 +1,4 @@
1
- import { NftContract, Token } from "@b3dotfun/sdk/anyspend/types";
1
+ import { NftContract, NftType, Token } from "@b3dotfun/sdk/anyspend/types";
2
2
  import { base } from "viem/chains";
3
3
 
4
4
  export const ANYSPEND_MAINNET_BASE_URL = process.env.NEXT_PUBLIC_ANYSPEND_BASE_URL || "https://mainnet.anyspend.com";
@@ -45,7 +45,8 @@ export const NFT_CONTRACTS: NftContract[] = [
45
45
  "https://storage.googleapis.com/nftimagebucket/base/tokens/0x80f0e6644723abb03aa8867d21e32bd854b2a2d9/preview/TVRjME1EUTRORFl4T0E9PV8zNjcy.jpg",
46
46
  name: "Downhill Ski",
47
47
  description: "Downhill Ski",
48
- tokenId: null
48
+ tokenId: null,
49
+ type: NftType.ERC721
49
50
  },
50
51
  {
51
52
  chainId: base.id,
@@ -57,7 +58,8 @@ export const NFT_CONTRACTS: NftContract[] = [
57
58
  name: "Eclipse Venom",
58
59
  description:
59
60
  "The Eclipse Venom's crystalline blade channels imprisoned astral toxins through swirling currents of violet and teal light, synchronizing with its wielder's heartbeat for strikes that bypass conventional armor. Wounds from this otherworldly weapon resist healing as victims describe being consumed from within by liquid darkness, their final moments filled with visions of infinite cosmic depths.",
60
- tokenId: null
61
+ tokenId: null,
62
+ type: NftType.ERC721
61
63
  }
62
64
  ];
63
65
 
@@ -6,6 +6,7 @@ export * from "./react/providers/AnyspendProvider";
6
6
 
7
7
  // Types
8
8
  export * from "./types";
9
+ export * from "./types/metadata";
9
10
 
10
11
  // Utils
11
12
  export * from "./utils/address";
@@ -1,19 +1,16 @@
1
1
  import { B3_TOKEN, OrderType } from "@b3dotfun/sdk/anyspend";
2
- import { baseMainnet } from "@b3dotfun/sdk/shared/constants/chains/supported";
3
- import { EthIcon } from "./icons/EthIcon";
4
- import { SolIcon } from "./icons/SolIcon";
5
- import { UsdcIcon } from "./icons/USDCIcon";
6
- import { StyleRoot } from "@b3dotfun/sdk/global-account/react";
7
2
  import {
8
3
  Button,
9
4
  GlareCardRounded,
10
5
  Input,
6
+ StyleRoot,
11
7
  TextLoop,
12
8
  useChainSwitchWithAction,
13
9
  useHasMounted,
14
- useTokenBalance,
15
- useModalStore
10
+ useModalStore,
11
+ useTokenBalance
16
12
  } from "@b3dotfun/sdk/global-account/react";
13
+ import { baseMainnet } from "@b3dotfun/sdk/shared/constants/chains/supported";
17
14
  import { motion } from "framer-motion";
18
15
  import invariant from "invariant";
19
16
  import { ArrowRight, Loader2 } from "lucide-react";
@@ -22,6 +19,9 @@ import { toast } from "sonner";
22
19
  import { createPublicClient, encodeFunctionData, erc20Abi, formatUnits, http } from "viem";
23
20
  import { useAccount, useWaitForTransactionReceipt, useWriteContract } from "wagmi";
24
21
  import { AnySpendCustom } from "./AnySpendCustom";
22
+ import { EthIcon } from "./icons/EthIcon";
23
+ import { SolIcon } from "./icons/SolIcon";
24
+ import { UsdcIcon } from "./icons/USDCIcon";
25
25
 
26
26
  const SPIN_WHEEL_ABI = [
27
27
  {
@@ -668,6 +668,7 @@ export function AnySpendBuySpin({
668
668
  spenderAddress={paymentConfig.entryModule}
669
669
  encodedData={encodedData}
670
670
  metadata={{
671
+ type: OrderType.Custom,
671
672
  action: `buy ${userSpinQuantity} spin${userSpinQuantity !== "1" ? "s" : ""}`
672
673
  }}
673
674
  header={header}