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