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