@sats-connect/core 0.4.2-bfaec4d → 0.4.2-e55c4de

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.js CHANGED
@@ -181,6 +181,10 @@ __export(src_exports, {
181
181
  stxSignTransactionParamsSchema: () => stxSignTransactionParamsSchema,
182
182
  stxSignTransactionRequestMessageSchema: () => stxSignTransactionRequestMessageSchema,
183
183
  stxSignTransactionResultSchema: () => stxSignTransactionResultSchema,
184
+ stxSignTransactionsMethodName: () => stxSignTransactionsMethodName,
185
+ stxSignTransactionsParamsSchema: () => stxSignTransactionsParamsSchema,
186
+ stxSignTransactionsRequestMessageSchema: () => stxSignTransactionsRequestMessageSchema,
187
+ stxSignTransactionsResultSchema: () => stxSignTransactionsResultSchema,
184
188
  stxTransferStxMethodName: () => stxTransferStxMethodName,
185
189
  stxTransferStxParamsSchema: () => stxTransferStxParamsSchema,
186
190
  stxTransferStxRequestMessageSchema: () => stxTransferStxRequestMessageSchema,
@@ -304,7 +308,7 @@ var rpcResponseMessageSchema = v2.union([
304
308
  ]);
305
309
 
306
310
  // src/request/index.ts
307
- var v20 = __toESM(require("valibot"));
311
+ var v21 = __toESM(require("valibot"));
308
312
 
309
313
  // src/request/types/stxMethods/callContract.ts
310
314
  var v3 = __toESM(require("valibot"));
@@ -599,10 +603,50 @@ var stxSignTransactionRequestMessageSchema = v10.object({
599
603
  }).entries
600
604
  });
601
605
 
602
- // src/request/types/stxMethods/transferStx.ts
606
+ // src/request/types/stxMethods/signTransactions.ts
603
607
  var v11 = __toESM(require("valibot"));
608
+ var stxSignTransactionsMethodName = "stx_signTransactions";
609
+ var stxSignTransactionsParamsSchema = v11.object({
610
+ /**
611
+ * The transactions to sign as hex-encoded strings.
612
+ */
613
+ transactions: v11.pipe(
614
+ v11.array(
615
+ v11.pipe(
616
+ v11.string(),
617
+ v11.check((hex) => {
618
+ return true;
619
+ }, "Invalid hex-encoded Stacks transaction.")
620
+ )
621
+ ),
622
+ v11.minLength(1)
623
+ ),
624
+ /**
625
+ * Whether the signed transactions should be broadcast after signing. Defaults
626
+ * to `true`.
627
+ */
628
+ broadcast: v11.optional(v11.boolean())
629
+ });
630
+ var stxSignTransactionsResultSchema = v11.object({
631
+ /**
632
+ * The signed transactions as hex-encoded strings, in the same order as in the
633
+ * sign request.
634
+ */
635
+ transactions: v11.array(v11.string())
636
+ });
637
+ var stxSignTransactionsRequestMessageSchema = v11.object({
638
+ ...rpcRequestMessageSchema.entries,
639
+ ...v11.object({
640
+ method: v11.literal(stxSignTransactionsMethodName),
641
+ params: stxSignTransactionsParamsSchema,
642
+ id: v11.string()
643
+ }).entries
644
+ });
645
+
646
+ // src/request/types/stxMethods/transferStx.ts
647
+ var v12 = __toESM(require("valibot"));
604
648
  var stxTransferStxMethodName = "stx_transferStx";
605
- var stxTransferStxParamsSchema = v11.object({
649
+ var stxTransferStxParamsSchema = v12.object({
606
650
  /**
607
651
  * Amount of STX tokens to transfer in microstacks as a string. Anything
608
652
  * parseable by `BigInt` is acceptable.
@@ -615,23 +659,23 @@ var stxTransferStxParamsSchema = v11.object({
615
659
  * const amount3 = '1234';
616
660
  * ```
617
661
  */
618
- amount: v11.union([v11.number(), v11.string()]),
662
+ amount: v12.union([v12.number(), v12.string()]),
619
663
  /**
620
664
  * The recipeint's principal.
621
665
  */
622
- recipient: v11.string(),
666
+ recipient: v12.string(),
623
667
  /**
624
668
  * A string representing the memo.
625
669
  */
626
- memo: v11.optional(v11.string()),
670
+ memo: v12.optional(v12.string()),
627
671
  /**
628
672
  * Version of parameter format.
629
673
  */
630
- version: v11.optional(v11.string()),
674
+ version: v12.optional(v12.string()),
631
675
  /**
632
676
  * The mode of the post conditions.
633
677
  */
634
- postConditionMode: v11.optional(v11.number()),
678
+ postConditionMode: v12.optional(v12.number()),
635
679
  /**
636
680
  * A hex-encoded string representing the post conditions.
637
681
  *
@@ -644,89 +688,89 @@ var stxTransferStxParamsSchema = v11.object({
644
688
  * const hexPostCondition = serializePostCondition(postCondition).toString('hex');
645
689
  * ```
646
690
  */
647
- postConditions: v11.optional(v11.array(v11.string())),
691
+ postConditions: v12.optional(v12.array(v12.string())),
648
692
  /**
649
693
  * The public key to sign the transaction with. The wallet may use any key
650
694
  * when not provided.
651
695
  */
652
- pubkey: v11.optional(v11.string())
696
+ pubkey: v12.optional(v12.string())
653
697
  });
654
- var stxTransferStxResultSchema = v11.object({
698
+ var stxTransferStxResultSchema = v12.object({
655
699
  /**
656
700
  * The ID of the transaction.
657
701
  */
658
- txid: v11.string(),
702
+ txid: v12.string(),
659
703
  /**
660
704
  * A Stacks transaction as a hex-encoded string.
661
705
  */
662
- transaction: v11.string()
706
+ transaction: v12.string()
663
707
  });
664
- var stxTransferStxRequestMessageSchema = v11.object({
708
+ var stxTransferStxRequestMessageSchema = v12.object({
665
709
  ...rpcRequestMessageSchema.entries,
666
- ...v11.object({
667
- method: v11.literal(stxTransferStxMethodName),
710
+ ...v12.object({
711
+ method: v12.literal(stxTransferStxMethodName),
668
712
  params: stxTransferStxParamsSchema,
669
- id: v11.string()
713
+ id: v12.string()
670
714
  }).entries
671
715
  });
672
716
 
673
717
  // src/request/types/btcMethods.ts
674
- var v13 = __toESM(require("valibot"));
718
+ var v14 = __toESM(require("valibot"));
675
719
 
676
720
  // src/request/types/common.ts
677
- var v12 = __toESM(require("valibot"));
721
+ var v13 = __toESM(require("valibot"));
678
722
  var walletTypes = ["software", "ledger"];
679
- var walletTypeSchema = v12.picklist(walletTypes);
723
+ var walletTypeSchema = v13.picklist(walletTypes);
680
724
 
681
725
  // src/request/types/btcMethods.ts
682
726
  var getInfoMethodName = "getInfo";
683
- var getInfoParamsSchema = v13.nullish(v13.null());
684
- var getInfoResultSchema = v13.object({
727
+ var getInfoParamsSchema = v14.nullish(v14.null());
728
+ var getInfoResultSchema = v14.object({
685
729
  /**
686
730
  * Version of the wallet.
687
731
  */
688
- version: v13.string(),
732
+ version: v14.string(),
689
733
  /**
690
734
  * [WBIP](https://wbips.netlify.app/wbips/WBIP002) methods supported by the wallet.
691
735
  */
692
- methods: v13.optional(v13.array(v13.string())),
736
+ methods: v14.optional(v14.array(v14.string())),
693
737
  /**
694
738
  * List of WBIP standards supported by the wallet. Not currently used.
695
739
  */
696
- supports: v13.array(v13.string())
740
+ supports: v14.array(v14.string())
697
741
  });
698
- var getInfoRequestMessageSchema = v13.object({
742
+ var getInfoRequestMessageSchema = v14.object({
699
743
  ...rpcRequestMessageSchema.entries,
700
- ...v13.object({
701
- method: v13.literal(getInfoMethodName),
744
+ ...v14.object({
745
+ method: v14.literal(getInfoMethodName),
702
746
  params: getInfoParamsSchema,
703
- id: v13.string()
747
+ id: v14.string()
704
748
  }).entries
705
749
  });
706
750
  var getAddressesMethodName = "getAddresses";
707
- var getAddressesParamsSchema = v13.object({
751
+ var getAddressesParamsSchema = v14.object({
708
752
  /**
709
753
  * The purposes for which to generate addresses. See
710
754
  * {@linkcode AddressPurpose} for available purposes.
711
755
  */
712
- purposes: v13.array(v13.enum(AddressPurpose)),
756
+ purposes: v14.array(v14.enum(AddressPurpose)),
713
757
  /**
714
758
  * A message to be displayed to the user in the request prompt.
715
759
  */
716
- message: v13.optional(v13.string())
760
+ message: v14.optional(v14.string())
717
761
  });
718
- var getAddressesResultSchema = v13.object({
762
+ var getAddressesResultSchema = v14.object({
719
763
  /**
720
764
  * The addresses generated for the given purposes.
721
765
  */
722
- addresses: v13.array(addressSchema)
766
+ addresses: v14.array(addressSchema)
723
767
  });
724
- var getAddressesRequestMessageSchema = v13.object({
768
+ var getAddressesRequestMessageSchema = v14.object({
725
769
  ...rpcRequestMessageSchema.entries,
726
- ...v13.object({
727
- method: v13.literal(getAddressesMethodName),
770
+ ...v14.object({
771
+ method: v14.literal(getAddressesMethodName),
728
772
  params: getAddressesParamsSchema,
729
- id: v13.string()
773
+ id: v14.string()
730
774
  }).entries
731
775
  });
732
776
  var signMessageMethodName = "signMessage";
@@ -735,456 +779,456 @@ var MessageSigningProtocols = /* @__PURE__ */ ((MessageSigningProtocols2) => {
735
779
  MessageSigningProtocols2["BIP322"] = "BIP322";
736
780
  return MessageSigningProtocols2;
737
781
  })(MessageSigningProtocols || {});
738
- var signMessageParamsSchema = v13.object({
782
+ var signMessageParamsSchema = v14.object({
739
783
  /**
740
784
  * The address used for signing.
741
785
  **/
742
- address: v13.string(),
786
+ address: v14.string(),
743
787
  /**
744
788
  * The message to sign.
745
789
  **/
746
- message: v13.string(),
790
+ message: v14.string(),
747
791
  /**
748
792
  * The protocol to use for signing the message.
749
793
  */
750
- protocol: v13.optional(v13.enum(MessageSigningProtocols))
794
+ protocol: v14.optional(v14.enum(MessageSigningProtocols))
751
795
  });
752
- var signMessageResultSchema = v13.object({
796
+ var signMessageResultSchema = v14.object({
753
797
  /**
754
798
  * The signature of the message.
755
799
  */
756
- signature: v13.string(),
800
+ signature: v14.string(),
757
801
  /**
758
802
  * hash of the message.
759
803
  */
760
- messageHash: v13.string(),
804
+ messageHash: v14.string(),
761
805
  /**
762
806
  * The address used for signing.
763
807
  */
764
- address: v13.string(),
808
+ address: v14.string(),
765
809
  /**
766
810
  * The protocol to use for signing the message.
767
811
  */
768
- protocol: v13.enum(MessageSigningProtocols)
812
+ protocol: v14.enum(MessageSigningProtocols)
769
813
  });
770
- var signMessageRequestMessageSchema = v13.object({
814
+ var signMessageRequestMessageSchema = v14.object({
771
815
  ...rpcRequestMessageSchema.entries,
772
- ...v13.object({
773
- method: v13.literal(signMessageMethodName),
816
+ ...v14.object({
817
+ method: v14.literal(signMessageMethodName),
774
818
  params: signMessageParamsSchema,
775
- id: v13.string()
819
+ id: v14.string()
776
820
  }).entries
777
821
  });
778
822
  var sendTransferMethodName = "sendTransfer";
779
- var sendTransferParamsSchema = v13.object({
823
+ var sendTransferParamsSchema = v14.object({
780
824
  /**
781
825
  * Array of recipients to send to.
782
826
  * The amount to send to each recipient is in satoshis.
783
827
  */
784
- recipients: v13.array(
785
- v13.object({
786
- address: v13.string(),
787
- amount: v13.number()
828
+ recipients: v14.array(
829
+ v14.object({
830
+ address: v14.string(),
831
+ amount: v14.number()
788
832
  })
789
833
  )
790
834
  });
791
- var sendTransferResultSchema = v13.object({
835
+ var sendTransferResultSchema = v14.object({
792
836
  /**
793
837
  * The transaction id as a hex-encoded string.
794
838
  */
795
- txid: v13.string()
839
+ txid: v14.string()
796
840
  });
797
- var sendTransferRequestMessageSchema = v13.object({
841
+ var sendTransferRequestMessageSchema = v14.object({
798
842
  ...rpcRequestMessageSchema.entries,
799
- ...v13.object({
800
- method: v13.literal(sendTransferMethodName),
843
+ ...v14.object({
844
+ method: v14.literal(sendTransferMethodName),
801
845
  params: sendTransferParamsSchema,
802
- id: v13.string()
846
+ id: v14.string()
803
847
  }).entries
804
848
  });
805
849
  var signPsbtMethodName = "signPsbt";
806
- var signPsbtParamsSchema = v13.object({
850
+ var signPsbtParamsSchema = v14.object({
807
851
  /**
808
852
  * The base64 encoded PSBT to sign.
809
853
  */
810
- psbt: v13.string(),
854
+ psbt: v14.string(),
811
855
  /**
812
856
  * The inputs to sign.
813
857
  * The key is the address and the value is an array of indexes of the inputs to sign.
814
858
  */
815
- signInputs: v13.record(v13.string(), v13.array(v13.number())),
859
+ signInputs: v14.record(v14.string(), v14.array(v14.number())),
816
860
  /**
817
861
  * Whether to broadcast the transaction after signing.
818
862
  **/
819
- broadcast: v13.optional(v13.boolean())
863
+ broadcast: v14.optional(v14.boolean())
820
864
  });
821
- var signPsbtResultSchema = v13.object({
865
+ var signPsbtResultSchema = v14.object({
822
866
  /**
823
867
  * The base64 encoded PSBT after signing.
824
868
  */
825
- psbt: v13.string(),
869
+ psbt: v14.string(),
826
870
  /**
827
871
  * The transaction id as a hex-encoded string.
828
872
  * This is only returned if the transaction was broadcast.
829
873
  **/
830
- txid: v13.optional(v13.string())
874
+ txid: v14.optional(v14.string())
831
875
  });
832
- var signPsbtRequestMessageSchema = v13.object({
876
+ var signPsbtRequestMessageSchema = v14.object({
833
877
  ...rpcRequestMessageSchema.entries,
834
- ...v13.object({
835
- method: v13.literal(signPsbtMethodName),
878
+ ...v14.object({
879
+ method: v14.literal(signPsbtMethodName),
836
880
  params: signPsbtParamsSchema,
837
- id: v13.string()
881
+ id: v14.string()
838
882
  }).entries
839
883
  });
840
884
  var getAccountsMethodName = "getAccounts";
841
- var getAccountsParamsSchema = v13.object({
885
+ var getAccountsParamsSchema = v14.object({
842
886
  /**
843
887
  * The purposes for which to generate addresses. See
844
888
  * {@linkcode AddressPurpose} for available purposes.
845
889
  */
846
- purposes: v13.array(v13.enum(AddressPurpose)),
890
+ purposes: v14.array(v14.enum(AddressPurpose)),
847
891
  /**
848
892
  * A message to be displayed to the user in the request prompt.
849
893
  */
850
- message: v13.optional(v13.string())
894
+ message: v14.optional(v14.string())
851
895
  });
852
- var getAccountsResultSchema = v13.array(
853
- v13.object({
896
+ var getAccountsResultSchema = v14.array(
897
+ v14.object({
854
898
  ...addressSchema.entries,
855
- ...v13.object({
899
+ ...v14.object({
856
900
  walletType: walletTypeSchema
857
901
  }).entries
858
902
  })
859
903
  );
860
- var getAccountsRequestMessageSchema = v13.object({
904
+ var getAccountsRequestMessageSchema = v14.object({
861
905
  ...rpcRequestMessageSchema.entries,
862
- ...v13.object({
863
- method: v13.literal(getAccountsMethodName),
906
+ ...v14.object({
907
+ method: v14.literal(getAccountsMethodName),
864
908
  params: getAccountsParamsSchema,
865
- id: v13.string()
909
+ id: v14.string()
866
910
  }).entries
867
911
  });
868
912
  var getBalanceMethodName = "getBalance";
869
- var getBalanceParamsSchema = v13.nullish(v13.null());
870
- var getBalanceResultSchema = v13.object({
913
+ var getBalanceParamsSchema = v14.nullish(v14.null());
914
+ var getBalanceResultSchema = v14.object({
871
915
  /**
872
916
  * The confirmed balance of the wallet in sats. Using a string due to chrome
873
917
  * messages not supporting bigint
874
918
  * (https://issues.chromium.org/issues/40116184).
875
919
  */
876
- confirmed: v13.string(),
920
+ confirmed: v14.string(),
877
921
  /**
878
922
  * The unconfirmed balance of the wallet in sats. Using a string due to chrome
879
923
  * messages not supporting bigint
880
924
  * (https://issues.chromium.org/issues/40116184).
881
925
  */
882
- unconfirmed: v13.string(),
926
+ unconfirmed: v14.string(),
883
927
  /**
884
928
  * The total balance (both confirmed and unconfrimed UTXOs) of the wallet in
885
929
  * sats. Using a string due to chrome messages not supporting bigint
886
930
  * (https://issues.chromium.org/issues/40116184).
887
931
  */
888
- total: v13.string()
932
+ total: v14.string()
889
933
  });
890
- var getBalanceRequestMessageSchema = v13.object({
934
+ var getBalanceRequestMessageSchema = v14.object({
891
935
  ...rpcRequestMessageSchema.entries,
892
- ...v13.object({
893
- method: v13.literal(getBalanceMethodName),
894
- id: v13.string()
936
+ ...v14.object({
937
+ method: v14.literal(getBalanceMethodName),
938
+ id: v14.string()
895
939
  }).entries
896
940
  });
897
941
 
898
942
  // src/request/types/walletMethods.ts
899
- var v14 = __toESM(require("valibot"));
900
- var accountActionsSchema = v14.object({
901
- read: v14.optional(v14.boolean())
902
- });
903
- var walletActionsSchema = v14.object({});
904
- var accountPermissionSchema = v14.object({
905
- type: v14.literal("account"),
906
- resourceId: v14.string(),
907
- clientId: v14.string(),
943
+ var v15 = __toESM(require("valibot"));
944
+ var accountActionsSchema = v15.object({
945
+ read: v15.optional(v15.boolean())
946
+ });
947
+ var walletActionsSchema = v15.object({});
948
+ var accountPermissionSchema = v15.object({
949
+ type: v15.literal("account"),
950
+ resourceId: v15.string(),
951
+ clientId: v15.string(),
908
952
  actions: accountActionsSchema
909
953
  });
910
- var walletPermissionSchema = v14.object({
911
- type: v14.literal("wallet"),
912
- resourceId: v14.string(),
913
- clientId: v14.string(),
954
+ var walletPermissionSchema = v15.object({
955
+ type: v15.literal("wallet"),
956
+ resourceId: v15.string(),
957
+ clientId: v15.string(),
914
958
  actions: walletActionsSchema
915
959
  });
916
- var PermissionRequestParams = v14.variant("type", [
917
- v14.object({
918
- ...v14.omit(accountPermissionSchema, ["clientId"]).entries
960
+ var PermissionRequestParams = v15.variant("type", [
961
+ v15.object({
962
+ ...v15.omit(accountPermissionSchema, ["clientId"]).entries
919
963
  }),
920
- v14.object({
921
- ...v14.omit(walletPermissionSchema, ["clientId"]).entries
964
+ v15.object({
965
+ ...v15.omit(walletPermissionSchema, ["clientId"]).entries
922
966
  })
923
967
  ]);
924
- var permission = v14.variant("type", [accountPermissionSchema, walletPermissionSchema]);
968
+ var permission = v15.variant("type", [accountPermissionSchema, walletPermissionSchema]);
925
969
  var requestPermissionsMethodName = "wallet_requestPermissions";
926
- var requestPermissionsParamsSchema = v14.nullish(v14.array(PermissionRequestParams));
927
- var requestPermissionsResultSchema = v14.literal(true);
928
- var requestPermissionsRequestMessageSchema = v14.object({
970
+ var requestPermissionsParamsSchema = v15.nullish(v15.array(PermissionRequestParams));
971
+ var requestPermissionsResultSchema = v15.literal(true);
972
+ var requestPermissionsRequestMessageSchema = v15.object({
929
973
  ...rpcRequestMessageSchema.entries,
930
- ...v14.object({
931
- method: v14.literal(requestPermissionsMethodName),
974
+ ...v15.object({
975
+ method: v15.literal(requestPermissionsMethodName),
932
976
  params: requestPermissionsParamsSchema,
933
- id: v14.string()
977
+ id: v15.string()
934
978
  }).entries
935
979
  });
936
980
  var renouncePermissionsMethodName = "wallet_renouncePermissions";
937
- var renouncePermissionsParamsSchema = v14.nullish(v14.null());
938
- var renouncePermissionsResultSchema = v14.nullish(v14.null());
939
- var renouncePermissionsRequestMessageSchema = v14.object({
981
+ var renouncePermissionsParamsSchema = v15.nullish(v15.null());
982
+ var renouncePermissionsResultSchema = v15.nullish(v15.null());
983
+ var renouncePermissionsRequestMessageSchema = v15.object({
940
984
  ...rpcRequestMessageSchema.entries,
941
- ...v14.object({
942
- method: v14.literal(renouncePermissionsMethodName),
985
+ ...v15.object({
986
+ method: v15.literal(renouncePermissionsMethodName),
943
987
  params: renouncePermissionsParamsSchema,
944
- id: v14.string()
988
+ id: v15.string()
945
989
  }).entries
946
990
  });
947
991
  var disconnectMethodName = "wallet_disconnect";
948
- var disconnectParamsSchema = v14.nullish(v14.null());
949
- var disconnectResultSchema = v14.nullish(v14.null());
950
- var disconnectRequestMessageSchema = v14.object({
992
+ var disconnectParamsSchema = v15.nullish(v15.null());
993
+ var disconnectResultSchema = v15.nullish(v15.null());
994
+ var disconnectRequestMessageSchema = v15.object({
951
995
  ...rpcRequestMessageSchema.entries,
952
- ...v14.object({
953
- method: v14.literal(disconnectMethodName),
996
+ ...v15.object({
997
+ method: v15.literal(disconnectMethodName),
954
998
  params: disconnectParamsSchema,
955
- id: v14.string()
999
+ id: v15.string()
956
1000
  }).entries
957
1001
  });
958
1002
  var getWalletTypeMethodName = "wallet_getWalletType";
959
- var getWalletTypeParamsSchema = v14.nullish(v14.null());
1003
+ var getWalletTypeParamsSchema = v15.nullish(v15.null());
960
1004
  var getWalletTypeResultSchema = walletTypeSchema;
961
- var getWalletTypeRequestMessageSchema = v14.object({
1005
+ var getWalletTypeRequestMessageSchema = v15.object({
962
1006
  ...rpcRequestMessageSchema.entries,
963
- ...v14.object({
964
- method: v14.literal(getWalletTypeMethodName),
1007
+ ...v15.object({
1008
+ method: v15.literal(getWalletTypeMethodName),
965
1009
  params: getWalletTypeParamsSchema,
966
- id: v14.string()
1010
+ id: v15.string()
967
1011
  }).entries
968
1012
  });
969
1013
  var getCurrentPermissionsMethodName = "wallet_getCurrentPermissions";
970
- var getCurrentPermissionsParamsSchema = v14.nullish(v14.null());
971
- var getCurrentPermissionsResultSchema = v14.array(permission);
972
- var getCurrentPermissionsRequestMessageSchema = v14.object({
1014
+ var getCurrentPermissionsParamsSchema = v15.nullish(v15.null());
1015
+ var getCurrentPermissionsResultSchema = v15.array(permission);
1016
+ var getCurrentPermissionsRequestMessageSchema = v15.object({
973
1017
  ...rpcRequestMessageSchema.entries,
974
- ...v14.object({
975
- method: v14.literal(getCurrentPermissionsMethodName),
1018
+ ...v15.object({
1019
+ method: v15.literal(getCurrentPermissionsMethodName),
976
1020
  params: getCurrentPermissionsParamsSchema,
977
- id: v14.string()
1021
+ id: v15.string()
978
1022
  }).entries
979
1023
  });
980
1024
  var getAccountMethodName = "wallet_getAccount";
981
- var getAccountParamsSchema = v14.nullish(v14.null());
982
- var getAccountResultSchema = v14.object({
983
- id: v14.string(),
984
- addresses: v14.array(addressSchema),
1025
+ var getAccountParamsSchema = v15.nullish(v15.null());
1026
+ var getAccountResultSchema = v15.object({
1027
+ id: v15.string(),
1028
+ addresses: v15.array(addressSchema),
985
1029
  walletType: walletTypeSchema
986
1030
  });
987
- var getAccountRequestMessageSchema = v14.object({
1031
+ var getAccountRequestMessageSchema = v15.object({
988
1032
  ...rpcRequestMessageSchema.entries,
989
- ...v14.object({
990
- method: v14.literal(getAccountMethodName),
1033
+ ...v15.object({
1034
+ method: v15.literal(getAccountMethodName),
991
1035
  params: getAccountParamsSchema,
992
- id: v14.string()
1036
+ id: v15.string()
993
1037
  }).entries
994
1038
  });
995
1039
  var connectMethodName = "wallet_connect";
996
- var connectParamsSchema = v14.nullish(
997
- v14.object({
998
- permissions: v14.optional(v14.array(PermissionRequestParams)),
999
- addresses: v14.optional(v14.array(v14.enum(AddressPurpose))),
1000
- message: v14.optional(
1001
- v14.pipe(v14.string(), v14.maxLength(80, "The message must not exceed 80 characters."))
1040
+ var connectParamsSchema = v15.nullish(
1041
+ v15.object({
1042
+ permissions: v15.optional(v15.array(PermissionRequestParams)),
1043
+ addresses: v15.optional(v15.array(v15.enum(AddressPurpose))),
1044
+ message: v15.optional(
1045
+ v15.pipe(v15.string(), v15.maxLength(80, "The message must not exceed 80 characters."))
1002
1046
  )
1003
1047
  })
1004
1048
  );
1005
1049
  var connectResultSchema = getAccountResultSchema;
1006
- var connectRequestMessageSchema = v14.object({
1050
+ var connectRequestMessageSchema = v15.object({
1007
1051
  ...rpcRequestMessageSchema.entries,
1008
- ...v14.object({
1009
- method: v14.literal(connectMethodName),
1052
+ ...v15.object({
1053
+ method: v15.literal(connectMethodName),
1010
1054
  params: connectParamsSchema,
1011
- id: v14.string()
1055
+ id: v15.string()
1012
1056
  }).entries
1013
1057
  });
1014
1058
 
1015
1059
  // src/request/types/runesMethods/etch.ts
1016
- var v15 = __toESM(require("valibot"));
1060
+ var v16 = __toESM(require("valibot"));
1017
1061
  var runesEtchMethodName = "runes_etch";
1018
- var etchTermsSchema = v15.object({
1019
- amount: v15.string(),
1020
- cap: v15.string(),
1021
- heightStart: v15.optional(v15.string()),
1022
- heightEnd: v15.optional(v15.string()),
1023
- offsetStart: v15.optional(v15.string()),
1024
- offsetEnd: v15.optional(v15.string())
1025
- });
1026
- var inscriptionDetailsSchema = v15.object({
1027
- contentType: v15.string(),
1028
- contentBase64: v15.string()
1029
- });
1030
- var runesEtchParamsSchema = v15.object({
1031
- runeName: v15.string(),
1032
- divisibility: v15.optional(v15.number()),
1033
- symbol: v15.optional(v15.string()),
1034
- premine: v15.optional(v15.string()),
1035
- isMintable: v15.boolean(),
1036
- delegateInscriptionId: v15.optional(v15.string()),
1037
- destinationAddress: v15.string(),
1038
- refundAddress: v15.string(),
1039
- feeRate: v15.number(),
1040
- appServiceFee: v15.optional(v15.number()),
1041
- appServiceFeeAddress: v15.optional(v15.string()),
1042
- terms: v15.optional(etchTermsSchema),
1043
- inscriptionDetails: v15.optional(inscriptionDetailsSchema),
1044
- network: v15.optional(v15.enum(BitcoinNetworkType))
1045
- });
1046
- var runesEtchResultSchema = v15.object({
1047
- orderId: v15.string(),
1048
- fundTransactionId: v15.string(),
1049
- fundingAddress: v15.string()
1050
- });
1051
- var runesEtchRequestMessageSchema = v15.object({
1062
+ var etchTermsSchema = v16.object({
1063
+ amount: v16.string(),
1064
+ cap: v16.string(),
1065
+ heightStart: v16.optional(v16.string()),
1066
+ heightEnd: v16.optional(v16.string()),
1067
+ offsetStart: v16.optional(v16.string()),
1068
+ offsetEnd: v16.optional(v16.string())
1069
+ });
1070
+ var inscriptionDetailsSchema = v16.object({
1071
+ contentType: v16.string(),
1072
+ contentBase64: v16.string()
1073
+ });
1074
+ var runesEtchParamsSchema = v16.object({
1075
+ runeName: v16.string(),
1076
+ divisibility: v16.optional(v16.number()),
1077
+ symbol: v16.optional(v16.string()),
1078
+ premine: v16.optional(v16.string()),
1079
+ isMintable: v16.boolean(),
1080
+ delegateInscriptionId: v16.optional(v16.string()),
1081
+ destinationAddress: v16.string(),
1082
+ refundAddress: v16.string(),
1083
+ feeRate: v16.number(),
1084
+ appServiceFee: v16.optional(v16.number()),
1085
+ appServiceFeeAddress: v16.optional(v16.string()),
1086
+ terms: v16.optional(etchTermsSchema),
1087
+ inscriptionDetails: v16.optional(inscriptionDetailsSchema),
1088
+ network: v16.optional(v16.enum(BitcoinNetworkType))
1089
+ });
1090
+ var runesEtchResultSchema = v16.object({
1091
+ orderId: v16.string(),
1092
+ fundTransactionId: v16.string(),
1093
+ fundingAddress: v16.string()
1094
+ });
1095
+ var runesEtchRequestMessageSchema = v16.object({
1052
1096
  ...rpcRequestMessageSchema.entries,
1053
- ...v15.object({
1054
- method: v15.literal(runesEtchMethodName),
1097
+ ...v16.object({
1098
+ method: v16.literal(runesEtchMethodName),
1055
1099
  params: runesEtchParamsSchema,
1056
- id: v15.string()
1100
+ id: v16.string()
1057
1101
  }).entries
1058
1102
  });
1059
1103
 
1060
1104
  // src/request/types/runesMethods/getBalance.ts
1061
- var v16 = __toESM(require("valibot"));
1105
+ var v17 = __toESM(require("valibot"));
1062
1106
  var runesGetBalanceMethodName = "runes_getBalance";
1063
- var runesGetBalanceParamsSchema = v16.nullish(v16.null());
1064
- var runesGetBalanceResultSchema = v16.object({
1065
- balances: v16.array(
1066
- v16.object({
1067
- runeName: v16.string(),
1068
- amount: v16.string(),
1069
- divisibility: v16.number(),
1070
- symbol: v16.string(),
1071
- inscriptionId: v16.nullish(v16.string())
1107
+ var runesGetBalanceParamsSchema = v17.nullish(v17.null());
1108
+ var runesGetBalanceResultSchema = v17.object({
1109
+ balances: v17.array(
1110
+ v17.object({
1111
+ runeName: v17.string(),
1112
+ amount: v17.string(),
1113
+ divisibility: v17.number(),
1114
+ symbol: v17.string(),
1115
+ inscriptionId: v17.nullish(v17.string())
1072
1116
  })
1073
1117
  )
1074
1118
  });
1075
- var runesGetBalanceRequestMessageSchema = v16.object({
1119
+ var runesGetBalanceRequestMessageSchema = v17.object({
1076
1120
  ...rpcRequestMessageSchema.entries,
1077
- ...v16.object({
1078
- method: v16.literal(runesGetBalanceMethodName),
1121
+ ...v17.object({
1122
+ method: v17.literal(runesGetBalanceMethodName),
1079
1123
  params: runesGetBalanceParamsSchema,
1080
- id: v16.string()
1124
+ id: v17.string()
1081
1125
  }).entries
1082
1126
  });
1083
1127
 
1084
1128
  // src/request/types/runesMethods/mint.ts
1085
- var v17 = __toESM(require("valibot"));
1129
+ var v18 = __toESM(require("valibot"));
1086
1130
  var runesMintMethodName = "runes_mint";
1087
- var runesMintParamsSchema = v17.object({
1088
- appServiceFee: v17.optional(v17.number()),
1089
- appServiceFeeAddress: v17.optional(v17.string()),
1090
- destinationAddress: v17.string(),
1091
- feeRate: v17.number(),
1092
- refundAddress: v17.string(),
1093
- repeats: v17.number(),
1094
- runeName: v17.string(),
1095
- network: v17.optional(v17.enum(BitcoinNetworkType))
1096
- });
1097
- var runesMintResultSchema = v17.object({
1098
- orderId: v17.string(),
1099
- fundTransactionId: v17.string(),
1100
- fundingAddress: v17.string()
1101
- });
1102
- var runesMintRequestMessageSchema = v17.object({
1131
+ var runesMintParamsSchema = v18.object({
1132
+ appServiceFee: v18.optional(v18.number()),
1133
+ appServiceFeeAddress: v18.optional(v18.string()),
1134
+ destinationAddress: v18.string(),
1135
+ feeRate: v18.number(),
1136
+ refundAddress: v18.string(),
1137
+ repeats: v18.number(),
1138
+ runeName: v18.string(),
1139
+ network: v18.optional(v18.enum(BitcoinNetworkType))
1140
+ });
1141
+ var runesMintResultSchema = v18.object({
1142
+ orderId: v18.string(),
1143
+ fundTransactionId: v18.string(),
1144
+ fundingAddress: v18.string()
1145
+ });
1146
+ var runesMintRequestMessageSchema = v18.object({
1103
1147
  ...rpcRequestMessageSchema.entries,
1104
- ...v17.object({
1105
- method: v17.literal(runesMintMethodName),
1148
+ ...v18.object({
1149
+ method: v18.literal(runesMintMethodName),
1106
1150
  params: runesMintParamsSchema,
1107
- id: v17.string()
1151
+ id: v18.string()
1108
1152
  }).entries
1109
1153
  });
1110
1154
 
1111
1155
  // src/request/types/runesMethods/transfer.ts
1112
- var v18 = __toESM(require("valibot"));
1156
+ var v19 = __toESM(require("valibot"));
1113
1157
  var runesTransferMethodName = "runes_transfer";
1114
- var runesTransferParamsSchema = v18.object({
1115
- recipients: v18.array(
1116
- v18.object({
1117
- runeName: v18.string(),
1118
- amount: v18.string(),
1119
- address: v18.string()
1158
+ var runesTransferParamsSchema = v19.object({
1159
+ recipients: v19.array(
1160
+ v19.object({
1161
+ runeName: v19.string(),
1162
+ amount: v19.string(),
1163
+ address: v19.string()
1120
1164
  })
1121
1165
  )
1122
1166
  });
1123
- var runesTransferResultSchema = v18.object({
1124
- txid: v18.string()
1167
+ var runesTransferResultSchema = v19.object({
1168
+ txid: v19.string()
1125
1169
  });
1126
- var runesTransferRequestMessageSchema = v18.object({
1170
+ var runesTransferRequestMessageSchema = v19.object({
1127
1171
  ...rpcRequestMessageSchema.entries,
1128
- ...v18.object({
1129
- method: v18.literal(runesTransferMethodName),
1172
+ ...v19.object({
1173
+ method: v19.literal(runesTransferMethodName),
1130
1174
  params: runesTransferParamsSchema,
1131
- id: v18.string()
1175
+ id: v19.string()
1132
1176
  }).entries
1133
1177
  });
1134
1178
 
1135
1179
  // src/request/types/ordinalsMethods.ts
1136
- var v19 = __toESM(require("valibot"));
1180
+ var v20 = __toESM(require("valibot"));
1137
1181
  var getInscriptionsMethodName = "ord_getInscriptions";
1138
- var getInscriptionsParamsSchema = v19.object({
1139
- offset: v19.number(),
1140
- limit: v19.number()
1141
- });
1142
- var getInscriptionsResultSchema = v19.object({
1143
- total: v19.number(),
1144
- limit: v19.number(),
1145
- offset: v19.number(),
1146
- inscriptions: v19.array(
1147
- v19.object({
1148
- inscriptionId: v19.string(),
1149
- inscriptionNumber: v19.string(),
1150
- address: v19.string(),
1151
- collectionName: v19.optional(v19.string()),
1152
- postage: v19.string(),
1153
- contentLength: v19.string(),
1154
- contentType: v19.string(),
1155
- timestamp: v19.number(),
1156
- offset: v19.number(),
1157
- genesisTransaction: v19.string(),
1158
- output: v19.string()
1182
+ var getInscriptionsParamsSchema = v20.object({
1183
+ offset: v20.number(),
1184
+ limit: v20.number()
1185
+ });
1186
+ var getInscriptionsResultSchema = v20.object({
1187
+ total: v20.number(),
1188
+ limit: v20.number(),
1189
+ offset: v20.number(),
1190
+ inscriptions: v20.array(
1191
+ v20.object({
1192
+ inscriptionId: v20.string(),
1193
+ inscriptionNumber: v20.string(),
1194
+ address: v20.string(),
1195
+ collectionName: v20.optional(v20.string()),
1196
+ postage: v20.string(),
1197
+ contentLength: v20.string(),
1198
+ contentType: v20.string(),
1199
+ timestamp: v20.number(),
1200
+ offset: v20.number(),
1201
+ genesisTransaction: v20.string(),
1202
+ output: v20.string()
1159
1203
  })
1160
1204
  )
1161
1205
  });
1162
- var getInscriptionsRequestMessageSchema = v19.object({
1206
+ var getInscriptionsRequestMessageSchema = v20.object({
1163
1207
  ...rpcRequestMessageSchema.entries,
1164
- ...v19.object({
1165
- method: v19.literal(getInscriptionsMethodName),
1208
+ ...v20.object({
1209
+ method: v20.literal(getInscriptionsMethodName),
1166
1210
  params: getInscriptionsParamsSchema,
1167
- id: v19.string()
1211
+ id: v20.string()
1168
1212
  }).entries
1169
1213
  });
1170
1214
  var sendInscriptionsMethodName = "ord_sendInscriptions";
1171
- var sendInscriptionsParamsSchema = v19.object({
1172
- transfers: v19.array(
1173
- v19.object({
1174
- address: v19.string(),
1175
- inscriptionId: v19.string()
1215
+ var sendInscriptionsParamsSchema = v20.object({
1216
+ transfers: v20.array(
1217
+ v20.object({
1218
+ address: v20.string(),
1219
+ inscriptionId: v20.string()
1176
1220
  })
1177
1221
  )
1178
1222
  });
1179
- var sendInscriptionsResultSchema = v19.object({
1180
- txid: v19.string()
1223
+ var sendInscriptionsResultSchema = v20.object({
1224
+ txid: v20.string()
1181
1225
  });
1182
- var sendInscriptionsRequestMessageSchema = v19.object({
1226
+ var sendInscriptionsRequestMessageSchema = v20.object({
1183
1227
  ...rpcRequestMessageSchema.entries,
1184
- ...v19.object({
1185
- method: v19.literal(sendInscriptionsMethodName),
1228
+ ...v20.object({
1229
+ method: v20.literal(sendInscriptionsMethodName),
1186
1230
  params: sendInscriptionsParamsSchema,
1187
- id: v19.string()
1231
+ id: v20.string()
1188
1232
  }).entries
1189
1233
  });
1190
1234
 
@@ -1201,13 +1245,13 @@ var request = async (method, params, providerId) => {
1201
1245
  throw new Error("A wallet method is required");
1202
1246
  }
1203
1247
  const response = await provider.request(method, params);
1204
- if (v20.is(rpcErrorResponseMessageSchema, response)) {
1248
+ if (v21.is(rpcErrorResponseMessageSchema, response)) {
1205
1249
  return {
1206
1250
  status: "error",
1207
1251
  error: response.error
1208
1252
  };
1209
1253
  }
1210
- if (v20.is(rpcSuccessResponseMessageSchema, response)) {
1254
+ if (v21.is(rpcSuccessResponseMessageSchema, response)) {
1211
1255
  return {
1212
1256
  status: "success",
1213
1257
  result: response.result
@@ -2299,6 +2343,10 @@ var signMultipleTransactions = async (options) => {
2299
2343
  stxSignTransactionParamsSchema,
2300
2344
  stxSignTransactionRequestMessageSchema,
2301
2345
  stxSignTransactionResultSchema,
2346
+ stxSignTransactionsMethodName,
2347
+ stxSignTransactionsParamsSchema,
2348
+ stxSignTransactionsRequestMessageSchema,
2349
+ stxSignTransactionsResultSchema,
2302
2350
  stxTransferStxMethodName,
2303
2351
  stxTransferStxParamsSchema,
2304
2352
  stxTransferStxRequestMessageSchema,