@sats-connect/core 0.4.1-364d53c → 0.4.1-968f02f

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