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