@sats-connect/core 0.14.0-37f2f13 → 0.14.0-678332e
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 +30 -2
- package/dist/index.d.ts +30 -2
- package/dist/index.js +597 -572
- package/dist/index.mjs +593 -572
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -121,6 +121,10 @@ __export(index_exports, {
|
|
|
121
121
|
isProviderInstalled: () => isProviderInstalled,
|
|
122
122
|
networkChangeEventName: () => networkChangeEventName,
|
|
123
123
|
networkChangeSchema: () => networkChangeSchema,
|
|
124
|
+
openBridgeMethodName: () => openBridgeMethodName,
|
|
125
|
+
openBridgeParamsSchema: () => openBridgeParamsSchema,
|
|
126
|
+
openBridgeRequestMessageSchema: () => openBridgeRequestMessageSchema,
|
|
127
|
+
openBridgeResultSchema: () => openBridgeResultSchema,
|
|
124
128
|
openReceiveMethodName: () => openReceiveMethodName,
|
|
125
129
|
openReceiveParamsSchema: () => openReceiveParamsSchema,
|
|
126
130
|
openReceiveRequestMessageSchema: () => openReceiveRequestMessageSchema,
|
|
@@ -278,7 +282,7 @@ __export(index_exports, {
|
|
|
278
282
|
module.exports = __toCommonJS(index_exports);
|
|
279
283
|
|
|
280
284
|
// src/request/index.ts
|
|
281
|
-
var
|
|
285
|
+
var v54 = __toESM(require("valibot"));
|
|
282
286
|
|
|
283
287
|
// src/provider/types.ts
|
|
284
288
|
var v4 = __toESM(require("valibot"));
|
|
@@ -522,7 +526,7 @@ var sanitizeAddressPurposeRequest = (method, params) => {
|
|
|
522
526
|
};
|
|
523
527
|
|
|
524
528
|
// src/request/types/btcMethods.ts
|
|
525
|
-
var
|
|
529
|
+
var v19 = __toESM(require("valibot"));
|
|
526
530
|
|
|
527
531
|
// src/request/types/walletMethods/addNetwork.ts
|
|
528
532
|
var v5 = __toESM(require("valibot"));
|
|
@@ -744,50 +748,67 @@ var getWalletTypeRequestMessageSchema = v14.object({
|
|
|
744
748
|
}).entries
|
|
745
749
|
});
|
|
746
750
|
|
|
747
|
-
// src/request/types/walletMethods/
|
|
751
|
+
// src/request/types/walletMethods/openBridge.ts
|
|
748
752
|
var v15 = __toESM(require("valibot"));
|
|
749
|
-
var
|
|
750
|
-
var
|
|
751
|
-
|
|
753
|
+
var openBridgeMethodName = "wallet_openBridge";
|
|
754
|
+
var openBridgeParamsSchema = v15.object({
|
|
755
|
+
fromAsset: v15.string(),
|
|
756
|
+
toAsset: v15.string()
|
|
752
757
|
});
|
|
753
|
-
var
|
|
754
|
-
var
|
|
758
|
+
var openBridgeResultSchema = v15.nullish(v15.null());
|
|
759
|
+
var openBridgeRequestMessageSchema = v15.object({
|
|
755
760
|
...rpcRequestMessageSchema.entries,
|
|
756
761
|
...v15.object({
|
|
757
|
-
method: v15.literal(
|
|
758
|
-
params:
|
|
762
|
+
method: v15.literal(openBridgeMethodName),
|
|
763
|
+
params: openBridgeParamsSchema,
|
|
759
764
|
id: v15.string()
|
|
760
765
|
}).entries
|
|
761
766
|
});
|
|
762
767
|
|
|
763
|
-
// src/request/types/walletMethods/
|
|
768
|
+
// src/request/types/walletMethods/openReceive.ts
|
|
764
769
|
var v16 = __toESM(require("valibot"));
|
|
765
|
-
var
|
|
766
|
-
var
|
|
767
|
-
|
|
768
|
-
|
|
770
|
+
var openReceiveMethodName = "wallet_openReceive";
|
|
771
|
+
var openReceiveParamsSchema = v16.object({
|
|
772
|
+
address: v16.string()
|
|
773
|
+
});
|
|
774
|
+
var openReceiveResultSchema = addressSchema;
|
|
775
|
+
var openReceiveRequestMessageSchema = v16.object({
|
|
769
776
|
...rpcRequestMessageSchema.entries,
|
|
770
777
|
...v16.object({
|
|
771
|
-
method: v16.literal(
|
|
772
|
-
params:
|
|
778
|
+
method: v16.literal(openReceiveMethodName),
|
|
779
|
+
params: openReceiveParamsSchema,
|
|
773
780
|
id: v16.string()
|
|
774
781
|
}).entries
|
|
775
782
|
});
|
|
776
783
|
|
|
777
|
-
// src/request/types/walletMethods/
|
|
784
|
+
// src/request/types/walletMethods/renouncePermissions.ts
|
|
778
785
|
var v17 = __toESM(require("valibot"));
|
|
779
|
-
var
|
|
780
|
-
var
|
|
781
|
-
var
|
|
782
|
-
var
|
|
786
|
+
var renouncePermissionsMethodName = "wallet_renouncePermissions";
|
|
787
|
+
var renouncePermissionsParamsSchema = v17.nullish(v17.null());
|
|
788
|
+
var renouncePermissionsResultSchema = v17.nullish(v17.null());
|
|
789
|
+
var renouncePermissionsRequestMessageSchema = v17.object({
|
|
783
790
|
...rpcRequestMessageSchema.entries,
|
|
784
791
|
...v17.object({
|
|
785
|
-
method: v17.literal(
|
|
786
|
-
params:
|
|
792
|
+
method: v17.literal(renouncePermissionsMethodName),
|
|
793
|
+
params: renouncePermissionsParamsSchema,
|
|
787
794
|
id: v17.string()
|
|
788
795
|
}).entries
|
|
789
796
|
});
|
|
790
797
|
|
|
798
|
+
// src/request/types/walletMethods/requestPermissions.ts
|
|
799
|
+
var v18 = __toESM(require("valibot"));
|
|
800
|
+
var requestPermissionsMethodName = "wallet_requestPermissions";
|
|
801
|
+
var requestPermissionsParamsSchema = v18.nullish(v18.array(PermissionRequestParams));
|
|
802
|
+
var requestPermissionsResultSchema = v18.literal(true);
|
|
803
|
+
var requestPermissionsRequestMessageSchema = v18.object({
|
|
804
|
+
...rpcRequestMessageSchema.entries,
|
|
805
|
+
...v18.object({
|
|
806
|
+
method: v18.literal(requestPermissionsMethodName),
|
|
807
|
+
params: requestPermissionsParamsSchema,
|
|
808
|
+
id: v18.string()
|
|
809
|
+
}).entries
|
|
810
|
+
});
|
|
811
|
+
|
|
791
812
|
// src/request/types/btcMethods.ts
|
|
792
813
|
var ProviderPlatform = /* @__PURE__ */ ((ProviderPlatform2) => {
|
|
793
814
|
ProviderPlatform2["Web"] = "web";
|
|
@@ -795,58 +816,58 @@ var ProviderPlatform = /* @__PURE__ */ ((ProviderPlatform2) => {
|
|
|
795
816
|
return ProviderPlatform2;
|
|
796
817
|
})(ProviderPlatform || {});
|
|
797
818
|
var getInfoMethodName = "getInfo";
|
|
798
|
-
var getInfoParamsSchema =
|
|
799
|
-
var getInfoResultSchema =
|
|
819
|
+
var getInfoParamsSchema = v19.nullish(v19.null());
|
|
820
|
+
var getInfoResultSchema = v19.object({
|
|
800
821
|
/**
|
|
801
822
|
* Version of the wallet.
|
|
802
823
|
*/
|
|
803
|
-
version:
|
|
824
|
+
version: v19.string(),
|
|
804
825
|
/**
|
|
805
826
|
* The platform the wallet is running on (web or mobile).
|
|
806
827
|
*/
|
|
807
|
-
platform:
|
|
828
|
+
platform: v19.optional(v19.enum(ProviderPlatform)),
|
|
808
829
|
/**
|
|
809
830
|
* [WBIP](https://wbips.netlify.app/wbips/WBIP002) methods supported by the wallet.
|
|
810
831
|
*/
|
|
811
|
-
methods:
|
|
832
|
+
methods: v19.optional(v19.array(v19.string())),
|
|
812
833
|
/**
|
|
813
834
|
* List of WBIP standards supported by the wallet. Not currently used.
|
|
814
835
|
*/
|
|
815
|
-
supports:
|
|
836
|
+
supports: v19.array(v19.string())
|
|
816
837
|
});
|
|
817
|
-
var getInfoRequestMessageSchema =
|
|
838
|
+
var getInfoRequestMessageSchema = v19.object({
|
|
818
839
|
...rpcRequestMessageSchema.entries,
|
|
819
|
-
...
|
|
820
|
-
method:
|
|
840
|
+
...v19.object({
|
|
841
|
+
method: v19.literal(getInfoMethodName),
|
|
821
842
|
params: getInfoParamsSchema,
|
|
822
|
-
id:
|
|
843
|
+
id: v19.string()
|
|
823
844
|
}).entries
|
|
824
845
|
});
|
|
825
846
|
var getAddressesMethodName = "getAddresses";
|
|
826
|
-
var getAddressesParamsSchema =
|
|
847
|
+
var getAddressesParamsSchema = v19.object({
|
|
827
848
|
/**
|
|
828
849
|
* The purposes for which to generate addresses. See
|
|
829
850
|
* {@linkcode AddressPurpose} for available purposes.
|
|
830
851
|
*/
|
|
831
|
-
purposes:
|
|
852
|
+
purposes: v19.array(v19.enum(AddressPurpose)),
|
|
832
853
|
/**
|
|
833
854
|
* A message to be displayed to the user in the request prompt.
|
|
834
855
|
*/
|
|
835
|
-
message:
|
|
856
|
+
message: v19.optional(v19.string())
|
|
836
857
|
});
|
|
837
|
-
var getAddressesResultSchema =
|
|
858
|
+
var getAddressesResultSchema = v19.object({
|
|
838
859
|
/**
|
|
839
860
|
* The addresses generated for the given purposes.
|
|
840
861
|
*/
|
|
841
|
-
addresses:
|
|
862
|
+
addresses: v19.array(addressSchema),
|
|
842
863
|
network: getNetworkResultSchema
|
|
843
864
|
});
|
|
844
|
-
var getAddressesRequestMessageSchema =
|
|
865
|
+
var getAddressesRequestMessageSchema = v19.object({
|
|
845
866
|
...rpcRequestMessageSchema.entries,
|
|
846
|
-
...
|
|
847
|
-
method:
|
|
867
|
+
...v19.object({
|
|
868
|
+
method: v19.literal(getAddressesMethodName),
|
|
848
869
|
params: getAddressesParamsSchema,
|
|
849
|
-
id:
|
|
870
|
+
id: v19.string()
|
|
850
871
|
}).entries
|
|
851
872
|
});
|
|
852
873
|
var signMessageMethodName = "signMessage";
|
|
@@ -855,606 +876,606 @@ var MessageSigningProtocols = /* @__PURE__ */ ((MessageSigningProtocols2) => {
|
|
|
855
876
|
MessageSigningProtocols2["BIP322"] = "BIP322";
|
|
856
877
|
return MessageSigningProtocols2;
|
|
857
878
|
})(MessageSigningProtocols || {});
|
|
858
|
-
var signMessageParamsSchema =
|
|
879
|
+
var signMessageParamsSchema = v19.object({
|
|
859
880
|
/**
|
|
860
881
|
* The address used for signing.
|
|
861
882
|
**/
|
|
862
|
-
address:
|
|
883
|
+
address: v19.string(),
|
|
863
884
|
/**
|
|
864
885
|
* The message to sign.
|
|
865
886
|
**/
|
|
866
|
-
message:
|
|
887
|
+
message: v19.string(),
|
|
867
888
|
/**
|
|
868
889
|
* The protocol to use for signing the message.
|
|
869
890
|
*/
|
|
870
|
-
protocol:
|
|
891
|
+
protocol: v19.optional(v19.enum(MessageSigningProtocols))
|
|
871
892
|
});
|
|
872
|
-
var signMessageResultSchema =
|
|
893
|
+
var signMessageResultSchema = v19.object({
|
|
873
894
|
/**
|
|
874
895
|
* The signature of the message.
|
|
875
896
|
*/
|
|
876
|
-
signature:
|
|
897
|
+
signature: v19.string(),
|
|
877
898
|
/**
|
|
878
899
|
* hash of the message.
|
|
879
900
|
*/
|
|
880
|
-
messageHash:
|
|
901
|
+
messageHash: v19.string(),
|
|
881
902
|
/**
|
|
882
903
|
* The address used for signing.
|
|
883
904
|
*/
|
|
884
|
-
address:
|
|
905
|
+
address: v19.string(),
|
|
885
906
|
/**
|
|
886
907
|
* The protocol to use for signing the message.
|
|
887
908
|
*/
|
|
888
|
-
protocol:
|
|
909
|
+
protocol: v19.enum(MessageSigningProtocols)
|
|
889
910
|
});
|
|
890
|
-
var signMessageRequestMessageSchema =
|
|
911
|
+
var signMessageRequestMessageSchema = v19.object({
|
|
891
912
|
...rpcRequestMessageSchema.entries,
|
|
892
|
-
...
|
|
893
|
-
method:
|
|
913
|
+
...v19.object({
|
|
914
|
+
method: v19.literal(signMessageMethodName),
|
|
894
915
|
params: signMessageParamsSchema,
|
|
895
|
-
id:
|
|
916
|
+
id: v19.string()
|
|
896
917
|
}).entries
|
|
897
918
|
});
|
|
898
919
|
var sendTransferMethodName = "sendTransfer";
|
|
899
|
-
var sendTransferParamsSchema =
|
|
920
|
+
var sendTransferParamsSchema = v19.object({
|
|
900
921
|
/**
|
|
901
922
|
* Array of recipients to send to.
|
|
902
923
|
* The amount to send to each recipient is in satoshis.
|
|
903
924
|
*/
|
|
904
|
-
recipients:
|
|
905
|
-
|
|
906
|
-
address:
|
|
907
|
-
amount:
|
|
925
|
+
recipients: v19.array(
|
|
926
|
+
v19.object({
|
|
927
|
+
address: v19.string(),
|
|
928
|
+
amount: v19.number()
|
|
908
929
|
})
|
|
909
930
|
)
|
|
910
931
|
});
|
|
911
|
-
var sendTransferResultSchema =
|
|
932
|
+
var sendTransferResultSchema = v19.object({
|
|
912
933
|
/**
|
|
913
934
|
* The transaction id as a hex-encoded string.
|
|
914
935
|
*/
|
|
915
|
-
txid:
|
|
936
|
+
txid: v19.string()
|
|
916
937
|
});
|
|
917
|
-
var sendTransferRequestMessageSchema =
|
|
938
|
+
var sendTransferRequestMessageSchema = v19.object({
|
|
918
939
|
...rpcRequestMessageSchema.entries,
|
|
919
|
-
...
|
|
920
|
-
method:
|
|
940
|
+
...v19.object({
|
|
941
|
+
method: v19.literal(sendTransferMethodName),
|
|
921
942
|
params: sendTransferParamsSchema,
|
|
922
|
-
id:
|
|
943
|
+
id: v19.string()
|
|
923
944
|
}).entries
|
|
924
945
|
});
|
|
925
946
|
var signPsbtMethodName = "signPsbt";
|
|
926
|
-
var signPsbtParamsSchema =
|
|
947
|
+
var signPsbtParamsSchema = v19.object({
|
|
927
948
|
/**
|
|
928
949
|
* The base64 encoded PSBT to sign.
|
|
929
950
|
*/
|
|
930
|
-
psbt:
|
|
951
|
+
psbt: v19.string(),
|
|
931
952
|
/**
|
|
932
953
|
* The inputs to sign.
|
|
933
954
|
* The key is the address and the value is an array of indexes of the inputs to sign.
|
|
934
955
|
*/
|
|
935
|
-
signInputs:
|
|
956
|
+
signInputs: v19.optional(v19.record(v19.string(), v19.array(v19.number()))),
|
|
936
957
|
/**
|
|
937
958
|
* Whether to broadcast the transaction after signing.
|
|
938
959
|
**/
|
|
939
|
-
broadcast:
|
|
960
|
+
broadcast: v19.optional(v19.boolean())
|
|
940
961
|
});
|
|
941
|
-
var signPsbtResultSchema =
|
|
962
|
+
var signPsbtResultSchema = v19.object({
|
|
942
963
|
/**
|
|
943
964
|
* The base64 encoded PSBT after signing.
|
|
944
965
|
*/
|
|
945
|
-
psbt:
|
|
966
|
+
psbt: v19.string(),
|
|
946
967
|
/**
|
|
947
968
|
* The transaction id as a hex-encoded string.
|
|
948
969
|
* This is only returned if the transaction was broadcast.
|
|
949
970
|
**/
|
|
950
|
-
txid:
|
|
971
|
+
txid: v19.optional(v19.string())
|
|
951
972
|
});
|
|
952
|
-
var signPsbtRequestMessageSchema =
|
|
973
|
+
var signPsbtRequestMessageSchema = v19.object({
|
|
953
974
|
...rpcRequestMessageSchema.entries,
|
|
954
|
-
...
|
|
955
|
-
method:
|
|
975
|
+
...v19.object({
|
|
976
|
+
method: v19.literal(signPsbtMethodName),
|
|
956
977
|
params: signPsbtParamsSchema,
|
|
957
|
-
id:
|
|
978
|
+
id: v19.string()
|
|
958
979
|
}).entries
|
|
959
980
|
});
|
|
960
981
|
var getAccountsMethodName = "getAccounts";
|
|
961
|
-
var getAccountsParamsSchema =
|
|
982
|
+
var getAccountsParamsSchema = v19.object({
|
|
962
983
|
/**
|
|
963
984
|
* The purposes for which to generate addresses. See
|
|
964
985
|
* {@linkcode AddressPurpose} for available purposes.
|
|
965
986
|
*/
|
|
966
|
-
purposes:
|
|
987
|
+
purposes: v19.array(v19.enum(AddressPurpose)),
|
|
967
988
|
/**
|
|
968
989
|
* A message to be displayed to the user in the request prompt.
|
|
969
990
|
*/
|
|
970
|
-
message:
|
|
991
|
+
message: v19.optional(v19.string())
|
|
971
992
|
});
|
|
972
|
-
var getAccountsResultSchema =
|
|
973
|
-
|
|
993
|
+
var getAccountsResultSchema = v19.array(
|
|
994
|
+
v19.object({
|
|
974
995
|
...addressSchema.entries,
|
|
975
|
-
...
|
|
996
|
+
...v19.object({
|
|
976
997
|
walletType: walletTypeSchema
|
|
977
998
|
}).entries
|
|
978
999
|
})
|
|
979
1000
|
);
|
|
980
|
-
var getAccountsRequestMessageSchema =
|
|
1001
|
+
var getAccountsRequestMessageSchema = v19.object({
|
|
981
1002
|
...rpcRequestMessageSchema.entries,
|
|
982
|
-
...
|
|
983
|
-
method:
|
|
1003
|
+
...v19.object({
|
|
1004
|
+
method: v19.literal(getAccountsMethodName),
|
|
984
1005
|
params: getAccountsParamsSchema,
|
|
985
|
-
id:
|
|
1006
|
+
id: v19.string()
|
|
986
1007
|
}).entries
|
|
987
1008
|
});
|
|
988
1009
|
var getBalanceMethodName = "getBalance";
|
|
989
|
-
var getBalanceParamsSchema =
|
|
990
|
-
var getBalanceResultSchema =
|
|
1010
|
+
var getBalanceParamsSchema = v19.nullish(v19.null());
|
|
1011
|
+
var getBalanceResultSchema = v19.object({
|
|
991
1012
|
/**
|
|
992
1013
|
* The confirmed balance of the wallet in sats. Using a string due to chrome
|
|
993
1014
|
* messages not supporting bigint
|
|
994
1015
|
* (https://issues.chromium.org/issues/40116184).
|
|
995
1016
|
*/
|
|
996
|
-
confirmed:
|
|
1017
|
+
confirmed: v19.string(),
|
|
997
1018
|
/**
|
|
998
1019
|
* The unconfirmed balance of the wallet in sats. Using a string due to chrome
|
|
999
1020
|
* messages not supporting bigint
|
|
1000
1021
|
* (https://issues.chromium.org/issues/40116184).
|
|
1001
1022
|
*/
|
|
1002
|
-
unconfirmed:
|
|
1023
|
+
unconfirmed: v19.string(),
|
|
1003
1024
|
/**
|
|
1004
1025
|
* The total balance (both confirmed and unconfrimed UTXOs) of the wallet in
|
|
1005
1026
|
* sats. Using a string due to chrome messages not supporting bigint
|
|
1006
1027
|
* (https://issues.chromium.org/issues/40116184).
|
|
1007
1028
|
*/
|
|
1008
|
-
total:
|
|
1029
|
+
total: v19.string()
|
|
1009
1030
|
});
|
|
1010
|
-
var getBalanceRequestMessageSchema =
|
|
1031
|
+
var getBalanceRequestMessageSchema = v19.object({
|
|
1011
1032
|
...rpcRequestMessageSchema.entries,
|
|
1012
|
-
...
|
|
1013
|
-
method:
|
|
1014
|
-
id:
|
|
1033
|
+
...v19.object({
|
|
1034
|
+
method: v19.literal(getBalanceMethodName),
|
|
1035
|
+
id: v19.string()
|
|
1015
1036
|
}).entries
|
|
1016
1037
|
});
|
|
1017
1038
|
|
|
1018
1039
|
// src/request/types/ordinalsMethods.ts
|
|
1019
|
-
var
|
|
1040
|
+
var v20 = __toESM(require("valibot"));
|
|
1020
1041
|
var getInscriptionsMethodName = "ord_getInscriptions";
|
|
1021
|
-
var getInscriptionsParamsSchema =
|
|
1022
|
-
offset:
|
|
1023
|
-
limit:
|
|
1024
|
-
});
|
|
1025
|
-
var getInscriptionsResultSchema =
|
|
1026
|
-
total:
|
|
1027
|
-
limit:
|
|
1028
|
-
offset:
|
|
1029
|
-
inscriptions:
|
|
1030
|
-
|
|
1031
|
-
inscriptionId:
|
|
1032
|
-
inscriptionNumber:
|
|
1033
|
-
address:
|
|
1034
|
-
collectionName:
|
|
1035
|
-
postage:
|
|
1036
|
-
contentLength:
|
|
1037
|
-
contentType:
|
|
1038
|
-
timestamp:
|
|
1039
|
-
offset:
|
|
1040
|
-
genesisTransaction:
|
|
1041
|
-
output:
|
|
1042
|
+
var getInscriptionsParamsSchema = v20.object({
|
|
1043
|
+
offset: v20.number(),
|
|
1044
|
+
limit: v20.number()
|
|
1045
|
+
});
|
|
1046
|
+
var getInscriptionsResultSchema = v20.object({
|
|
1047
|
+
total: v20.number(),
|
|
1048
|
+
limit: v20.number(),
|
|
1049
|
+
offset: v20.number(),
|
|
1050
|
+
inscriptions: v20.array(
|
|
1051
|
+
v20.object({
|
|
1052
|
+
inscriptionId: v20.string(),
|
|
1053
|
+
inscriptionNumber: v20.string(),
|
|
1054
|
+
address: v20.string(),
|
|
1055
|
+
collectionName: v20.optional(v20.string()),
|
|
1056
|
+
postage: v20.string(),
|
|
1057
|
+
contentLength: v20.string(),
|
|
1058
|
+
contentType: v20.string(),
|
|
1059
|
+
timestamp: v20.number(),
|
|
1060
|
+
offset: v20.number(),
|
|
1061
|
+
genesisTransaction: v20.string(),
|
|
1062
|
+
output: v20.string()
|
|
1042
1063
|
})
|
|
1043
1064
|
)
|
|
1044
1065
|
});
|
|
1045
|
-
var getInscriptionsRequestMessageSchema =
|
|
1066
|
+
var getInscriptionsRequestMessageSchema = v20.object({
|
|
1046
1067
|
...rpcRequestMessageSchema.entries,
|
|
1047
|
-
...
|
|
1048
|
-
method:
|
|
1068
|
+
...v20.object({
|
|
1069
|
+
method: v20.literal(getInscriptionsMethodName),
|
|
1049
1070
|
params: getInscriptionsParamsSchema,
|
|
1050
|
-
id:
|
|
1071
|
+
id: v20.string()
|
|
1051
1072
|
}).entries
|
|
1052
1073
|
});
|
|
1053
1074
|
var sendInscriptionsMethodName = "ord_sendInscriptions";
|
|
1054
|
-
var sendInscriptionsParamsSchema =
|
|
1055
|
-
transfers:
|
|
1056
|
-
|
|
1057
|
-
address:
|
|
1058
|
-
inscriptionId:
|
|
1075
|
+
var sendInscriptionsParamsSchema = v20.object({
|
|
1076
|
+
transfers: v20.array(
|
|
1077
|
+
v20.object({
|
|
1078
|
+
address: v20.string(),
|
|
1079
|
+
inscriptionId: v20.string()
|
|
1059
1080
|
})
|
|
1060
1081
|
)
|
|
1061
1082
|
});
|
|
1062
|
-
var sendInscriptionsResultSchema =
|
|
1063
|
-
txid:
|
|
1083
|
+
var sendInscriptionsResultSchema = v20.object({
|
|
1084
|
+
txid: v20.string()
|
|
1064
1085
|
});
|
|
1065
|
-
var sendInscriptionsRequestMessageSchema =
|
|
1086
|
+
var sendInscriptionsRequestMessageSchema = v20.object({
|
|
1066
1087
|
...rpcRequestMessageSchema.entries,
|
|
1067
|
-
...
|
|
1068
|
-
method:
|
|
1088
|
+
...v20.object({
|
|
1089
|
+
method: v20.literal(sendInscriptionsMethodName),
|
|
1069
1090
|
params: sendInscriptionsParamsSchema,
|
|
1070
|
-
id:
|
|
1091
|
+
id: v20.string()
|
|
1071
1092
|
}).entries
|
|
1072
1093
|
});
|
|
1073
1094
|
|
|
1074
1095
|
// src/request/types/runesMethods/etch.ts
|
|
1075
|
-
var
|
|
1096
|
+
var v21 = __toESM(require("valibot"));
|
|
1076
1097
|
var runesEtchMethodName = "runes_etch";
|
|
1077
|
-
var etchTermsSchema =
|
|
1078
|
-
amount:
|
|
1079
|
-
cap:
|
|
1080
|
-
heightStart:
|
|
1081
|
-
heightEnd:
|
|
1082
|
-
offsetStart:
|
|
1083
|
-
offsetEnd:
|
|
1084
|
-
});
|
|
1085
|
-
var inscriptionDetailsSchema =
|
|
1086
|
-
contentType:
|
|
1087
|
-
contentBase64:
|
|
1088
|
-
});
|
|
1089
|
-
var runesEtchParamsSchema =
|
|
1090
|
-
runeName:
|
|
1091
|
-
divisibility:
|
|
1092
|
-
symbol:
|
|
1093
|
-
premine:
|
|
1094
|
-
isMintable:
|
|
1095
|
-
delegateInscriptionId:
|
|
1096
|
-
destinationAddress:
|
|
1097
|
-
refundAddress:
|
|
1098
|
-
feeRate:
|
|
1099
|
-
appServiceFee:
|
|
1100
|
-
appServiceFeeAddress:
|
|
1101
|
-
terms:
|
|
1102
|
-
inscriptionDetails:
|
|
1103
|
-
network:
|
|
1104
|
-
});
|
|
1105
|
-
var runesEtchResultSchema =
|
|
1106
|
-
orderId:
|
|
1107
|
-
fundTransactionId:
|
|
1108
|
-
fundingAddress:
|
|
1109
|
-
});
|
|
1110
|
-
var runesEtchRequestMessageSchema =
|
|
1098
|
+
var etchTermsSchema = v21.object({
|
|
1099
|
+
amount: v21.string(),
|
|
1100
|
+
cap: v21.string(),
|
|
1101
|
+
heightStart: v21.optional(v21.string()),
|
|
1102
|
+
heightEnd: v21.optional(v21.string()),
|
|
1103
|
+
offsetStart: v21.optional(v21.string()),
|
|
1104
|
+
offsetEnd: v21.optional(v21.string())
|
|
1105
|
+
});
|
|
1106
|
+
var inscriptionDetailsSchema = v21.object({
|
|
1107
|
+
contentType: v21.string(),
|
|
1108
|
+
contentBase64: v21.string()
|
|
1109
|
+
});
|
|
1110
|
+
var runesEtchParamsSchema = v21.object({
|
|
1111
|
+
runeName: v21.string(),
|
|
1112
|
+
divisibility: v21.optional(v21.number()),
|
|
1113
|
+
symbol: v21.optional(v21.string()),
|
|
1114
|
+
premine: v21.optional(v21.string()),
|
|
1115
|
+
isMintable: v21.boolean(),
|
|
1116
|
+
delegateInscriptionId: v21.optional(v21.string()),
|
|
1117
|
+
destinationAddress: v21.string(),
|
|
1118
|
+
refundAddress: v21.string(),
|
|
1119
|
+
feeRate: v21.number(),
|
|
1120
|
+
appServiceFee: v21.optional(v21.number()),
|
|
1121
|
+
appServiceFeeAddress: v21.optional(v21.string()),
|
|
1122
|
+
terms: v21.optional(etchTermsSchema),
|
|
1123
|
+
inscriptionDetails: v21.optional(inscriptionDetailsSchema),
|
|
1124
|
+
network: v21.optional(v21.enum(BitcoinNetworkType))
|
|
1125
|
+
});
|
|
1126
|
+
var runesEtchResultSchema = v21.object({
|
|
1127
|
+
orderId: v21.string(),
|
|
1128
|
+
fundTransactionId: v21.string(),
|
|
1129
|
+
fundingAddress: v21.string()
|
|
1130
|
+
});
|
|
1131
|
+
var runesEtchRequestMessageSchema = v21.object({
|
|
1111
1132
|
...rpcRequestMessageSchema.entries,
|
|
1112
|
-
...
|
|
1113
|
-
method:
|
|
1133
|
+
...v21.object({
|
|
1134
|
+
method: v21.literal(runesEtchMethodName),
|
|
1114
1135
|
params: runesEtchParamsSchema,
|
|
1115
|
-
id:
|
|
1136
|
+
id: v21.string()
|
|
1116
1137
|
}).entries
|
|
1117
1138
|
});
|
|
1118
1139
|
|
|
1119
1140
|
// src/request/types/runesMethods/getBalance.ts
|
|
1120
|
-
var
|
|
1141
|
+
var v22 = __toESM(require("valibot"));
|
|
1121
1142
|
var runesGetBalanceMethodName = "runes_getBalance";
|
|
1122
|
-
var runesGetBalanceParamsSchema =
|
|
1123
|
-
var runesGetBalanceResultSchema =
|
|
1124
|
-
balances:
|
|
1125
|
-
|
|
1126
|
-
runeName:
|
|
1127
|
-
amount:
|
|
1128
|
-
divisibility:
|
|
1129
|
-
symbol:
|
|
1130
|
-
inscriptionId:
|
|
1131
|
-
spendableBalance:
|
|
1143
|
+
var runesGetBalanceParamsSchema = v22.nullish(v22.null());
|
|
1144
|
+
var runesGetBalanceResultSchema = v22.object({
|
|
1145
|
+
balances: v22.array(
|
|
1146
|
+
v22.object({
|
|
1147
|
+
runeName: v22.string(),
|
|
1148
|
+
amount: v22.string(),
|
|
1149
|
+
divisibility: v22.number(),
|
|
1150
|
+
symbol: v22.string(),
|
|
1151
|
+
inscriptionId: v22.nullish(v22.string()),
|
|
1152
|
+
spendableBalance: v22.string()
|
|
1132
1153
|
})
|
|
1133
1154
|
)
|
|
1134
1155
|
});
|
|
1135
|
-
var runesGetBalanceRequestMessageSchema =
|
|
1156
|
+
var runesGetBalanceRequestMessageSchema = v22.object({
|
|
1136
1157
|
...rpcRequestMessageSchema.entries,
|
|
1137
|
-
...
|
|
1138
|
-
method:
|
|
1158
|
+
...v22.object({
|
|
1159
|
+
method: v22.literal(runesGetBalanceMethodName),
|
|
1139
1160
|
params: runesGetBalanceParamsSchema,
|
|
1140
|
-
id:
|
|
1161
|
+
id: v22.string()
|
|
1141
1162
|
}).entries
|
|
1142
1163
|
});
|
|
1143
1164
|
|
|
1144
1165
|
// src/request/types/runesMethods/mint.ts
|
|
1145
|
-
var
|
|
1166
|
+
var v23 = __toESM(require("valibot"));
|
|
1146
1167
|
var runesMintMethodName = "runes_mint";
|
|
1147
|
-
var runesMintParamsSchema =
|
|
1148
|
-
appServiceFee:
|
|
1149
|
-
appServiceFeeAddress:
|
|
1150
|
-
destinationAddress:
|
|
1151
|
-
feeRate:
|
|
1152
|
-
refundAddress:
|
|
1153
|
-
repeats:
|
|
1154
|
-
runeName:
|
|
1155
|
-
network:
|
|
1156
|
-
});
|
|
1157
|
-
var runesMintResultSchema =
|
|
1158
|
-
orderId:
|
|
1159
|
-
fundTransactionId:
|
|
1160
|
-
fundingAddress:
|
|
1161
|
-
});
|
|
1162
|
-
var runesMintRequestMessageSchema =
|
|
1168
|
+
var runesMintParamsSchema = v23.object({
|
|
1169
|
+
appServiceFee: v23.optional(v23.number()),
|
|
1170
|
+
appServiceFeeAddress: v23.optional(v23.string()),
|
|
1171
|
+
destinationAddress: v23.string(),
|
|
1172
|
+
feeRate: v23.number(),
|
|
1173
|
+
refundAddress: v23.string(),
|
|
1174
|
+
repeats: v23.number(),
|
|
1175
|
+
runeName: v23.string(),
|
|
1176
|
+
network: v23.optional(v23.enum(BitcoinNetworkType))
|
|
1177
|
+
});
|
|
1178
|
+
var runesMintResultSchema = v23.object({
|
|
1179
|
+
orderId: v23.string(),
|
|
1180
|
+
fundTransactionId: v23.string(),
|
|
1181
|
+
fundingAddress: v23.string()
|
|
1182
|
+
});
|
|
1183
|
+
var runesMintRequestMessageSchema = v23.object({
|
|
1163
1184
|
...rpcRequestMessageSchema.entries,
|
|
1164
|
-
...
|
|
1165
|
-
method:
|
|
1185
|
+
...v23.object({
|
|
1186
|
+
method: v23.literal(runesMintMethodName),
|
|
1166
1187
|
params: runesMintParamsSchema,
|
|
1167
|
-
id:
|
|
1188
|
+
id: v23.string()
|
|
1168
1189
|
}).entries
|
|
1169
1190
|
});
|
|
1170
1191
|
|
|
1171
1192
|
// src/request/types/runesMethods/transfer.ts
|
|
1172
|
-
var
|
|
1193
|
+
var v24 = __toESM(require("valibot"));
|
|
1173
1194
|
var runesTransferMethodName = "runes_transfer";
|
|
1174
|
-
var runesTransferParamsSchema =
|
|
1175
|
-
recipients:
|
|
1176
|
-
|
|
1177
|
-
runeName:
|
|
1178
|
-
amount:
|
|
1179
|
-
address:
|
|
1195
|
+
var runesTransferParamsSchema = v24.object({
|
|
1196
|
+
recipients: v24.array(
|
|
1197
|
+
v24.object({
|
|
1198
|
+
runeName: v24.string(),
|
|
1199
|
+
amount: v24.string(),
|
|
1200
|
+
address: v24.string()
|
|
1180
1201
|
})
|
|
1181
1202
|
)
|
|
1182
1203
|
});
|
|
1183
|
-
var runesTransferResultSchema =
|
|
1184
|
-
txid:
|
|
1204
|
+
var runesTransferResultSchema = v24.object({
|
|
1205
|
+
txid: v24.string()
|
|
1185
1206
|
});
|
|
1186
|
-
var runesTransferRequestMessageSchema =
|
|
1207
|
+
var runesTransferRequestMessageSchema = v24.object({
|
|
1187
1208
|
...rpcRequestMessageSchema.entries,
|
|
1188
|
-
...
|
|
1189
|
-
method:
|
|
1209
|
+
...v24.object({
|
|
1210
|
+
method: v24.literal(runesTransferMethodName),
|
|
1190
1211
|
params: runesTransferParamsSchema,
|
|
1191
|
-
id:
|
|
1212
|
+
id: v24.string()
|
|
1192
1213
|
}).entries
|
|
1193
1214
|
});
|
|
1194
1215
|
|
|
1195
1216
|
// src/request/types/sparkMethods/flashnetMethods/clawbackFunds.ts
|
|
1196
|
-
var
|
|
1217
|
+
var v25 = __toESM(require("valibot"));
|
|
1197
1218
|
var sparkFlashnetClawbackFundsMethodName = "spark_flashnet_clawbackFunds";
|
|
1198
|
-
var sparkFlashnetClawbackFundsParamsSchema =
|
|
1199
|
-
sparkTransferId:
|
|
1200
|
-
lpIdentityPublicKey:
|
|
1201
|
-
});
|
|
1202
|
-
var sparkFlashnetClawbackFundsResultSchema = v24.object({
|
|
1203
|
-
requestId: v24.string(),
|
|
1204
|
-
accepted: v24.boolean(),
|
|
1205
|
-
internalRequestId: v24.optional(v24.string()),
|
|
1206
|
-
sparkStatusTrackingId: v24.optional(v24.string()),
|
|
1207
|
-
error: v24.optional(v24.string())
|
|
1208
|
-
});
|
|
1209
|
-
var sparkFlashnetClawbackFundsRequestMessageSchema = v24.object({
|
|
1210
|
-
...rpcRequestMessageSchema.entries,
|
|
1211
|
-
...v24.object({
|
|
1212
|
-
method: v24.literal(sparkFlashnetClawbackFundsMethodName),
|
|
1213
|
-
params: sparkFlashnetClawbackFundsParamsSchema,
|
|
1214
|
-
id: v24.string()
|
|
1215
|
-
}).entries
|
|
1219
|
+
var sparkFlashnetClawbackFundsParamsSchema = v25.object({
|
|
1220
|
+
sparkTransferId: v25.string(),
|
|
1221
|
+
lpIdentityPublicKey: v25.string()
|
|
1216
1222
|
});
|
|
1217
|
-
|
|
1218
|
-
// src/request/types/sparkMethods/flashnetMethods/executeRouteSwap.ts
|
|
1219
|
-
var v25 = __toESM(require("valibot"));
|
|
1220
|
-
var sparkFlashnetExecuteRouteSwapMethodName = "spark_flashnet_executeRouteSwap";
|
|
1221
|
-
var sparkFlashnetExecuteRouteSwapParamsSchema = v25.object({
|
|
1222
|
-
hops: v25.array(
|
|
1223
|
-
v25.object({
|
|
1224
|
-
poolId: v25.string(),
|
|
1225
|
-
assetInAddress: v25.string(),
|
|
1226
|
-
assetOutAddress: v25.string(),
|
|
1227
|
-
hopIntegratorFeeRateBps: v25.optional(v25.number())
|
|
1228
|
-
})
|
|
1229
|
-
),
|
|
1230
|
-
initialAssetAddress: v25.string(),
|
|
1231
|
-
inputAmount: v25.string(),
|
|
1232
|
-
maxRouteSlippageBps: v25.string(),
|
|
1233
|
-
minAmountOut: v25.optional(v25.string()),
|
|
1234
|
-
integratorFeeRateBps: v25.optional(v25.number()),
|
|
1235
|
-
integratorPublicKey: v25.optional(v25.string())
|
|
1236
|
-
});
|
|
1237
|
-
var sparkFlashnetExecuteRouteSwapResultSchema = v25.object({
|
|
1223
|
+
var sparkFlashnetClawbackFundsResultSchema = v25.object({
|
|
1238
1224
|
requestId: v25.string(),
|
|
1239
1225
|
accepted: v25.boolean(),
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
finalOutboundTransferId: v25.string(),
|
|
1226
|
+
internalRequestId: v25.optional(v25.string()),
|
|
1227
|
+
sparkStatusTrackingId: v25.optional(v25.string()),
|
|
1243
1228
|
error: v25.optional(v25.string())
|
|
1244
1229
|
});
|
|
1245
|
-
var
|
|
1230
|
+
var sparkFlashnetClawbackFundsRequestMessageSchema = v25.object({
|
|
1246
1231
|
...rpcRequestMessageSchema.entries,
|
|
1247
1232
|
...v25.object({
|
|
1248
|
-
method: v25.literal(
|
|
1249
|
-
params:
|
|
1233
|
+
method: v25.literal(sparkFlashnetClawbackFundsMethodName),
|
|
1234
|
+
params: sparkFlashnetClawbackFundsParamsSchema,
|
|
1250
1235
|
id: v25.string()
|
|
1251
1236
|
}).entries
|
|
1252
1237
|
});
|
|
1253
1238
|
|
|
1254
|
-
// src/request/types/sparkMethods/flashnetMethods/
|
|
1239
|
+
// src/request/types/sparkMethods/flashnetMethods/executeRouteSwap.ts
|
|
1255
1240
|
var v26 = __toESM(require("valibot"));
|
|
1256
|
-
var
|
|
1257
|
-
var
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1241
|
+
var sparkFlashnetExecuteRouteSwapMethodName = "spark_flashnet_executeRouteSwap";
|
|
1242
|
+
var sparkFlashnetExecuteRouteSwapParamsSchema = v26.object({
|
|
1243
|
+
hops: v26.array(
|
|
1244
|
+
v26.object({
|
|
1245
|
+
poolId: v26.string(),
|
|
1246
|
+
assetInAddress: v26.string(),
|
|
1247
|
+
assetOutAddress: v26.string(),
|
|
1248
|
+
hopIntegratorFeeRateBps: v26.optional(v26.number())
|
|
1249
|
+
})
|
|
1250
|
+
),
|
|
1251
|
+
initialAssetAddress: v26.string(),
|
|
1252
|
+
inputAmount: v26.string(),
|
|
1253
|
+
maxRouteSlippageBps: v26.string(),
|
|
1263
1254
|
minAmountOut: v26.optional(v26.string()),
|
|
1264
1255
|
integratorFeeRateBps: v26.optional(v26.number()),
|
|
1265
1256
|
integratorPublicKey: v26.optional(v26.string())
|
|
1266
1257
|
});
|
|
1267
|
-
var
|
|
1258
|
+
var sparkFlashnetExecuteRouteSwapResultSchema = v26.object({
|
|
1268
1259
|
requestId: v26.string(),
|
|
1269
1260
|
accepted: v26.boolean(),
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
assetOutAddress: v26.optional(v26.string()),
|
|
1274
|
-
assetInAddress: v26.optional(v26.string()),
|
|
1275
|
-
outboundTransferId: v26.optional(v26.string()),
|
|
1261
|
+
outputAmount: v26.string(),
|
|
1262
|
+
executionPrice: v26.string(),
|
|
1263
|
+
finalOutboundTransferId: v26.string(),
|
|
1276
1264
|
error: v26.optional(v26.string())
|
|
1277
1265
|
});
|
|
1278
|
-
var
|
|
1266
|
+
var sparkFlashnetExecuteRouteSwapRequestMessageSchema = v26.object({
|
|
1279
1267
|
...rpcRequestMessageSchema.entries,
|
|
1280
1268
|
...v26.object({
|
|
1281
|
-
method: v26.literal(
|
|
1282
|
-
params:
|
|
1269
|
+
method: v26.literal(sparkFlashnetExecuteRouteSwapMethodName),
|
|
1270
|
+
params: sparkFlashnetExecuteRouteSwapParamsSchema,
|
|
1283
1271
|
id: v26.string()
|
|
1284
1272
|
}).entries
|
|
1285
1273
|
});
|
|
1286
1274
|
|
|
1287
|
-
// src/request/types/sparkMethods/flashnetMethods/
|
|
1275
|
+
// src/request/types/sparkMethods/flashnetMethods/executeSwap.ts
|
|
1288
1276
|
var v27 = __toESM(require("valibot"));
|
|
1277
|
+
var sparkFlashnetExecuteSwapMethodName = "spark_flashnet_executeSwap";
|
|
1278
|
+
var sparkFlashnetExecuteSwapParamsSchema = v27.object({
|
|
1279
|
+
poolId: v27.string(),
|
|
1280
|
+
assetInAddress: v27.string(),
|
|
1281
|
+
assetOutAddress: v27.string(),
|
|
1282
|
+
amountIn: v27.string(),
|
|
1283
|
+
maxSlippageBps: v27.number(),
|
|
1284
|
+
minAmountOut: v27.optional(v27.string()),
|
|
1285
|
+
integratorFeeRateBps: v27.optional(v27.number()),
|
|
1286
|
+
integratorPublicKey: v27.optional(v27.string())
|
|
1287
|
+
});
|
|
1288
|
+
var sparkFlashnetExecuteSwapResultSchema = v27.object({
|
|
1289
|
+
requestId: v27.string(),
|
|
1290
|
+
accepted: v27.boolean(),
|
|
1291
|
+
amountOut: v27.optional(v27.string()),
|
|
1292
|
+
feeAmount: v27.optional(v27.string()),
|
|
1293
|
+
executionPrice: v27.optional(v27.string()),
|
|
1294
|
+
assetOutAddress: v27.optional(v27.string()),
|
|
1295
|
+
assetInAddress: v27.optional(v27.string()),
|
|
1296
|
+
outboundTransferId: v27.optional(v27.string()),
|
|
1297
|
+
error: v27.optional(v27.string())
|
|
1298
|
+
});
|
|
1299
|
+
var sparkFlashnetExecuteSwapRequestMessageSchema = v27.object({
|
|
1300
|
+
...rpcRequestMessageSchema.entries,
|
|
1301
|
+
...v27.object({
|
|
1302
|
+
method: v27.literal(sparkFlashnetExecuteSwapMethodName),
|
|
1303
|
+
params: sparkFlashnetExecuteSwapParamsSchema,
|
|
1304
|
+
id: v27.string()
|
|
1305
|
+
}).entries
|
|
1306
|
+
});
|
|
1307
|
+
|
|
1308
|
+
// src/request/types/sparkMethods/flashnetMethods/getClawbackEligibleTransfers.ts
|
|
1309
|
+
var v28 = __toESM(require("valibot"));
|
|
1289
1310
|
var sparkGetClawbackEligibleTransfersMethodName = "spark_flashnet_getClawbackEligibleTransfers";
|
|
1290
|
-
var sparkGetClawbackEligibleTransfersParamsSchema =
|
|
1291
|
-
var sparkGetClawbackEligibleTransfersResultSchema =
|
|
1292
|
-
eligibleTransfers:
|
|
1293
|
-
|
|
1294
|
-
txId:
|
|
1295
|
-
createdAt:
|
|
1296
|
-
lpIdentityPublicKey:
|
|
1311
|
+
var sparkGetClawbackEligibleTransfersParamsSchema = v28.nullish(v28.null());
|
|
1312
|
+
var sparkGetClawbackEligibleTransfersResultSchema = v28.object({
|
|
1313
|
+
eligibleTransfers: v28.array(
|
|
1314
|
+
v28.object({
|
|
1315
|
+
txId: v28.string(),
|
|
1316
|
+
createdAt: v28.string(),
|
|
1317
|
+
lpIdentityPublicKey: v28.string()
|
|
1297
1318
|
})
|
|
1298
1319
|
)
|
|
1299
1320
|
});
|
|
1300
|
-
var sparkGetClawbackEligibleTransfersRequestMessageSchema =
|
|
1321
|
+
var sparkGetClawbackEligibleTransfersRequestMessageSchema = v28.object({
|
|
1301
1322
|
...rpcRequestMessageSchema.entries,
|
|
1302
|
-
...
|
|
1303
|
-
method:
|
|
1323
|
+
...v28.object({
|
|
1324
|
+
method: v28.literal(sparkGetClawbackEligibleTransfersMethodName),
|
|
1304
1325
|
params: sparkGetClawbackEligibleTransfersParamsSchema,
|
|
1305
|
-
id:
|
|
1326
|
+
id: v28.string()
|
|
1306
1327
|
}).entries
|
|
1307
1328
|
});
|
|
1308
1329
|
|
|
1309
1330
|
// src/request/types/sparkMethods/flashnetMethods/getJwt.ts
|
|
1310
|
-
var
|
|
1331
|
+
var v29 = __toESM(require("valibot"));
|
|
1311
1332
|
var sparkFlashnetGetJwtMethodName = "spark_flashnet_getJwt";
|
|
1312
|
-
var sparkFlashnetGetJwtParamsSchema =
|
|
1313
|
-
var sparkFlashnetGetJwtResultSchema =
|
|
1333
|
+
var sparkFlashnetGetJwtParamsSchema = v29.null();
|
|
1334
|
+
var sparkFlashnetGetJwtResultSchema = v29.object({
|
|
1314
1335
|
/**
|
|
1315
1336
|
* The JWT token for authenticated requests to the Flashnet API.
|
|
1316
1337
|
*/
|
|
1317
|
-
jwt:
|
|
1338
|
+
jwt: v29.string()
|
|
1318
1339
|
});
|
|
1319
|
-
var sparkFlashnetGetJwtRequestMessageSchema =
|
|
1340
|
+
var sparkFlashnetGetJwtRequestMessageSchema = v29.object({
|
|
1320
1341
|
...rpcRequestMessageSchema.entries,
|
|
1321
|
-
...
|
|
1322
|
-
method:
|
|
1342
|
+
...v29.object({
|
|
1343
|
+
method: v29.literal(sparkFlashnetGetJwtMethodName),
|
|
1323
1344
|
params: sparkFlashnetGetJwtParamsSchema,
|
|
1324
|
-
id:
|
|
1345
|
+
id: v29.string()
|
|
1325
1346
|
}).entries
|
|
1326
1347
|
});
|
|
1327
1348
|
|
|
1328
1349
|
// src/request/types/sparkMethods/flashnetMethods/intents/addLiquidity.ts
|
|
1329
|
-
var v29 = __toESM(require("valibot"));
|
|
1330
|
-
var sparkFlashnetAddLiquidityIntentSchema = v29.object({
|
|
1331
|
-
type: v29.literal("addLiquidity"),
|
|
1332
|
-
data: v29.object({
|
|
1333
|
-
userPublicKey: v29.string(),
|
|
1334
|
-
poolId: v29.string(),
|
|
1335
|
-
assetAAmount: v29.string(),
|
|
1336
|
-
assetBAmount: v29.string(),
|
|
1337
|
-
assetAMinAmountIn: v29.string(),
|
|
1338
|
-
assetBMinAmountIn: v29.string(),
|
|
1339
|
-
assetATransferId: v29.string(),
|
|
1340
|
-
assetBTransferId: v29.string(),
|
|
1341
|
-
nonce: v29.string()
|
|
1342
|
-
})
|
|
1343
|
-
});
|
|
1344
|
-
|
|
1345
|
-
// src/request/types/sparkMethods/flashnetMethods/intents/clawback.ts
|
|
1346
1350
|
var v30 = __toESM(require("valibot"));
|
|
1347
|
-
var
|
|
1348
|
-
type: v30.literal("
|
|
1351
|
+
var sparkFlashnetAddLiquidityIntentSchema = v30.object({
|
|
1352
|
+
type: v30.literal("addLiquidity"),
|
|
1349
1353
|
data: v30.object({
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1354
|
+
userPublicKey: v30.string(),
|
|
1355
|
+
poolId: v30.string(),
|
|
1356
|
+
assetAAmount: v30.string(),
|
|
1357
|
+
assetBAmount: v30.string(),
|
|
1358
|
+
assetAMinAmountIn: v30.string(),
|
|
1359
|
+
assetBMinAmountIn: v30.string(),
|
|
1360
|
+
assetATransferId: v30.string(),
|
|
1361
|
+
assetBTransferId: v30.string(),
|
|
1353
1362
|
nonce: v30.string()
|
|
1354
1363
|
})
|
|
1355
1364
|
});
|
|
1356
1365
|
|
|
1357
|
-
// src/request/types/sparkMethods/flashnetMethods/intents/
|
|
1366
|
+
// src/request/types/sparkMethods/flashnetMethods/intents/clawback.ts
|
|
1358
1367
|
var v31 = __toESM(require("valibot"));
|
|
1359
|
-
var
|
|
1360
|
-
type: v31.literal("
|
|
1368
|
+
var sparkFlashnetClawbackIntentSchema = v31.object({
|
|
1369
|
+
type: v31.literal("clawback"),
|
|
1361
1370
|
data: v31.object({
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1371
|
+
senderPublicKey: v31.string(),
|
|
1372
|
+
sparkTransferId: v31.string(),
|
|
1373
|
+
lpIdentityPublicKey: v31.string(),
|
|
1365
1374
|
nonce: v31.string()
|
|
1366
1375
|
})
|
|
1367
1376
|
});
|
|
1368
1377
|
|
|
1369
|
-
// src/request/types/sparkMethods/flashnetMethods/intents/
|
|
1378
|
+
// src/request/types/sparkMethods/flashnetMethods/intents/confirmInitialDeposit.ts
|
|
1370
1379
|
var v32 = __toESM(require("valibot"));
|
|
1371
|
-
var
|
|
1372
|
-
type: v32.literal("
|
|
1380
|
+
var sparkFlashnetConfirmInitialDepositIntentSchema = v32.object({
|
|
1381
|
+
type: v32.literal("confirmInitialDeposit"),
|
|
1373
1382
|
data: v32.object({
|
|
1383
|
+
poolId: v32.string(),
|
|
1384
|
+
assetASparkTransferId: v32.string(),
|
|
1374
1385
|
poolOwnerPublicKey: v32.string(),
|
|
1375
|
-
assetAAddress: v32.string(),
|
|
1376
|
-
assetBAddress: v32.string(),
|
|
1377
|
-
lpFeeRateBps: v32.union([v32.number(), v32.string()]),
|
|
1378
|
-
totalHostFeeRateBps: v32.union([v32.number(), v32.string()]),
|
|
1379
1386
|
nonce: v32.string()
|
|
1380
1387
|
})
|
|
1381
1388
|
});
|
|
1382
1389
|
|
|
1383
|
-
// src/request/types/sparkMethods/flashnetMethods/intents/
|
|
1390
|
+
// src/request/types/sparkMethods/flashnetMethods/intents/createConstantProductPool.ts
|
|
1384
1391
|
var v33 = __toESM(require("valibot"));
|
|
1385
|
-
var
|
|
1386
|
-
type: v33.literal("
|
|
1392
|
+
var sparkFlashnetCreateConstantProductPoolIntentSchema = v33.object({
|
|
1393
|
+
type: v33.literal("createConstantProductPool"),
|
|
1387
1394
|
data: v33.object({
|
|
1395
|
+
poolOwnerPublicKey: v33.string(),
|
|
1388
1396
|
assetAAddress: v33.string(),
|
|
1389
1397
|
assetBAddress: v33.string(),
|
|
1390
|
-
assetAInitialReserve: v33.string(),
|
|
1391
|
-
virtualReserveA: v33.union([v33.number(), v33.string()]),
|
|
1392
|
-
virtualReserveB: v33.union([v33.number(), v33.string()]),
|
|
1393
|
-
threshold: v33.union([v33.number(), v33.string()]),
|
|
1394
1398
|
lpFeeRateBps: v33.union([v33.number(), v33.string()]),
|
|
1395
1399
|
totalHostFeeRateBps: v33.union([v33.number(), v33.string()]),
|
|
1396
|
-
poolOwnerPublicKey: v33.string(),
|
|
1397
1400
|
nonce: v33.string()
|
|
1398
1401
|
})
|
|
1399
1402
|
});
|
|
1400
1403
|
|
|
1401
|
-
// src/request/types/sparkMethods/flashnetMethods/intents/
|
|
1404
|
+
// src/request/types/sparkMethods/flashnetMethods/intents/createSingleSidedPool.ts
|
|
1402
1405
|
var v34 = __toESM(require("valibot"));
|
|
1403
|
-
var
|
|
1404
|
-
type: v34.literal("
|
|
1406
|
+
var sparkFlashnetCreateSingleSidedPoolIntentSchema = v34.object({
|
|
1407
|
+
type: v34.literal("createSingleSidedPool"),
|
|
1405
1408
|
data: v34.object({
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
+
assetAAddress: v34.string(),
|
|
1410
|
+
assetBAddress: v34.string(),
|
|
1411
|
+
assetAInitialReserve: v34.string(),
|
|
1412
|
+
virtualReserveA: v34.union([v34.number(), v34.string()]),
|
|
1413
|
+
virtualReserveB: v34.union([v34.number(), v34.string()]),
|
|
1414
|
+
threshold: v34.union([v34.number(), v34.string()]),
|
|
1415
|
+
lpFeeRateBps: v34.union([v34.number(), v34.string()]),
|
|
1416
|
+
totalHostFeeRateBps: v34.union([v34.number(), v34.string()]),
|
|
1417
|
+
poolOwnerPublicKey: v34.string(),
|
|
1409
1418
|
nonce: v34.string()
|
|
1410
1419
|
})
|
|
1411
1420
|
});
|
|
1412
1421
|
|
|
1413
|
-
// src/request/types/sparkMethods/flashnetMethods/intents/
|
|
1422
|
+
// src/request/types/sparkMethods/flashnetMethods/intents/removeLiquidity.ts
|
|
1414
1423
|
var v35 = __toESM(require("valibot"));
|
|
1415
|
-
var
|
|
1416
|
-
type: v35.literal("
|
|
1424
|
+
var sparkFlashnetRemoveLiquidityIntentSchema = v35.object({
|
|
1425
|
+
type: v35.literal("removeLiquidity"),
|
|
1417
1426
|
data: v35.object({
|
|
1418
1427
|
userPublicKey: v35.string(),
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
v35.object({
|
|
1422
|
-
poolId: v35.string(),
|
|
1423
|
-
inputAssetAddress: v35.string(),
|
|
1424
|
-
outputAssetAddress: v35.string(),
|
|
1425
|
-
hopIntegratorFeeRateBps: v35.optional(v35.union([v35.number(), v35.string()]))
|
|
1426
|
-
})
|
|
1427
|
-
),
|
|
1428
|
-
inputAmount: v35.string(),
|
|
1429
|
-
maxRouteSlippageBps: v35.union([v35.number(), v35.string()]),
|
|
1430
|
-
minAmountOut: v35.string(),
|
|
1431
|
-
defaultIntegratorFeeRateBps: v35.optional(v35.union([v35.number(), v35.string()])),
|
|
1428
|
+
poolId: v35.string(),
|
|
1429
|
+
lpTokensToRemove: v35.string(),
|
|
1432
1430
|
nonce: v35.string()
|
|
1433
1431
|
})
|
|
1434
1432
|
});
|
|
1435
1433
|
|
|
1436
|
-
// src/request/types/sparkMethods/flashnetMethods/intents/
|
|
1434
|
+
// src/request/types/sparkMethods/flashnetMethods/intents/routeSwap.ts
|
|
1437
1435
|
var v36 = __toESM(require("valibot"));
|
|
1438
|
-
var
|
|
1439
|
-
type: v36.literal("
|
|
1436
|
+
var sparkFlashnetRouteSwapIntentSchema = v36.object({
|
|
1437
|
+
type: v36.literal("executeRouteSwap"),
|
|
1440
1438
|
data: v36.object({
|
|
1441
1439
|
userPublicKey: v36.string(),
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1440
|
+
initialSparkTransferId: v36.string(),
|
|
1441
|
+
hops: v36.array(
|
|
1442
|
+
v36.object({
|
|
1443
|
+
poolId: v36.string(),
|
|
1444
|
+
inputAssetAddress: v36.string(),
|
|
1445
|
+
outputAssetAddress: v36.string(),
|
|
1446
|
+
hopIntegratorFeeRateBps: v36.optional(v36.union([v36.number(), v36.string()]))
|
|
1447
|
+
})
|
|
1448
|
+
),
|
|
1449
|
+
inputAmount: v36.string(),
|
|
1450
|
+
maxRouteSlippageBps: v36.union([v36.number(), v36.string()]),
|
|
1448
1451
|
minAmountOut: v36.string(),
|
|
1449
|
-
|
|
1452
|
+
defaultIntegratorFeeRateBps: v36.optional(v36.union([v36.number(), v36.string()])),
|
|
1450
1453
|
nonce: v36.string()
|
|
1451
1454
|
})
|
|
1452
1455
|
});
|
|
1453
1456
|
|
|
1454
|
-
// src/request/types/sparkMethods/flashnetMethods/
|
|
1457
|
+
// src/request/types/sparkMethods/flashnetMethods/intents/swap.ts
|
|
1455
1458
|
var v37 = __toESM(require("valibot"));
|
|
1459
|
+
var sparkFlashnetSwapIntentSchema = v37.object({
|
|
1460
|
+
type: v37.literal("executeSwap"),
|
|
1461
|
+
data: v37.object({
|
|
1462
|
+
userPublicKey: v37.string(),
|
|
1463
|
+
poolId: v37.string(),
|
|
1464
|
+
transferId: v37.string(),
|
|
1465
|
+
assetInAddress: v37.string(),
|
|
1466
|
+
assetOutAddress: v37.string(),
|
|
1467
|
+
amountIn: v37.string(),
|
|
1468
|
+
maxSlippageBps: v37.union([v37.number(), v37.string()]),
|
|
1469
|
+
minAmountOut: v37.string(),
|
|
1470
|
+
totalIntegratorFeeRateBps: v37.optional(v37.union([v37.number(), v37.string()])),
|
|
1471
|
+
nonce: v37.string()
|
|
1472
|
+
})
|
|
1473
|
+
});
|
|
1474
|
+
|
|
1475
|
+
// src/request/types/sparkMethods/flashnetMethods/signIntent.ts
|
|
1476
|
+
var v38 = __toESM(require("valibot"));
|
|
1456
1477
|
var sparkFlashnetSignIntentMethodName = "spark_flashnet_signIntent";
|
|
1457
|
-
var sparkFlashnetSignIntentParamsSchema =
|
|
1478
|
+
var sparkFlashnetSignIntentParamsSchema = v38.union([
|
|
1458
1479
|
sparkFlashnetSwapIntentSchema,
|
|
1459
1480
|
sparkFlashnetRouteSwapIntentSchema,
|
|
1460
1481
|
sparkFlashnetAddLiquidityIntentSchema,
|
|
@@ -1464,109 +1485,109 @@ var sparkFlashnetSignIntentParamsSchema = v37.union([
|
|
|
1464
1485
|
sparkFlashnetCreateSingleSidedPoolIntentSchema,
|
|
1465
1486
|
sparkFlashnetRemoveLiquidityIntentSchema
|
|
1466
1487
|
]);
|
|
1467
|
-
var sparkFlashnetSignIntentResultSchema =
|
|
1488
|
+
var sparkFlashnetSignIntentResultSchema = v38.object({
|
|
1468
1489
|
/**
|
|
1469
1490
|
* The signed intent as a hex string.
|
|
1470
1491
|
*/
|
|
1471
|
-
signature:
|
|
1492
|
+
signature: v38.string()
|
|
1472
1493
|
});
|
|
1473
|
-
var sparkFlashnetSignIntentRequestMessageSchema =
|
|
1494
|
+
var sparkFlashnetSignIntentRequestMessageSchema = v38.object({
|
|
1474
1495
|
...rpcRequestMessageSchema.entries,
|
|
1475
|
-
...
|
|
1476
|
-
method:
|
|
1496
|
+
...v38.object({
|
|
1497
|
+
method: v38.literal(sparkFlashnetSignIntentMethodName),
|
|
1477
1498
|
params: sparkFlashnetSignIntentParamsSchema,
|
|
1478
|
-
id:
|
|
1499
|
+
id: v38.string()
|
|
1479
1500
|
}).entries
|
|
1480
1501
|
});
|
|
1481
1502
|
|
|
1482
1503
|
// src/request/types/sparkMethods/flashnetMethods/signStructuredMessage.ts
|
|
1483
|
-
var
|
|
1504
|
+
var v39 = __toESM(require("valibot"));
|
|
1484
1505
|
var sparkFlashnetSignStructuredMessageMethodName = "spark_flashnet_signStructuredMessage";
|
|
1485
|
-
var sparkFlashnetSignStructuredMessageParamsSchema =
|
|
1486
|
-
message:
|
|
1506
|
+
var sparkFlashnetSignStructuredMessageParamsSchema = v39.object({
|
|
1507
|
+
message: v39.string()
|
|
1487
1508
|
});
|
|
1488
|
-
var sparkFlashnetSignStructuredMessageResultSchema =
|
|
1489
|
-
message:
|
|
1490
|
-
signature:
|
|
1509
|
+
var sparkFlashnetSignStructuredMessageResultSchema = v39.object({
|
|
1510
|
+
message: v39.string(),
|
|
1511
|
+
signature: v39.string()
|
|
1491
1512
|
});
|
|
1492
|
-
var sparkFlashnetSignStructuredMessageRequestMessageSchema =
|
|
1513
|
+
var sparkFlashnetSignStructuredMessageRequestMessageSchema = v39.object({
|
|
1493
1514
|
...rpcRequestMessageSchema.entries,
|
|
1494
|
-
...
|
|
1495
|
-
method:
|
|
1515
|
+
...v39.object({
|
|
1516
|
+
method: v39.literal(sparkFlashnetSignStructuredMessageMethodName),
|
|
1496
1517
|
params: sparkFlashnetSignStructuredMessageParamsSchema,
|
|
1497
|
-
id:
|
|
1518
|
+
id: v39.string()
|
|
1498
1519
|
}).entries
|
|
1499
1520
|
});
|
|
1500
1521
|
|
|
1501
1522
|
// src/request/types/sparkMethods/getAddresses.ts
|
|
1502
|
-
var
|
|
1523
|
+
var v40 = __toESM(require("valibot"));
|
|
1503
1524
|
var sparkGetAddressesMethodName = "spark_getAddresses";
|
|
1504
|
-
var sparkGetAddressesParamsSchema =
|
|
1505
|
-
|
|
1525
|
+
var sparkGetAddressesParamsSchema = v40.nullish(
|
|
1526
|
+
v40.object({
|
|
1506
1527
|
/**
|
|
1507
1528
|
* A message to be displayed to the user in the request prompt.
|
|
1508
1529
|
*/
|
|
1509
|
-
message:
|
|
1530
|
+
message: v40.optional(v40.string())
|
|
1510
1531
|
})
|
|
1511
1532
|
);
|
|
1512
|
-
var sparkGetAddressesResultSchema =
|
|
1533
|
+
var sparkGetAddressesResultSchema = v40.object({
|
|
1513
1534
|
/**
|
|
1514
1535
|
* The addresses generated for the given purposes.
|
|
1515
1536
|
*/
|
|
1516
|
-
addresses:
|
|
1537
|
+
addresses: v40.array(addressSchema),
|
|
1517
1538
|
network: getNetworkResultSchema
|
|
1518
1539
|
});
|
|
1519
|
-
var sparkGetAddressesRequestMessageSchema =
|
|
1540
|
+
var sparkGetAddressesRequestMessageSchema = v40.object({
|
|
1520
1541
|
...rpcRequestMessageSchema.entries,
|
|
1521
|
-
...
|
|
1522
|
-
method:
|
|
1542
|
+
...v40.object({
|
|
1543
|
+
method: v40.literal(sparkGetAddressesMethodName),
|
|
1523
1544
|
params: sparkGetAddressesParamsSchema,
|
|
1524
|
-
id:
|
|
1545
|
+
id: v40.string()
|
|
1525
1546
|
}).entries
|
|
1526
1547
|
});
|
|
1527
1548
|
|
|
1528
1549
|
// src/request/types/sparkMethods/getBalance.ts
|
|
1529
|
-
var
|
|
1550
|
+
var v41 = __toESM(require("valibot"));
|
|
1530
1551
|
var sparkGetBalanceMethodName = "spark_getBalance";
|
|
1531
|
-
var sparkGetBalanceParamsSchema =
|
|
1532
|
-
var sparkGetBalanceResultSchema =
|
|
1552
|
+
var sparkGetBalanceParamsSchema = v41.nullish(v41.null());
|
|
1553
|
+
var sparkGetBalanceResultSchema = v41.object({
|
|
1533
1554
|
/**
|
|
1534
1555
|
* The Spark Bitcoin address balance in sats in string form.
|
|
1535
1556
|
*/
|
|
1536
|
-
balance:
|
|
1537
|
-
tokenBalances:
|
|
1538
|
-
|
|
1557
|
+
balance: v41.string(),
|
|
1558
|
+
tokenBalances: v41.array(
|
|
1559
|
+
v41.object({
|
|
1539
1560
|
/* The address balance of the token in string form as it can overflow a js number */
|
|
1540
|
-
balance:
|
|
1541
|
-
tokenMetadata:
|
|
1542
|
-
tokenIdentifier:
|
|
1543
|
-
tokenName:
|
|
1544
|
-
tokenTicker:
|
|
1545
|
-
decimals:
|
|
1546
|
-
maxSupply:
|
|
1561
|
+
balance: v41.string(),
|
|
1562
|
+
tokenMetadata: v41.object({
|
|
1563
|
+
tokenIdentifier: v41.string(),
|
|
1564
|
+
tokenName: v41.string(),
|
|
1565
|
+
tokenTicker: v41.string(),
|
|
1566
|
+
decimals: v41.number(),
|
|
1567
|
+
maxSupply: v41.string()
|
|
1547
1568
|
})
|
|
1548
1569
|
})
|
|
1549
1570
|
)
|
|
1550
1571
|
});
|
|
1551
|
-
var sparkGetBalanceRequestMessageSchema =
|
|
1572
|
+
var sparkGetBalanceRequestMessageSchema = v41.object({
|
|
1552
1573
|
...rpcRequestMessageSchema.entries,
|
|
1553
|
-
...
|
|
1554
|
-
method:
|
|
1574
|
+
...v41.object({
|
|
1575
|
+
method: v41.literal(sparkGetBalanceMethodName),
|
|
1555
1576
|
params: sparkGetBalanceParamsSchema,
|
|
1556
|
-
id:
|
|
1577
|
+
id: v41.string()
|
|
1557
1578
|
}).entries
|
|
1558
1579
|
});
|
|
1559
1580
|
|
|
1560
1581
|
// src/request/types/sparkMethods/signMessage.ts
|
|
1561
|
-
var
|
|
1582
|
+
var v42 = __toESM(require("valibot"));
|
|
1562
1583
|
var sparkSignMessageMethodName = "spark_signMessage";
|
|
1563
|
-
var sparkSignMessageParamsSchema =
|
|
1584
|
+
var sparkSignMessageParamsSchema = v42.object({
|
|
1564
1585
|
/**
|
|
1565
1586
|
* The message to sign. The message should only consist of valid UTF-8 characters.
|
|
1566
1587
|
*/
|
|
1567
|
-
message:
|
|
1588
|
+
message: v42.string()
|
|
1568
1589
|
});
|
|
1569
|
-
var sparkSignMessageResultSchema =
|
|
1590
|
+
var sparkSignMessageResultSchema = v42.object({
|
|
1570
1591
|
/**
|
|
1571
1592
|
* The signature, encoded in base64, of the message hash.
|
|
1572
1593
|
*
|
|
@@ -1574,98 +1595,98 @@ var sparkSignMessageResultSchema = v41.object({
|
|
|
1574
1595
|
* and the resulting byte array is hashed with SHA256 before signing
|
|
1575
1596
|
* with the private key.
|
|
1576
1597
|
*/
|
|
1577
|
-
signature:
|
|
1598
|
+
signature: v42.string()
|
|
1578
1599
|
});
|
|
1579
|
-
var sparkSignMessageRequestMessageSchema =
|
|
1600
|
+
var sparkSignMessageRequestMessageSchema = v42.object({
|
|
1580
1601
|
...rpcRequestMessageSchema.entries,
|
|
1581
|
-
...
|
|
1582
|
-
method:
|
|
1602
|
+
...v42.object({
|
|
1603
|
+
method: v42.literal(sparkSignMessageMethodName),
|
|
1583
1604
|
params: sparkSignMessageParamsSchema,
|
|
1584
|
-
id:
|
|
1605
|
+
id: v42.string()
|
|
1585
1606
|
}).entries
|
|
1586
1607
|
});
|
|
1587
1608
|
|
|
1588
1609
|
// src/request/types/sparkMethods/transfer.ts
|
|
1589
|
-
var
|
|
1610
|
+
var v43 = __toESM(require("valibot"));
|
|
1590
1611
|
var sparkTransferMethodName = "spark_transfer";
|
|
1591
|
-
var sparkTransferParamsSchema =
|
|
1612
|
+
var sparkTransferParamsSchema = v43.object({
|
|
1592
1613
|
/**
|
|
1593
1614
|
* Amount of SATS to transfer as a string or number.
|
|
1594
1615
|
*/
|
|
1595
|
-
amountSats:
|
|
1616
|
+
amountSats: v43.union([v43.number(), v43.string()]),
|
|
1596
1617
|
/**
|
|
1597
1618
|
* The recipient's spark address.
|
|
1598
1619
|
*/
|
|
1599
|
-
receiverSparkAddress:
|
|
1620
|
+
receiverSparkAddress: v43.string()
|
|
1600
1621
|
});
|
|
1601
|
-
var sparkTransferResultSchema =
|
|
1622
|
+
var sparkTransferResultSchema = v43.object({
|
|
1602
1623
|
/**
|
|
1603
1624
|
* The ID of the transaction.
|
|
1604
1625
|
*/
|
|
1605
|
-
id:
|
|
1626
|
+
id: v43.string()
|
|
1606
1627
|
});
|
|
1607
|
-
var sparkTransferRequestMessageSchema =
|
|
1628
|
+
var sparkTransferRequestMessageSchema = v43.object({
|
|
1608
1629
|
...rpcRequestMessageSchema.entries,
|
|
1609
|
-
...
|
|
1610
|
-
method:
|
|
1630
|
+
...v43.object({
|
|
1631
|
+
method: v43.literal(sparkTransferMethodName),
|
|
1611
1632
|
params: sparkTransferParamsSchema,
|
|
1612
|
-
id:
|
|
1633
|
+
id: v43.string()
|
|
1613
1634
|
}).entries
|
|
1614
1635
|
});
|
|
1615
1636
|
|
|
1616
1637
|
// src/request/types/sparkMethods/transferToken.ts
|
|
1617
|
-
var
|
|
1638
|
+
var v44 = __toESM(require("valibot"));
|
|
1618
1639
|
var sparkTransferTokenMethodName = "spark_transferToken";
|
|
1619
|
-
var sparkTransferTokenParamsSchema =
|
|
1640
|
+
var sparkTransferTokenParamsSchema = v44.object({
|
|
1620
1641
|
/**
|
|
1621
1642
|
* Amount of units of the token to transfer as a string or number.
|
|
1622
1643
|
*/
|
|
1623
|
-
tokenAmount:
|
|
1644
|
+
tokenAmount: v44.union([v44.number(), v44.string()]),
|
|
1624
1645
|
/**
|
|
1625
1646
|
* The Bech32m token identifier.
|
|
1626
1647
|
*/
|
|
1627
|
-
tokenIdentifier:
|
|
1648
|
+
tokenIdentifier: v44.string(),
|
|
1628
1649
|
/**
|
|
1629
1650
|
* The recipient's spark address.
|
|
1630
1651
|
*/
|
|
1631
|
-
receiverSparkAddress:
|
|
1652
|
+
receiverSparkAddress: v44.string()
|
|
1632
1653
|
});
|
|
1633
|
-
var sparkTransferTokenResultSchema =
|
|
1654
|
+
var sparkTransferTokenResultSchema = v44.object({
|
|
1634
1655
|
/**
|
|
1635
1656
|
* The ID of the transaction.
|
|
1636
1657
|
*/
|
|
1637
|
-
id:
|
|
1658
|
+
id: v44.string()
|
|
1638
1659
|
});
|
|
1639
|
-
var sparkTransferTokenRequestMessageSchema =
|
|
1660
|
+
var sparkTransferTokenRequestMessageSchema = v44.object({
|
|
1640
1661
|
...rpcRequestMessageSchema.entries,
|
|
1641
|
-
...
|
|
1642
|
-
method:
|
|
1662
|
+
...v44.object({
|
|
1663
|
+
method: v44.literal(sparkTransferTokenMethodName),
|
|
1643
1664
|
params: sparkTransferTokenParamsSchema,
|
|
1644
|
-
id:
|
|
1665
|
+
id: v44.string()
|
|
1645
1666
|
}).entries
|
|
1646
1667
|
});
|
|
1647
1668
|
|
|
1648
1669
|
// src/request/types/stxMethods/callContract.ts
|
|
1649
|
-
var
|
|
1670
|
+
var v45 = __toESM(require("valibot"));
|
|
1650
1671
|
var stxCallContractMethodName = "stx_callContract";
|
|
1651
|
-
var stxCallContractParamsSchema =
|
|
1672
|
+
var stxCallContractParamsSchema = v45.object({
|
|
1652
1673
|
/**
|
|
1653
1674
|
* The contract principal.
|
|
1654
1675
|
*
|
|
1655
1676
|
* E.g. `"SPKE...GD5C.my-contract"`
|
|
1656
1677
|
*/
|
|
1657
|
-
contract:
|
|
1678
|
+
contract: v45.string(),
|
|
1658
1679
|
/**
|
|
1659
1680
|
* The name of the function to call.
|
|
1660
1681
|
*
|
|
1661
1682
|
* Note: spec changes ongoing,
|
|
1662
1683
|
* https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
|
|
1663
1684
|
*/
|
|
1664
|
-
functionName:
|
|
1685
|
+
functionName: v45.string(),
|
|
1665
1686
|
/**
|
|
1666
1687
|
* @deprecated in favor of `functionArgs` for @stacks/connect compatibility
|
|
1667
1688
|
*/
|
|
1668
|
-
arguments:
|
|
1689
|
+
arguments: v45.optional(v45.array(v45.string())),
|
|
1669
1690
|
/**
|
|
1670
1691
|
* The function's arguments. The arguments are expected to be hex-encoded
|
|
1671
1692
|
* strings of Clarity values.
|
|
@@ -1680,274 +1701,274 @@ var stxCallContractParamsSchema = v44.object({
|
|
|
1680
1701
|
* const hexArgs = functionArgs.map(cvToHex);
|
|
1681
1702
|
* ```
|
|
1682
1703
|
*/
|
|
1683
|
-
functionArgs:
|
|
1704
|
+
functionArgs: v45.optional(v45.array(v45.string())),
|
|
1684
1705
|
/**
|
|
1685
1706
|
* The post conditions to apply to the contract call.
|
|
1686
1707
|
*/
|
|
1687
|
-
postConditions:
|
|
1708
|
+
postConditions: v45.optional(v45.array(v45.string())),
|
|
1688
1709
|
/**
|
|
1689
1710
|
* The mode to apply to the post conditions.
|
|
1690
1711
|
*/
|
|
1691
|
-
postConditionMode:
|
|
1712
|
+
postConditionMode: v45.optional(v45.union([v45.literal("allow"), v45.literal("deny")]))
|
|
1692
1713
|
});
|
|
1693
|
-
var stxCallContractResultSchema =
|
|
1714
|
+
var stxCallContractResultSchema = v45.object({
|
|
1694
1715
|
/**
|
|
1695
1716
|
* The ID of the transaction.
|
|
1696
1717
|
*/
|
|
1697
|
-
txid:
|
|
1718
|
+
txid: v45.string(),
|
|
1698
1719
|
/**
|
|
1699
1720
|
* A Stacks transaction as a hex-encoded string.
|
|
1700
1721
|
*/
|
|
1701
|
-
transaction:
|
|
1722
|
+
transaction: v45.string()
|
|
1702
1723
|
});
|
|
1703
|
-
var stxCallContractRequestMessageSchema =
|
|
1724
|
+
var stxCallContractRequestMessageSchema = v45.object({
|
|
1704
1725
|
...rpcRequestMessageSchema.entries,
|
|
1705
|
-
...
|
|
1706
|
-
method:
|
|
1726
|
+
...v45.object({
|
|
1727
|
+
method: v45.literal(stxCallContractMethodName),
|
|
1707
1728
|
params: stxCallContractParamsSchema,
|
|
1708
|
-
id:
|
|
1729
|
+
id: v45.string()
|
|
1709
1730
|
}).entries
|
|
1710
1731
|
});
|
|
1711
1732
|
|
|
1712
1733
|
// src/request/types/stxMethods/deployContract.ts
|
|
1713
|
-
var
|
|
1734
|
+
var v46 = __toESM(require("valibot"));
|
|
1714
1735
|
var stxDeployContractMethodName = "stx_deployContract";
|
|
1715
|
-
var stxDeployContractParamsSchema =
|
|
1736
|
+
var stxDeployContractParamsSchema = v46.object({
|
|
1716
1737
|
/**
|
|
1717
1738
|
* Name of the contract.
|
|
1718
1739
|
*/
|
|
1719
|
-
name:
|
|
1740
|
+
name: v46.string(),
|
|
1720
1741
|
/**
|
|
1721
1742
|
* The source code of the Clarity contract.
|
|
1722
1743
|
*/
|
|
1723
|
-
clarityCode:
|
|
1744
|
+
clarityCode: v46.string(),
|
|
1724
1745
|
/**
|
|
1725
1746
|
* The version of the Clarity contract.
|
|
1726
1747
|
*/
|
|
1727
|
-
clarityVersion:
|
|
1748
|
+
clarityVersion: v46.optional(v46.number()),
|
|
1728
1749
|
/**
|
|
1729
1750
|
* The post conditions to apply to the contract call.
|
|
1730
1751
|
*/
|
|
1731
|
-
postConditions:
|
|
1752
|
+
postConditions: v46.optional(v46.array(v46.string())),
|
|
1732
1753
|
/**
|
|
1733
1754
|
* The mode to apply to the post conditions.
|
|
1734
1755
|
*/
|
|
1735
|
-
postConditionMode:
|
|
1756
|
+
postConditionMode: v46.optional(v46.union([v46.literal("allow"), v46.literal("deny")]))
|
|
1736
1757
|
});
|
|
1737
|
-
var stxDeployContractResultSchema =
|
|
1758
|
+
var stxDeployContractResultSchema = v46.object({
|
|
1738
1759
|
/**
|
|
1739
1760
|
* The ID of the transaction.
|
|
1740
1761
|
*/
|
|
1741
|
-
txid:
|
|
1762
|
+
txid: v46.string(),
|
|
1742
1763
|
/**
|
|
1743
1764
|
* A Stacks transaction as a hex-encoded string.
|
|
1744
1765
|
*/
|
|
1745
|
-
transaction:
|
|
1766
|
+
transaction: v46.string()
|
|
1746
1767
|
});
|
|
1747
|
-
var stxDeployContractRequestMessageSchema =
|
|
1768
|
+
var stxDeployContractRequestMessageSchema = v46.object({
|
|
1748
1769
|
...rpcRequestMessageSchema.entries,
|
|
1749
|
-
...
|
|
1750
|
-
method:
|
|
1770
|
+
...v46.object({
|
|
1771
|
+
method: v46.literal(stxDeployContractMethodName),
|
|
1751
1772
|
params: stxDeployContractParamsSchema,
|
|
1752
|
-
id:
|
|
1773
|
+
id: v46.string()
|
|
1753
1774
|
}).entries
|
|
1754
1775
|
});
|
|
1755
1776
|
|
|
1756
1777
|
// src/request/types/stxMethods/getAccounts.ts
|
|
1757
|
-
var
|
|
1778
|
+
var v47 = __toESM(require("valibot"));
|
|
1758
1779
|
var stxGetAccountsMethodName = "stx_getAccounts";
|
|
1759
|
-
var stxGetAccountsParamsSchema =
|
|
1760
|
-
var stxGetAccountsResultSchema =
|
|
1780
|
+
var stxGetAccountsParamsSchema = v47.nullish(v47.null());
|
|
1781
|
+
var stxGetAccountsResultSchema = v47.object({
|
|
1761
1782
|
/**
|
|
1762
1783
|
* The addresses generated for the given purposes.
|
|
1763
1784
|
*/
|
|
1764
|
-
addresses:
|
|
1765
|
-
|
|
1766
|
-
address:
|
|
1767
|
-
publicKey:
|
|
1768
|
-
gaiaHubUrl:
|
|
1769
|
-
gaiaAppKey:
|
|
1785
|
+
addresses: v47.array(
|
|
1786
|
+
v47.object({
|
|
1787
|
+
address: v47.string(),
|
|
1788
|
+
publicKey: v47.string(),
|
|
1789
|
+
gaiaHubUrl: v47.string(),
|
|
1790
|
+
gaiaAppKey: v47.string()
|
|
1770
1791
|
})
|
|
1771
1792
|
),
|
|
1772
1793
|
network: getNetworkResultSchema
|
|
1773
1794
|
});
|
|
1774
|
-
var stxGetAccountsRequestMessageSchema =
|
|
1795
|
+
var stxGetAccountsRequestMessageSchema = v47.object({
|
|
1775
1796
|
...rpcRequestMessageSchema.entries,
|
|
1776
|
-
...
|
|
1777
|
-
method:
|
|
1797
|
+
...v47.object({
|
|
1798
|
+
method: v47.literal(stxGetAccountsMethodName),
|
|
1778
1799
|
params: stxGetAccountsParamsSchema,
|
|
1779
|
-
id:
|
|
1800
|
+
id: v47.string()
|
|
1780
1801
|
}).entries
|
|
1781
1802
|
});
|
|
1782
1803
|
|
|
1783
1804
|
// src/request/types/stxMethods/getAddresses.ts
|
|
1784
|
-
var
|
|
1805
|
+
var v48 = __toESM(require("valibot"));
|
|
1785
1806
|
var stxGetAddressesMethodName = "stx_getAddresses";
|
|
1786
|
-
var stxGetAddressesParamsSchema =
|
|
1787
|
-
|
|
1807
|
+
var stxGetAddressesParamsSchema = v48.nullish(
|
|
1808
|
+
v48.object({
|
|
1788
1809
|
/**
|
|
1789
1810
|
* A message to be displayed to the user in the request prompt.
|
|
1790
1811
|
*/
|
|
1791
|
-
message:
|
|
1812
|
+
message: v48.optional(v48.string())
|
|
1792
1813
|
})
|
|
1793
1814
|
);
|
|
1794
|
-
var stxGetAddressesResultSchema =
|
|
1815
|
+
var stxGetAddressesResultSchema = v48.object({
|
|
1795
1816
|
/**
|
|
1796
1817
|
* The addresses generated for the given purposes.
|
|
1797
1818
|
*/
|
|
1798
|
-
addresses:
|
|
1819
|
+
addresses: v48.array(addressSchema),
|
|
1799
1820
|
network: getNetworkResultSchema
|
|
1800
1821
|
});
|
|
1801
|
-
var stxGetAddressesRequestMessageSchema =
|
|
1822
|
+
var stxGetAddressesRequestMessageSchema = v48.object({
|
|
1802
1823
|
...rpcRequestMessageSchema.entries,
|
|
1803
|
-
...
|
|
1804
|
-
method:
|
|
1824
|
+
...v48.object({
|
|
1825
|
+
method: v48.literal(stxGetAddressesMethodName),
|
|
1805
1826
|
params: stxGetAddressesParamsSchema,
|
|
1806
|
-
id:
|
|
1827
|
+
id: v48.string()
|
|
1807
1828
|
}).entries
|
|
1808
1829
|
});
|
|
1809
1830
|
|
|
1810
1831
|
// src/request/types/stxMethods/signMessage.ts
|
|
1811
|
-
var
|
|
1832
|
+
var v49 = __toESM(require("valibot"));
|
|
1812
1833
|
var stxSignMessageMethodName = "stx_signMessage";
|
|
1813
|
-
var stxSignMessageParamsSchema =
|
|
1834
|
+
var stxSignMessageParamsSchema = v49.object({
|
|
1814
1835
|
/**
|
|
1815
1836
|
* The message to sign.
|
|
1816
1837
|
*/
|
|
1817
|
-
message:
|
|
1838
|
+
message: v49.string()
|
|
1818
1839
|
});
|
|
1819
|
-
var stxSignMessageResultSchema =
|
|
1840
|
+
var stxSignMessageResultSchema = v49.object({
|
|
1820
1841
|
/**
|
|
1821
1842
|
* The signature of the message.
|
|
1822
1843
|
*/
|
|
1823
|
-
signature:
|
|
1844
|
+
signature: v49.string(),
|
|
1824
1845
|
/**
|
|
1825
1846
|
* The public key used to sign the message.
|
|
1826
1847
|
*/
|
|
1827
|
-
publicKey:
|
|
1848
|
+
publicKey: v49.string()
|
|
1828
1849
|
});
|
|
1829
|
-
var stxSignMessageRequestMessageSchema =
|
|
1850
|
+
var stxSignMessageRequestMessageSchema = v49.object({
|
|
1830
1851
|
...rpcRequestMessageSchema.entries,
|
|
1831
|
-
...
|
|
1832
|
-
method:
|
|
1852
|
+
...v49.object({
|
|
1853
|
+
method: v49.literal(stxSignMessageMethodName),
|
|
1833
1854
|
params: stxSignMessageParamsSchema,
|
|
1834
|
-
id:
|
|
1855
|
+
id: v49.string()
|
|
1835
1856
|
}).entries
|
|
1836
1857
|
});
|
|
1837
1858
|
|
|
1838
1859
|
// src/request/types/stxMethods/signStructuredMessage.ts
|
|
1839
|
-
var
|
|
1860
|
+
var v50 = __toESM(require("valibot"));
|
|
1840
1861
|
var stxSignStructuredMessageMethodName = "stx_signStructuredMessage";
|
|
1841
|
-
var stxSignStructuredMessageParamsSchema =
|
|
1862
|
+
var stxSignStructuredMessageParamsSchema = v50.object({
|
|
1842
1863
|
/**
|
|
1843
1864
|
* The domain to be signed.
|
|
1844
1865
|
*/
|
|
1845
|
-
domain:
|
|
1866
|
+
domain: v50.string(),
|
|
1846
1867
|
/**
|
|
1847
1868
|
* Message payload to be signed.
|
|
1848
1869
|
*/
|
|
1849
|
-
message:
|
|
1870
|
+
message: v50.string(),
|
|
1850
1871
|
/**
|
|
1851
1872
|
* The public key to sign the message with.
|
|
1852
1873
|
*/
|
|
1853
|
-
publicKey:
|
|
1874
|
+
publicKey: v50.optional(v50.string())
|
|
1854
1875
|
});
|
|
1855
|
-
var stxSignStructuredMessageResultSchema =
|
|
1876
|
+
var stxSignStructuredMessageResultSchema = v50.object({
|
|
1856
1877
|
/**
|
|
1857
1878
|
* Signature of the message.
|
|
1858
1879
|
*/
|
|
1859
|
-
signature:
|
|
1880
|
+
signature: v50.string(),
|
|
1860
1881
|
/**
|
|
1861
1882
|
* Public key as hex-encoded string.
|
|
1862
1883
|
*/
|
|
1863
|
-
publicKey:
|
|
1884
|
+
publicKey: v50.string()
|
|
1864
1885
|
});
|
|
1865
|
-
var stxSignStructuredMessageRequestMessageSchema =
|
|
1886
|
+
var stxSignStructuredMessageRequestMessageSchema = v50.object({
|
|
1866
1887
|
...rpcRequestMessageSchema.entries,
|
|
1867
|
-
...
|
|
1868
|
-
method:
|
|
1888
|
+
...v50.object({
|
|
1889
|
+
method: v50.literal(stxSignStructuredMessageMethodName),
|
|
1869
1890
|
params: stxSignStructuredMessageParamsSchema,
|
|
1870
|
-
id:
|
|
1891
|
+
id: v50.string()
|
|
1871
1892
|
}).entries
|
|
1872
1893
|
});
|
|
1873
1894
|
|
|
1874
1895
|
// src/request/types/stxMethods/signTransaction.ts
|
|
1875
|
-
var
|
|
1896
|
+
var v51 = __toESM(require("valibot"));
|
|
1876
1897
|
var stxSignTransactionMethodName = "stx_signTransaction";
|
|
1877
|
-
var stxSignTransactionParamsSchema =
|
|
1898
|
+
var stxSignTransactionParamsSchema = v51.object({
|
|
1878
1899
|
/**
|
|
1879
1900
|
* The transaction to sign as a hex-encoded string.
|
|
1880
1901
|
*/
|
|
1881
|
-
transaction:
|
|
1902
|
+
transaction: v51.string(),
|
|
1882
1903
|
/**
|
|
1883
1904
|
* The public key to sign the transaction with. The wallet may use any key
|
|
1884
1905
|
* when not provided.
|
|
1885
1906
|
*/
|
|
1886
|
-
pubkey:
|
|
1907
|
+
pubkey: v51.optional(v51.string()),
|
|
1887
1908
|
/**
|
|
1888
1909
|
* Whether to broadcast the transaction after signing. Defaults to `true`.
|
|
1889
1910
|
*/
|
|
1890
|
-
broadcast:
|
|
1911
|
+
broadcast: v51.optional(v51.boolean())
|
|
1891
1912
|
});
|
|
1892
|
-
var stxSignTransactionResultSchema =
|
|
1913
|
+
var stxSignTransactionResultSchema = v51.object({
|
|
1893
1914
|
/**
|
|
1894
1915
|
* The signed transaction as a hex-encoded string.
|
|
1895
1916
|
*/
|
|
1896
|
-
transaction:
|
|
1917
|
+
transaction: v51.string()
|
|
1897
1918
|
});
|
|
1898
|
-
var stxSignTransactionRequestMessageSchema =
|
|
1919
|
+
var stxSignTransactionRequestMessageSchema = v51.object({
|
|
1899
1920
|
...rpcRequestMessageSchema.entries,
|
|
1900
|
-
...
|
|
1901
|
-
method:
|
|
1921
|
+
...v51.object({
|
|
1922
|
+
method: v51.literal(stxSignTransactionMethodName),
|
|
1902
1923
|
params: stxSignTransactionParamsSchema,
|
|
1903
|
-
id:
|
|
1924
|
+
id: v51.string()
|
|
1904
1925
|
}).entries
|
|
1905
1926
|
});
|
|
1906
1927
|
|
|
1907
1928
|
// src/request/types/stxMethods/signTransactions.ts
|
|
1908
|
-
var
|
|
1929
|
+
var v52 = __toESM(require("valibot"));
|
|
1909
1930
|
var stxSignTransactionsMethodName = "stx_signTransactions";
|
|
1910
|
-
var stxSignTransactionsParamsSchema =
|
|
1931
|
+
var stxSignTransactionsParamsSchema = v52.object({
|
|
1911
1932
|
/**
|
|
1912
1933
|
* The transactions to sign as hex-encoded strings.
|
|
1913
1934
|
*/
|
|
1914
|
-
transactions:
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1935
|
+
transactions: v52.pipe(
|
|
1936
|
+
v52.array(
|
|
1937
|
+
v52.pipe(
|
|
1938
|
+
v52.string(),
|
|
1939
|
+
v52.check((hex) => {
|
|
1919
1940
|
return true;
|
|
1920
1941
|
}, "Invalid hex-encoded Stacks transaction.")
|
|
1921
1942
|
)
|
|
1922
1943
|
),
|
|
1923
|
-
|
|
1944
|
+
v52.minLength(1)
|
|
1924
1945
|
),
|
|
1925
1946
|
/**
|
|
1926
1947
|
* Whether the signed transactions should be broadcast after signing. Defaults
|
|
1927
1948
|
* to `true`.
|
|
1928
1949
|
*/
|
|
1929
|
-
broadcast:
|
|
1950
|
+
broadcast: v52.optional(v52.boolean())
|
|
1930
1951
|
});
|
|
1931
|
-
var stxSignTransactionsResultSchema =
|
|
1952
|
+
var stxSignTransactionsResultSchema = v52.object({
|
|
1932
1953
|
/**
|
|
1933
1954
|
* The signed transactions as hex-encoded strings, in the same order as in the
|
|
1934
1955
|
* sign request.
|
|
1935
1956
|
*/
|
|
1936
|
-
transactions:
|
|
1957
|
+
transactions: v52.array(v52.string())
|
|
1937
1958
|
});
|
|
1938
|
-
var stxSignTransactionsRequestMessageSchema =
|
|
1959
|
+
var stxSignTransactionsRequestMessageSchema = v52.object({
|
|
1939
1960
|
...rpcRequestMessageSchema.entries,
|
|
1940
|
-
...
|
|
1941
|
-
method:
|
|
1961
|
+
...v52.object({
|
|
1962
|
+
method: v52.literal(stxSignTransactionsMethodName),
|
|
1942
1963
|
params: stxSignTransactionsParamsSchema,
|
|
1943
|
-
id:
|
|
1964
|
+
id: v52.string()
|
|
1944
1965
|
}).entries
|
|
1945
1966
|
});
|
|
1946
1967
|
|
|
1947
1968
|
// src/request/types/stxMethods/transferStx.ts
|
|
1948
|
-
var
|
|
1969
|
+
var v53 = __toESM(require("valibot"));
|
|
1949
1970
|
var stxTransferStxMethodName = "stx_transferStx";
|
|
1950
|
-
var stxTransferStxParamsSchema =
|
|
1971
|
+
var stxTransferStxParamsSchema = v53.object({
|
|
1951
1972
|
/**
|
|
1952
1973
|
* Amount of STX tokens to transfer in microstacks as a string. Anything
|
|
1953
1974
|
* parseable by `BigInt` is acceptable.
|
|
@@ -1960,23 +1981,23 @@ var stxTransferStxParamsSchema = v52.object({
|
|
|
1960
1981
|
* const amount3 = '1234';
|
|
1961
1982
|
* ```
|
|
1962
1983
|
*/
|
|
1963
|
-
amount:
|
|
1984
|
+
amount: v53.union([v53.number(), v53.string()]),
|
|
1964
1985
|
/**
|
|
1965
1986
|
* The recipient's principal.
|
|
1966
1987
|
*/
|
|
1967
|
-
recipient:
|
|
1988
|
+
recipient: v53.string(),
|
|
1968
1989
|
/**
|
|
1969
1990
|
* A string representing the memo.
|
|
1970
1991
|
*/
|
|
1971
|
-
memo:
|
|
1992
|
+
memo: v53.optional(v53.string()),
|
|
1972
1993
|
/**
|
|
1973
1994
|
* Version of parameter format.
|
|
1974
1995
|
*/
|
|
1975
|
-
version:
|
|
1996
|
+
version: v53.optional(v53.string()),
|
|
1976
1997
|
/**
|
|
1977
1998
|
* The mode of the post conditions.
|
|
1978
1999
|
*/
|
|
1979
|
-
postConditionMode:
|
|
2000
|
+
postConditionMode: v53.optional(v53.number()),
|
|
1980
2001
|
/**
|
|
1981
2002
|
* A hex-encoded string representing the post conditions.
|
|
1982
2003
|
*
|
|
@@ -1989,29 +2010,29 @@ var stxTransferStxParamsSchema = v52.object({
|
|
|
1989
2010
|
* const hexPostCondition = serializePostCondition(postCondition).toString('hex');
|
|
1990
2011
|
* ```
|
|
1991
2012
|
*/
|
|
1992
|
-
postConditions:
|
|
2013
|
+
postConditions: v53.optional(v53.array(v53.string())),
|
|
1993
2014
|
/**
|
|
1994
2015
|
* The public key to sign the transaction with. The wallet may use any key
|
|
1995
2016
|
* when not provided.
|
|
1996
2017
|
*/
|
|
1997
|
-
pubkey:
|
|
2018
|
+
pubkey: v53.optional(v53.string())
|
|
1998
2019
|
});
|
|
1999
|
-
var stxTransferStxResultSchema =
|
|
2020
|
+
var stxTransferStxResultSchema = v53.object({
|
|
2000
2021
|
/**
|
|
2001
2022
|
* The ID of the transaction.
|
|
2002
2023
|
*/
|
|
2003
|
-
txid:
|
|
2024
|
+
txid: v53.string(),
|
|
2004
2025
|
/**
|
|
2005
2026
|
* A Stacks transaction as a hex-encoded string.
|
|
2006
2027
|
*/
|
|
2007
|
-
transaction:
|
|
2028
|
+
transaction: v53.string()
|
|
2008
2029
|
});
|
|
2009
|
-
var stxTransferStxRequestMessageSchema =
|
|
2030
|
+
var stxTransferStxRequestMessageSchema = v53.object({
|
|
2010
2031
|
...rpcRequestMessageSchema.entries,
|
|
2011
|
-
...
|
|
2012
|
-
method:
|
|
2032
|
+
...v53.object({
|
|
2033
|
+
method: v53.literal(stxTransferStxMethodName),
|
|
2013
2034
|
params: stxTransferStxParamsSchema,
|
|
2014
|
-
id:
|
|
2035
|
+
id: v53.string()
|
|
2015
2036
|
}).entries
|
|
2016
2037
|
});
|
|
2017
2038
|
|
|
@@ -2019,13 +2040,13 @@ var stxTransferStxRequestMessageSchema = v52.object({
|
|
|
2019
2040
|
var cache = {};
|
|
2020
2041
|
var requestInternal = async (provider, method, params) => {
|
|
2021
2042
|
const response = await provider.request(method, params);
|
|
2022
|
-
if (
|
|
2043
|
+
if (v54.is(rpcErrorResponseMessageSchema, response)) {
|
|
2023
2044
|
return {
|
|
2024
2045
|
status: "error",
|
|
2025
2046
|
error: response.error
|
|
2026
2047
|
};
|
|
2027
2048
|
}
|
|
2028
|
-
if (
|
|
2049
|
+
if (v54.is(rpcSuccessResponseMessageSchema, response)) {
|
|
2029
2050
|
return {
|
|
2030
2051
|
status: "success",
|
|
2031
2052
|
result: response.result
|
|
@@ -3162,6 +3183,10 @@ var signMultipleTransactions = async (options) => {
|
|
|
3162
3183
|
isProviderInstalled,
|
|
3163
3184
|
networkChangeEventName,
|
|
3164
3185
|
networkChangeSchema,
|
|
3186
|
+
openBridgeMethodName,
|
|
3187
|
+
openBridgeParamsSchema,
|
|
3188
|
+
openBridgeRequestMessageSchema,
|
|
3189
|
+
openBridgeResultSchema,
|
|
3165
3190
|
openReceiveMethodName,
|
|
3166
3191
|
openReceiveParamsSchema,
|
|
3167
3192
|
openReceiveRequestMessageSchema,
|