@sats-connect/core 0.5.7 → 0.5.8-2731ce5
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 +151 -61
- package/dist/index.d.ts +151 -61
- package/dist/index.js +434 -389
- package/dist/index.mjs +430 -389
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
2
|
|
|
3
|
+
declare enum AddressPurpose {
|
|
4
|
+
Ordinals = "ordinals",
|
|
5
|
+
Payment = "payment",
|
|
6
|
+
Stacks = "stacks"
|
|
7
|
+
}
|
|
8
|
+
interface GetAddressPayload extends RequestPayload {
|
|
9
|
+
purposes: AddressPurpose[];
|
|
10
|
+
message: string;
|
|
11
|
+
}
|
|
12
|
+
declare enum AddressType {
|
|
13
|
+
p2pkh = "p2pkh",
|
|
14
|
+
p2sh = "p2sh",
|
|
15
|
+
p2wpkh = "p2wpkh",
|
|
16
|
+
p2wsh = "p2wsh",
|
|
17
|
+
p2tr = "p2tr",
|
|
18
|
+
stacks = "stacks"
|
|
19
|
+
}
|
|
20
|
+
declare const addressSchema: v.ObjectSchema<{
|
|
21
|
+
readonly address: v.StringSchema<undefined>;
|
|
22
|
+
readonly publicKey: v.StringSchema<undefined>;
|
|
23
|
+
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
24
|
+
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
25
|
+
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
26
|
+
}, undefined>;
|
|
27
|
+
type Address = v.InferOutput<typeof addressSchema>;
|
|
28
|
+
interface GetAddressResponse {
|
|
29
|
+
addresses: Address[];
|
|
30
|
+
}
|
|
31
|
+
type GetAddressOptions = RequestOptions<GetAddressPayload, GetAddressResponse>;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated Use `request()` instead
|
|
35
|
+
*/
|
|
36
|
+
declare const getAddress: (options: GetAddressOptions) => Promise<void>;
|
|
37
|
+
|
|
3
38
|
interface GetCapabilitiesPayload extends RequestPayload {
|
|
4
39
|
}
|
|
5
40
|
type GetCapabilitiesResponse = Capability[];
|
|
@@ -103,7 +138,7 @@ declare const networkChangeEventName = "networkChange";
|
|
|
103
138
|
declare const networkChangeSchema: v.ObjectSchema<{
|
|
104
139
|
readonly type: v.LiteralSchema<"networkChange", undefined>;
|
|
105
140
|
readonly bitcoin: v.ObjectSchema<{
|
|
106
|
-
readonly name: v.
|
|
141
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
107
142
|
}, undefined>;
|
|
108
143
|
readonly stacks: v.ObjectSchema<{
|
|
109
144
|
readonly name: v.StringSchema<undefined>;
|
|
@@ -120,7 +155,7 @@ declare const walletEventSchema: v.VariantSchema<"type", [v.ObjectSchema<{
|
|
|
120
155
|
}, undefined>, v.ObjectSchema<{
|
|
121
156
|
readonly type: v.LiteralSchema<"networkChange", undefined>;
|
|
122
157
|
readonly bitcoin: v.ObjectSchema<{
|
|
123
|
-
readonly name: v.
|
|
158
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
124
159
|
}, undefined>;
|
|
125
160
|
readonly stacks: v.ObjectSchema<{
|
|
126
161
|
readonly name: v.StringSchema<undefined>;
|
|
@@ -304,41 +339,6 @@ type RpcResult<Method extends keyof Requests> = {
|
|
|
304
339
|
status: 'error';
|
|
305
340
|
};
|
|
306
341
|
|
|
307
|
-
declare enum AddressPurpose {
|
|
308
|
-
Ordinals = "ordinals",
|
|
309
|
-
Payment = "payment",
|
|
310
|
-
Stacks = "stacks"
|
|
311
|
-
}
|
|
312
|
-
interface GetAddressPayload extends RequestPayload {
|
|
313
|
-
purposes: AddressPurpose[];
|
|
314
|
-
message: string;
|
|
315
|
-
}
|
|
316
|
-
declare enum AddressType {
|
|
317
|
-
p2pkh = "p2pkh",
|
|
318
|
-
p2sh = "p2sh",
|
|
319
|
-
p2wpkh = "p2wpkh",
|
|
320
|
-
p2wsh = "p2wsh",
|
|
321
|
-
p2tr = "p2tr",
|
|
322
|
-
stacks = "stacks"
|
|
323
|
-
}
|
|
324
|
-
declare const addressSchema: v.ObjectSchema<{
|
|
325
|
-
readonly address: v.StringSchema<undefined>;
|
|
326
|
-
readonly publicKey: v.StringSchema<undefined>;
|
|
327
|
-
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
328
|
-
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
329
|
-
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
330
|
-
}, undefined>;
|
|
331
|
-
type Address = v.InferOutput<typeof addressSchema>;
|
|
332
|
-
interface GetAddressResponse {
|
|
333
|
-
addresses: Address[];
|
|
334
|
-
}
|
|
335
|
-
type GetAddressOptions = RequestOptions<GetAddressPayload, GetAddressResponse>;
|
|
336
|
-
|
|
337
|
-
/**
|
|
338
|
-
* @deprecated Use `request()` instead
|
|
339
|
-
*/
|
|
340
|
-
declare const getAddress: (options: GetAddressOptions) => Promise<void>;
|
|
341
|
-
|
|
342
342
|
declare const getInfoMethodName = "getInfo";
|
|
343
343
|
declare const getInfoParamsSchema: v.NullishSchema<v.NullSchema<undefined>, never>;
|
|
344
344
|
type GetInfoParams = v.InferOutput<typeof getInfoParamsSchema>;
|
|
@@ -389,6 +389,14 @@ declare const getAddressesResultSchema: v.ObjectSchema<{
|
|
|
389
389
|
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
390
390
|
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
391
391
|
}, undefined>, undefined>;
|
|
392
|
+
readonly network: v.ObjectSchema<{
|
|
393
|
+
readonly bitcoin: v.ObjectSchema<{
|
|
394
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
395
|
+
}, undefined>;
|
|
396
|
+
readonly stacks: v.ObjectSchema<{
|
|
397
|
+
readonly name: v.StringSchema<undefined>;
|
|
398
|
+
}, undefined>;
|
|
399
|
+
}, undefined>;
|
|
392
400
|
}, undefined>;
|
|
393
401
|
type GetAddressesResult = v.InferOutput<typeof getAddressesResultSchema>;
|
|
394
402
|
declare const getAddressesRequestMessageSchema: v.ObjectSchema<{
|
|
@@ -957,6 +965,10 @@ declare const stxCallContractParamsSchema: v.ObjectSchema<{
|
|
|
957
965
|
* https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
|
|
958
966
|
*/
|
|
959
967
|
readonly functionName: v.StringSchema<undefined>;
|
|
968
|
+
/**
|
|
969
|
+
* @deprecated in favor of `functionArgs` for @stacks/connect compatibility
|
|
970
|
+
*/
|
|
971
|
+
readonly arguments: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
|
|
960
972
|
/**
|
|
961
973
|
* The function's arguments. The arguments are expected to be hex-encoded
|
|
962
974
|
* strings of Clarity values.
|
|
@@ -971,7 +983,15 @@ declare const stxCallContractParamsSchema: v.ObjectSchema<{
|
|
|
971
983
|
* const hexArgs = functionArgs.map(cvToHex);
|
|
972
984
|
* ```
|
|
973
985
|
*/
|
|
974
|
-
readonly
|
|
986
|
+
readonly functionArgs: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
|
|
987
|
+
/**
|
|
988
|
+
* The post conditions to apply to the contract call.
|
|
989
|
+
*/
|
|
990
|
+
readonly postConditions: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
|
|
991
|
+
/**
|
|
992
|
+
* The mode to apply to the post conditions.
|
|
993
|
+
*/
|
|
994
|
+
readonly postConditionMode: v.OptionalSchema<v.UnionSchema<[v.LiteralSchema<"allow", undefined>, v.LiteralSchema<"deny", undefined>], undefined>, never>;
|
|
975
995
|
}, undefined>;
|
|
976
996
|
type StxCallContractParams = v.InferOutput<typeof stxCallContractParamsSchema>;
|
|
977
997
|
declare const stxCallContractResultSchema: v.ObjectSchema<{
|
|
@@ -1001,6 +1021,10 @@ declare const stxCallContractRequestMessageSchema: v.ObjectSchema<{
|
|
|
1001
1021
|
* https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
|
|
1002
1022
|
*/
|
|
1003
1023
|
readonly functionName: v.StringSchema<undefined>;
|
|
1024
|
+
/**
|
|
1025
|
+
* @deprecated in favor of `functionArgs` for @stacks/connect compatibility
|
|
1026
|
+
*/
|
|
1027
|
+
readonly arguments: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
|
|
1004
1028
|
/**
|
|
1005
1029
|
* The function's arguments. The arguments are expected to be hex-encoded
|
|
1006
1030
|
* strings of Clarity values.
|
|
@@ -1015,7 +1039,15 @@ declare const stxCallContractRequestMessageSchema: v.ObjectSchema<{
|
|
|
1015
1039
|
* const hexArgs = functionArgs.map(cvToHex);
|
|
1016
1040
|
* ```
|
|
1017
1041
|
*/
|
|
1018
|
-
readonly
|
|
1042
|
+
readonly functionArgs: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
|
|
1043
|
+
/**
|
|
1044
|
+
* The post conditions to apply to the contract call.
|
|
1045
|
+
*/
|
|
1046
|
+
readonly postConditions: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
|
|
1047
|
+
/**
|
|
1048
|
+
* The mode to apply to the post conditions.
|
|
1049
|
+
*/
|
|
1050
|
+
readonly postConditionMode: v.OptionalSchema<v.UnionSchema<[v.LiteralSchema<"allow", undefined>, v.LiteralSchema<"deny", undefined>], undefined>, never>;
|
|
1019
1051
|
}, undefined>;
|
|
1020
1052
|
readonly id: v.StringSchema<undefined>;
|
|
1021
1053
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
@@ -1037,6 +1069,14 @@ declare const stxDeployContractParamsSchema: v.ObjectSchema<{
|
|
|
1037
1069
|
* The version of the Clarity contract.
|
|
1038
1070
|
*/
|
|
1039
1071
|
readonly clarityVersion: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
1072
|
+
/**
|
|
1073
|
+
* The post conditions to apply to the contract call.
|
|
1074
|
+
*/
|
|
1075
|
+
readonly postConditions: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
|
|
1076
|
+
/**
|
|
1077
|
+
* The mode to apply to the post conditions.
|
|
1078
|
+
*/
|
|
1079
|
+
readonly postConditionMode: v.OptionalSchema<v.UnionSchema<[v.LiteralSchema<"allow", undefined>, v.LiteralSchema<"deny", undefined>], undefined>, never>;
|
|
1040
1080
|
}, undefined>;
|
|
1041
1081
|
type StxDeployContractParams = v.InferOutput<typeof stxDeployContractParamsSchema>;
|
|
1042
1082
|
declare const stxDeployContractResultSchema: v.ObjectSchema<{
|
|
@@ -1065,6 +1105,14 @@ declare const stxDeployContractRequestMessageSchema: v.ObjectSchema<{
|
|
|
1065
1105
|
* The version of the Clarity contract.
|
|
1066
1106
|
*/
|
|
1067
1107
|
readonly clarityVersion: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
1108
|
+
/**
|
|
1109
|
+
* The post conditions to apply to the contract call.
|
|
1110
|
+
*/
|
|
1111
|
+
readonly postConditions: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
|
|
1112
|
+
/**
|
|
1113
|
+
* The mode to apply to the post conditions.
|
|
1114
|
+
*/
|
|
1115
|
+
readonly postConditionMode: v.OptionalSchema<v.UnionSchema<[v.LiteralSchema<"allow", undefined>, v.LiteralSchema<"deny", undefined>], undefined>, never>;
|
|
1068
1116
|
}, undefined>;
|
|
1069
1117
|
readonly id: v.StringSchema<undefined>;
|
|
1070
1118
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
@@ -1085,6 +1133,14 @@ declare const stxGetAccountsResultSchema: v.ObjectSchema<{
|
|
|
1085
1133
|
readonly gaiaHubUrl: v.StringSchema<undefined>;
|
|
1086
1134
|
readonly gaiaAppKey: v.StringSchema<undefined>;
|
|
1087
1135
|
}, undefined>, undefined>;
|
|
1136
|
+
readonly network: v.ObjectSchema<{
|
|
1137
|
+
readonly bitcoin: v.ObjectSchema<{
|
|
1138
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1139
|
+
}, undefined>;
|
|
1140
|
+
readonly stacks: v.ObjectSchema<{
|
|
1141
|
+
readonly name: v.StringSchema<undefined>;
|
|
1142
|
+
}, undefined>;
|
|
1143
|
+
}, undefined>;
|
|
1088
1144
|
}, undefined>;
|
|
1089
1145
|
type StxGetAccountsResult = v.InferOutput<typeof stxGetAccountsResultSchema>;
|
|
1090
1146
|
declare const stxGetAccountsRequestMessageSchema: v.ObjectSchema<{
|
|
@@ -1115,6 +1171,14 @@ declare const stxGetAddressesResultSchema: v.ObjectSchema<{
|
|
|
1115
1171
|
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
1116
1172
|
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1117
1173
|
}, undefined>, undefined>;
|
|
1174
|
+
readonly network: v.ObjectSchema<{
|
|
1175
|
+
readonly bitcoin: v.ObjectSchema<{
|
|
1176
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1177
|
+
}, undefined>;
|
|
1178
|
+
readonly stacks: v.ObjectSchema<{
|
|
1179
|
+
readonly name: v.StringSchema<undefined>;
|
|
1180
|
+
}, undefined>;
|
|
1181
|
+
}, undefined>;
|
|
1118
1182
|
}, undefined>;
|
|
1119
1183
|
type StxGetAddressesResult = v.InferOutput<typeof stxGetAddressesResultSchema>;
|
|
1120
1184
|
declare const stxGetAddressesRequestMessageSchema: v.ObjectSchema<{
|
|
@@ -1603,6 +1667,43 @@ declare const getCurrentPermissionsRequestMessageSchema: v.ObjectSchema<{
|
|
|
1603
1667
|
}, undefined>;
|
|
1604
1668
|
type GetCurrentPermissionsRequestMessage = v.InferOutput<typeof getCurrentPermissionsRequestMessageSchema>;
|
|
1605
1669
|
type GetCurrentPermissions = MethodParamsAndResult<GetCurrentPermissionsParams, GetCurrentPermissionsResult>;
|
|
1670
|
+
declare const getNetworkMethodName = "wallet_getNetwork";
|
|
1671
|
+
declare const getNetworkParamsSchema: v.NullishSchema<v.NullSchema<undefined>, never>;
|
|
1672
|
+
type GetNetworkParams = v.InferOutput<typeof getNetworkParamsSchema>;
|
|
1673
|
+
declare const getNetworkResultSchema: v.ObjectSchema<{
|
|
1674
|
+
readonly bitcoin: v.ObjectSchema<{
|
|
1675
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1676
|
+
}, undefined>;
|
|
1677
|
+
readonly stacks: v.ObjectSchema<{
|
|
1678
|
+
readonly name: v.StringSchema<undefined>;
|
|
1679
|
+
}, undefined>;
|
|
1680
|
+
}, undefined>;
|
|
1681
|
+
type GetNetworkResult = v.InferOutput<typeof getNetworkResultSchema>;
|
|
1682
|
+
declare const getNetworkRequestMessageSchema: v.ObjectSchema<{
|
|
1683
|
+
readonly method: v.LiteralSchema<"wallet_getNetwork", undefined>;
|
|
1684
|
+
readonly params: v.NullishSchema<v.NullSchema<undefined>, never>;
|
|
1685
|
+
readonly id: v.StringSchema<undefined>;
|
|
1686
|
+
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1687
|
+
}, undefined>;
|
|
1688
|
+
type GetNetworkRequestMessage = v.InferOutput<typeof getNetworkRequestMessageSchema>;
|
|
1689
|
+
type GetNetwork = MethodParamsAndResult<GetNetworkParams, GetNetworkResult>;
|
|
1690
|
+
declare const changeNetworkMethodName = "wallet_changeNetwork";
|
|
1691
|
+
declare const changeNetworkParamsSchema: v.ObjectSchema<{
|
|
1692
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1693
|
+
}, undefined>;
|
|
1694
|
+
type ChangeNetworkParams = v.InferOutput<typeof changeNetworkParamsSchema>;
|
|
1695
|
+
declare const changeNetworkResultSchema: v.NullishSchema<v.NullSchema<undefined>, never>;
|
|
1696
|
+
type ChangeNetworkResult = v.InferOutput<typeof changeNetworkResultSchema>;
|
|
1697
|
+
declare const changeNetworkRequestMessageSchema: v.ObjectSchema<{
|
|
1698
|
+
readonly method: v.LiteralSchema<"wallet_changeNetwork", undefined>;
|
|
1699
|
+
readonly params: v.ObjectSchema<{
|
|
1700
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1701
|
+
}, undefined>;
|
|
1702
|
+
readonly id: v.StringSchema<undefined>;
|
|
1703
|
+
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1704
|
+
}, undefined>;
|
|
1705
|
+
type ChangeNetworkRequestMessage = v.InferOutput<typeof changeNetworkRequestMessageSchema>;
|
|
1706
|
+
type ChangeNetwork = MethodParamsAndResult<ChangeNetworkParams, ChangeNetworkResult>;
|
|
1606
1707
|
declare const getAccountMethodName = "wallet_getAccount";
|
|
1607
1708
|
declare const getAccountParamsSchema: v.NullishSchema<v.NullSchema<undefined>, never>;
|
|
1608
1709
|
type GetAccountParams = v.InferOutput<typeof getAccountParamsSchema>;
|
|
@@ -1616,6 +1717,14 @@ declare const getAccountResultSchema: v.ObjectSchema<{
|
|
|
1616
1717
|
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1617
1718
|
}, undefined>, undefined>;
|
|
1618
1719
|
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1720
|
+
readonly network: v.ObjectSchema<{
|
|
1721
|
+
readonly bitcoin: v.ObjectSchema<{
|
|
1722
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1723
|
+
}, undefined>;
|
|
1724
|
+
readonly stacks: v.ObjectSchema<{
|
|
1725
|
+
readonly name: v.StringSchema<undefined>;
|
|
1726
|
+
}, undefined>;
|
|
1727
|
+
}, undefined>;
|
|
1619
1728
|
}, undefined>;
|
|
1620
1729
|
type GetAccountResult = v.InferOutput<typeof getAccountResultSchema>;
|
|
1621
1730
|
declare const getAccountRequestMessageSchema: v.ObjectSchema<{
|
|
@@ -1626,26 +1735,6 @@ declare const getAccountRequestMessageSchema: v.ObjectSchema<{
|
|
|
1626
1735
|
}, undefined>;
|
|
1627
1736
|
type GetAccountRequestMessage = v.InferOutput<typeof getAccountRequestMessageSchema>;
|
|
1628
1737
|
type GetAccount = MethodParamsAndResult<GetAccountParams, GetAccountResult>;
|
|
1629
|
-
declare const getNetworkMethodName = "wallet_getNetwork";
|
|
1630
|
-
declare const getNetworkParamsSchema: v.NullishSchema<v.NullSchema<undefined>, never>;
|
|
1631
|
-
type GetNetworkParams = v.InferOutput<typeof getNetworkParamsSchema>;
|
|
1632
|
-
declare const getNetworkResultSchema: v.ObjectSchema<{
|
|
1633
|
-
readonly bitcoin: v.ObjectSchema<{
|
|
1634
|
-
readonly name: v.PicklistSchema<readonly ["Mainnet", "Testnet", "Testnet4", "Signet", "Regtest"], undefined>;
|
|
1635
|
-
}, undefined>;
|
|
1636
|
-
readonly stacks: v.ObjectSchema<{
|
|
1637
|
-
readonly name: v.StringSchema<undefined>;
|
|
1638
|
-
}, undefined>;
|
|
1639
|
-
}, undefined>;
|
|
1640
|
-
type GetNetworkResult = v.InferOutput<typeof getNetworkResultSchema>;
|
|
1641
|
-
declare const getNetworkRequestMessageSchema: v.ObjectSchema<{
|
|
1642
|
-
readonly method: v.LiteralSchema<"wallet_getNetwork", undefined>;
|
|
1643
|
-
readonly params: v.NullishSchema<v.NullSchema<undefined>, never>;
|
|
1644
|
-
readonly id: v.StringSchema<undefined>;
|
|
1645
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1646
|
-
}, undefined>;
|
|
1647
|
-
type GetNetworkRequestMessage = v.InferOutput<typeof getNetworkRequestMessageSchema>;
|
|
1648
|
-
type GetNetwork = MethodParamsAndResult<GetNetworkParams, GetNetworkResult>;
|
|
1649
1738
|
declare const connectMethodName = "wallet_connect";
|
|
1650
1739
|
declare const connectParamsSchema: v.NullishSchema<v.ObjectSchema<{
|
|
1651
1740
|
readonly permissions: v.OptionalSchema<v.ArraySchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
@@ -1677,7 +1766,7 @@ declare const connectResultSchema: v.ObjectSchema<{
|
|
|
1677
1766
|
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1678
1767
|
readonly network: v.ObjectSchema<{
|
|
1679
1768
|
readonly bitcoin: v.ObjectSchema<{
|
|
1680
|
-
readonly name: v.
|
|
1769
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1681
1770
|
}, undefined>;
|
|
1682
1771
|
readonly stacks: v.ObjectSchema<{
|
|
1683
1772
|
readonly name: v.StringSchema<undefined>;
|
|
@@ -1762,6 +1851,7 @@ interface WalletRequests {
|
|
|
1762
1851
|
wallet_renouncePermissions: RenouncePermissions;
|
|
1763
1852
|
wallet_requestPermissions: RequestPermissions;
|
|
1764
1853
|
wallet_getNetwork: GetNetwork;
|
|
1854
|
+
wallet_changeNetwork: ChangeNetwork;
|
|
1765
1855
|
}
|
|
1766
1856
|
type Requests = BtcRequests & StxRequests & RunesRequests & WalletRequests & OrdinalsRequests;
|
|
1767
1857
|
type Return<Method> = Method extends keyof Requests ? Requests[Method]['result'] : never;
|
|
@@ -1794,4 +1884,4 @@ declare class BaseAdapter extends SatsConnectAdapter {
|
|
|
1794
1884
|
declare const DefaultAdaptersInfo: Record<string, Provider>;
|
|
1795
1885
|
declare const defaultAdapters: Record<string, new () => SatsConnectAdapter>;
|
|
1796
1886
|
|
|
1797
|
-
export { type AccountChangeEvent, type AddListener, type Address, AddressPurpose, AddressType, BaseAdapter, type BitcoinNetwork, BitcoinNetworkType, type BitcoinProvider, type BtcRequestMethod, type BtcRequests, type Capability, type Connect, type ConnectParams, type ConnectRequestMessage, type ConnectResult, type CreateInscriptionOptions, type CreateInscriptionPayload, type CreateInscriptionResponse, type CreateRepeatInscriptionsOptions, type CreateRepeatInscriptionsPayload, type CreateRepeatInscriptionsResponse, DefaultAdaptersInfo, type Disconnect, type DisconnectEvent, type DisconnectParams, type DisconnectRequestMessage, type DisconnectResult, type GetAccount, type GetAccountParams, type GetAccountRequestMessage, type GetAccountResult, type GetAccounts, type GetAccountsParams, type GetAccountsRequestMessage, type GetAccountsResult, type GetAddressOptions, type GetAddressPayload, type GetAddressResponse, type GetAddresses, type GetAddressesParams, type GetAddressesRequestMessage, type GetAddressesResult, type GetBalance, type GetBalanceParams, type GetBalanceRequestMessage, type GetBalanceResult, type GetCapabilitiesOptions, type GetCapabilitiesPayload, type GetCapabilitiesResponse, type GetCurrentPermissions, type GetCurrentPermissionsParams, type GetCurrentPermissionsRequestMessage, type GetCurrentPermissionsResult, type GetInfo, type GetInfoParams, type GetInfoRequestMessage, type GetInfoResult, type GetInscriptions, type GetInscriptionsParams, type GetInscriptionsRequestMessage, type GetInscriptionsResult, type GetNetwork, type GetNetworkParams, type GetNetworkRequestMessage, type GetNetworkResult, type GetWalletType, type GetWalletTypeParams, type GetWalletTypeRequestMessage, type GetWalletTypeResult, type InputToSign, MessageSigningProtocols, type MethodParamsAndResult, type NetworkChangeEvent, type OrdinalsRequestMethod, type OrdinalsRequests, type Params, PermissionRequestParams, type PermissionWithoutClientId, type Provider, type PsbtPayload, type Recipient, type RenouncePermissions, type RenouncePermissionsParams, type RenouncePermissionsRequestMessage, type RenouncePermissionsResult, type RequestOptions, type RequestPayload, type RequestPermissions, type RequestPermissionsParams, type RequestPermissionsRequestMessage, type RequestPermissionsResult, type Requests, type Return, type RpcBase, type RpcError, RpcErrorCode, type RpcErrorResponse, type RpcErrorResponseMessage, type RpcId, RpcIdSchema, type RpcRequest, type RpcRequestMessage, type RpcResponse, type RpcResponseMessage, type RpcResult, type RpcSuccessResponse, type RpcSuccessResponseMessage, type RunesEstimateEtch, type RunesEstimateEtchParams, type RunesEstimateEtchResult, type RunesEstimateMint, type RunesEstimateRbfOrder, type RunesEtch, type RunesEtchParams, type RunesEtchRequestMessage, type RunesEtchResult, type RunesGetBalance, type RunesGetBalanceParams, type RunesGetBalanceResult, type RunesGetOrder, type RunesMint, type RunesMintParams, type RunesMintRequestMessage, type RunesMintResult, type RunesRbfOrder, type RunesRequestMethod, type RunesRequests, type RunesTransfer, type RunesTransferRequestMessage, type RunesTransferResult, SatsConnectAdapter, type SendBtcTransactionOptions, type SendBtcTransactionPayload, type SendBtcTransactionResponse, type SendInscriptions, type SendInscriptionsParams, type SendInscriptionsRequestMessage, type SendInscriptionsResult, type SendTransfer, type SendTransferParams, type SendTransferRequestMessage, type SendTransferResult, type SerializedRecipient, type SerializedSendBtcTransactionPayload, type SignMessage, type SignMessageOptions, type SignMessageParams, type SignMessagePayload, type SignMessageRequestMessage, type SignMessageResponse, type SignMessageResult, type SignMultiplePsbtPayload, type SignMultipleTransactionOptions, type SignMultipleTransactionsPayload, type SignMultipleTransactionsResponse, type SignPsbt, type SignPsbtParams, type SignPsbtRequestMessage, type SignPsbtResult, type SignTransactionOptions, type SignTransactionPayload, type SignTransactionResponse, type StxCallContract, type StxCallContractParams, type StxCallContractRequestMessage, type StxCallContractResult, type StxDeployContract, type StxDeployContractParams, type StxDeployContractRequestMessage, type StxDeployContractResult, type StxGetAccounts, type StxGetAccountsParams, type StxGetAccountsRequestMessage, type StxGetAccountsResult, type StxGetAddresses, type StxGetAddressesParams, type StxGetAddressesRequestMessage, type StxGetAddressesResult, type StxRequestMethod, type StxRequests, type StxSignMessage, type StxSignMessageParams, type StxSignMessageRequestMessage, type StxSignMessageResult, type StxSignStructuredMessage, type StxSignStructuredMessageParams, type StxSignStructuredMessageRequestMessage, type StxSignStructuredMessageResult, type StxSignTransaction, type StxSignTransactionParams, type StxSignTransactionRequestMessage, type StxSignTransactionResult, type StxSignTransactions, type StxSignTransactionsParams, type StxSignTransactionsRequestMessage, type StxSignTransactionsResult, type StxTransferStx, type StxTransferStxParams, type StxTransferStxRequestMessage, type StxTransferStxResult, type SupportedWallet, type TransferRunesParams, type WalletEvent, type WalletRequests, type WalletType, accountActionsSchema, accountChangeEventName, accountChangeSchema, accountPermissionSchema, addListener, addressSchema, connectMethodName, connectParamsSchema, connectRequestMessageSchema, connectResultSchema, createInscription, createRepeatInscriptions, defaultAdapters, disconnectEventName, disconnectMethodName, disconnectParamsSchema, disconnectRequestMessageSchema, disconnectResultSchema, disconnectSchema, getAccountMethodName, getAccountParamsSchema, getAccountRequestMessageSchema, getAccountResultSchema, getAccountsMethodName, getAccountsParamsSchema, getAccountsRequestMessageSchema, getAccountsResultSchema, getAddress, getAddressesMethodName, getAddressesParamsSchema, getAddressesRequestMessageSchema, getAddressesResultSchema, getBalanceMethodName, getBalanceParamsSchema, getBalanceRequestMessageSchema, getBalanceResultSchema, getCapabilities, getCurrentPermissionsMethodName, getCurrentPermissionsParamsSchema, getCurrentPermissionsRequestMessageSchema, getCurrentPermissionsResultSchema, getDefaultProvider, getInfoMethodName, getInfoParamsSchema, getInfoRequestMessageSchema, getInfoResultSchema, getInscriptionsMethodName, getInscriptionsParamsSchema, getInscriptionsRequestMessageSchema, getInscriptionsResultSchema, getNetworkMethodName, getNetworkParamsSchema, getNetworkRequestMessageSchema, getNetworkResultSchema, getProviderById, getProviderOrThrow, getProviders, getSupportedWallets, getWalletTypeMethodName, getWalletTypeParamsSchema, getWalletTypeRequestMessageSchema, getWalletTypeResultSchema, isProviderInstalled, networkChangeEventName, networkChangeSchema, permission, removeDefaultProvider, renouncePermissionsMethodName, renouncePermissionsParamsSchema, renouncePermissionsRequestMessageSchema, renouncePermissionsResultSchema, request, requestPermissionsMethodName, requestPermissionsParamsSchema, requestPermissionsRequestMessageSchema, requestPermissionsResultSchema, rpcErrorResponseMessageSchema, rpcRequestMessageSchema, rpcResponseMessageSchema, rpcSuccessResponseMessageSchema, type runesEstimateMintParams, type runesEstimateMintResult, runesEtchMethodName, runesEtchParamsSchema, runesEtchRequestMessageSchema, runesEtchResultSchema, runesGetBalanceMethodName, runesGetBalanceParamsSchema, type runesGetBalanceRequestMessage, runesGetBalanceRequestMessageSchema, runesGetBalanceResultSchema, runesMintMethodName, runesMintParamsSchema, runesMintRequestMessageSchema, runesMintResultSchema, runesTransferMethodName, runesTransferParamsSchema, runesTransferRequestMessageSchema, runesTransferResultSchema, sendBtcTransaction, sendInscriptionsMethodName, sendInscriptionsParamsSchema, sendInscriptionsRequestMessageSchema, sendInscriptionsResultSchema, sendTransferMethodName, sendTransferParamsSchema, sendTransferRequestMessageSchema, sendTransferResultSchema, setDefaultProvider, signMessage, signMessageMethodName, signMessageParamsSchema, signMessageRequestMessageSchema, signMessageResultSchema, signMultipleTransactions, signPsbtMethodName, signPsbtParamsSchema, signPsbtRequestMessageSchema, signPsbtResultSchema, signTransaction, stxCallContractMethodName, stxCallContractParamsSchema, stxCallContractRequestMessageSchema, stxCallContractResultSchema, stxDeployContractMethodName, stxDeployContractParamsSchema, stxDeployContractRequestMessageSchema, stxDeployContractResultSchema, stxGetAccountsMethodName, stxGetAccountsParamsSchema, stxGetAccountsRequestMessageSchema, stxGetAccountsResultSchema, stxGetAddressesMethodName, stxGetAddressesParamsSchema, stxGetAddressesRequestMessageSchema, stxGetAddressesResultSchema, stxSignMessageMethodName, stxSignMessageParamsSchema, stxSignMessageRequestMessageSchema, stxSignMessageResultSchema, stxSignStructuredMessageMethodName, stxSignStructuredMessageParamsSchema, stxSignStructuredMessageRequestMessageSchema, stxSignStructuredMessageResultSchema, stxSignTransactionMethodName, stxSignTransactionParamsSchema, stxSignTransactionRequestMessageSchema, stxSignTransactionResultSchema, stxSignTransactionsMethodName, stxSignTransactionsParamsSchema, stxSignTransactionsRequestMessageSchema, stxSignTransactionsResultSchema, stxTransferStxMethodName, stxTransferStxParamsSchema, stxTransferStxRequestMessageSchema, stxTransferStxResultSchema, walletActionsSchema, walletEventSchema, walletPermissionSchema, walletTypeSchema, walletTypes };
|
|
1887
|
+
export { type AccountChangeEvent, type AddListener, type Address, AddressPurpose, AddressType, BaseAdapter, type BitcoinNetwork, BitcoinNetworkType, type BitcoinProvider, type BtcRequestMethod, type BtcRequests, type Capability, type ChangeNetwork, type ChangeNetworkParams, type ChangeNetworkRequestMessage, type ChangeNetworkResult, type Connect, type ConnectParams, type ConnectRequestMessage, type ConnectResult, type CreateInscriptionOptions, type CreateInscriptionPayload, type CreateInscriptionResponse, type CreateRepeatInscriptionsOptions, type CreateRepeatInscriptionsPayload, type CreateRepeatInscriptionsResponse, DefaultAdaptersInfo, type Disconnect, type DisconnectEvent, type DisconnectParams, type DisconnectRequestMessage, type DisconnectResult, type GetAccount, type GetAccountParams, type GetAccountRequestMessage, type GetAccountResult, type GetAccounts, type GetAccountsParams, type GetAccountsRequestMessage, type GetAccountsResult, type GetAddressOptions, type GetAddressPayload, type GetAddressResponse, type GetAddresses, type GetAddressesParams, type GetAddressesRequestMessage, type GetAddressesResult, type GetBalance, type GetBalanceParams, type GetBalanceRequestMessage, type GetBalanceResult, type GetCapabilitiesOptions, type GetCapabilitiesPayload, type GetCapabilitiesResponse, type GetCurrentPermissions, type GetCurrentPermissionsParams, type GetCurrentPermissionsRequestMessage, type GetCurrentPermissionsResult, type GetInfo, type GetInfoParams, type GetInfoRequestMessage, type GetInfoResult, type GetInscriptions, type GetInscriptionsParams, type GetInscriptionsRequestMessage, type GetInscriptionsResult, type GetNetwork, type GetNetworkParams, type GetNetworkRequestMessage, type GetNetworkResult, type GetWalletType, type GetWalletTypeParams, type GetWalletTypeRequestMessage, type GetWalletTypeResult, type InputToSign, MessageSigningProtocols, type MethodParamsAndResult, type NetworkChangeEvent, type OrdinalsRequestMethod, type OrdinalsRequests, type Params, PermissionRequestParams, type PermissionWithoutClientId, type Provider, type PsbtPayload, type Recipient, type RenouncePermissions, type RenouncePermissionsParams, type RenouncePermissionsRequestMessage, type RenouncePermissionsResult, type RequestOptions, type RequestPayload, type RequestPermissions, type RequestPermissionsParams, type RequestPermissionsRequestMessage, type RequestPermissionsResult, type Requests, type Return, type RpcBase, type RpcError, RpcErrorCode, type RpcErrorResponse, type RpcErrorResponseMessage, type RpcId, RpcIdSchema, type RpcRequest, type RpcRequestMessage, type RpcResponse, type RpcResponseMessage, type RpcResult, type RpcSuccessResponse, type RpcSuccessResponseMessage, type RunesEstimateEtch, type RunesEstimateEtchParams, type RunesEstimateEtchResult, type RunesEstimateMint, type RunesEstimateRbfOrder, type RunesEtch, type RunesEtchParams, type RunesEtchRequestMessage, type RunesEtchResult, type RunesGetBalance, type RunesGetBalanceParams, type RunesGetBalanceResult, type RunesGetOrder, type RunesMint, type RunesMintParams, type RunesMintRequestMessage, type RunesMintResult, type RunesRbfOrder, type RunesRequestMethod, type RunesRequests, type RunesTransfer, type RunesTransferRequestMessage, type RunesTransferResult, SatsConnectAdapter, type SendBtcTransactionOptions, type SendBtcTransactionPayload, type SendBtcTransactionResponse, type SendInscriptions, type SendInscriptionsParams, type SendInscriptionsRequestMessage, type SendInscriptionsResult, type SendTransfer, type SendTransferParams, type SendTransferRequestMessage, type SendTransferResult, type SerializedRecipient, type SerializedSendBtcTransactionPayload, type SignMessage, type SignMessageOptions, type SignMessageParams, type SignMessagePayload, type SignMessageRequestMessage, type SignMessageResponse, type SignMessageResult, type SignMultiplePsbtPayload, type SignMultipleTransactionOptions, type SignMultipleTransactionsPayload, type SignMultipleTransactionsResponse, type SignPsbt, type SignPsbtParams, type SignPsbtRequestMessage, type SignPsbtResult, type SignTransactionOptions, type SignTransactionPayload, type SignTransactionResponse, type StxCallContract, type StxCallContractParams, type StxCallContractRequestMessage, type StxCallContractResult, type StxDeployContract, type StxDeployContractParams, type StxDeployContractRequestMessage, type StxDeployContractResult, type StxGetAccounts, type StxGetAccountsParams, type StxGetAccountsRequestMessage, type StxGetAccountsResult, type StxGetAddresses, type StxGetAddressesParams, type StxGetAddressesRequestMessage, type StxGetAddressesResult, type StxRequestMethod, type StxRequests, type StxSignMessage, type StxSignMessageParams, type StxSignMessageRequestMessage, type StxSignMessageResult, type StxSignStructuredMessage, type StxSignStructuredMessageParams, type StxSignStructuredMessageRequestMessage, type StxSignStructuredMessageResult, type StxSignTransaction, type StxSignTransactionParams, type StxSignTransactionRequestMessage, type StxSignTransactionResult, type StxSignTransactions, type StxSignTransactionsParams, type StxSignTransactionsRequestMessage, type StxSignTransactionsResult, type StxTransferStx, type StxTransferStxParams, type StxTransferStxRequestMessage, type StxTransferStxResult, type SupportedWallet, type TransferRunesParams, type WalletEvent, type WalletRequests, type WalletType, accountActionsSchema, accountChangeEventName, accountChangeSchema, accountPermissionSchema, addListener, addressSchema, changeNetworkMethodName, changeNetworkParamsSchema, changeNetworkRequestMessageSchema, changeNetworkResultSchema, connectMethodName, connectParamsSchema, connectRequestMessageSchema, connectResultSchema, createInscription, createRepeatInscriptions, defaultAdapters, disconnectEventName, disconnectMethodName, disconnectParamsSchema, disconnectRequestMessageSchema, disconnectResultSchema, disconnectSchema, getAccountMethodName, getAccountParamsSchema, getAccountRequestMessageSchema, getAccountResultSchema, getAccountsMethodName, getAccountsParamsSchema, getAccountsRequestMessageSchema, getAccountsResultSchema, getAddress, getAddressesMethodName, getAddressesParamsSchema, getAddressesRequestMessageSchema, getAddressesResultSchema, getBalanceMethodName, getBalanceParamsSchema, getBalanceRequestMessageSchema, getBalanceResultSchema, getCapabilities, getCurrentPermissionsMethodName, getCurrentPermissionsParamsSchema, getCurrentPermissionsRequestMessageSchema, getCurrentPermissionsResultSchema, getDefaultProvider, getInfoMethodName, getInfoParamsSchema, getInfoRequestMessageSchema, getInfoResultSchema, getInscriptionsMethodName, getInscriptionsParamsSchema, getInscriptionsRequestMessageSchema, getInscriptionsResultSchema, getNetworkMethodName, getNetworkParamsSchema, getNetworkRequestMessageSchema, getNetworkResultSchema, getProviderById, getProviderOrThrow, getProviders, getSupportedWallets, getWalletTypeMethodName, getWalletTypeParamsSchema, getWalletTypeRequestMessageSchema, getWalletTypeResultSchema, isProviderInstalled, networkChangeEventName, networkChangeSchema, permission, removeDefaultProvider, renouncePermissionsMethodName, renouncePermissionsParamsSchema, renouncePermissionsRequestMessageSchema, renouncePermissionsResultSchema, request, requestPermissionsMethodName, requestPermissionsParamsSchema, requestPermissionsRequestMessageSchema, requestPermissionsResultSchema, rpcErrorResponseMessageSchema, rpcRequestMessageSchema, rpcResponseMessageSchema, rpcSuccessResponseMessageSchema, type runesEstimateMintParams, type runesEstimateMintResult, runesEtchMethodName, runesEtchParamsSchema, runesEtchRequestMessageSchema, runesEtchResultSchema, runesGetBalanceMethodName, runesGetBalanceParamsSchema, type runesGetBalanceRequestMessage, runesGetBalanceRequestMessageSchema, runesGetBalanceResultSchema, runesMintMethodName, runesMintParamsSchema, runesMintRequestMessageSchema, runesMintResultSchema, runesTransferMethodName, runesTransferParamsSchema, runesTransferRequestMessageSchema, runesTransferResultSchema, sendBtcTransaction, sendInscriptionsMethodName, sendInscriptionsParamsSchema, sendInscriptionsRequestMessageSchema, sendInscriptionsResultSchema, sendTransferMethodName, sendTransferParamsSchema, sendTransferRequestMessageSchema, sendTransferResultSchema, setDefaultProvider, signMessage, signMessageMethodName, signMessageParamsSchema, signMessageRequestMessageSchema, signMessageResultSchema, signMultipleTransactions, signPsbtMethodName, signPsbtParamsSchema, signPsbtRequestMessageSchema, signPsbtResultSchema, signTransaction, stxCallContractMethodName, stxCallContractParamsSchema, stxCallContractRequestMessageSchema, stxCallContractResultSchema, stxDeployContractMethodName, stxDeployContractParamsSchema, stxDeployContractRequestMessageSchema, stxDeployContractResultSchema, stxGetAccountsMethodName, stxGetAccountsParamsSchema, stxGetAccountsRequestMessageSchema, stxGetAccountsResultSchema, stxGetAddressesMethodName, stxGetAddressesParamsSchema, stxGetAddressesRequestMessageSchema, stxGetAddressesResultSchema, stxSignMessageMethodName, stxSignMessageParamsSchema, stxSignMessageRequestMessageSchema, stxSignMessageResultSchema, stxSignStructuredMessageMethodName, stxSignStructuredMessageParamsSchema, stxSignStructuredMessageRequestMessageSchema, stxSignStructuredMessageResultSchema, stxSignTransactionMethodName, stxSignTransactionParamsSchema, stxSignTransactionRequestMessageSchema, stxSignTransactionResultSchema, stxSignTransactionsMethodName, stxSignTransactionsParamsSchema, stxSignTransactionsRequestMessageSchema, stxSignTransactionsResultSchema, stxTransferStxMethodName, stxTransferStxParamsSchema, stxTransferStxRequestMessageSchema, stxTransferStxResultSchema, walletActionsSchema, walletEventSchema, walletPermissionSchema, walletTypeSchema, walletTypes };
|