@sats-connect/core 0.14.0-8ca2d84 → 0.14.0-dcc11ec

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/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/request/index.ts
2
- import * as v53 from "valibot";
2
+ import * as v55 from "valibot";
3
3
 
4
4
  // src/provider/types.ts
5
5
  import * as v4 from "valibot";
@@ -243,7 +243,7 @@ var sanitizeAddressPurposeRequest = (method, params) => {
243
243
  };
244
244
 
245
245
  // src/request/types/btcMethods.ts
246
- import * as v18 from "valibot";
246
+ import * as v20 from "valibot";
247
247
 
248
248
  // src/request/types/walletMethods/addNetwork.ts
249
249
  import * as v5 from "valibot";
@@ -465,50 +465,83 @@ var getWalletTypeRequestMessageSchema = v14.object({
465
465
  }).entries
466
466
  });
467
467
 
468
- // src/request/types/walletMethods/openReceive.ts
468
+ // src/request/types/walletMethods/openBridge.ts
469
469
  import * as v15 from "valibot";
470
- var openReceiveMethodName = "wallet_openReceive";
471
- var openReceiveParamsSchema = v15.object({
472
- address: v15.string()
470
+ var openBridgeMethodName = "wallet_openBridge";
471
+ var openBridgeParamsSchema = v15.object({
472
+ fromAsset: v15.string(),
473
+ toAsset: v15.string()
473
474
  });
474
- var openReceiveResultSchema = v15.nullish(v15.null());
475
- var openReceiveRequestMessageSchema = v15.object({
475
+ var openBridgeResultSchema = v15.nullish(v15.null());
476
+ var openBridgeRequestMessageSchema = v15.object({
476
477
  ...rpcRequestMessageSchema.entries,
477
478
  ...v15.object({
478
- method: v15.literal(openReceiveMethodName),
479
- params: openReceiveParamsSchema,
479
+ method: v15.literal(openBridgeMethodName),
480
+ params: openBridgeParamsSchema,
480
481
  id: v15.string()
481
482
  }).entries
482
483
  });
483
484
 
484
- // src/request/types/walletMethods/renouncePermissions.ts
485
+ // src/request/types/walletMethods/openBuy.ts
485
486
  import * as v16 from "valibot";
486
- var renouncePermissionsMethodName = "wallet_renouncePermissions";
487
- var renouncePermissionsParamsSchema = v16.nullish(v16.null());
488
- var renouncePermissionsResultSchema = v16.nullish(v16.null());
489
- var renouncePermissionsRequestMessageSchema = v16.object({
487
+ var openBuyMethodName = "wallet_openBuy";
488
+ var openBuyParamsSchema = v16.object({
489
+ asset: v16.string()
490
+ });
491
+ var openBuyResultSchema = v16.nullish(v16.null());
492
+ var openBuyRequestMessageSchema = v16.object({
490
493
  ...rpcRequestMessageSchema.entries,
491
494
  ...v16.object({
492
- method: v16.literal(renouncePermissionsMethodName),
493
- params: renouncePermissionsParamsSchema,
495
+ method: v16.literal(openBuyMethodName),
496
+ params: openBuyParamsSchema,
494
497
  id: v16.string()
495
498
  }).entries
496
499
  });
497
500
 
498
- // src/request/types/walletMethods/requestPermissions.ts
501
+ // src/request/types/walletMethods/openReceive.ts
499
502
  import * as v17 from "valibot";
500
- var requestPermissionsMethodName = "wallet_requestPermissions";
501
- var requestPermissionsParamsSchema = v17.nullish(v17.array(PermissionRequestParams));
502
- var requestPermissionsResultSchema = v17.literal(true);
503
- var requestPermissionsRequestMessageSchema = v17.object({
503
+ var openReceiveMethodName = "wallet_openReceive";
504
+ var openReceiveParamsSchema = v17.object({
505
+ address: v17.string()
506
+ });
507
+ var openReceiveResultSchema = addressSchema;
508
+ var openReceiveRequestMessageSchema = v17.object({
504
509
  ...rpcRequestMessageSchema.entries,
505
510
  ...v17.object({
506
- method: v17.literal(requestPermissionsMethodName),
507
- params: requestPermissionsParamsSchema,
511
+ method: v17.literal(openReceiveMethodName),
512
+ params: openReceiveParamsSchema,
508
513
  id: v17.string()
509
514
  }).entries
510
515
  });
511
516
 
517
+ // src/request/types/walletMethods/renouncePermissions.ts
518
+ import * as v18 from "valibot";
519
+ var renouncePermissionsMethodName = "wallet_renouncePermissions";
520
+ var renouncePermissionsParamsSchema = v18.nullish(v18.null());
521
+ var renouncePermissionsResultSchema = v18.nullish(v18.null());
522
+ var renouncePermissionsRequestMessageSchema = v18.object({
523
+ ...rpcRequestMessageSchema.entries,
524
+ ...v18.object({
525
+ method: v18.literal(renouncePermissionsMethodName),
526
+ params: renouncePermissionsParamsSchema,
527
+ id: v18.string()
528
+ }).entries
529
+ });
530
+
531
+ // src/request/types/walletMethods/requestPermissions.ts
532
+ import * as v19 from "valibot";
533
+ var requestPermissionsMethodName = "wallet_requestPermissions";
534
+ var requestPermissionsParamsSchema = v19.nullish(v19.array(PermissionRequestParams));
535
+ var requestPermissionsResultSchema = v19.literal(true);
536
+ var requestPermissionsRequestMessageSchema = v19.object({
537
+ ...rpcRequestMessageSchema.entries,
538
+ ...v19.object({
539
+ method: v19.literal(requestPermissionsMethodName),
540
+ params: requestPermissionsParamsSchema,
541
+ id: v19.string()
542
+ }).entries
543
+ });
544
+
512
545
  // src/request/types/btcMethods.ts
513
546
  var ProviderPlatform = /* @__PURE__ */ ((ProviderPlatform2) => {
514
547
  ProviderPlatform2["Web"] = "web";
@@ -516,58 +549,58 @@ var ProviderPlatform = /* @__PURE__ */ ((ProviderPlatform2) => {
516
549
  return ProviderPlatform2;
517
550
  })(ProviderPlatform || {});
518
551
  var getInfoMethodName = "getInfo";
519
- var getInfoParamsSchema = v18.nullish(v18.null());
520
- var getInfoResultSchema = v18.object({
552
+ var getInfoParamsSchema = v20.nullish(v20.null());
553
+ var getInfoResultSchema = v20.object({
521
554
  /**
522
555
  * Version of the wallet.
523
556
  */
524
- version: v18.string(),
557
+ version: v20.string(),
525
558
  /**
526
559
  * The platform the wallet is running on (web or mobile).
527
560
  */
528
- platform: v18.optional(v18.enum(ProviderPlatform)),
561
+ platform: v20.optional(v20.enum(ProviderPlatform)),
529
562
  /**
530
563
  * [WBIP](https://wbips.netlify.app/wbips/WBIP002) methods supported by the wallet.
531
564
  */
532
- methods: v18.optional(v18.array(v18.string())),
565
+ methods: v20.optional(v20.array(v20.string())),
533
566
  /**
534
567
  * List of WBIP standards supported by the wallet. Not currently used.
535
568
  */
536
- supports: v18.array(v18.string())
569
+ supports: v20.array(v20.string())
537
570
  });
538
- var getInfoRequestMessageSchema = v18.object({
571
+ var getInfoRequestMessageSchema = v20.object({
539
572
  ...rpcRequestMessageSchema.entries,
540
- ...v18.object({
541
- method: v18.literal(getInfoMethodName),
573
+ ...v20.object({
574
+ method: v20.literal(getInfoMethodName),
542
575
  params: getInfoParamsSchema,
543
- id: v18.string()
576
+ id: v20.string()
544
577
  }).entries
545
578
  });
546
579
  var getAddressesMethodName = "getAddresses";
547
- var getAddressesParamsSchema = v18.object({
580
+ var getAddressesParamsSchema = v20.object({
548
581
  /**
549
582
  * The purposes for which to generate addresses. See
550
583
  * {@linkcode AddressPurpose} for available purposes.
551
584
  */
552
- purposes: v18.array(v18.enum(AddressPurpose)),
585
+ purposes: v20.array(v20.enum(AddressPurpose)),
553
586
  /**
554
587
  * A message to be displayed to the user in the request prompt.
555
588
  */
556
- message: v18.optional(v18.string())
589
+ message: v20.optional(v20.string())
557
590
  });
558
- var getAddressesResultSchema = v18.object({
591
+ var getAddressesResultSchema = v20.object({
559
592
  /**
560
593
  * The addresses generated for the given purposes.
561
594
  */
562
- addresses: v18.array(addressSchema),
595
+ addresses: v20.array(addressSchema),
563
596
  network: getNetworkResultSchema
564
597
  });
565
- var getAddressesRequestMessageSchema = v18.object({
598
+ var getAddressesRequestMessageSchema = v20.object({
566
599
  ...rpcRequestMessageSchema.entries,
567
- ...v18.object({
568
- method: v18.literal(getAddressesMethodName),
600
+ ...v20.object({
601
+ method: v20.literal(getAddressesMethodName),
569
602
  params: getAddressesParamsSchema,
570
- id: v18.string()
603
+ id: v20.string()
571
604
  }).entries
572
605
  });
573
606
  var signMessageMethodName = "signMessage";
@@ -576,606 +609,606 @@ var MessageSigningProtocols = /* @__PURE__ */ ((MessageSigningProtocols2) => {
576
609
  MessageSigningProtocols2["BIP322"] = "BIP322";
577
610
  return MessageSigningProtocols2;
578
611
  })(MessageSigningProtocols || {});
579
- var signMessageParamsSchema = v18.object({
612
+ var signMessageParamsSchema = v20.object({
580
613
  /**
581
614
  * The address used for signing.
582
615
  **/
583
- address: v18.string(),
616
+ address: v20.string(),
584
617
  /**
585
618
  * The message to sign.
586
619
  **/
587
- message: v18.string(),
620
+ message: v20.string(),
588
621
  /**
589
622
  * The protocol to use for signing the message.
590
623
  */
591
- protocol: v18.optional(v18.enum(MessageSigningProtocols))
624
+ protocol: v20.optional(v20.enum(MessageSigningProtocols))
592
625
  });
593
- var signMessageResultSchema = v18.object({
626
+ var signMessageResultSchema = v20.object({
594
627
  /**
595
628
  * The signature of the message.
596
629
  */
597
- signature: v18.string(),
630
+ signature: v20.string(),
598
631
  /**
599
632
  * hash of the message.
600
633
  */
601
- messageHash: v18.string(),
634
+ messageHash: v20.string(),
602
635
  /**
603
636
  * The address used for signing.
604
637
  */
605
- address: v18.string(),
638
+ address: v20.string(),
606
639
  /**
607
640
  * The protocol to use for signing the message.
608
641
  */
609
- protocol: v18.enum(MessageSigningProtocols)
642
+ protocol: v20.enum(MessageSigningProtocols)
610
643
  });
611
- var signMessageRequestMessageSchema = v18.object({
644
+ var signMessageRequestMessageSchema = v20.object({
612
645
  ...rpcRequestMessageSchema.entries,
613
- ...v18.object({
614
- method: v18.literal(signMessageMethodName),
646
+ ...v20.object({
647
+ method: v20.literal(signMessageMethodName),
615
648
  params: signMessageParamsSchema,
616
- id: v18.string()
649
+ id: v20.string()
617
650
  }).entries
618
651
  });
619
652
  var sendTransferMethodName = "sendTransfer";
620
- var sendTransferParamsSchema = v18.object({
653
+ var sendTransferParamsSchema = v20.object({
621
654
  /**
622
655
  * Array of recipients to send to.
623
656
  * The amount to send to each recipient is in satoshis.
624
657
  */
625
- recipients: v18.array(
626
- v18.object({
627
- address: v18.string(),
628
- amount: v18.number()
658
+ recipients: v20.array(
659
+ v20.object({
660
+ address: v20.string(),
661
+ amount: v20.number()
629
662
  })
630
663
  )
631
664
  });
632
- var sendTransferResultSchema = v18.object({
665
+ var sendTransferResultSchema = v20.object({
633
666
  /**
634
667
  * The transaction id as a hex-encoded string.
635
668
  */
636
- txid: v18.string()
669
+ txid: v20.string()
637
670
  });
638
- var sendTransferRequestMessageSchema = v18.object({
671
+ var sendTransferRequestMessageSchema = v20.object({
639
672
  ...rpcRequestMessageSchema.entries,
640
- ...v18.object({
641
- method: v18.literal(sendTransferMethodName),
673
+ ...v20.object({
674
+ method: v20.literal(sendTransferMethodName),
642
675
  params: sendTransferParamsSchema,
643
- id: v18.string()
676
+ id: v20.string()
644
677
  }).entries
645
678
  });
646
679
  var signPsbtMethodName = "signPsbt";
647
- var signPsbtParamsSchema = v18.object({
680
+ var signPsbtParamsSchema = v20.object({
648
681
  /**
649
682
  * The base64 encoded PSBT to sign.
650
683
  */
651
- psbt: v18.string(),
684
+ psbt: v20.string(),
652
685
  /**
653
686
  * The inputs to sign.
654
687
  * The key is the address and the value is an array of indexes of the inputs to sign.
655
688
  */
656
- signInputs: v18.optional(v18.record(v18.string(), v18.array(v18.number()))),
689
+ signInputs: v20.optional(v20.record(v20.string(), v20.array(v20.number()))),
657
690
  /**
658
691
  * Whether to broadcast the transaction after signing.
659
692
  **/
660
- broadcast: v18.optional(v18.boolean())
693
+ broadcast: v20.optional(v20.boolean())
661
694
  });
662
- var signPsbtResultSchema = v18.object({
695
+ var signPsbtResultSchema = v20.object({
663
696
  /**
664
697
  * The base64 encoded PSBT after signing.
665
698
  */
666
- psbt: v18.string(),
699
+ psbt: v20.string(),
667
700
  /**
668
701
  * The transaction id as a hex-encoded string.
669
702
  * This is only returned if the transaction was broadcast.
670
703
  **/
671
- txid: v18.optional(v18.string())
704
+ txid: v20.optional(v20.string())
672
705
  });
673
- var signPsbtRequestMessageSchema = v18.object({
706
+ var signPsbtRequestMessageSchema = v20.object({
674
707
  ...rpcRequestMessageSchema.entries,
675
- ...v18.object({
676
- method: v18.literal(signPsbtMethodName),
708
+ ...v20.object({
709
+ method: v20.literal(signPsbtMethodName),
677
710
  params: signPsbtParamsSchema,
678
- id: v18.string()
711
+ id: v20.string()
679
712
  }).entries
680
713
  });
681
714
  var getAccountsMethodName = "getAccounts";
682
- var getAccountsParamsSchema = v18.object({
715
+ var getAccountsParamsSchema = v20.object({
683
716
  /**
684
717
  * The purposes for which to generate addresses. See
685
718
  * {@linkcode AddressPurpose} for available purposes.
686
719
  */
687
- purposes: v18.array(v18.enum(AddressPurpose)),
720
+ purposes: v20.array(v20.enum(AddressPurpose)),
688
721
  /**
689
722
  * A message to be displayed to the user in the request prompt.
690
723
  */
691
- message: v18.optional(v18.string())
724
+ message: v20.optional(v20.string())
692
725
  });
693
- var getAccountsResultSchema = v18.array(
694
- v18.object({
726
+ var getAccountsResultSchema = v20.array(
727
+ v20.object({
695
728
  ...addressSchema.entries,
696
- ...v18.object({
729
+ ...v20.object({
697
730
  walletType: walletTypeSchema
698
731
  }).entries
699
732
  })
700
733
  );
701
- var getAccountsRequestMessageSchema = v18.object({
734
+ var getAccountsRequestMessageSchema = v20.object({
702
735
  ...rpcRequestMessageSchema.entries,
703
- ...v18.object({
704
- method: v18.literal(getAccountsMethodName),
736
+ ...v20.object({
737
+ method: v20.literal(getAccountsMethodName),
705
738
  params: getAccountsParamsSchema,
706
- id: v18.string()
739
+ id: v20.string()
707
740
  }).entries
708
741
  });
709
742
  var getBalanceMethodName = "getBalance";
710
- var getBalanceParamsSchema = v18.nullish(v18.null());
711
- var getBalanceResultSchema = v18.object({
743
+ var getBalanceParamsSchema = v20.nullish(v20.null());
744
+ var getBalanceResultSchema = v20.object({
712
745
  /**
713
746
  * The confirmed balance of the wallet in sats. Using a string due to chrome
714
747
  * messages not supporting bigint
715
748
  * (https://issues.chromium.org/issues/40116184).
716
749
  */
717
- confirmed: v18.string(),
750
+ confirmed: v20.string(),
718
751
  /**
719
752
  * The unconfirmed balance of the wallet in sats. Using a string due to chrome
720
753
  * messages not supporting bigint
721
754
  * (https://issues.chromium.org/issues/40116184).
722
755
  */
723
- unconfirmed: v18.string(),
756
+ unconfirmed: v20.string(),
724
757
  /**
725
758
  * The total balance (both confirmed and unconfrimed UTXOs) of the wallet in
726
759
  * sats. Using a string due to chrome messages not supporting bigint
727
760
  * (https://issues.chromium.org/issues/40116184).
728
761
  */
729
- total: v18.string()
762
+ total: v20.string()
730
763
  });
731
- var getBalanceRequestMessageSchema = v18.object({
764
+ var getBalanceRequestMessageSchema = v20.object({
732
765
  ...rpcRequestMessageSchema.entries,
733
- ...v18.object({
734
- method: v18.literal(getBalanceMethodName),
735
- id: v18.string()
766
+ ...v20.object({
767
+ method: v20.literal(getBalanceMethodName),
768
+ id: v20.string()
736
769
  }).entries
737
770
  });
738
771
 
739
772
  // src/request/types/ordinalsMethods.ts
740
- import * as v19 from "valibot";
773
+ import * as v21 from "valibot";
741
774
  var getInscriptionsMethodName = "ord_getInscriptions";
742
- var getInscriptionsParamsSchema = v19.object({
743
- offset: v19.number(),
744
- limit: v19.number()
745
- });
746
- var getInscriptionsResultSchema = v19.object({
747
- total: v19.number(),
748
- limit: v19.number(),
749
- offset: v19.number(),
750
- inscriptions: v19.array(
751
- v19.object({
752
- inscriptionId: v19.string(),
753
- inscriptionNumber: v19.string(),
754
- address: v19.string(),
755
- collectionName: v19.optional(v19.string()),
756
- postage: v19.string(),
757
- contentLength: v19.string(),
758
- contentType: v19.string(),
759
- timestamp: v19.number(),
760
- offset: v19.number(),
761
- genesisTransaction: v19.string(),
762
- output: v19.string()
775
+ var getInscriptionsParamsSchema = v21.object({
776
+ offset: v21.number(),
777
+ limit: v21.number()
778
+ });
779
+ var getInscriptionsResultSchema = v21.object({
780
+ total: v21.number(),
781
+ limit: v21.number(),
782
+ offset: v21.number(),
783
+ inscriptions: v21.array(
784
+ v21.object({
785
+ inscriptionId: v21.string(),
786
+ inscriptionNumber: v21.string(),
787
+ address: v21.string(),
788
+ collectionName: v21.optional(v21.string()),
789
+ postage: v21.string(),
790
+ contentLength: v21.string(),
791
+ contentType: v21.string(),
792
+ timestamp: v21.number(),
793
+ offset: v21.number(),
794
+ genesisTransaction: v21.string(),
795
+ output: v21.string()
763
796
  })
764
797
  )
765
798
  });
766
- var getInscriptionsRequestMessageSchema = v19.object({
799
+ var getInscriptionsRequestMessageSchema = v21.object({
767
800
  ...rpcRequestMessageSchema.entries,
768
- ...v19.object({
769
- method: v19.literal(getInscriptionsMethodName),
801
+ ...v21.object({
802
+ method: v21.literal(getInscriptionsMethodName),
770
803
  params: getInscriptionsParamsSchema,
771
- id: v19.string()
804
+ id: v21.string()
772
805
  }).entries
773
806
  });
774
807
  var sendInscriptionsMethodName = "ord_sendInscriptions";
775
- var sendInscriptionsParamsSchema = v19.object({
776
- transfers: v19.array(
777
- v19.object({
778
- address: v19.string(),
779
- inscriptionId: v19.string()
808
+ var sendInscriptionsParamsSchema = v21.object({
809
+ transfers: v21.array(
810
+ v21.object({
811
+ address: v21.string(),
812
+ inscriptionId: v21.string()
780
813
  })
781
814
  )
782
815
  });
783
- var sendInscriptionsResultSchema = v19.object({
784
- txid: v19.string()
816
+ var sendInscriptionsResultSchema = v21.object({
817
+ txid: v21.string()
785
818
  });
786
- var sendInscriptionsRequestMessageSchema = v19.object({
819
+ var sendInscriptionsRequestMessageSchema = v21.object({
787
820
  ...rpcRequestMessageSchema.entries,
788
- ...v19.object({
789
- method: v19.literal(sendInscriptionsMethodName),
821
+ ...v21.object({
822
+ method: v21.literal(sendInscriptionsMethodName),
790
823
  params: sendInscriptionsParamsSchema,
791
- id: v19.string()
824
+ id: v21.string()
792
825
  }).entries
793
826
  });
794
827
 
795
828
  // src/request/types/runesMethods/etch.ts
796
- import * as v20 from "valibot";
829
+ import * as v22 from "valibot";
797
830
  var runesEtchMethodName = "runes_etch";
798
- var etchTermsSchema = v20.object({
799
- amount: v20.string(),
800
- cap: v20.string(),
801
- heightStart: v20.optional(v20.string()),
802
- heightEnd: v20.optional(v20.string()),
803
- offsetStart: v20.optional(v20.string()),
804
- offsetEnd: v20.optional(v20.string())
805
- });
806
- var inscriptionDetailsSchema = v20.object({
807
- contentType: v20.string(),
808
- contentBase64: v20.string()
809
- });
810
- var runesEtchParamsSchema = v20.object({
811
- runeName: v20.string(),
812
- divisibility: v20.optional(v20.number()),
813
- symbol: v20.optional(v20.string()),
814
- premine: v20.optional(v20.string()),
815
- isMintable: v20.boolean(),
816
- delegateInscriptionId: v20.optional(v20.string()),
817
- destinationAddress: v20.string(),
818
- refundAddress: v20.string(),
819
- feeRate: v20.number(),
820
- appServiceFee: v20.optional(v20.number()),
821
- appServiceFeeAddress: v20.optional(v20.string()),
822
- terms: v20.optional(etchTermsSchema),
823
- inscriptionDetails: v20.optional(inscriptionDetailsSchema),
824
- network: v20.optional(v20.enum(BitcoinNetworkType))
825
- });
826
- var runesEtchResultSchema = v20.object({
827
- orderId: v20.string(),
828
- fundTransactionId: v20.string(),
829
- fundingAddress: v20.string()
830
- });
831
- var runesEtchRequestMessageSchema = v20.object({
831
+ var etchTermsSchema = v22.object({
832
+ amount: v22.string(),
833
+ cap: v22.string(),
834
+ heightStart: v22.optional(v22.string()),
835
+ heightEnd: v22.optional(v22.string()),
836
+ offsetStart: v22.optional(v22.string()),
837
+ offsetEnd: v22.optional(v22.string())
838
+ });
839
+ var inscriptionDetailsSchema = v22.object({
840
+ contentType: v22.string(),
841
+ contentBase64: v22.string()
842
+ });
843
+ var runesEtchParamsSchema = v22.object({
844
+ runeName: v22.string(),
845
+ divisibility: v22.optional(v22.number()),
846
+ symbol: v22.optional(v22.string()),
847
+ premine: v22.optional(v22.string()),
848
+ isMintable: v22.boolean(),
849
+ delegateInscriptionId: v22.optional(v22.string()),
850
+ destinationAddress: v22.string(),
851
+ refundAddress: v22.string(),
852
+ feeRate: v22.number(),
853
+ appServiceFee: v22.optional(v22.number()),
854
+ appServiceFeeAddress: v22.optional(v22.string()),
855
+ terms: v22.optional(etchTermsSchema),
856
+ inscriptionDetails: v22.optional(inscriptionDetailsSchema),
857
+ network: v22.optional(v22.enum(BitcoinNetworkType))
858
+ });
859
+ var runesEtchResultSchema = v22.object({
860
+ orderId: v22.string(),
861
+ fundTransactionId: v22.string(),
862
+ fundingAddress: v22.string()
863
+ });
864
+ var runesEtchRequestMessageSchema = v22.object({
832
865
  ...rpcRequestMessageSchema.entries,
833
- ...v20.object({
834
- method: v20.literal(runesEtchMethodName),
866
+ ...v22.object({
867
+ method: v22.literal(runesEtchMethodName),
835
868
  params: runesEtchParamsSchema,
836
- id: v20.string()
869
+ id: v22.string()
837
870
  }).entries
838
871
  });
839
872
 
840
873
  // src/request/types/runesMethods/getBalance.ts
841
- import * as v21 from "valibot";
874
+ import * as v23 from "valibot";
842
875
  var runesGetBalanceMethodName = "runes_getBalance";
843
- var runesGetBalanceParamsSchema = v21.nullish(v21.null());
844
- var runesGetBalanceResultSchema = v21.object({
845
- balances: v21.array(
846
- v21.object({
847
- runeName: v21.string(),
848
- amount: v21.string(),
849
- divisibility: v21.number(),
850
- symbol: v21.string(),
851
- inscriptionId: v21.nullish(v21.string()),
852
- spendableBalance: v21.string()
876
+ var runesGetBalanceParamsSchema = v23.nullish(v23.null());
877
+ var runesGetBalanceResultSchema = v23.object({
878
+ balances: v23.array(
879
+ v23.object({
880
+ runeName: v23.string(),
881
+ amount: v23.string(),
882
+ divisibility: v23.number(),
883
+ symbol: v23.string(),
884
+ inscriptionId: v23.nullish(v23.string()),
885
+ spendableBalance: v23.string()
853
886
  })
854
887
  )
855
888
  });
856
- var runesGetBalanceRequestMessageSchema = v21.object({
889
+ var runesGetBalanceRequestMessageSchema = v23.object({
857
890
  ...rpcRequestMessageSchema.entries,
858
- ...v21.object({
859
- method: v21.literal(runesGetBalanceMethodName),
891
+ ...v23.object({
892
+ method: v23.literal(runesGetBalanceMethodName),
860
893
  params: runesGetBalanceParamsSchema,
861
- id: v21.string()
894
+ id: v23.string()
862
895
  }).entries
863
896
  });
864
897
 
865
898
  // src/request/types/runesMethods/mint.ts
866
- import * as v22 from "valibot";
899
+ import * as v24 from "valibot";
867
900
  var runesMintMethodName = "runes_mint";
868
- var runesMintParamsSchema = v22.object({
869
- appServiceFee: v22.optional(v22.number()),
870
- appServiceFeeAddress: v22.optional(v22.string()),
871
- destinationAddress: v22.string(),
872
- feeRate: v22.number(),
873
- refundAddress: v22.string(),
874
- repeats: v22.number(),
875
- runeName: v22.string(),
876
- network: v22.optional(v22.enum(BitcoinNetworkType))
877
- });
878
- var runesMintResultSchema = v22.object({
879
- orderId: v22.string(),
880
- fundTransactionId: v22.string(),
881
- fundingAddress: v22.string()
882
- });
883
- var runesMintRequestMessageSchema = v22.object({
901
+ var runesMintParamsSchema = v24.object({
902
+ appServiceFee: v24.optional(v24.number()),
903
+ appServiceFeeAddress: v24.optional(v24.string()),
904
+ destinationAddress: v24.string(),
905
+ feeRate: v24.number(),
906
+ refundAddress: v24.string(),
907
+ repeats: v24.number(),
908
+ runeName: v24.string(),
909
+ network: v24.optional(v24.enum(BitcoinNetworkType))
910
+ });
911
+ var runesMintResultSchema = v24.object({
912
+ orderId: v24.string(),
913
+ fundTransactionId: v24.string(),
914
+ fundingAddress: v24.string()
915
+ });
916
+ var runesMintRequestMessageSchema = v24.object({
884
917
  ...rpcRequestMessageSchema.entries,
885
- ...v22.object({
886
- method: v22.literal(runesMintMethodName),
918
+ ...v24.object({
919
+ method: v24.literal(runesMintMethodName),
887
920
  params: runesMintParamsSchema,
888
- id: v22.string()
921
+ id: v24.string()
889
922
  }).entries
890
923
  });
891
924
 
892
925
  // src/request/types/runesMethods/transfer.ts
893
- import * as v23 from "valibot";
926
+ import * as v25 from "valibot";
894
927
  var runesTransferMethodName = "runes_transfer";
895
- var runesTransferParamsSchema = v23.object({
896
- recipients: v23.array(
897
- v23.object({
898
- runeName: v23.string(),
899
- amount: v23.string(),
900
- address: v23.string()
928
+ var runesTransferParamsSchema = v25.object({
929
+ recipients: v25.array(
930
+ v25.object({
931
+ runeName: v25.string(),
932
+ amount: v25.string(),
933
+ address: v25.string()
901
934
  })
902
935
  )
903
936
  });
904
- var runesTransferResultSchema = v23.object({
905
- txid: v23.string()
937
+ var runesTransferResultSchema = v25.object({
938
+ txid: v25.string()
906
939
  });
907
- var runesTransferRequestMessageSchema = v23.object({
940
+ var runesTransferRequestMessageSchema = v25.object({
908
941
  ...rpcRequestMessageSchema.entries,
909
- ...v23.object({
910
- method: v23.literal(runesTransferMethodName),
942
+ ...v25.object({
943
+ method: v25.literal(runesTransferMethodName),
911
944
  params: runesTransferParamsSchema,
912
- id: v23.string()
945
+ id: v25.string()
913
946
  }).entries
914
947
  });
915
948
 
916
949
  // src/request/types/sparkMethods/flashnetMethods/clawbackFunds.ts
917
- import * as v24 from "valibot";
950
+ import * as v26 from "valibot";
918
951
  var sparkFlashnetClawbackFundsMethodName = "spark_flashnet_clawbackFunds";
919
- var sparkFlashnetClawbackFundsParamsSchema = v24.object({
920
- sparkTransferId: v24.string(),
921
- lpIdentityPublicKey: v24.string()
922
- });
923
- var sparkFlashnetClawbackFundsResultSchema = v24.object({
924
- requestId: v24.string(),
925
- accepted: v24.boolean(),
926
- internalRequestId: v24.optional(v24.string()),
927
- sparkStatusTrackingId: v24.optional(v24.string()),
928
- error: v24.optional(v24.string())
929
- });
930
- var sparkFlashnetClawbackFundsRequestMessageSchema = v24.object({
952
+ var sparkFlashnetClawbackFundsParamsSchema = v26.object({
953
+ sparkTransferId: v26.string(),
954
+ lpIdentityPublicKey: v26.string()
955
+ });
956
+ var sparkFlashnetClawbackFundsResultSchema = v26.object({
957
+ requestId: v26.string(),
958
+ accepted: v26.boolean(),
959
+ internalRequestId: v26.optional(v26.string()),
960
+ sparkStatusTrackingId: v26.optional(v26.string()),
961
+ error: v26.optional(v26.string())
962
+ });
963
+ var sparkFlashnetClawbackFundsRequestMessageSchema = v26.object({
931
964
  ...rpcRequestMessageSchema.entries,
932
- ...v24.object({
933
- method: v24.literal(sparkFlashnetClawbackFundsMethodName),
965
+ ...v26.object({
966
+ method: v26.literal(sparkFlashnetClawbackFundsMethodName),
934
967
  params: sparkFlashnetClawbackFundsParamsSchema,
935
- id: v24.string()
968
+ id: v26.string()
936
969
  }).entries
937
970
  });
938
971
 
939
972
  // src/request/types/sparkMethods/flashnetMethods/executeRouteSwap.ts
940
- import * as v25 from "valibot";
973
+ import * as v27 from "valibot";
941
974
  var sparkFlashnetExecuteRouteSwapMethodName = "spark_flashnet_executeRouteSwap";
942
- var sparkFlashnetExecuteRouteSwapParamsSchema = v25.object({
943
- hops: v25.array(
944
- v25.object({
945
- poolId: v25.string(),
946
- assetInAddress: v25.string(),
947
- assetOutAddress: v25.string(),
948
- hopIntegratorFeeRateBps: v25.optional(v25.number())
975
+ var sparkFlashnetExecuteRouteSwapParamsSchema = v27.object({
976
+ hops: v27.array(
977
+ v27.object({
978
+ poolId: v27.string(),
979
+ assetInAddress: v27.string(),
980
+ assetOutAddress: v27.string(),
981
+ hopIntegratorFeeRateBps: v27.optional(v27.number())
949
982
  })
950
983
  ),
951
- initialAssetAddress: v25.string(),
952
- inputAmount: v25.string(),
953
- maxRouteSlippageBps: v25.string(),
954
- minAmountOut: v25.optional(v25.string()),
955
- integratorFeeRateBps: v25.optional(v25.number()),
956
- integratorPublicKey: v25.optional(v25.string())
957
- });
958
- var sparkFlashnetExecuteRouteSwapResultSchema = v25.object({
959
- requestId: v25.string(),
960
- accepted: v25.boolean(),
961
- outputAmount: v25.string(),
962
- executionPrice: v25.string(),
963
- finalOutboundTransferId: v25.string(),
964
- error: v25.optional(v25.string())
965
- });
966
- var sparkFlashnetExecuteRouteSwapRequestMessageSchema = v25.object({
984
+ initialAssetAddress: v27.string(),
985
+ inputAmount: v27.string(),
986
+ maxRouteSlippageBps: v27.string(),
987
+ minAmountOut: v27.optional(v27.string()),
988
+ integratorFeeRateBps: v27.optional(v27.number()),
989
+ integratorPublicKey: v27.optional(v27.string())
990
+ });
991
+ var sparkFlashnetExecuteRouteSwapResultSchema = v27.object({
992
+ requestId: v27.string(),
993
+ accepted: v27.boolean(),
994
+ outputAmount: v27.string(),
995
+ executionPrice: v27.string(),
996
+ finalOutboundTransferId: v27.string(),
997
+ error: v27.optional(v27.string())
998
+ });
999
+ var sparkFlashnetExecuteRouteSwapRequestMessageSchema = v27.object({
967
1000
  ...rpcRequestMessageSchema.entries,
968
- ...v25.object({
969
- method: v25.literal(sparkFlashnetExecuteRouteSwapMethodName),
1001
+ ...v27.object({
1002
+ method: v27.literal(sparkFlashnetExecuteRouteSwapMethodName),
970
1003
  params: sparkFlashnetExecuteRouteSwapParamsSchema,
971
- id: v25.string()
1004
+ id: v27.string()
972
1005
  }).entries
973
1006
  });
974
1007
 
975
1008
  // src/request/types/sparkMethods/flashnetMethods/executeSwap.ts
976
- import * as v26 from "valibot";
1009
+ import * as v28 from "valibot";
977
1010
  var sparkFlashnetExecuteSwapMethodName = "spark_flashnet_executeSwap";
978
- var sparkFlashnetExecuteSwapParamsSchema = v26.object({
979
- poolId: v26.string(),
980
- assetInAddress: v26.string(),
981
- assetOutAddress: v26.string(),
982
- amountIn: v26.string(),
983
- maxSlippageBps: v26.number(),
984
- minAmountOut: v26.optional(v26.string()),
985
- integratorFeeRateBps: v26.optional(v26.number()),
986
- integratorPublicKey: v26.optional(v26.string())
987
- });
988
- var sparkFlashnetExecuteSwapResultSchema = v26.object({
989
- requestId: v26.string(),
990
- accepted: v26.boolean(),
991
- amountOut: v26.optional(v26.string()),
992
- feeAmount: v26.optional(v26.string()),
993
- executionPrice: v26.optional(v26.string()),
994
- assetOutAddress: v26.optional(v26.string()),
995
- assetInAddress: v26.optional(v26.string()),
996
- outboundTransferId: v26.optional(v26.string()),
997
- error: v26.optional(v26.string())
998
- });
999
- var sparkFlashnetExecuteSwapRequestMessageSchema = v26.object({
1011
+ var sparkFlashnetExecuteSwapParamsSchema = v28.object({
1012
+ poolId: v28.string(),
1013
+ assetInAddress: v28.string(),
1014
+ assetOutAddress: v28.string(),
1015
+ amountIn: v28.string(),
1016
+ maxSlippageBps: v28.number(),
1017
+ minAmountOut: v28.optional(v28.string()),
1018
+ integratorFeeRateBps: v28.optional(v28.number()),
1019
+ integratorPublicKey: v28.optional(v28.string())
1020
+ });
1021
+ var sparkFlashnetExecuteSwapResultSchema = v28.object({
1022
+ requestId: v28.string(),
1023
+ accepted: v28.boolean(),
1024
+ amountOut: v28.optional(v28.string()),
1025
+ feeAmount: v28.optional(v28.string()),
1026
+ executionPrice: v28.optional(v28.string()),
1027
+ assetOutAddress: v28.optional(v28.string()),
1028
+ assetInAddress: v28.optional(v28.string()),
1029
+ outboundTransferId: v28.optional(v28.string()),
1030
+ error: v28.optional(v28.string())
1031
+ });
1032
+ var sparkFlashnetExecuteSwapRequestMessageSchema = v28.object({
1000
1033
  ...rpcRequestMessageSchema.entries,
1001
- ...v26.object({
1002
- method: v26.literal(sparkFlashnetExecuteSwapMethodName),
1034
+ ...v28.object({
1035
+ method: v28.literal(sparkFlashnetExecuteSwapMethodName),
1003
1036
  params: sparkFlashnetExecuteSwapParamsSchema,
1004
- id: v26.string()
1037
+ id: v28.string()
1005
1038
  }).entries
1006
1039
  });
1007
1040
 
1008
1041
  // src/request/types/sparkMethods/flashnetMethods/getClawbackEligibleTransfers.ts
1009
- import * as v27 from "valibot";
1042
+ import * as v29 from "valibot";
1010
1043
  var sparkGetClawbackEligibleTransfersMethodName = "spark_flashnet_getClawbackEligibleTransfers";
1011
- var sparkGetClawbackEligibleTransfersParamsSchema = v27.nullish(v27.null());
1012
- var sparkGetClawbackEligibleTransfersResultSchema = v27.object({
1013
- eligibleTransfers: v27.array(
1014
- v27.object({
1015
- txId: v27.string(),
1016
- createdAt: v27.string(),
1017
- lpIdentityPublicKey: v27.string()
1044
+ var sparkGetClawbackEligibleTransfersParamsSchema = v29.nullish(v29.null());
1045
+ var sparkGetClawbackEligibleTransfersResultSchema = v29.object({
1046
+ eligibleTransfers: v29.array(
1047
+ v29.object({
1048
+ txId: v29.string(),
1049
+ createdAt: v29.string(),
1050
+ lpIdentityPublicKey: v29.string()
1018
1051
  })
1019
1052
  )
1020
1053
  });
1021
- var sparkGetClawbackEligibleTransfersRequestMessageSchema = v27.object({
1054
+ var sparkGetClawbackEligibleTransfersRequestMessageSchema = v29.object({
1022
1055
  ...rpcRequestMessageSchema.entries,
1023
- ...v27.object({
1024
- method: v27.literal(sparkGetClawbackEligibleTransfersMethodName),
1056
+ ...v29.object({
1057
+ method: v29.literal(sparkGetClawbackEligibleTransfersMethodName),
1025
1058
  params: sparkGetClawbackEligibleTransfersParamsSchema,
1026
- id: v27.string()
1059
+ id: v29.string()
1027
1060
  }).entries
1028
1061
  });
1029
1062
 
1030
1063
  // src/request/types/sparkMethods/flashnetMethods/getJwt.ts
1031
- import * as v28 from "valibot";
1064
+ import * as v30 from "valibot";
1032
1065
  var sparkFlashnetGetJwtMethodName = "spark_flashnet_getJwt";
1033
- var sparkFlashnetGetJwtParamsSchema = v28.null();
1034
- var sparkFlashnetGetJwtResultSchema = v28.object({
1066
+ var sparkFlashnetGetJwtParamsSchema = v30.null();
1067
+ var sparkFlashnetGetJwtResultSchema = v30.object({
1035
1068
  /**
1036
1069
  * The JWT token for authenticated requests to the Flashnet API.
1037
1070
  */
1038
- jwt: v28.string()
1071
+ jwt: v30.string()
1039
1072
  });
1040
- var sparkFlashnetGetJwtRequestMessageSchema = v28.object({
1073
+ var sparkFlashnetGetJwtRequestMessageSchema = v30.object({
1041
1074
  ...rpcRequestMessageSchema.entries,
1042
- ...v28.object({
1043
- method: v28.literal(sparkFlashnetGetJwtMethodName),
1075
+ ...v30.object({
1076
+ method: v30.literal(sparkFlashnetGetJwtMethodName),
1044
1077
  params: sparkFlashnetGetJwtParamsSchema,
1045
- id: v28.string()
1078
+ id: v30.string()
1046
1079
  }).entries
1047
1080
  });
1048
1081
 
1049
1082
  // src/request/types/sparkMethods/flashnetMethods/intents/addLiquidity.ts
1050
- import * as v29 from "valibot";
1051
- var sparkFlashnetAddLiquidityIntentSchema = v29.object({
1052
- type: v29.literal("addLiquidity"),
1053
- data: v29.object({
1054
- userPublicKey: v29.string(),
1055
- poolId: v29.string(),
1056
- assetAAmount: v29.string(),
1057
- assetBAmount: v29.string(),
1058
- assetAMinAmountIn: v29.string(),
1059
- assetBMinAmountIn: v29.string(),
1060
- assetATransferId: v29.string(),
1061
- assetBTransferId: v29.string(),
1062
- nonce: v29.string()
1063
- })
1064
- });
1065
-
1066
- // src/request/types/sparkMethods/flashnetMethods/intents/clawback.ts
1067
- import * as v30 from "valibot";
1068
- var sparkFlashnetClawbackIntentSchema = v30.object({
1069
- type: v30.literal("clawback"),
1070
- data: v30.object({
1071
- senderPublicKey: v30.string(),
1072
- sparkTransferId: v30.string(),
1073
- lpIdentityPublicKey: v30.string(),
1074
- nonce: v30.string()
1075
- })
1076
- });
1077
-
1078
- // src/request/types/sparkMethods/flashnetMethods/intents/confirmInitialDeposit.ts
1079
1083
  import * as v31 from "valibot";
1080
- var sparkFlashnetConfirmInitialDepositIntentSchema = v31.object({
1081
- type: v31.literal("confirmInitialDeposit"),
1084
+ var sparkFlashnetAddLiquidityIntentSchema = v31.object({
1085
+ type: v31.literal("addLiquidity"),
1082
1086
  data: v31.object({
1087
+ userPublicKey: v31.string(),
1083
1088
  poolId: v31.string(),
1084
- assetASparkTransferId: v31.string(),
1085
- poolOwnerPublicKey: v31.string(),
1089
+ assetAAmount: v31.string(),
1090
+ assetBAmount: v31.string(),
1091
+ assetAMinAmountIn: v31.string(),
1092
+ assetBMinAmountIn: v31.string(),
1093
+ assetATransferId: v31.string(),
1094
+ assetBTransferId: v31.string(),
1086
1095
  nonce: v31.string()
1087
1096
  })
1088
1097
  });
1089
1098
 
1090
- // src/request/types/sparkMethods/flashnetMethods/intents/createConstantProductPool.ts
1099
+ // src/request/types/sparkMethods/flashnetMethods/intents/clawback.ts
1091
1100
  import * as v32 from "valibot";
1092
- var sparkFlashnetCreateConstantProductPoolIntentSchema = v32.object({
1093
- type: v32.literal("createConstantProductPool"),
1101
+ var sparkFlashnetClawbackIntentSchema = v32.object({
1102
+ type: v32.literal("clawback"),
1094
1103
  data: v32.object({
1095
- poolOwnerPublicKey: v32.string(),
1096
- assetAAddress: v32.string(),
1097
- assetBAddress: v32.string(),
1098
- lpFeeRateBps: v32.union([v32.number(), v32.string()]),
1099
- totalHostFeeRateBps: v32.union([v32.number(), v32.string()]),
1104
+ senderPublicKey: v32.string(),
1105
+ sparkTransferId: v32.string(),
1106
+ lpIdentityPublicKey: v32.string(),
1100
1107
  nonce: v32.string()
1101
1108
  })
1102
1109
  });
1103
1110
 
1104
- // src/request/types/sparkMethods/flashnetMethods/intents/createSingleSidedPool.ts
1111
+ // src/request/types/sparkMethods/flashnetMethods/intents/confirmInitialDeposit.ts
1105
1112
  import * as v33 from "valibot";
1106
- var sparkFlashnetCreateSingleSidedPoolIntentSchema = v33.object({
1107
- type: v33.literal("createSingleSidedPool"),
1113
+ var sparkFlashnetConfirmInitialDepositIntentSchema = v33.object({
1114
+ type: v33.literal("confirmInitialDeposit"),
1108
1115
  data: v33.object({
1109
- assetAAddress: v33.string(),
1110
- assetBAddress: v33.string(),
1111
- assetAInitialReserve: v33.string(),
1112
- virtualReserveA: v33.union([v33.number(), v33.string()]),
1113
- virtualReserveB: v33.union([v33.number(), v33.string()]),
1114
- threshold: v33.union([v33.number(), v33.string()]),
1115
- lpFeeRateBps: v33.union([v33.number(), v33.string()]),
1116
- totalHostFeeRateBps: v33.union([v33.number(), v33.string()]),
1116
+ poolId: v33.string(),
1117
+ assetASparkTransferId: v33.string(),
1117
1118
  poolOwnerPublicKey: v33.string(),
1118
1119
  nonce: v33.string()
1119
1120
  })
1120
1121
  });
1121
1122
 
1122
- // src/request/types/sparkMethods/flashnetMethods/intents/removeLiquidity.ts
1123
+ // src/request/types/sparkMethods/flashnetMethods/intents/createConstantProductPool.ts
1123
1124
  import * as v34 from "valibot";
1124
- var sparkFlashnetRemoveLiquidityIntentSchema = v34.object({
1125
- type: v34.literal("removeLiquidity"),
1125
+ var sparkFlashnetCreateConstantProductPoolIntentSchema = v34.object({
1126
+ type: v34.literal("createConstantProductPool"),
1126
1127
  data: v34.object({
1127
- userPublicKey: v34.string(),
1128
- poolId: v34.string(),
1129
- lpTokensToRemove: v34.string(),
1128
+ poolOwnerPublicKey: v34.string(),
1129
+ assetAAddress: v34.string(),
1130
+ assetBAddress: v34.string(),
1131
+ lpFeeRateBps: v34.union([v34.number(), v34.string()]),
1132
+ totalHostFeeRateBps: v34.union([v34.number(), v34.string()]),
1130
1133
  nonce: v34.string()
1131
1134
  })
1132
1135
  });
1133
1136
 
1134
- // src/request/types/sparkMethods/flashnetMethods/intents/routeSwap.ts
1137
+ // src/request/types/sparkMethods/flashnetMethods/intents/createSingleSidedPool.ts
1135
1138
  import * as v35 from "valibot";
1136
- var sparkFlashnetRouteSwapIntentSchema = v35.object({
1137
- type: v35.literal("executeRouteSwap"),
1139
+ var sparkFlashnetCreateSingleSidedPoolIntentSchema = v35.object({
1140
+ type: v35.literal("createSingleSidedPool"),
1138
1141
  data: v35.object({
1139
- userPublicKey: v35.string(),
1140
- initialSparkTransferId: v35.string(),
1141
- hops: v35.array(
1142
- v35.object({
1143
- poolId: v35.string(),
1144
- inputAssetAddress: v35.string(),
1145
- outputAssetAddress: v35.string(),
1146
- hopIntegratorFeeRateBps: v35.optional(v35.union([v35.number(), v35.string()]))
1147
- })
1148
- ),
1149
- inputAmount: v35.string(),
1150
- maxRouteSlippageBps: v35.union([v35.number(), v35.string()]),
1151
- minAmountOut: v35.string(),
1152
- defaultIntegratorFeeRateBps: v35.optional(v35.union([v35.number(), v35.string()])),
1142
+ assetAAddress: v35.string(),
1143
+ assetBAddress: v35.string(),
1144
+ assetAInitialReserve: v35.string(),
1145
+ virtualReserveA: v35.union([v35.number(), v35.string()]),
1146
+ virtualReserveB: v35.union([v35.number(), v35.string()]),
1147
+ threshold: v35.union([v35.number(), v35.string()]),
1148
+ lpFeeRateBps: v35.union([v35.number(), v35.string()]),
1149
+ totalHostFeeRateBps: v35.union([v35.number(), v35.string()]),
1150
+ poolOwnerPublicKey: v35.string(),
1153
1151
  nonce: v35.string()
1154
1152
  })
1155
1153
  });
1156
1154
 
1157
- // src/request/types/sparkMethods/flashnetMethods/intents/swap.ts
1155
+ // src/request/types/sparkMethods/flashnetMethods/intents/removeLiquidity.ts
1158
1156
  import * as v36 from "valibot";
1159
- var sparkFlashnetSwapIntentSchema = v36.object({
1160
- type: v36.literal("executeSwap"),
1157
+ var sparkFlashnetRemoveLiquidityIntentSchema = v36.object({
1158
+ type: v36.literal("removeLiquidity"),
1161
1159
  data: v36.object({
1162
1160
  userPublicKey: v36.string(),
1163
1161
  poolId: v36.string(),
1164
- transferId: v36.string(),
1165
- assetInAddress: v36.string(),
1166
- assetOutAddress: v36.string(),
1167
- amountIn: v36.string(),
1168
- maxSlippageBps: v36.union([v36.number(), v36.string()]),
1169
- minAmountOut: v36.string(),
1170
- totalIntegratorFeeRateBps: v36.optional(v36.union([v36.number(), v36.string()])),
1162
+ lpTokensToRemove: v36.string(),
1171
1163
  nonce: v36.string()
1172
1164
  })
1173
1165
  });
1174
1166
 
1175
- // src/request/types/sparkMethods/flashnetMethods/signIntent.ts
1167
+ // src/request/types/sparkMethods/flashnetMethods/intents/routeSwap.ts
1176
1168
  import * as v37 from "valibot";
1169
+ var sparkFlashnetRouteSwapIntentSchema = v37.object({
1170
+ type: v37.literal("executeRouteSwap"),
1171
+ data: v37.object({
1172
+ userPublicKey: v37.string(),
1173
+ initialSparkTransferId: v37.string(),
1174
+ hops: v37.array(
1175
+ v37.object({
1176
+ poolId: v37.string(),
1177
+ inputAssetAddress: v37.string(),
1178
+ outputAssetAddress: v37.string(),
1179
+ hopIntegratorFeeRateBps: v37.optional(v37.union([v37.number(), v37.string()]))
1180
+ })
1181
+ ),
1182
+ inputAmount: v37.string(),
1183
+ maxRouteSlippageBps: v37.union([v37.number(), v37.string()]),
1184
+ minAmountOut: v37.string(),
1185
+ defaultIntegratorFeeRateBps: v37.optional(v37.union([v37.number(), v37.string()])),
1186
+ nonce: v37.string()
1187
+ })
1188
+ });
1189
+
1190
+ // src/request/types/sparkMethods/flashnetMethods/intents/swap.ts
1191
+ import * as v38 from "valibot";
1192
+ var sparkFlashnetSwapIntentSchema = v38.object({
1193
+ type: v38.literal("executeSwap"),
1194
+ data: v38.object({
1195
+ userPublicKey: v38.string(),
1196
+ poolId: v38.string(),
1197
+ transferId: v38.string(),
1198
+ assetInAddress: v38.string(),
1199
+ assetOutAddress: v38.string(),
1200
+ amountIn: v38.string(),
1201
+ maxSlippageBps: v38.union([v38.number(), v38.string()]),
1202
+ minAmountOut: v38.string(),
1203
+ totalIntegratorFeeRateBps: v38.optional(v38.union([v38.number(), v38.string()])),
1204
+ nonce: v38.string()
1205
+ })
1206
+ });
1207
+
1208
+ // src/request/types/sparkMethods/flashnetMethods/signIntent.ts
1209
+ import * as v39 from "valibot";
1177
1210
  var sparkFlashnetSignIntentMethodName = "spark_flashnet_signIntent";
1178
- var sparkFlashnetSignIntentParamsSchema = v37.union([
1211
+ var sparkFlashnetSignIntentParamsSchema = v39.union([
1179
1212
  sparkFlashnetSwapIntentSchema,
1180
1213
  sparkFlashnetRouteSwapIntentSchema,
1181
1214
  sparkFlashnetAddLiquidityIntentSchema,
@@ -1185,109 +1218,109 @@ var sparkFlashnetSignIntentParamsSchema = v37.union([
1185
1218
  sparkFlashnetCreateSingleSidedPoolIntentSchema,
1186
1219
  sparkFlashnetRemoveLiquidityIntentSchema
1187
1220
  ]);
1188
- var sparkFlashnetSignIntentResultSchema = v37.object({
1221
+ var sparkFlashnetSignIntentResultSchema = v39.object({
1189
1222
  /**
1190
1223
  * The signed intent as a hex string.
1191
1224
  */
1192
- signature: v37.string()
1225
+ signature: v39.string()
1193
1226
  });
1194
- var sparkFlashnetSignIntentRequestMessageSchema = v37.object({
1227
+ var sparkFlashnetSignIntentRequestMessageSchema = v39.object({
1195
1228
  ...rpcRequestMessageSchema.entries,
1196
- ...v37.object({
1197
- method: v37.literal(sparkFlashnetSignIntentMethodName),
1229
+ ...v39.object({
1230
+ method: v39.literal(sparkFlashnetSignIntentMethodName),
1198
1231
  params: sparkFlashnetSignIntentParamsSchema,
1199
- id: v37.string()
1232
+ id: v39.string()
1200
1233
  }).entries
1201
1234
  });
1202
1235
 
1203
1236
  // src/request/types/sparkMethods/flashnetMethods/signStructuredMessage.ts
1204
- import * as v38 from "valibot";
1237
+ import * as v40 from "valibot";
1205
1238
  var sparkFlashnetSignStructuredMessageMethodName = "spark_flashnet_signStructuredMessage";
1206
- var sparkFlashnetSignStructuredMessageParamsSchema = v38.object({
1207
- message: v38.string()
1239
+ var sparkFlashnetSignStructuredMessageParamsSchema = v40.object({
1240
+ message: v40.string()
1208
1241
  });
1209
- var sparkFlashnetSignStructuredMessageResultSchema = v38.object({
1210
- message: v38.string(),
1211
- signature: v38.string()
1242
+ var sparkFlashnetSignStructuredMessageResultSchema = v40.object({
1243
+ message: v40.string(),
1244
+ signature: v40.string()
1212
1245
  });
1213
- var sparkFlashnetSignStructuredMessageRequestMessageSchema = v38.object({
1246
+ var sparkFlashnetSignStructuredMessageRequestMessageSchema = v40.object({
1214
1247
  ...rpcRequestMessageSchema.entries,
1215
- ...v38.object({
1216
- method: v38.literal(sparkFlashnetSignStructuredMessageMethodName),
1248
+ ...v40.object({
1249
+ method: v40.literal(sparkFlashnetSignStructuredMessageMethodName),
1217
1250
  params: sparkFlashnetSignStructuredMessageParamsSchema,
1218
- id: v38.string()
1251
+ id: v40.string()
1219
1252
  }).entries
1220
1253
  });
1221
1254
 
1222
1255
  // src/request/types/sparkMethods/getAddresses.ts
1223
- import * as v39 from "valibot";
1256
+ import * as v41 from "valibot";
1224
1257
  var sparkGetAddressesMethodName = "spark_getAddresses";
1225
- var sparkGetAddressesParamsSchema = v39.nullish(
1226
- v39.object({
1258
+ var sparkGetAddressesParamsSchema = v41.nullish(
1259
+ v41.object({
1227
1260
  /**
1228
1261
  * A message to be displayed to the user in the request prompt.
1229
1262
  */
1230
- message: v39.optional(v39.string())
1263
+ message: v41.optional(v41.string())
1231
1264
  })
1232
1265
  );
1233
- var sparkGetAddressesResultSchema = v39.object({
1266
+ var sparkGetAddressesResultSchema = v41.object({
1234
1267
  /**
1235
1268
  * The addresses generated for the given purposes.
1236
1269
  */
1237
- addresses: v39.array(addressSchema),
1270
+ addresses: v41.array(addressSchema),
1238
1271
  network: getNetworkResultSchema
1239
1272
  });
1240
- var sparkGetAddressesRequestMessageSchema = v39.object({
1273
+ var sparkGetAddressesRequestMessageSchema = v41.object({
1241
1274
  ...rpcRequestMessageSchema.entries,
1242
- ...v39.object({
1243
- method: v39.literal(sparkGetAddressesMethodName),
1275
+ ...v41.object({
1276
+ method: v41.literal(sparkGetAddressesMethodName),
1244
1277
  params: sparkGetAddressesParamsSchema,
1245
- id: v39.string()
1278
+ id: v41.string()
1246
1279
  }).entries
1247
1280
  });
1248
1281
 
1249
1282
  // src/request/types/sparkMethods/getBalance.ts
1250
- import * as v40 from "valibot";
1283
+ import * as v42 from "valibot";
1251
1284
  var sparkGetBalanceMethodName = "spark_getBalance";
1252
- var sparkGetBalanceParamsSchema = v40.nullish(v40.null());
1253
- var sparkGetBalanceResultSchema = v40.object({
1285
+ var sparkGetBalanceParamsSchema = v42.nullish(v42.null());
1286
+ var sparkGetBalanceResultSchema = v42.object({
1254
1287
  /**
1255
1288
  * The Spark Bitcoin address balance in sats in string form.
1256
1289
  */
1257
- balance: v40.string(),
1258
- tokenBalances: v40.array(
1259
- v40.object({
1290
+ balance: v42.string(),
1291
+ tokenBalances: v42.array(
1292
+ v42.object({
1260
1293
  /* The address balance of the token in string form as it can overflow a js number */
1261
- balance: v40.string(),
1262
- tokenMetadata: v40.object({
1263
- tokenIdentifier: v40.string(),
1264
- tokenName: v40.string(),
1265
- tokenTicker: v40.string(),
1266
- decimals: v40.number(),
1267
- maxSupply: v40.string()
1294
+ balance: v42.string(),
1295
+ tokenMetadata: v42.object({
1296
+ tokenIdentifier: v42.string(),
1297
+ tokenName: v42.string(),
1298
+ tokenTicker: v42.string(),
1299
+ decimals: v42.number(),
1300
+ maxSupply: v42.string()
1268
1301
  })
1269
1302
  })
1270
1303
  )
1271
1304
  });
1272
- var sparkGetBalanceRequestMessageSchema = v40.object({
1305
+ var sparkGetBalanceRequestMessageSchema = v42.object({
1273
1306
  ...rpcRequestMessageSchema.entries,
1274
- ...v40.object({
1275
- method: v40.literal(sparkGetBalanceMethodName),
1307
+ ...v42.object({
1308
+ method: v42.literal(sparkGetBalanceMethodName),
1276
1309
  params: sparkGetBalanceParamsSchema,
1277
- id: v40.string()
1310
+ id: v42.string()
1278
1311
  }).entries
1279
1312
  });
1280
1313
 
1281
1314
  // src/request/types/sparkMethods/signMessage.ts
1282
- import * as v41 from "valibot";
1315
+ import * as v43 from "valibot";
1283
1316
  var sparkSignMessageMethodName = "spark_signMessage";
1284
- var sparkSignMessageParamsSchema = v41.object({
1317
+ var sparkSignMessageParamsSchema = v43.object({
1285
1318
  /**
1286
1319
  * The message to sign. The message should only consist of valid UTF-8 characters.
1287
1320
  */
1288
- message: v41.string()
1321
+ message: v43.string()
1289
1322
  });
1290
- var sparkSignMessageResultSchema = v41.object({
1323
+ var sparkSignMessageResultSchema = v43.object({
1291
1324
  /**
1292
1325
  * The signature, encoded in base64, of the message hash.
1293
1326
  *
@@ -1295,98 +1328,98 @@ var sparkSignMessageResultSchema = v41.object({
1295
1328
  * and the resulting byte array is hashed with SHA256 before signing
1296
1329
  * with the private key.
1297
1330
  */
1298
- signature: v41.string()
1331
+ signature: v43.string()
1299
1332
  });
1300
- var sparkSignMessageRequestMessageSchema = v41.object({
1333
+ var sparkSignMessageRequestMessageSchema = v43.object({
1301
1334
  ...rpcRequestMessageSchema.entries,
1302
- ...v41.object({
1303
- method: v41.literal(sparkSignMessageMethodName),
1335
+ ...v43.object({
1336
+ method: v43.literal(sparkSignMessageMethodName),
1304
1337
  params: sparkSignMessageParamsSchema,
1305
- id: v41.string()
1338
+ id: v43.string()
1306
1339
  }).entries
1307
1340
  });
1308
1341
 
1309
1342
  // src/request/types/sparkMethods/transfer.ts
1310
- import * as v42 from "valibot";
1343
+ import * as v44 from "valibot";
1311
1344
  var sparkTransferMethodName = "spark_transfer";
1312
- var sparkTransferParamsSchema = v42.object({
1345
+ var sparkTransferParamsSchema = v44.object({
1313
1346
  /**
1314
1347
  * Amount of SATS to transfer as a string or number.
1315
1348
  */
1316
- amountSats: v42.union([v42.number(), v42.string()]),
1349
+ amountSats: v44.union([v44.number(), v44.string()]),
1317
1350
  /**
1318
1351
  * The recipient's spark address.
1319
1352
  */
1320
- receiverSparkAddress: v42.string()
1353
+ receiverSparkAddress: v44.string()
1321
1354
  });
1322
- var sparkTransferResultSchema = v42.object({
1355
+ var sparkTransferResultSchema = v44.object({
1323
1356
  /**
1324
1357
  * The ID of the transaction.
1325
1358
  */
1326
- id: v42.string()
1359
+ id: v44.string()
1327
1360
  });
1328
- var sparkTransferRequestMessageSchema = v42.object({
1361
+ var sparkTransferRequestMessageSchema = v44.object({
1329
1362
  ...rpcRequestMessageSchema.entries,
1330
- ...v42.object({
1331
- method: v42.literal(sparkTransferMethodName),
1363
+ ...v44.object({
1364
+ method: v44.literal(sparkTransferMethodName),
1332
1365
  params: sparkTransferParamsSchema,
1333
- id: v42.string()
1366
+ id: v44.string()
1334
1367
  }).entries
1335
1368
  });
1336
1369
 
1337
1370
  // src/request/types/sparkMethods/transferToken.ts
1338
- import * as v43 from "valibot";
1371
+ import * as v45 from "valibot";
1339
1372
  var sparkTransferTokenMethodName = "spark_transferToken";
1340
- var sparkTransferTokenParamsSchema = v43.object({
1373
+ var sparkTransferTokenParamsSchema = v45.object({
1341
1374
  /**
1342
1375
  * Amount of units of the token to transfer as a string or number.
1343
1376
  */
1344
- tokenAmount: v43.union([v43.number(), v43.string()]),
1377
+ tokenAmount: v45.union([v45.number(), v45.string()]),
1345
1378
  /**
1346
1379
  * The Bech32m token identifier.
1347
1380
  */
1348
- tokenIdentifier: v43.string(),
1381
+ tokenIdentifier: v45.string(),
1349
1382
  /**
1350
1383
  * The recipient's spark address.
1351
1384
  */
1352
- receiverSparkAddress: v43.string()
1385
+ receiverSparkAddress: v45.string()
1353
1386
  });
1354
- var sparkTransferTokenResultSchema = v43.object({
1387
+ var sparkTransferTokenResultSchema = v45.object({
1355
1388
  /**
1356
1389
  * The ID of the transaction.
1357
1390
  */
1358
- id: v43.string()
1391
+ id: v45.string()
1359
1392
  });
1360
- var sparkTransferTokenRequestMessageSchema = v43.object({
1393
+ var sparkTransferTokenRequestMessageSchema = v45.object({
1361
1394
  ...rpcRequestMessageSchema.entries,
1362
- ...v43.object({
1363
- method: v43.literal(sparkTransferTokenMethodName),
1395
+ ...v45.object({
1396
+ method: v45.literal(sparkTransferTokenMethodName),
1364
1397
  params: sparkTransferTokenParamsSchema,
1365
- id: v43.string()
1398
+ id: v45.string()
1366
1399
  }).entries
1367
1400
  });
1368
1401
 
1369
1402
  // src/request/types/stxMethods/callContract.ts
1370
- import * as v44 from "valibot";
1403
+ import * as v46 from "valibot";
1371
1404
  var stxCallContractMethodName = "stx_callContract";
1372
- var stxCallContractParamsSchema = v44.object({
1405
+ var stxCallContractParamsSchema = v46.object({
1373
1406
  /**
1374
1407
  * The contract principal.
1375
1408
  *
1376
1409
  * E.g. `"SPKE...GD5C.my-contract"`
1377
1410
  */
1378
- contract: v44.string(),
1411
+ contract: v46.string(),
1379
1412
  /**
1380
1413
  * The name of the function to call.
1381
1414
  *
1382
1415
  * Note: spec changes ongoing,
1383
1416
  * https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
1384
1417
  */
1385
- functionName: v44.string(),
1418
+ functionName: v46.string(),
1386
1419
  /**
1387
1420
  * @deprecated in favor of `functionArgs` for @stacks/connect compatibility
1388
1421
  */
1389
- arguments: v44.optional(v44.array(v44.string())),
1422
+ arguments: v46.optional(v46.array(v46.string())),
1390
1423
  /**
1391
1424
  * The function's arguments. The arguments are expected to be hex-encoded
1392
1425
  * strings of Clarity values.
@@ -1401,274 +1434,274 @@ var stxCallContractParamsSchema = v44.object({
1401
1434
  * const hexArgs = functionArgs.map(cvToHex);
1402
1435
  * ```
1403
1436
  */
1404
- functionArgs: v44.optional(v44.array(v44.string())),
1437
+ functionArgs: v46.optional(v46.array(v46.string())),
1405
1438
  /**
1406
1439
  * The post conditions to apply to the contract call.
1407
1440
  */
1408
- postConditions: v44.optional(v44.array(v44.string())),
1441
+ postConditions: v46.optional(v46.array(v46.string())),
1409
1442
  /**
1410
1443
  * The mode to apply to the post conditions.
1411
1444
  */
1412
- postConditionMode: v44.optional(v44.union([v44.literal("allow"), v44.literal("deny")]))
1445
+ postConditionMode: v46.optional(v46.union([v46.literal("allow"), v46.literal("deny")]))
1413
1446
  });
1414
- var stxCallContractResultSchema = v44.object({
1447
+ var stxCallContractResultSchema = v46.object({
1415
1448
  /**
1416
1449
  * The ID of the transaction.
1417
1450
  */
1418
- txid: v44.string(),
1451
+ txid: v46.string(),
1419
1452
  /**
1420
1453
  * A Stacks transaction as a hex-encoded string.
1421
1454
  */
1422
- transaction: v44.string()
1455
+ transaction: v46.string()
1423
1456
  });
1424
- var stxCallContractRequestMessageSchema = v44.object({
1457
+ var stxCallContractRequestMessageSchema = v46.object({
1425
1458
  ...rpcRequestMessageSchema.entries,
1426
- ...v44.object({
1427
- method: v44.literal(stxCallContractMethodName),
1459
+ ...v46.object({
1460
+ method: v46.literal(stxCallContractMethodName),
1428
1461
  params: stxCallContractParamsSchema,
1429
- id: v44.string()
1462
+ id: v46.string()
1430
1463
  }).entries
1431
1464
  });
1432
1465
 
1433
1466
  // src/request/types/stxMethods/deployContract.ts
1434
- import * as v45 from "valibot";
1467
+ import * as v47 from "valibot";
1435
1468
  var stxDeployContractMethodName = "stx_deployContract";
1436
- var stxDeployContractParamsSchema = v45.object({
1469
+ var stxDeployContractParamsSchema = v47.object({
1437
1470
  /**
1438
1471
  * Name of the contract.
1439
1472
  */
1440
- name: v45.string(),
1473
+ name: v47.string(),
1441
1474
  /**
1442
1475
  * The source code of the Clarity contract.
1443
1476
  */
1444
- clarityCode: v45.string(),
1477
+ clarityCode: v47.string(),
1445
1478
  /**
1446
1479
  * The version of the Clarity contract.
1447
1480
  */
1448
- clarityVersion: v45.optional(v45.number()),
1481
+ clarityVersion: v47.optional(v47.number()),
1449
1482
  /**
1450
1483
  * The post conditions to apply to the contract call.
1451
1484
  */
1452
- postConditions: v45.optional(v45.array(v45.string())),
1485
+ postConditions: v47.optional(v47.array(v47.string())),
1453
1486
  /**
1454
1487
  * The mode to apply to the post conditions.
1455
1488
  */
1456
- postConditionMode: v45.optional(v45.union([v45.literal("allow"), v45.literal("deny")]))
1489
+ postConditionMode: v47.optional(v47.union([v47.literal("allow"), v47.literal("deny")]))
1457
1490
  });
1458
- var stxDeployContractResultSchema = v45.object({
1491
+ var stxDeployContractResultSchema = v47.object({
1459
1492
  /**
1460
1493
  * The ID of the transaction.
1461
1494
  */
1462
- txid: v45.string(),
1495
+ txid: v47.string(),
1463
1496
  /**
1464
1497
  * A Stacks transaction as a hex-encoded string.
1465
1498
  */
1466
- transaction: v45.string()
1499
+ transaction: v47.string()
1467
1500
  });
1468
- var stxDeployContractRequestMessageSchema = v45.object({
1501
+ var stxDeployContractRequestMessageSchema = v47.object({
1469
1502
  ...rpcRequestMessageSchema.entries,
1470
- ...v45.object({
1471
- method: v45.literal(stxDeployContractMethodName),
1503
+ ...v47.object({
1504
+ method: v47.literal(stxDeployContractMethodName),
1472
1505
  params: stxDeployContractParamsSchema,
1473
- id: v45.string()
1506
+ id: v47.string()
1474
1507
  }).entries
1475
1508
  });
1476
1509
 
1477
1510
  // src/request/types/stxMethods/getAccounts.ts
1478
- import * as v46 from "valibot";
1511
+ import * as v48 from "valibot";
1479
1512
  var stxGetAccountsMethodName = "stx_getAccounts";
1480
- var stxGetAccountsParamsSchema = v46.nullish(v46.null());
1481
- var stxGetAccountsResultSchema = v46.object({
1513
+ var stxGetAccountsParamsSchema = v48.nullish(v48.null());
1514
+ var stxGetAccountsResultSchema = v48.object({
1482
1515
  /**
1483
1516
  * The addresses generated for the given purposes.
1484
1517
  */
1485
- addresses: v46.array(
1486
- v46.object({
1487
- address: v46.string(),
1488
- publicKey: v46.string(),
1489
- gaiaHubUrl: v46.string(),
1490
- gaiaAppKey: v46.string()
1518
+ addresses: v48.array(
1519
+ v48.object({
1520
+ address: v48.string(),
1521
+ publicKey: v48.string(),
1522
+ gaiaHubUrl: v48.string(),
1523
+ gaiaAppKey: v48.string()
1491
1524
  })
1492
1525
  ),
1493
1526
  network: getNetworkResultSchema
1494
1527
  });
1495
- var stxGetAccountsRequestMessageSchema = v46.object({
1528
+ var stxGetAccountsRequestMessageSchema = v48.object({
1496
1529
  ...rpcRequestMessageSchema.entries,
1497
- ...v46.object({
1498
- method: v46.literal(stxGetAccountsMethodName),
1530
+ ...v48.object({
1531
+ method: v48.literal(stxGetAccountsMethodName),
1499
1532
  params: stxGetAccountsParamsSchema,
1500
- id: v46.string()
1533
+ id: v48.string()
1501
1534
  }).entries
1502
1535
  });
1503
1536
 
1504
1537
  // src/request/types/stxMethods/getAddresses.ts
1505
- import * as v47 from "valibot";
1538
+ import * as v49 from "valibot";
1506
1539
  var stxGetAddressesMethodName = "stx_getAddresses";
1507
- var stxGetAddressesParamsSchema = v47.nullish(
1508
- v47.object({
1540
+ var stxGetAddressesParamsSchema = v49.nullish(
1541
+ v49.object({
1509
1542
  /**
1510
1543
  * A message to be displayed to the user in the request prompt.
1511
1544
  */
1512
- message: v47.optional(v47.string())
1545
+ message: v49.optional(v49.string())
1513
1546
  })
1514
1547
  );
1515
- var stxGetAddressesResultSchema = v47.object({
1548
+ var stxGetAddressesResultSchema = v49.object({
1516
1549
  /**
1517
1550
  * The addresses generated for the given purposes.
1518
1551
  */
1519
- addresses: v47.array(addressSchema),
1552
+ addresses: v49.array(addressSchema),
1520
1553
  network: getNetworkResultSchema
1521
1554
  });
1522
- var stxGetAddressesRequestMessageSchema = v47.object({
1555
+ var stxGetAddressesRequestMessageSchema = v49.object({
1523
1556
  ...rpcRequestMessageSchema.entries,
1524
- ...v47.object({
1525
- method: v47.literal(stxGetAddressesMethodName),
1557
+ ...v49.object({
1558
+ method: v49.literal(stxGetAddressesMethodName),
1526
1559
  params: stxGetAddressesParamsSchema,
1527
- id: v47.string()
1560
+ id: v49.string()
1528
1561
  }).entries
1529
1562
  });
1530
1563
 
1531
1564
  // src/request/types/stxMethods/signMessage.ts
1532
- import * as v48 from "valibot";
1565
+ import * as v50 from "valibot";
1533
1566
  var stxSignMessageMethodName = "stx_signMessage";
1534
- var stxSignMessageParamsSchema = v48.object({
1567
+ var stxSignMessageParamsSchema = v50.object({
1535
1568
  /**
1536
1569
  * The message to sign.
1537
1570
  */
1538
- message: v48.string()
1571
+ message: v50.string()
1539
1572
  });
1540
- var stxSignMessageResultSchema = v48.object({
1573
+ var stxSignMessageResultSchema = v50.object({
1541
1574
  /**
1542
1575
  * The signature of the message.
1543
1576
  */
1544
- signature: v48.string(),
1577
+ signature: v50.string(),
1545
1578
  /**
1546
1579
  * The public key used to sign the message.
1547
1580
  */
1548
- publicKey: v48.string()
1581
+ publicKey: v50.string()
1549
1582
  });
1550
- var stxSignMessageRequestMessageSchema = v48.object({
1583
+ var stxSignMessageRequestMessageSchema = v50.object({
1551
1584
  ...rpcRequestMessageSchema.entries,
1552
- ...v48.object({
1553
- method: v48.literal(stxSignMessageMethodName),
1585
+ ...v50.object({
1586
+ method: v50.literal(stxSignMessageMethodName),
1554
1587
  params: stxSignMessageParamsSchema,
1555
- id: v48.string()
1588
+ id: v50.string()
1556
1589
  }).entries
1557
1590
  });
1558
1591
 
1559
1592
  // src/request/types/stxMethods/signStructuredMessage.ts
1560
- import * as v49 from "valibot";
1593
+ import * as v51 from "valibot";
1561
1594
  var stxSignStructuredMessageMethodName = "stx_signStructuredMessage";
1562
- var stxSignStructuredMessageParamsSchema = v49.object({
1595
+ var stxSignStructuredMessageParamsSchema = v51.object({
1563
1596
  /**
1564
1597
  * The domain to be signed.
1565
1598
  */
1566
- domain: v49.string(),
1599
+ domain: v51.string(),
1567
1600
  /**
1568
1601
  * Message payload to be signed.
1569
1602
  */
1570
- message: v49.string(),
1603
+ message: v51.string(),
1571
1604
  /**
1572
1605
  * The public key to sign the message with.
1573
1606
  */
1574
- publicKey: v49.optional(v49.string())
1607
+ publicKey: v51.optional(v51.string())
1575
1608
  });
1576
- var stxSignStructuredMessageResultSchema = v49.object({
1609
+ var stxSignStructuredMessageResultSchema = v51.object({
1577
1610
  /**
1578
1611
  * Signature of the message.
1579
1612
  */
1580
- signature: v49.string(),
1613
+ signature: v51.string(),
1581
1614
  /**
1582
1615
  * Public key as hex-encoded string.
1583
1616
  */
1584
- publicKey: v49.string()
1617
+ publicKey: v51.string()
1585
1618
  });
1586
- var stxSignStructuredMessageRequestMessageSchema = v49.object({
1619
+ var stxSignStructuredMessageRequestMessageSchema = v51.object({
1587
1620
  ...rpcRequestMessageSchema.entries,
1588
- ...v49.object({
1589
- method: v49.literal(stxSignStructuredMessageMethodName),
1621
+ ...v51.object({
1622
+ method: v51.literal(stxSignStructuredMessageMethodName),
1590
1623
  params: stxSignStructuredMessageParamsSchema,
1591
- id: v49.string()
1624
+ id: v51.string()
1592
1625
  }).entries
1593
1626
  });
1594
1627
 
1595
1628
  // src/request/types/stxMethods/signTransaction.ts
1596
- import * as v50 from "valibot";
1629
+ import * as v52 from "valibot";
1597
1630
  var stxSignTransactionMethodName = "stx_signTransaction";
1598
- var stxSignTransactionParamsSchema = v50.object({
1631
+ var stxSignTransactionParamsSchema = v52.object({
1599
1632
  /**
1600
1633
  * The transaction to sign as a hex-encoded string.
1601
1634
  */
1602
- transaction: v50.string(),
1635
+ transaction: v52.string(),
1603
1636
  /**
1604
1637
  * The public key to sign the transaction with. The wallet may use any key
1605
1638
  * when not provided.
1606
1639
  */
1607
- pubkey: v50.optional(v50.string()),
1640
+ pubkey: v52.optional(v52.string()),
1608
1641
  /**
1609
1642
  * Whether to broadcast the transaction after signing. Defaults to `true`.
1610
1643
  */
1611
- broadcast: v50.optional(v50.boolean())
1644
+ broadcast: v52.optional(v52.boolean())
1612
1645
  });
1613
- var stxSignTransactionResultSchema = v50.object({
1646
+ var stxSignTransactionResultSchema = v52.object({
1614
1647
  /**
1615
1648
  * The signed transaction as a hex-encoded string.
1616
1649
  */
1617
- transaction: v50.string()
1650
+ transaction: v52.string()
1618
1651
  });
1619
- var stxSignTransactionRequestMessageSchema = v50.object({
1652
+ var stxSignTransactionRequestMessageSchema = v52.object({
1620
1653
  ...rpcRequestMessageSchema.entries,
1621
- ...v50.object({
1622
- method: v50.literal(stxSignTransactionMethodName),
1654
+ ...v52.object({
1655
+ method: v52.literal(stxSignTransactionMethodName),
1623
1656
  params: stxSignTransactionParamsSchema,
1624
- id: v50.string()
1657
+ id: v52.string()
1625
1658
  }).entries
1626
1659
  });
1627
1660
 
1628
1661
  // src/request/types/stxMethods/signTransactions.ts
1629
- import * as v51 from "valibot";
1662
+ import * as v53 from "valibot";
1630
1663
  var stxSignTransactionsMethodName = "stx_signTransactions";
1631
- var stxSignTransactionsParamsSchema = v51.object({
1664
+ var stxSignTransactionsParamsSchema = v53.object({
1632
1665
  /**
1633
1666
  * The transactions to sign as hex-encoded strings.
1634
1667
  */
1635
- transactions: v51.pipe(
1636
- v51.array(
1637
- v51.pipe(
1638
- v51.string(),
1639
- v51.check((hex) => {
1668
+ transactions: v53.pipe(
1669
+ v53.array(
1670
+ v53.pipe(
1671
+ v53.string(),
1672
+ v53.check((hex) => {
1640
1673
  return true;
1641
1674
  }, "Invalid hex-encoded Stacks transaction.")
1642
1675
  )
1643
1676
  ),
1644
- v51.minLength(1)
1677
+ v53.minLength(1)
1645
1678
  ),
1646
1679
  /**
1647
1680
  * Whether the signed transactions should be broadcast after signing. Defaults
1648
1681
  * to `true`.
1649
1682
  */
1650
- broadcast: v51.optional(v51.boolean())
1683
+ broadcast: v53.optional(v53.boolean())
1651
1684
  });
1652
- var stxSignTransactionsResultSchema = v51.object({
1685
+ var stxSignTransactionsResultSchema = v53.object({
1653
1686
  /**
1654
1687
  * The signed transactions as hex-encoded strings, in the same order as in the
1655
1688
  * sign request.
1656
1689
  */
1657
- transactions: v51.array(v51.string())
1690
+ transactions: v53.array(v53.string())
1658
1691
  });
1659
- var stxSignTransactionsRequestMessageSchema = v51.object({
1692
+ var stxSignTransactionsRequestMessageSchema = v53.object({
1660
1693
  ...rpcRequestMessageSchema.entries,
1661
- ...v51.object({
1662
- method: v51.literal(stxSignTransactionsMethodName),
1694
+ ...v53.object({
1695
+ method: v53.literal(stxSignTransactionsMethodName),
1663
1696
  params: stxSignTransactionsParamsSchema,
1664
- id: v51.string()
1697
+ id: v53.string()
1665
1698
  }).entries
1666
1699
  });
1667
1700
 
1668
1701
  // src/request/types/stxMethods/transferStx.ts
1669
- import * as v52 from "valibot";
1702
+ import * as v54 from "valibot";
1670
1703
  var stxTransferStxMethodName = "stx_transferStx";
1671
- var stxTransferStxParamsSchema = v52.object({
1704
+ var stxTransferStxParamsSchema = v54.object({
1672
1705
  /**
1673
1706
  * Amount of STX tokens to transfer in microstacks as a string. Anything
1674
1707
  * parseable by `BigInt` is acceptable.
@@ -1681,23 +1714,23 @@ var stxTransferStxParamsSchema = v52.object({
1681
1714
  * const amount3 = '1234';
1682
1715
  * ```
1683
1716
  */
1684
- amount: v52.union([v52.number(), v52.string()]),
1717
+ amount: v54.union([v54.number(), v54.string()]),
1685
1718
  /**
1686
1719
  * The recipient's principal.
1687
1720
  */
1688
- recipient: v52.string(),
1721
+ recipient: v54.string(),
1689
1722
  /**
1690
1723
  * A string representing the memo.
1691
1724
  */
1692
- memo: v52.optional(v52.string()),
1725
+ memo: v54.optional(v54.string()),
1693
1726
  /**
1694
1727
  * Version of parameter format.
1695
1728
  */
1696
- version: v52.optional(v52.string()),
1729
+ version: v54.optional(v54.string()),
1697
1730
  /**
1698
1731
  * The mode of the post conditions.
1699
1732
  */
1700
- postConditionMode: v52.optional(v52.number()),
1733
+ postConditionMode: v54.optional(v54.number()),
1701
1734
  /**
1702
1735
  * A hex-encoded string representing the post conditions.
1703
1736
  *
@@ -1710,29 +1743,29 @@ var stxTransferStxParamsSchema = v52.object({
1710
1743
  * const hexPostCondition = serializePostCondition(postCondition).toString('hex');
1711
1744
  * ```
1712
1745
  */
1713
- postConditions: v52.optional(v52.array(v52.string())),
1746
+ postConditions: v54.optional(v54.array(v54.string())),
1714
1747
  /**
1715
1748
  * The public key to sign the transaction with. The wallet may use any key
1716
1749
  * when not provided.
1717
1750
  */
1718
- pubkey: v52.optional(v52.string())
1751
+ pubkey: v54.optional(v54.string())
1719
1752
  });
1720
- var stxTransferStxResultSchema = v52.object({
1753
+ var stxTransferStxResultSchema = v54.object({
1721
1754
  /**
1722
1755
  * The ID of the transaction.
1723
1756
  */
1724
- txid: v52.string(),
1757
+ txid: v54.string(),
1725
1758
  /**
1726
1759
  * A Stacks transaction as a hex-encoded string.
1727
1760
  */
1728
- transaction: v52.string()
1761
+ transaction: v54.string()
1729
1762
  });
1730
- var stxTransferStxRequestMessageSchema = v52.object({
1763
+ var stxTransferStxRequestMessageSchema = v54.object({
1731
1764
  ...rpcRequestMessageSchema.entries,
1732
- ...v52.object({
1733
- method: v52.literal(stxTransferStxMethodName),
1765
+ ...v54.object({
1766
+ method: v54.literal(stxTransferStxMethodName),
1734
1767
  params: stxTransferStxParamsSchema,
1735
- id: v52.string()
1768
+ id: v54.string()
1736
1769
  }).entries
1737
1770
  });
1738
1771
 
@@ -1740,13 +1773,13 @@ var stxTransferStxRequestMessageSchema = v52.object({
1740
1773
  var cache = {};
1741
1774
  var requestInternal = async (provider, method, params) => {
1742
1775
  const response = await provider.request(method, params);
1743
- if (v53.is(rpcErrorResponseMessageSchema, response)) {
1776
+ if (v55.is(rpcErrorResponseMessageSchema, response)) {
1744
1777
  return {
1745
1778
  status: "error",
1746
1779
  error: response.error
1747
1780
  };
1748
1781
  }
1749
- if (v53.is(rpcSuccessResponseMessageSchema, response)) {
1782
+ if (v55.is(rpcSuccessResponseMessageSchema, response)) {
1750
1783
  return {
1751
1784
  status: "success",
1752
1785
  result: response.result
@@ -2882,6 +2915,14 @@ export {
2882
2915
  isProviderInstalled,
2883
2916
  networkChangeEventName,
2884
2917
  networkChangeSchema,
2918
+ openBridgeMethodName,
2919
+ openBridgeParamsSchema,
2920
+ openBridgeRequestMessageSchema,
2921
+ openBridgeResultSchema,
2922
+ openBuyMethodName,
2923
+ openBuyParamsSchema,
2924
+ openBuyRequestMessageSchema,
2925
+ openBuyResultSchema,
2885
2926
  openReceiveMethodName,
2886
2927
  openReceiveParamsSchema,
2887
2928
  openReceiveRequestMessageSchema,