@silvana-one/api 1.0.6 → 1.0.8

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.
@@ -684,33 +684,17 @@ export type NftMetadata = {
684
684
  * Optional banner image URL or IPFS hash. Required for Collection Master NFT.
685
685
  */
686
686
  banner?: string;
687
- traits?: Array<{
688
- /**
689
- * The trait key/name
690
- */
691
- key: string;
692
- /**
693
- * The type of the trait value
694
- */
695
- type: 'string' | 'text' | 'image' | 'url' | 'field' | 'number' | 'address' | 'map' | 'tree';
696
- /**
697
- * The trait value, can be a string or complex object depending on type
698
- */
699
- value: string | {
700
- [key: string]: unknown;
701
- };
702
- /**
703
- * Optional flag indicating if this trait is private
704
- */
705
- isPrivate?: boolean;
706
- }>;
687
+ /**
688
+ * Array of traits associated with the NFT
689
+ */
690
+ traits?: Array<Trait>;
707
691
  };
708
692
 
709
693
  export type NftData = {
710
694
  /**
711
695
  * The public key of the owner of the NFT
712
696
  */
713
- owner: string;
697
+ owner?: string;
714
698
  /**
715
699
  * The public key of the approved address of the NFT
716
700
  */
@@ -765,6 +749,70 @@ export type NftData = {
765
749
  requireOwnerAuthorizationToUpgrade?: boolean;
766
750
  };
767
751
 
752
+ export type Trait = {
753
+ /**
754
+ * The trait key/name
755
+ */
756
+ key: string;
757
+ /**
758
+ * The type of the trait value
759
+ */
760
+ type: 'string' | 'text' | 'image' | 'url' | 'field' | 'number' | 'address' | 'map' | 'tree';
761
+ /**
762
+ * The trait value, can be a string or complex object depending on type
763
+ */
764
+ value: string | {
765
+ [key: string]: unknown;
766
+ };
767
+ /**
768
+ * Optional flag indicating if this trait is private
769
+ */
770
+ isPrivate?: boolean;
771
+ };
772
+
773
+ export type CmsnftData = {
774
+ /**
775
+ * The address of the NFT collection
776
+ */
777
+ collectionAddress: string;
778
+ /**
779
+ * The symbol of the NFT
780
+ */
781
+ symbol?: string;
782
+ /**
783
+ * The name of the NFT
784
+ */
785
+ name: string;
786
+ /**
787
+ * Optional description of the NFT
788
+ */
789
+ description?: string;
790
+ /**
791
+ * URL to the NFT image
792
+ */
793
+ imageURL: string;
794
+ /**
795
+ * Array of traits associated with the NFT
796
+ */
797
+ traits?: Array<Trait>;
798
+ /**
799
+ * Data associated with the NFT
800
+ */
801
+ nftData?: NftData;
802
+ /**
803
+ * The price of the NFT
804
+ */
805
+ price?: number;
806
+ /**
807
+ * The start time of the minting period( unix timestamp in ms)
808
+ */
809
+ mintStart?: number;
810
+ /**
811
+ * The end time of the minting period( unix timestamp in ms)
812
+ */
813
+ mintEnd?: number;
814
+ };
815
+
768
816
  export type NftTransferParams = {
769
817
  /**
770
818
  * The address of the owner or approved
@@ -2529,6 +2577,196 @@ export type TransferNftResponses = {
2529
2577
 
2530
2578
  export type TransferNftResponse = TransferNftResponses[keyof TransferNftResponses];
2531
2579
 
2580
+ export type CmsStoreNftData = {
2581
+ body: {
2582
+ /**
2583
+ * The signature of the Collection creator
2584
+ */
2585
+ signature: string;
2586
+ nft: CmsnftData;
2587
+ };
2588
+ path?: never;
2589
+ query?: never;
2590
+ url: '/nft/cms/store';
2591
+ };
2592
+
2593
+ export type CmsStoreNftErrors = {
2594
+ /**
2595
+ * Bad request - invalid input parameters.
2596
+ */
2597
+ 400: ErrorResponse;
2598
+ /**
2599
+ * Unauthorized - user not authenticated.
2600
+ */
2601
+ 401: ErrorResponse;
2602
+ /**
2603
+ * Forbidden - user doesn't have permission.
2604
+ */
2605
+ 403: ErrorResponse;
2606
+ /**
2607
+ * Too many requests.
2608
+ */
2609
+ 429: ErrorResponse;
2610
+ /**
2611
+ * Internal server error - something went wrong during the request.
2612
+ */
2613
+ 500: ErrorResponse;
2614
+ /**
2615
+ * Service unavailable - blockchain or other external service is down.
2616
+ */
2617
+ 503: ErrorResponse;
2618
+ };
2619
+
2620
+ export type CmsStoreNftError = CmsStoreNftErrors[keyof CmsStoreNftErrors];
2621
+
2622
+ export type CmsStoreNftResponses = {
2623
+ /**
2624
+ * Successfully built transfer transaction.
2625
+ */
2626
+ 200: {
2627
+ /**
2628
+ * Indicates whether the NFT was successfully stored in CMS
2629
+ */
2630
+ success?: boolean;
2631
+ };
2632
+ };
2633
+
2634
+ export type CmsStoreNftResponse = CmsStoreNftResponses[keyof CmsStoreNftResponses];
2635
+
2636
+ export type CmsReadNftData = {
2637
+ body: {
2638
+ /**
2639
+ * The address of the NFT collection
2640
+ */
2641
+ collectionAddress: string;
2642
+ /**
2643
+ * The name of the NFT. If not provided, all NFTs will be returned that can be minted now.
2644
+ */
2645
+ nftName?: string;
2646
+ /**
2647
+ * The signature of the Collection creator. Required to get NFTs that cannot be minted now.
2648
+ */
2649
+ signature?: string;
2650
+ };
2651
+ path?: never;
2652
+ query?: never;
2653
+ url: '/nft/cms/read';
2654
+ };
2655
+
2656
+ export type CmsReadNftErrors = {
2657
+ /**
2658
+ * Bad request - invalid input parameters.
2659
+ */
2660
+ 400: ErrorResponse;
2661
+ /**
2662
+ * Unauthorized - user not authenticated.
2663
+ */
2664
+ 401: ErrorResponse;
2665
+ /**
2666
+ * Forbidden - user doesn't have permission.
2667
+ */
2668
+ 403: ErrorResponse;
2669
+ /**
2670
+ * Too many requests.
2671
+ */
2672
+ 429: ErrorResponse;
2673
+ /**
2674
+ * Internal server error - something went wrong during the request.
2675
+ */
2676
+ 500: ErrorResponse;
2677
+ /**
2678
+ * Service unavailable - blockchain or other external service is down.
2679
+ */
2680
+ 503: ErrorResponse;
2681
+ };
2682
+
2683
+ export type CmsReadNftError = CmsReadNftErrors[keyof CmsReadNftErrors];
2684
+
2685
+ export type CmsReadNftResponses = {
2686
+ /**
2687
+ * Successfully retrieved NFTs from CMS.
2688
+ */
2689
+ 200: {
2690
+ /**
2691
+ * The NFTs data retrieved from CMS
2692
+ */
2693
+ nfts?: Array<CmsnftData>;
2694
+ };
2695
+ };
2696
+
2697
+ export type CmsReadNftResponse = CmsReadNftResponses[keyof CmsReadNftResponses];
2698
+
2699
+ export type CmsReserveNftData = {
2700
+ body: {
2701
+ /**
2702
+ * The address of the NFT collection
2703
+ */
2704
+ collectionAddress: string;
2705
+ /**
2706
+ * The name of the NFT
2707
+ */
2708
+ nftName: string;
2709
+ /**
2710
+ * Indicates whether the NFT should be reserved in CMS or the reserve should be removed. Default is true.
2711
+ */
2712
+ reserve?: boolean;
2713
+ /**
2714
+ * The signature of the Collection creator. Required if reserve is false.
2715
+ */
2716
+ signature?: string;
2717
+ };
2718
+ path?: never;
2719
+ query?: never;
2720
+ url: '/nft/cms/reserve';
2721
+ };
2722
+
2723
+ export type CmsReserveNftErrors = {
2724
+ /**
2725
+ * Bad request - invalid input parameters.
2726
+ */
2727
+ 400: ErrorResponse;
2728
+ /**
2729
+ * Unauthorized - user not authenticated.
2730
+ */
2731
+ 401: ErrorResponse;
2732
+ /**
2733
+ * Forbidden - user doesn't have permission.
2734
+ */
2735
+ 403: ErrorResponse;
2736
+ /**
2737
+ * Too many requests.
2738
+ */
2739
+ 429: ErrorResponse;
2740
+ /**
2741
+ * Internal server error - something went wrong during the request.
2742
+ */
2743
+ 500: ErrorResponse;
2744
+ /**
2745
+ * Service unavailable - blockchain or other external service is down.
2746
+ */
2747
+ 503: ErrorResponse;
2748
+ };
2749
+
2750
+ export type CmsReserveNftError = CmsReserveNftErrors[keyof CmsReserveNftErrors];
2751
+
2752
+ export type CmsReserveNftResponses = {
2753
+ /**
2754
+ * Successfully built transfer transaction.
2755
+ */
2756
+ 200: {
2757
+ /**
2758
+ * Indicates whether the NFT was successfully reserved in CMS
2759
+ */
2760
+ reserved?: boolean;
2761
+ /**
2762
+ * The NFT data retrieved from CMS
2763
+ */
2764
+ nft?: CmsnftData;
2765
+ };
2766
+ };
2767
+
2768
+ export type CmsReserveNftResponse = CmsReserveNftResponses[keyof CmsReserveNftResponses];
2769
+
2532
2770
  export type ApproveNftData = {
2533
2771
  body: NftApproveTransactionParams;
2534
2772
  path?: never;