@b3dotfun/sdk 0.0.7-alpha.3 → 0.0.7-alpha.5
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/react/hooks/useAnyspendOrderAndTransactions.d.ts +4 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +4 -0
- package/dist/cjs/anyspend/services/anyspend.d.ts +2 -0
- package/dist/cjs/anyspend/types/nft.d.ts +6 -0
- package/dist/cjs/anyspend/types/nft.js +2 -0
- package/dist/cjs/anyspend/types/order.d.ts +10 -0
- package/dist/cjs/anyspend/types/req-res/createOrder.d.ts +28 -0
- package/dist/cjs/anyspend/types/req-res/getOrderAndTransactions.d.ts +18 -0
- package/dist/cjs/anyspend/types/req-res/getOrderHistory.d.ts +14 -0
- package/dist/cjs/global-account/react/hooks/useB3EnsName.d.ts +1 -4
- package/dist/cjs/global-account/react/hooks/useB3EnsName.js +22 -22
- package/dist/cjs/shared/constants/index.d.ts +1 -0
- package/dist/cjs/shared/constants/index.js +2 -1
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +4 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +4 -0
- package/dist/esm/anyspend/services/anyspend.d.ts +2 -0
- package/dist/esm/anyspend/types/nft.d.ts +6 -0
- package/dist/esm/anyspend/types/nft.js +2 -0
- package/dist/esm/anyspend/types/order.d.ts +10 -0
- package/dist/esm/anyspend/types/req-res/createOrder.d.ts +28 -0
- package/dist/esm/anyspend/types/req-res/getOrderAndTransactions.d.ts +18 -0
- package/dist/esm/anyspend/types/req-res/getOrderHistory.d.ts +14 -0
- package/dist/esm/global-account/react/hooks/useB3EnsName.d.ts +1 -4
- package/dist/esm/global-account/react/hooks/useB3EnsName.js +24 -21
- package/dist/esm/shared/constants/index.d.ts +1 -0
- package/dist/esm/shared/constants/index.js +1 -0
- package/dist/types/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +4 -0
- package/dist/types/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +4 -0
- package/dist/types/anyspend/services/anyspend.d.ts +2 -0
- package/dist/types/anyspend/types/nft.d.ts +6 -0
- package/dist/types/anyspend/types/order.d.ts +10 -0
- package/dist/types/anyspend/types/req-res/createOrder.d.ts +28 -0
- package/dist/types/anyspend/types/req-res/getOrderAndTransactions.d.ts +18 -0
- package/dist/types/anyspend/types/req-res/getOrderHistory.d.ts +14 -0
- package/dist/types/global-account/react/hooks/useB3EnsName.d.ts +1 -4
- package/dist/types/shared/constants/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/anyspend/types/nft.ts +2 -0
- package/src/global-account/react/hooks/useB3EnsName.ts +26 -32
- package/src/shared/constants/index.ts +2 -0
|
@@ -130,6 +130,8 @@ export declare function useAnyspendOrderAndTransactions(isMainnet: boolean, orde
|
|
|
130
130
|
} | null;
|
|
131
131
|
payload: {
|
|
132
132
|
contractAddress: string;
|
|
133
|
+
tokenId: number | null;
|
|
134
|
+
contractType: import("../../../anyspend/types").NftType;
|
|
133
135
|
nftPrice: string;
|
|
134
136
|
};
|
|
135
137
|
} | {
|
|
@@ -488,6 +490,8 @@ export declare function useAnyspendOrderAndTransactions(isMainnet: boolean, orde
|
|
|
488
490
|
} | null;
|
|
489
491
|
payload: {
|
|
490
492
|
contractAddress: string;
|
|
493
|
+
tokenId: number | null;
|
|
494
|
+
contractType: import("../../../anyspend/types").NftType;
|
|
491
495
|
nftPrice: string;
|
|
492
496
|
};
|
|
493
497
|
} | {
|
|
@@ -127,6 +127,8 @@ export declare function useAnyspendOrderHistory(isMainnet: boolean, creatorAddre
|
|
|
127
127
|
} | null;
|
|
128
128
|
payload: {
|
|
129
129
|
contractAddress: string;
|
|
130
|
+
tokenId: number | null;
|
|
131
|
+
contractType: import("../..").NftType;
|
|
130
132
|
nftPrice: string;
|
|
131
133
|
};
|
|
132
134
|
} | {
|
|
@@ -449,6 +451,8 @@ export declare function useAnyspendOrderHistory(isMainnet: boolean, creatorAddre
|
|
|
449
451
|
} | null;
|
|
450
452
|
payload: {
|
|
451
453
|
contractAddress: string;
|
|
454
|
+
tokenId: number | null;
|
|
455
|
+
contractType: import("../..").NftType;
|
|
452
456
|
nftPrice: string;
|
|
453
457
|
};
|
|
454
458
|
} | {
|
|
@@ -68,12 +68,18 @@ export declare const zNft: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
68
68
|
export type Nft = z.infer<typeof zNft>;
|
|
69
69
|
export declare const zMintNftPayload: z.ZodObject<{
|
|
70
70
|
contractAddress: z.ZodString;
|
|
71
|
+
tokenId: z.ZodNullable<z.ZodNumber>;
|
|
72
|
+
contractType: z.ZodNativeEnum<typeof NftType>;
|
|
71
73
|
nftPrice: z.ZodString;
|
|
72
74
|
}, "strip", z.ZodTypeAny, {
|
|
73
75
|
contractAddress: string;
|
|
76
|
+
tokenId: number | null;
|
|
77
|
+
contractType: NftType;
|
|
74
78
|
nftPrice: string;
|
|
75
79
|
}, {
|
|
76
80
|
contractAddress: string;
|
|
81
|
+
tokenId: number | null;
|
|
82
|
+
contractType: NftType;
|
|
77
83
|
nftPrice: string;
|
|
78
84
|
}>;
|
|
79
85
|
export declare const zMintNftMetadata: z.ZodObject<{
|
|
@@ -27,6 +27,8 @@ exports.zNft = zod_1.z.discriminatedUnion("type", [
|
|
|
27
27
|
]);
|
|
28
28
|
exports.zMintNftPayload = zod_1.z.object({
|
|
29
29
|
contractAddress: zod_1.z.string(),
|
|
30
|
+
tokenId: zod_1.z.number().nullable(),
|
|
31
|
+
contractType: zod_1.z.nativeEnum(NftType),
|
|
30
32
|
nftPrice: zod_1.z.string()
|
|
31
33
|
});
|
|
32
34
|
exports.zMintNftMetadata = zod_1.z.object({
|
|
@@ -487,12 +487,18 @@ export declare const zOrder: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
487
487
|
type: z.ZodLiteral<OrderType.MintNFT>;
|
|
488
488
|
payload: z.ZodObject<{
|
|
489
489
|
contractAddress: z.ZodString;
|
|
490
|
+
tokenId: z.ZodNullable<z.ZodNumber>;
|
|
491
|
+
contractType: z.ZodNativeEnum<typeof import("./nft").NftType>;
|
|
490
492
|
nftPrice: z.ZodString;
|
|
491
493
|
}, "strip", z.ZodTypeAny, {
|
|
492
494
|
contractAddress: string;
|
|
495
|
+
tokenId: number | null;
|
|
496
|
+
contractType: import("./nft").NftType;
|
|
493
497
|
nftPrice: string;
|
|
494
498
|
}, {
|
|
495
499
|
contractAddress: string;
|
|
500
|
+
tokenId: number | null;
|
|
501
|
+
contractType: import("./nft").NftType;
|
|
496
502
|
nftPrice: string;
|
|
497
503
|
}>;
|
|
498
504
|
metadata: z.ZodObject<{
|
|
@@ -743,6 +749,8 @@ export declare const zOrder: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
743
749
|
} | null;
|
|
744
750
|
payload: {
|
|
745
751
|
contractAddress: string;
|
|
752
|
+
tokenId: number | null;
|
|
753
|
+
contractType: import("./nft").NftType;
|
|
746
754
|
nftPrice: string;
|
|
747
755
|
};
|
|
748
756
|
}, {
|
|
@@ -815,6 +823,8 @@ export declare const zOrder: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
815
823
|
} | null;
|
|
816
824
|
payload: {
|
|
817
825
|
contractAddress: string;
|
|
826
|
+
tokenId: number | null;
|
|
827
|
+
contractType: import("./nft").NftType;
|
|
818
828
|
nftPrice: string;
|
|
819
829
|
};
|
|
820
830
|
}>, z.ZodObject<{
|
|
@@ -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,8 +1,5 @@
|
|
|
1
1
|
export declare const useB3EnsName: () => {
|
|
2
|
-
registerEns: (
|
|
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
|
}>;
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.useB3EnsName = void 0;
|
|
7
|
-
const bsmnt_1 = __importDefault(require("../../../global-account/bsmnt"));
|
|
8
4
|
const constants_1 = require("../../../shared/constants");
|
|
9
|
-
const js_cookie_1 = __importDefault(require("js-cookie"));
|
|
10
5
|
const react_1 = require("react");
|
|
11
6
|
const useB3EnsName = () => {
|
|
12
|
-
const registerEns =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
7
|
+
const registerEns = async (name, address, hash) => {
|
|
8
|
+
const message = `Register ${name}`;
|
|
9
|
+
const response = await fetch(constants_1.ENS_GATEWAY_URL + "set", {
|
|
10
|
+
method: "POST",
|
|
11
|
+
headers: {
|
|
12
|
+
"Content-Type": "application/json"
|
|
13
|
+
},
|
|
14
|
+
body: JSON.stringify({
|
|
15
|
+
name: name,
|
|
16
|
+
owner: address.toLowerCase(),
|
|
17
|
+
addresses: { "60": address.toLowerCase() },
|
|
18
|
+
signature: {
|
|
19
|
+
message: message,
|
|
20
|
+
hash: hash
|
|
21
|
+
}
|
|
22
|
+
})
|
|
23
|
+
});
|
|
24
24
|
return response;
|
|
25
|
-
}
|
|
26
|
-
const getEns =
|
|
27
|
-
const response = await fetch(
|
|
25
|
+
};
|
|
26
|
+
const getEns = async (address) => {
|
|
27
|
+
const response = await fetch(`${constants_1.ENS_GATEWAY_URL}address/${address}`);
|
|
28
28
|
if (!response.ok) {
|
|
29
29
|
throw new Error(`Failed to fetch ENS name: ${response.statusText}`);
|
|
30
30
|
}
|
|
31
31
|
const data = await response.json();
|
|
32
32
|
return data;
|
|
33
|
-
}
|
|
33
|
+
};
|
|
34
34
|
return (0, react_1.useMemo)(() => ({
|
|
35
35
|
registerEns,
|
|
36
36
|
getEns
|
|
37
|
-
}), [
|
|
37
|
+
}), []);
|
|
38
38
|
};
|
|
39
39
|
exports.useB3EnsName = useB3EnsName;
|
|
@@ -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,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.B3_AUTH_COOKIE_NAME = exports.CLIENT_APP_BUNDLE_ID = exports.THIRDWEB_CLIENT_ID = exports.THIRDWEB_SECRET_KEY = exports.tokenIcons = exports.ecosystemWalletId = exports.b3CoinIcon = exports.siteURL = void 0;
|
|
3
|
+
exports.ENS_GATEWAY_URL = exports.B3_AUTH_COOKIE_NAME = exports.CLIENT_APP_BUNDLE_ID = exports.THIRDWEB_CLIENT_ID = exports.THIRDWEB_SECRET_KEY = exports.tokenIcons = exports.ecosystemWalletId = exports.b3CoinIcon = exports.siteURL = void 0;
|
|
4
4
|
exports.siteURL = "https://basement.fun";
|
|
5
5
|
exports.b3CoinIcon = "https://cdn.b3.fun/b3-coin-3d.png";
|
|
6
6
|
exports.ecosystemWalletId = (process.env.EXPO_PUBLIC_THIRDWEB_ECOSYSTEM_ID ||
|
|
@@ -19,3 +19,4 @@ exports.THIRDWEB_SECRET_KEY = process.env.THIRDWEB_SECRET_KEY || "";
|
|
|
19
19
|
exports.THIRDWEB_CLIENT_ID = process.env.NEXT_PUBLIC_THIRDWEB_CLIENT_ID || process.env.EXPO_PUBLIC_THIRDWEB_CLIENT_ID || "";
|
|
20
20
|
exports.CLIENT_APP_BUNDLE_ID = process.env.EXPO_PUBLIC_B3_BUNDLE_ID || "";
|
|
21
21
|
exports.B3_AUTH_COOKIE_NAME = "b3-auth";
|
|
22
|
+
exports.ENS_GATEWAY_URL = "https://ens-gateway.b3.fun/";
|
|
@@ -130,6 +130,8 @@ export declare function useAnyspendOrderAndTransactions(isMainnet: boolean, orde
|
|
|
130
130
|
} | null;
|
|
131
131
|
payload: {
|
|
132
132
|
contractAddress: string;
|
|
133
|
+
tokenId: number | null;
|
|
134
|
+
contractType: import("../../../anyspend/types").NftType;
|
|
133
135
|
nftPrice: string;
|
|
134
136
|
};
|
|
135
137
|
} | {
|
|
@@ -488,6 +490,8 @@ export declare function useAnyspendOrderAndTransactions(isMainnet: boolean, orde
|
|
|
488
490
|
} | null;
|
|
489
491
|
payload: {
|
|
490
492
|
contractAddress: string;
|
|
493
|
+
tokenId: number | null;
|
|
494
|
+
contractType: import("../../../anyspend/types").NftType;
|
|
491
495
|
nftPrice: string;
|
|
492
496
|
};
|
|
493
497
|
} | {
|
|
@@ -127,6 +127,8 @@ export declare function useAnyspendOrderHistory(isMainnet: boolean, creatorAddre
|
|
|
127
127
|
} | null;
|
|
128
128
|
payload: {
|
|
129
129
|
contractAddress: string;
|
|
130
|
+
tokenId: number | null;
|
|
131
|
+
contractType: import("../..").NftType;
|
|
130
132
|
nftPrice: string;
|
|
131
133
|
};
|
|
132
134
|
} | {
|
|
@@ -449,6 +451,8 @@ export declare function useAnyspendOrderHistory(isMainnet: boolean, creatorAddre
|
|
|
449
451
|
} | null;
|
|
450
452
|
payload: {
|
|
451
453
|
contractAddress: string;
|
|
454
|
+
tokenId: number | null;
|
|
455
|
+
contractType: import("../..").NftType;
|
|
452
456
|
nftPrice: string;
|
|
453
457
|
};
|
|
454
458
|
} | {
|
|
@@ -68,12 +68,18 @@ export declare const zNft: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
68
68
|
export type Nft = z.infer<typeof zNft>;
|
|
69
69
|
export declare const zMintNftPayload: z.ZodObject<{
|
|
70
70
|
contractAddress: z.ZodString;
|
|
71
|
+
tokenId: z.ZodNullable<z.ZodNumber>;
|
|
72
|
+
contractType: z.ZodNativeEnum<typeof NftType>;
|
|
71
73
|
nftPrice: z.ZodString;
|
|
72
74
|
}, "strip", z.ZodTypeAny, {
|
|
73
75
|
contractAddress: string;
|
|
76
|
+
tokenId: number | null;
|
|
77
|
+
contractType: NftType;
|
|
74
78
|
nftPrice: string;
|
|
75
79
|
}, {
|
|
76
80
|
contractAddress: string;
|
|
81
|
+
tokenId: number | null;
|
|
82
|
+
contractType: NftType;
|
|
77
83
|
nftPrice: string;
|
|
78
84
|
}>;
|
|
79
85
|
export declare const zMintNftMetadata: z.ZodObject<{
|
|
@@ -24,6 +24,8 @@ export const zNft = z.discriminatedUnion("type", [
|
|
|
24
24
|
]);
|
|
25
25
|
export const zMintNftPayload = z.object({
|
|
26
26
|
contractAddress: z.string(),
|
|
27
|
+
tokenId: z.number().nullable(),
|
|
28
|
+
contractType: z.nativeEnum(NftType),
|
|
27
29
|
nftPrice: z.string()
|
|
28
30
|
});
|
|
29
31
|
export const zMintNftMetadata = z.object({
|
|
@@ -487,12 +487,18 @@ export declare const zOrder: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
487
487
|
type: z.ZodLiteral<OrderType.MintNFT>;
|
|
488
488
|
payload: z.ZodObject<{
|
|
489
489
|
contractAddress: z.ZodString;
|
|
490
|
+
tokenId: z.ZodNullable<z.ZodNumber>;
|
|
491
|
+
contractType: z.ZodNativeEnum<typeof import("./nft").NftType>;
|
|
490
492
|
nftPrice: z.ZodString;
|
|
491
493
|
}, "strip", z.ZodTypeAny, {
|
|
492
494
|
contractAddress: string;
|
|
495
|
+
tokenId: number | null;
|
|
496
|
+
contractType: import("./nft").NftType;
|
|
493
497
|
nftPrice: string;
|
|
494
498
|
}, {
|
|
495
499
|
contractAddress: string;
|
|
500
|
+
tokenId: number | null;
|
|
501
|
+
contractType: import("./nft").NftType;
|
|
496
502
|
nftPrice: string;
|
|
497
503
|
}>;
|
|
498
504
|
metadata: z.ZodObject<{
|
|
@@ -743,6 +749,8 @@ export declare const zOrder: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
743
749
|
} | null;
|
|
744
750
|
payload: {
|
|
745
751
|
contractAddress: string;
|
|
752
|
+
tokenId: number | null;
|
|
753
|
+
contractType: import("./nft").NftType;
|
|
746
754
|
nftPrice: string;
|
|
747
755
|
};
|
|
748
756
|
}, {
|
|
@@ -815,6 +823,8 @@ export declare const zOrder: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
815
823
|
} | null;
|
|
816
824
|
payload: {
|
|
817
825
|
contractAddress: string;
|
|
826
|
+
tokenId: number | null;
|
|
827
|
+
contractType: import("./nft").NftType;
|
|
818
828
|
nftPrice: string;
|
|
819
829
|
};
|
|
820
830
|
}>, z.ZodObject<{
|
|
@@ -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
|
} | {
|