@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.mjs CHANGED
@@ -109,7 +109,7 @@ var rpcResponseMessageSchema = v2.union([
109
109
  ]);
110
110
 
111
111
  // src/request/index.ts
112
- import * as v20 from "valibot";
112
+ import * as v21 from "valibot";
113
113
 
114
114
  // src/request/types/stxMethods/callContract.ts
115
115
  import * as v3 from "valibot";
@@ -404,10 +404,50 @@ var stxSignTransactionRequestMessageSchema = v10.object({
404
404
  }).entries
405
405
  });
406
406
 
407
- // src/request/types/stxMethods/transferStx.ts
407
+ // src/request/types/stxMethods/signTransactions.ts
408
408
  import * as v11 from "valibot";
409
+ var stxSignTransactionsMethodName = "stx_signTransactions";
410
+ var stxSignTransactionsParamsSchema = v11.object({
411
+ /**
412
+ * The transactions to sign as hex-encoded strings.
413
+ */
414
+ transactions: v11.pipe(
415
+ v11.array(
416
+ v11.pipe(
417
+ v11.string(),
418
+ v11.check((hex) => {
419
+ return true;
420
+ }, "Invalid hex-encoded Stacks transaction.")
421
+ )
422
+ ),
423
+ v11.minLength(1)
424
+ ),
425
+ /**
426
+ * Whether the signed transactions should be broadcast after signing. Defaults
427
+ * to `true`.
428
+ */
429
+ broadcast: v11.optional(v11.boolean())
430
+ });
431
+ var stxSignTransactionsResultSchema = v11.object({
432
+ /**
433
+ * The signed transactions as hex-encoded strings, in the same order as in the
434
+ * sign request.
435
+ */
436
+ transactions: v11.array(v11.string())
437
+ });
438
+ var stxSignTransactionsRequestMessageSchema = v11.object({
439
+ ...rpcRequestMessageSchema.entries,
440
+ ...v11.object({
441
+ method: v11.literal(stxSignTransactionsMethodName),
442
+ params: stxSignTransactionsParamsSchema,
443
+ id: v11.string()
444
+ }).entries
445
+ });
446
+
447
+ // src/request/types/stxMethods/transferStx.ts
448
+ import * as v12 from "valibot";
409
449
  var stxTransferStxMethodName = "stx_transferStx";
410
- var stxTransferStxParamsSchema = v11.object({
450
+ var stxTransferStxParamsSchema = v12.object({
411
451
  /**
412
452
  * Amount of STX tokens to transfer in microstacks as a string. Anything
413
453
  * parseable by `BigInt` is acceptable.
@@ -420,23 +460,23 @@ var stxTransferStxParamsSchema = v11.object({
420
460
  * const amount3 = '1234';
421
461
  * ```
422
462
  */
423
- amount: v11.union([v11.number(), v11.string()]),
463
+ amount: v12.union([v12.number(), v12.string()]),
424
464
  /**
425
465
  * The recipeint's principal.
426
466
  */
427
- recipient: v11.string(),
467
+ recipient: v12.string(),
428
468
  /**
429
469
  * A string representing the memo.
430
470
  */
431
- memo: v11.optional(v11.string()),
471
+ memo: v12.optional(v12.string()),
432
472
  /**
433
473
  * Version of parameter format.
434
474
  */
435
- version: v11.optional(v11.string()),
475
+ version: v12.optional(v12.string()),
436
476
  /**
437
477
  * The mode of the post conditions.
438
478
  */
439
- postConditionMode: v11.optional(v11.number()),
479
+ postConditionMode: v12.optional(v12.number()),
440
480
  /**
441
481
  * A hex-encoded string representing the post conditions.
442
482
  *
@@ -449,89 +489,89 @@ var stxTransferStxParamsSchema = v11.object({
449
489
  * const hexPostCondition = serializePostCondition(postCondition).toString('hex');
450
490
  * ```
451
491
  */
452
- postConditions: v11.optional(v11.array(v11.string())),
492
+ postConditions: v12.optional(v12.array(v12.string())),
453
493
  /**
454
494
  * The public key to sign the transaction with. The wallet may use any key
455
495
  * when not provided.
456
496
  */
457
- pubkey: v11.optional(v11.string())
497
+ pubkey: v12.optional(v12.string())
458
498
  });
459
- var stxTransferStxResultSchema = v11.object({
499
+ var stxTransferStxResultSchema = v12.object({
460
500
  /**
461
501
  * The ID of the transaction.
462
502
  */
463
- txid: v11.string(),
503
+ txid: v12.string(),
464
504
  /**
465
505
  * A Stacks transaction as a hex-encoded string.
466
506
  */
467
- transaction: v11.string()
507
+ transaction: v12.string()
468
508
  });
469
- var stxTransferStxRequestMessageSchema = v11.object({
509
+ var stxTransferStxRequestMessageSchema = v12.object({
470
510
  ...rpcRequestMessageSchema.entries,
471
- ...v11.object({
472
- method: v11.literal(stxTransferStxMethodName),
511
+ ...v12.object({
512
+ method: v12.literal(stxTransferStxMethodName),
473
513
  params: stxTransferStxParamsSchema,
474
- id: v11.string()
514
+ id: v12.string()
475
515
  }).entries
476
516
  });
477
517
 
478
518
  // src/request/types/btcMethods.ts
479
- import * as v13 from "valibot";
519
+ import * as v14 from "valibot";
480
520
 
481
521
  // src/request/types/common.ts
482
- import * as v12 from "valibot";
522
+ import * as v13 from "valibot";
483
523
  var walletTypes = ["software", "ledger"];
484
- var walletTypeSchema = v12.picklist(walletTypes);
524
+ var walletTypeSchema = v13.picklist(walletTypes);
485
525
 
486
526
  // src/request/types/btcMethods.ts
487
527
  var getInfoMethodName = "getInfo";
488
- var getInfoParamsSchema = v13.nullish(v13.null());
489
- var getInfoResultSchema = v13.object({
528
+ var getInfoParamsSchema = v14.nullish(v14.null());
529
+ var getInfoResultSchema = v14.object({
490
530
  /**
491
531
  * Version of the wallet.
492
532
  */
493
- version: v13.string(),
533
+ version: v14.string(),
494
534
  /**
495
535
  * [WBIP](https://wbips.netlify.app/wbips/WBIP002) methods supported by the wallet.
496
536
  */
497
- methods: v13.optional(v13.array(v13.string())),
537
+ methods: v14.optional(v14.array(v14.string())),
498
538
  /**
499
539
  * List of WBIP standards supported by the wallet. Not currently used.
500
540
  */
501
- supports: v13.array(v13.string())
541
+ supports: v14.array(v14.string())
502
542
  });
503
- var getInfoRequestMessageSchema = v13.object({
543
+ var getInfoRequestMessageSchema = v14.object({
504
544
  ...rpcRequestMessageSchema.entries,
505
- ...v13.object({
506
- method: v13.literal(getInfoMethodName),
545
+ ...v14.object({
546
+ method: v14.literal(getInfoMethodName),
507
547
  params: getInfoParamsSchema,
508
- id: v13.string()
548
+ id: v14.string()
509
549
  }).entries
510
550
  });
511
551
  var getAddressesMethodName = "getAddresses";
512
- var getAddressesParamsSchema = v13.object({
552
+ var getAddressesParamsSchema = v14.object({
513
553
  /**
514
554
  * The purposes for which to generate addresses. See
515
555
  * {@linkcode AddressPurpose} for available purposes.
516
556
  */
517
- purposes: v13.array(v13.enum(AddressPurpose)),
557
+ purposes: v14.array(v14.enum(AddressPurpose)),
518
558
  /**
519
559
  * A message to be displayed to the user in the request prompt.
520
560
  */
521
- message: v13.optional(v13.string())
561
+ message: v14.optional(v14.string())
522
562
  });
523
- var getAddressesResultSchema = v13.object({
563
+ var getAddressesResultSchema = v14.object({
524
564
  /**
525
565
  * The addresses generated for the given purposes.
526
566
  */
527
- addresses: v13.array(addressSchema)
567
+ addresses: v14.array(addressSchema)
528
568
  });
529
- var getAddressesRequestMessageSchema = v13.object({
569
+ var getAddressesRequestMessageSchema = v14.object({
530
570
  ...rpcRequestMessageSchema.entries,
531
- ...v13.object({
532
- method: v13.literal(getAddressesMethodName),
571
+ ...v14.object({
572
+ method: v14.literal(getAddressesMethodName),
533
573
  params: getAddressesParamsSchema,
534
- id: v13.string()
574
+ id: v14.string()
535
575
  }).entries
536
576
  });
537
577
  var signMessageMethodName = "signMessage";
@@ -540,456 +580,456 @@ var MessageSigningProtocols = /* @__PURE__ */ ((MessageSigningProtocols2) => {
540
580
  MessageSigningProtocols2["BIP322"] = "BIP322";
541
581
  return MessageSigningProtocols2;
542
582
  })(MessageSigningProtocols || {});
543
- var signMessageParamsSchema = v13.object({
583
+ var signMessageParamsSchema = v14.object({
544
584
  /**
545
585
  * The address used for signing.
546
586
  **/
547
- address: v13.string(),
587
+ address: v14.string(),
548
588
  /**
549
589
  * The message to sign.
550
590
  **/
551
- message: v13.string(),
591
+ message: v14.string(),
552
592
  /**
553
593
  * The protocol to use for signing the message.
554
594
  */
555
- protocol: v13.optional(v13.enum(MessageSigningProtocols))
595
+ protocol: v14.optional(v14.enum(MessageSigningProtocols))
556
596
  });
557
- var signMessageResultSchema = v13.object({
597
+ var signMessageResultSchema = v14.object({
558
598
  /**
559
599
  * The signature of the message.
560
600
  */
561
- signature: v13.string(),
601
+ signature: v14.string(),
562
602
  /**
563
603
  * hash of the message.
564
604
  */
565
- messageHash: v13.string(),
605
+ messageHash: v14.string(),
566
606
  /**
567
607
  * The address used for signing.
568
608
  */
569
- address: v13.string(),
609
+ address: v14.string(),
570
610
  /**
571
611
  * The protocol to use for signing the message.
572
612
  */
573
- protocol: v13.enum(MessageSigningProtocols)
613
+ protocol: v14.enum(MessageSigningProtocols)
574
614
  });
575
- var signMessageRequestMessageSchema = v13.object({
615
+ var signMessageRequestMessageSchema = v14.object({
576
616
  ...rpcRequestMessageSchema.entries,
577
- ...v13.object({
578
- method: v13.literal(signMessageMethodName),
617
+ ...v14.object({
618
+ method: v14.literal(signMessageMethodName),
579
619
  params: signMessageParamsSchema,
580
- id: v13.string()
620
+ id: v14.string()
581
621
  }).entries
582
622
  });
583
623
  var sendTransferMethodName = "sendTransfer";
584
- var sendTransferParamsSchema = v13.object({
624
+ var sendTransferParamsSchema = v14.object({
585
625
  /**
586
626
  * Array of recipients to send to.
587
627
  * The amount to send to each recipient is in satoshis.
588
628
  */
589
- recipients: v13.array(
590
- v13.object({
591
- address: v13.string(),
592
- amount: v13.number()
629
+ recipients: v14.array(
630
+ v14.object({
631
+ address: v14.string(),
632
+ amount: v14.number()
593
633
  })
594
634
  )
595
635
  });
596
- var sendTransferResultSchema = v13.object({
636
+ var sendTransferResultSchema = v14.object({
597
637
  /**
598
638
  * The transaction id as a hex-encoded string.
599
639
  */
600
- txid: v13.string()
640
+ txid: v14.string()
601
641
  });
602
- var sendTransferRequestMessageSchema = v13.object({
642
+ var sendTransferRequestMessageSchema = v14.object({
603
643
  ...rpcRequestMessageSchema.entries,
604
- ...v13.object({
605
- method: v13.literal(sendTransferMethodName),
644
+ ...v14.object({
645
+ method: v14.literal(sendTransferMethodName),
606
646
  params: sendTransferParamsSchema,
607
- id: v13.string()
647
+ id: v14.string()
608
648
  }).entries
609
649
  });
610
650
  var signPsbtMethodName = "signPsbt";
611
- var signPsbtParamsSchema = v13.object({
651
+ var signPsbtParamsSchema = v14.object({
612
652
  /**
613
653
  * The base64 encoded PSBT to sign.
614
654
  */
615
- psbt: v13.string(),
655
+ psbt: v14.string(),
616
656
  /**
617
657
  * The inputs to sign.
618
658
  * The key is the address and the value is an array of indexes of the inputs to sign.
619
659
  */
620
- signInputs: v13.record(v13.string(), v13.array(v13.number())),
660
+ signInputs: v14.record(v14.string(), v14.array(v14.number())),
621
661
  /**
622
662
  * Whether to broadcast the transaction after signing.
623
663
  **/
624
- broadcast: v13.optional(v13.boolean())
664
+ broadcast: v14.optional(v14.boolean())
625
665
  });
626
- var signPsbtResultSchema = v13.object({
666
+ var signPsbtResultSchema = v14.object({
627
667
  /**
628
668
  * The base64 encoded PSBT after signing.
629
669
  */
630
- psbt: v13.string(),
670
+ psbt: v14.string(),
631
671
  /**
632
672
  * The transaction id as a hex-encoded string.
633
673
  * This is only returned if the transaction was broadcast.
634
674
  **/
635
- txid: v13.optional(v13.string())
675
+ txid: v14.optional(v14.string())
636
676
  });
637
- var signPsbtRequestMessageSchema = v13.object({
677
+ var signPsbtRequestMessageSchema = v14.object({
638
678
  ...rpcRequestMessageSchema.entries,
639
- ...v13.object({
640
- method: v13.literal(signPsbtMethodName),
679
+ ...v14.object({
680
+ method: v14.literal(signPsbtMethodName),
641
681
  params: signPsbtParamsSchema,
642
- id: v13.string()
682
+ id: v14.string()
643
683
  }).entries
644
684
  });
645
685
  var getAccountsMethodName = "getAccounts";
646
- var getAccountsParamsSchema = v13.object({
686
+ var getAccountsParamsSchema = v14.object({
647
687
  /**
648
688
  * The purposes for which to generate addresses. See
649
689
  * {@linkcode AddressPurpose} for available purposes.
650
690
  */
651
- purposes: v13.array(v13.enum(AddressPurpose)),
691
+ purposes: v14.array(v14.enum(AddressPurpose)),
652
692
  /**
653
693
  * A message to be displayed to the user in the request prompt.
654
694
  */
655
- message: v13.optional(v13.string())
695
+ message: v14.optional(v14.string())
656
696
  });
657
- var getAccountsResultSchema = v13.array(
658
- v13.object({
697
+ var getAccountsResultSchema = v14.array(
698
+ v14.object({
659
699
  ...addressSchema.entries,
660
- ...v13.object({
700
+ ...v14.object({
661
701
  walletType: walletTypeSchema
662
702
  }).entries
663
703
  })
664
704
  );
665
- var getAccountsRequestMessageSchema = v13.object({
705
+ var getAccountsRequestMessageSchema = v14.object({
666
706
  ...rpcRequestMessageSchema.entries,
667
- ...v13.object({
668
- method: v13.literal(getAccountsMethodName),
707
+ ...v14.object({
708
+ method: v14.literal(getAccountsMethodName),
669
709
  params: getAccountsParamsSchema,
670
- id: v13.string()
710
+ id: v14.string()
671
711
  }).entries
672
712
  });
673
713
  var getBalanceMethodName = "getBalance";
674
- var getBalanceParamsSchema = v13.nullish(v13.null());
675
- var getBalanceResultSchema = v13.object({
714
+ var getBalanceParamsSchema = v14.nullish(v14.null());
715
+ var getBalanceResultSchema = v14.object({
676
716
  /**
677
717
  * The confirmed balance of the wallet in sats. Using a string due to chrome
678
718
  * messages not supporting bigint
679
719
  * (https://issues.chromium.org/issues/40116184).
680
720
  */
681
- confirmed: v13.string(),
721
+ confirmed: v14.string(),
682
722
  /**
683
723
  * The unconfirmed balance of the wallet in sats. Using a string due to chrome
684
724
  * messages not supporting bigint
685
725
  * (https://issues.chromium.org/issues/40116184).
686
726
  */
687
- unconfirmed: v13.string(),
727
+ unconfirmed: v14.string(),
688
728
  /**
689
729
  * The total balance (both confirmed and unconfrimed UTXOs) of the wallet in
690
730
  * sats. Using a string due to chrome messages not supporting bigint
691
731
  * (https://issues.chromium.org/issues/40116184).
692
732
  */
693
- total: v13.string()
733
+ total: v14.string()
694
734
  });
695
- var getBalanceRequestMessageSchema = v13.object({
735
+ var getBalanceRequestMessageSchema = v14.object({
696
736
  ...rpcRequestMessageSchema.entries,
697
- ...v13.object({
698
- method: v13.literal(getBalanceMethodName),
699
- id: v13.string()
737
+ ...v14.object({
738
+ method: v14.literal(getBalanceMethodName),
739
+ id: v14.string()
700
740
  }).entries
701
741
  });
702
742
 
703
743
  // src/request/types/walletMethods.ts
704
- import * as v14 from "valibot";
705
- var accountActionsSchema = v14.object({
706
- read: v14.optional(v14.boolean())
707
- });
708
- var walletActionsSchema = v14.object({});
709
- var accountPermissionSchema = v14.object({
710
- type: v14.literal("account"),
711
- resourceId: v14.string(),
712
- clientId: v14.string(),
744
+ import * as v15 from "valibot";
745
+ var accountActionsSchema = v15.object({
746
+ read: v15.optional(v15.boolean())
747
+ });
748
+ var walletActionsSchema = v15.object({});
749
+ var accountPermissionSchema = v15.object({
750
+ type: v15.literal("account"),
751
+ resourceId: v15.string(),
752
+ clientId: v15.string(),
713
753
  actions: accountActionsSchema
714
754
  });
715
- var walletPermissionSchema = v14.object({
716
- type: v14.literal("wallet"),
717
- resourceId: v14.string(),
718
- clientId: v14.string(),
755
+ var walletPermissionSchema = v15.object({
756
+ type: v15.literal("wallet"),
757
+ resourceId: v15.string(),
758
+ clientId: v15.string(),
719
759
  actions: walletActionsSchema
720
760
  });
721
- var PermissionRequestParams = v14.variant("type", [
722
- v14.object({
723
- ...v14.omit(accountPermissionSchema, ["clientId"]).entries
761
+ var PermissionRequestParams = v15.variant("type", [
762
+ v15.object({
763
+ ...v15.omit(accountPermissionSchema, ["clientId"]).entries
724
764
  }),
725
- v14.object({
726
- ...v14.omit(walletPermissionSchema, ["clientId"]).entries
765
+ v15.object({
766
+ ...v15.omit(walletPermissionSchema, ["clientId"]).entries
727
767
  })
728
768
  ]);
729
- var permission = v14.variant("type", [accountPermissionSchema, walletPermissionSchema]);
769
+ var permission = v15.variant("type", [accountPermissionSchema, walletPermissionSchema]);
730
770
  var requestPermissionsMethodName = "wallet_requestPermissions";
731
- var requestPermissionsParamsSchema = v14.nullish(v14.array(PermissionRequestParams));
732
- var requestPermissionsResultSchema = v14.literal(true);
733
- var requestPermissionsRequestMessageSchema = v14.object({
771
+ var requestPermissionsParamsSchema = v15.nullish(v15.array(PermissionRequestParams));
772
+ var requestPermissionsResultSchema = v15.literal(true);
773
+ var requestPermissionsRequestMessageSchema = v15.object({
734
774
  ...rpcRequestMessageSchema.entries,
735
- ...v14.object({
736
- method: v14.literal(requestPermissionsMethodName),
775
+ ...v15.object({
776
+ method: v15.literal(requestPermissionsMethodName),
737
777
  params: requestPermissionsParamsSchema,
738
- id: v14.string()
778
+ id: v15.string()
739
779
  }).entries
740
780
  });
741
781
  var renouncePermissionsMethodName = "wallet_renouncePermissions";
742
- var renouncePermissionsParamsSchema = v14.nullish(v14.null());
743
- var renouncePermissionsResultSchema = v14.nullish(v14.null());
744
- var renouncePermissionsRequestMessageSchema = v14.object({
782
+ var renouncePermissionsParamsSchema = v15.nullish(v15.null());
783
+ var renouncePermissionsResultSchema = v15.nullish(v15.null());
784
+ var renouncePermissionsRequestMessageSchema = v15.object({
745
785
  ...rpcRequestMessageSchema.entries,
746
- ...v14.object({
747
- method: v14.literal(renouncePermissionsMethodName),
786
+ ...v15.object({
787
+ method: v15.literal(renouncePermissionsMethodName),
748
788
  params: renouncePermissionsParamsSchema,
749
- id: v14.string()
789
+ id: v15.string()
750
790
  }).entries
751
791
  });
752
792
  var disconnectMethodName = "wallet_disconnect";
753
- var disconnectParamsSchema = v14.nullish(v14.null());
754
- var disconnectResultSchema = v14.nullish(v14.null());
755
- var disconnectRequestMessageSchema = v14.object({
793
+ var disconnectParamsSchema = v15.nullish(v15.null());
794
+ var disconnectResultSchema = v15.nullish(v15.null());
795
+ var disconnectRequestMessageSchema = v15.object({
756
796
  ...rpcRequestMessageSchema.entries,
757
- ...v14.object({
758
- method: v14.literal(disconnectMethodName),
797
+ ...v15.object({
798
+ method: v15.literal(disconnectMethodName),
759
799
  params: disconnectParamsSchema,
760
- id: v14.string()
800
+ id: v15.string()
761
801
  }).entries
762
802
  });
763
803
  var getWalletTypeMethodName = "wallet_getWalletType";
764
- var getWalletTypeParamsSchema = v14.nullish(v14.null());
804
+ var getWalletTypeParamsSchema = v15.nullish(v15.null());
765
805
  var getWalletTypeResultSchema = walletTypeSchema;
766
- var getWalletTypeRequestMessageSchema = v14.object({
806
+ var getWalletTypeRequestMessageSchema = v15.object({
767
807
  ...rpcRequestMessageSchema.entries,
768
- ...v14.object({
769
- method: v14.literal(getWalletTypeMethodName),
808
+ ...v15.object({
809
+ method: v15.literal(getWalletTypeMethodName),
770
810
  params: getWalletTypeParamsSchema,
771
- id: v14.string()
811
+ id: v15.string()
772
812
  }).entries
773
813
  });
774
814
  var getCurrentPermissionsMethodName = "wallet_getCurrentPermissions";
775
- var getCurrentPermissionsParamsSchema = v14.nullish(v14.null());
776
- var getCurrentPermissionsResultSchema = v14.array(permission);
777
- var getCurrentPermissionsRequestMessageSchema = v14.object({
815
+ var getCurrentPermissionsParamsSchema = v15.nullish(v15.null());
816
+ var getCurrentPermissionsResultSchema = v15.array(permission);
817
+ var getCurrentPermissionsRequestMessageSchema = v15.object({
778
818
  ...rpcRequestMessageSchema.entries,
779
- ...v14.object({
780
- method: v14.literal(getCurrentPermissionsMethodName),
819
+ ...v15.object({
820
+ method: v15.literal(getCurrentPermissionsMethodName),
781
821
  params: getCurrentPermissionsParamsSchema,
782
- id: v14.string()
822
+ id: v15.string()
783
823
  }).entries
784
824
  });
785
825
  var getAccountMethodName = "wallet_getAccount";
786
- var getAccountParamsSchema = v14.nullish(v14.null());
787
- var getAccountResultSchema = v14.object({
788
- id: v14.string(),
789
- addresses: v14.array(addressSchema),
826
+ var getAccountParamsSchema = v15.nullish(v15.null());
827
+ var getAccountResultSchema = v15.object({
828
+ id: v15.string(),
829
+ addresses: v15.array(addressSchema),
790
830
  walletType: walletTypeSchema
791
831
  });
792
- var getAccountRequestMessageSchema = v14.object({
832
+ var getAccountRequestMessageSchema = v15.object({
793
833
  ...rpcRequestMessageSchema.entries,
794
- ...v14.object({
795
- method: v14.literal(getAccountMethodName),
834
+ ...v15.object({
835
+ method: v15.literal(getAccountMethodName),
796
836
  params: getAccountParamsSchema,
797
- id: v14.string()
837
+ id: v15.string()
798
838
  }).entries
799
839
  });
800
840
  var connectMethodName = "wallet_connect";
801
- var connectParamsSchema = v14.nullish(
802
- v14.object({
803
- permissions: v14.optional(v14.array(PermissionRequestParams)),
804
- addresses: v14.optional(v14.array(v14.enum(AddressPurpose))),
805
- message: v14.optional(
806
- v14.pipe(v14.string(), v14.maxLength(80, "The message must not exceed 80 characters."))
841
+ var connectParamsSchema = v15.nullish(
842
+ v15.object({
843
+ permissions: v15.optional(v15.array(PermissionRequestParams)),
844
+ addresses: v15.optional(v15.array(v15.enum(AddressPurpose))),
845
+ message: v15.optional(
846
+ v15.pipe(v15.string(), v15.maxLength(80, "The message must not exceed 80 characters."))
807
847
  )
808
848
  })
809
849
  );
810
850
  var connectResultSchema = getAccountResultSchema;
811
- var connectRequestMessageSchema = v14.object({
851
+ var connectRequestMessageSchema = v15.object({
812
852
  ...rpcRequestMessageSchema.entries,
813
- ...v14.object({
814
- method: v14.literal(connectMethodName),
853
+ ...v15.object({
854
+ method: v15.literal(connectMethodName),
815
855
  params: connectParamsSchema,
816
- id: v14.string()
856
+ id: v15.string()
817
857
  }).entries
818
858
  });
819
859
 
820
860
  // src/request/types/runesMethods/etch.ts
821
- import * as v15 from "valibot";
861
+ import * as v16 from "valibot";
822
862
  var runesEtchMethodName = "runes_etch";
823
- var etchTermsSchema = v15.object({
824
- amount: v15.string(),
825
- cap: v15.string(),
826
- heightStart: v15.optional(v15.string()),
827
- heightEnd: v15.optional(v15.string()),
828
- offsetStart: v15.optional(v15.string()),
829
- offsetEnd: v15.optional(v15.string())
830
- });
831
- var inscriptionDetailsSchema = v15.object({
832
- contentType: v15.string(),
833
- contentBase64: v15.string()
834
- });
835
- var runesEtchParamsSchema = v15.object({
836
- runeName: v15.string(),
837
- divisibility: v15.optional(v15.number()),
838
- symbol: v15.optional(v15.string()),
839
- premine: v15.optional(v15.string()),
840
- isMintable: v15.boolean(),
841
- delegateInscriptionId: v15.optional(v15.string()),
842
- destinationAddress: v15.string(),
843
- refundAddress: v15.string(),
844
- feeRate: v15.number(),
845
- appServiceFee: v15.optional(v15.number()),
846
- appServiceFeeAddress: v15.optional(v15.string()),
847
- terms: v15.optional(etchTermsSchema),
848
- inscriptionDetails: v15.optional(inscriptionDetailsSchema),
849
- network: v15.optional(v15.enum(BitcoinNetworkType))
850
- });
851
- var runesEtchResultSchema = v15.object({
852
- orderId: v15.string(),
853
- fundTransactionId: v15.string(),
854
- fundingAddress: v15.string()
855
- });
856
- var runesEtchRequestMessageSchema = v15.object({
863
+ var etchTermsSchema = v16.object({
864
+ amount: v16.string(),
865
+ cap: v16.string(),
866
+ heightStart: v16.optional(v16.string()),
867
+ heightEnd: v16.optional(v16.string()),
868
+ offsetStart: v16.optional(v16.string()),
869
+ offsetEnd: v16.optional(v16.string())
870
+ });
871
+ var inscriptionDetailsSchema = v16.object({
872
+ contentType: v16.string(),
873
+ contentBase64: v16.string()
874
+ });
875
+ var runesEtchParamsSchema = v16.object({
876
+ runeName: v16.string(),
877
+ divisibility: v16.optional(v16.number()),
878
+ symbol: v16.optional(v16.string()),
879
+ premine: v16.optional(v16.string()),
880
+ isMintable: v16.boolean(),
881
+ delegateInscriptionId: v16.optional(v16.string()),
882
+ destinationAddress: v16.string(),
883
+ refundAddress: v16.string(),
884
+ feeRate: v16.number(),
885
+ appServiceFee: v16.optional(v16.number()),
886
+ appServiceFeeAddress: v16.optional(v16.string()),
887
+ terms: v16.optional(etchTermsSchema),
888
+ inscriptionDetails: v16.optional(inscriptionDetailsSchema),
889
+ network: v16.optional(v16.enum(BitcoinNetworkType))
890
+ });
891
+ var runesEtchResultSchema = v16.object({
892
+ orderId: v16.string(),
893
+ fundTransactionId: v16.string(),
894
+ fundingAddress: v16.string()
895
+ });
896
+ var runesEtchRequestMessageSchema = v16.object({
857
897
  ...rpcRequestMessageSchema.entries,
858
- ...v15.object({
859
- method: v15.literal(runesEtchMethodName),
898
+ ...v16.object({
899
+ method: v16.literal(runesEtchMethodName),
860
900
  params: runesEtchParamsSchema,
861
- id: v15.string()
901
+ id: v16.string()
862
902
  }).entries
863
903
  });
864
904
 
865
905
  // src/request/types/runesMethods/getBalance.ts
866
- import * as v16 from "valibot";
906
+ import * as v17 from "valibot";
867
907
  var runesGetBalanceMethodName = "runes_getBalance";
868
- var runesGetBalanceParamsSchema = v16.nullish(v16.null());
869
- var runesGetBalanceResultSchema = v16.object({
870
- balances: v16.array(
871
- v16.object({
872
- runeName: v16.string(),
873
- amount: v16.string(),
874
- divisibility: v16.number(),
875
- symbol: v16.string(),
876
- inscriptionId: v16.nullish(v16.string())
908
+ var runesGetBalanceParamsSchema = v17.nullish(v17.null());
909
+ var runesGetBalanceResultSchema = v17.object({
910
+ balances: v17.array(
911
+ v17.object({
912
+ runeName: v17.string(),
913
+ amount: v17.string(),
914
+ divisibility: v17.number(),
915
+ symbol: v17.string(),
916
+ inscriptionId: v17.nullish(v17.string())
877
917
  })
878
918
  )
879
919
  });
880
- var runesGetBalanceRequestMessageSchema = v16.object({
920
+ var runesGetBalanceRequestMessageSchema = v17.object({
881
921
  ...rpcRequestMessageSchema.entries,
882
- ...v16.object({
883
- method: v16.literal(runesGetBalanceMethodName),
922
+ ...v17.object({
923
+ method: v17.literal(runesGetBalanceMethodName),
884
924
  params: runesGetBalanceParamsSchema,
885
- id: v16.string()
925
+ id: v17.string()
886
926
  }).entries
887
927
  });
888
928
 
889
929
  // src/request/types/runesMethods/mint.ts
890
- import * as v17 from "valibot";
930
+ import * as v18 from "valibot";
891
931
  var runesMintMethodName = "runes_mint";
892
- var runesMintParamsSchema = v17.object({
893
- appServiceFee: v17.optional(v17.number()),
894
- appServiceFeeAddress: v17.optional(v17.string()),
895
- destinationAddress: v17.string(),
896
- feeRate: v17.number(),
897
- refundAddress: v17.string(),
898
- repeats: v17.number(),
899
- runeName: v17.string(),
900
- network: v17.optional(v17.enum(BitcoinNetworkType))
901
- });
902
- var runesMintResultSchema = v17.object({
903
- orderId: v17.string(),
904
- fundTransactionId: v17.string(),
905
- fundingAddress: v17.string()
906
- });
907
- var runesMintRequestMessageSchema = v17.object({
932
+ var runesMintParamsSchema = v18.object({
933
+ appServiceFee: v18.optional(v18.number()),
934
+ appServiceFeeAddress: v18.optional(v18.string()),
935
+ destinationAddress: v18.string(),
936
+ feeRate: v18.number(),
937
+ refundAddress: v18.string(),
938
+ repeats: v18.number(),
939
+ runeName: v18.string(),
940
+ network: v18.optional(v18.enum(BitcoinNetworkType))
941
+ });
942
+ var runesMintResultSchema = v18.object({
943
+ orderId: v18.string(),
944
+ fundTransactionId: v18.string(),
945
+ fundingAddress: v18.string()
946
+ });
947
+ var runesMintRequestMessageSchema = v18.object({
908
948
  ...rpcRequestMessageSchema.entries,
909
- ...v17.object({
910
- method: v17.literal(runesMintMethodName),
949
+ ...v18.object({
950
+ method: v18.literal(runesMintMethodName),
911
951
  params: runesMintParamsSchema,
912
- id: v17.string()
952
+ id: v18.string()
913
953
  }).entries
914
954
  });
915
955
 
916
956
  // src/request/types/runesMethods/transfer.ts
917
- import * as v18 from "valibot";
957
+ import * as v19 from "valibot";
918
958
  var runesTransferMethodName = "runes_transfer";
919
- var runesTransferParamsSchema = v18.object({
920
- recipients: v18.array(
921
- v18.object({
922
- runeName: v18.string(),
923
- amount: v18.string(),
924
- address: v18.string()
959
+ var runesTransferParamsSchema = v19.object({
960
+ recipients: v19.array(
961
+ v19.object({
962
+ runeName: v19.string(),
963
+ amount: v19.string(),
964
+ address: v19.string()
925
965
  })
926
966
  )
927
967
  });
928
- var runesTransferResultSchema = v18.object({
929
- txid: v18.string()
968
+ var runesTransferResultSchema = v19.object({
969
+ txid: v19.string()
930
970
  });
931
- var runesTransferRequestMessageSchema = v18.object({
971
+ var runesTransferRequestMessageSchema = v19.object({
932
972
  ...rpcRequestMessageSchema.entries,
933
- ...v18.object({
934
- method: v18.literal(runesTransferMethodName),
973
+ ...v19.object({
974
+ method: v19.literal(runesTransferMethodName),
935
975
  params: runesTransferParamsSchema,
936
- id: v18.string()
976
+ id: v19.string()
937
977
  }).entries
938
978
  });
939
979
 
940
980
  // src/request/types/ordinalsMethods.ts
941
- import * as v19 from "valibot";
981
+ import * as v20 from "valibot";
942
982
  var getInscriptionsMethodName = "ord_getInscriptions";
943
- var getInscriptionsParamsSchema = v19.object({
944
- offset: v19.number(),
945
- limit: v19.number()
946
- });
947
- var getInscriptionsResultSchema = v19.object({
948
- total: v19.number(),
949
- limit: v19.number(),
950
- offset: v19.number(),
951
- inscriptions: v19.array(
952
- v19.object({
953
- inscriptionId: v19.string(),
954
- inscriptionNumber: v19.string(),
955
- address: v19.string(),
956
- collectionName: v19.optional(v19.string()),
957
- postage: v19.string(),
958
- contentLength: v19.string(),
959
- contentType: v19.string(),
960
- timestamp: v19.number(),
961
- offset: v19.number(),
962
- genesisTransaction: v19.string(),
963
- output: v19.string()
983
+ var getInscriptionsParamsSchema = v20.object({
984
+ offset: v20.number(),
985
+ limit: v20.number()
986
+ });
987
+ var getInscriptionsResultSchema = v20.object({
988
+ total: v20.number(),
989
+ limit: v20.number(),
990
+ offset: v20.number(),
991
+ inscriptions: v20.array(
992
+ v20.object({
993
+ inscriptionId: v20.string(),
994
+ inscriptionNumber: v20.string(),
995
+ address: v20.string(),
996
+ collectionName: v20.optional(v20.string()),
997
+ postage: v20.string(),
998
+ contentLength: v20.string(),
999
+ contentType: v20.string(),
1000
+ timestamp: v20.number(),
1001
+ offset: v20.number(),
1002
+ genesisTransaction: v20.string(),
1003
+ output: v20.string()
964
1004
  })
965
1005
  )
966
1006
  });
967
- var getInscriptionsRequestMessageSchema = v19.object({
1007
+ var getInscriptionsRequestMessageSchema = v20.object({
968
1008
  ...rpcRequestMessageSchema.entries,
969
- ...v19.object({
970
- method: v19.literal(getInscriptionsMethodName),
1009
+ ...v20.object({
1010
+ method: v20.literal(getInscriptionsMethodName),
971
1011
  params: getInscriptionsParamsSchema,
972
- id: v19.string()
1012
+ id: v20.string()
973
1013
  }).entries
974
1014
  });
975
1015
  var sendInscriptionsMethodName = "ord_sendInscriptions";
976
- var sendInscriptionsParamsSchema = v19.object({
977
- transfers: v19.array(
978
- v19.object({
979
- address: v19.string(),
980
- inscriptionId: v19.string()
1016
+ var sendInscriptionsParamsSchema = v20.object({
1017
+ transfers: v20.array(
1018
+ v20.object({
1019
+ address: v20.string(),
1020
+ inscriptionId: v20.string()
981
1021
  })
982
1022
  )
983
1023
  });
984
- var sendInscriptionsResultSchema = v19.object({
985
- txid: v19.string()
1024
+ var sendInscriptionsResultSchema = v20.object({
1025
+ txid: v20.string()
986
1026
  });
987
- var sendInscriptionsRequestMessageSchema = v19.object({
1027
+ var sendInscriptionsRequestMessageSchema = v20.object({
988
1028
  ...rpcRequestMessageSchema.entries,
989
- ...v19.object({
990
- method: v19.literal(sendInscriptionsMethodName),
1029
+ ...v20.object({
1030
+ method: v20.literal(sendInscriptionsMethodName),
991
1031
  params: sendInscriptionsParamsSchema,
992
- id: v19.string()
1032
+ id: v20.string()
993
1033
  }).entries
994
1034
  });
995
1035
 
@@ -1006,13 +1046,13 @@ var request = async (method, params, providerId) => {
1006
1046
  throw new Error("A wallet method is required");
1007
1047
  }
1008
1048
  const response = await provider.request(method, params);
1009
- if (v20.is(rpcErrorResponseMessageSchema, response)) {
1049
+ if (v21.is(rpcErrorResponseMessageSchema, response)) {
1010
1050
  return {
1011
1051
  status: "error",
1012
1052
  error: response.error
1013
1053
  };
1014
1054
  }
1015
- if (v20.is(rpcSuccessResponseMessageSchema, response)) {
1055
+ if (v21.is(rpcSuccessResponseMessageSchema, response)) {
1016
1056
  return {
1017
1057
  status: "success",
1018
1058
  result: response.result
@@ -2103,6 +2143,10 @@ export {
2103
2143
  stxSignTransactionParamsSchema,
2104
2144
  stxSignTransactionRequestMessageSchema,
2105
2145
  stxSignTransactionResultSchema,
2146
+ stxSignTransactionsMethodName,
2147
+ stxSignTransactionsParamsSchema,
2148
+ stxSignTransactionsRequestMessageSchema,
2149
+ stxSignTransactionsResultSchema,
2106
2150
  stxTransferStxMethodName,
2107
2151
  stxTransferStxParamsSchema,
2108
2152
  stxTransferStxRequestMessageSchema,