@sats-connect/core 0.8.1-a6a42ae → 0.8.1-b5b5706
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 +1889 -1883
- package/dist/index.d.ts +1889 -1883
- package/dist/index.js +924 -898
- package/dist/index.mjs +923 -898
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,441 +1,637 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
2
|
|
|
3
|
-
declare enum
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
Testnet4 = "Testnet4",
|
|
7
|
-
Signet = "Signet",
|
|
8
|
-
Regtest = "Regtest"
|
|
9
|
-
}
|
|
10
|
-
declare enum StacksNetworkType {
|
|
11
|
-
Mainnet = "mainnet",
|
|
12
|
-
Testnet = "testnet"
|
|
13
|
-
}
|
|
14
|
-
declare enum StarknetNetworkType {
|
|
15
|
-
Mainnet = "mainnet",
|
|
16
|
-
Sepolia = "sepolia"
|
|
17
|
-
}
|
|
18
|
-
declare enum SparkNetworkType {
|
|
19
|
-
Mainnet = "mainnet",
|
|
20
|
-
Regtest = "regtest"
|
|
21
|
-
}
|
|
22
|
-
interface BitcoinNetwork {
|
|
23
|
-
type: BitcoinNetworkType;
|
|
24
|
-
address?: string;
|
|
25
|
-
}
|
|
26
|
-
interface RequestPayload {
|
|
27
|
-
network: BitcoinNetwork;
|
|
28
|
-
}
|
|
29
|
-
interface RequestOptions<Payload extends RequestPayload, Response> {
|
|
30
|
-
onFinish: (response: Response) => void;
|
|
31
|
-
onCancel: () => void;
|
|
32
|
-
payload: Payload;
|
|
33
|
-
getProvider?: () => Promise<BitcoinProvider | undefined>;
|
|
3
|
+
declare enum ProviderPlatform {
|
|
4
|
+
Web = "web",
|
|
5
|
+
Mobile = "mobile"
|
|
34
6
|
}
|
|
35
|
-
declare const
|
|
36
|
-
|
|
37
|
-
|
|
7
|
+
declare const getInfoMethodName = "getInfo";
|
|
8
|
+
declare const getInfoParamsSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
9
|
+
type GetInfoParams = v.InferOutput<typeof getInfoParamsSchema>;
|
|
10
|
+
declare const getInfoResultSchema: v.ObjectSchema<{
|
|
11
|
+
/**
|
|
12
|
+
* Version of the wallet.
|
|
13
|
+
*/
|
|
14
|
+
readonly version: v.StringSchema<undefined>;
|
|
15
|
+
/**
|
|
16
|
+
* The platform the wallet is running on (web or mobile).
|
|
17
|
+
*/
|
|
18
|
+
readonly platform: v.OptionalSchema<v.EnumSchema<typeof ProviderPlatform, undefined>, undefined>;
|
|
19
|
+
/**
|
|
20
|
+
* [WBIP](https://wbips.netlify.app/wbips/WBIP002) methods supported by the wallet.
|
|
21
|
+
*/
|
|
22
|
+
readonly methods: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
23
|
+
/**
|
|
24
|
+
* List of WBIP standards supported by the wallet. Not currently used.
|
|
25
|
+
*/
|
|
26
|
+
readonly supports: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
27
|
+
}, undefined>;
|
|
28
|
+
type GetInfoResult = v.InferOutput<typeof getInfoResultSchema>;
|
|
29
|
+
declare const getInfoRequestMessageSchema: v.ObjectSchema<{
|
|
30
|
+
readonly method: v.LiteralSchema<"getInfo", undefined>;
|
|
31
|
+
readonly params: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
32
|
+
readonly id: v.StringSchema<undefined>;
|
|
38
33
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
39
|
-
readonly method: v.StringSchema<undefined>;
|
|
40
|
-
readonly params: v.OptionalSchema<v.UnionSchema<[v.ArraySchema<v.UnknownSchema, undefined>, v.LooseObjectSchema<{}, undefined>, v.NullSchema<undefined>], undefined>, undefined>;
|
|
41
|
-
readonly id: v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>, v.NullSchema<undefined>], undefined>;
|
|
42
34
|
}, undefined>;
|
|
43
|
-
type
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
interface RpcRequest<T extends string, U> extends RpcBase {
|
|
49
|
-
method: T;
|
|
50
|
-
params: U;
|
|
51
|
-
}
|
|
52
|
-
interface MethodParamsAndResult<TParams, TResult> {
|
|
53
|
-
params: TParams;
|
|
54
|
-
result: TResult;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* @enum {number} RpcErrorCode
|
|
58
|
-
* @description JSON-RPC error codes
|
|
59
|
-
* @see https://www.jsonrpc.org/specification#error_object
|
|
60
|
-
*/
|
|
61
|
-
declare enum RpcErrorCode {
|
|
35
|
+
type GetInfoRequestMessage = v.InferOutput<typeof getInfoRequestMessageSchema>;
|
|
36
|
+
type GetInfo = MethodParamsAndResult<v.InferOutput<typeof getInfoParamsSchema>, v.InferOutput<typeof getInfoResultSchema>>;
|
|
37
|
+
declare const getAddressesMethodName = "getAddresses";
|
|
38
|
+
declare const getAddressesParamsSchema: v.ObjectSchema<{
|
|
62
39
|
/**
|
|
63
|
-
*
|
|
64
|
-
|
|
65
|
-
|
|
40
|
+
* The purposes for which to generate addresses. See
|
|
41
|
+
* {@linkcode AddressPurpose} for available purposes.
|
|
42
|
+
*/
|
|
43
|
+
readonly purposes: v.ArraySchema<v.EnumSchema<typeof AddressPurpose, undefined>, undefined>;
|
|
66
44
|
/**
|
|
67
|
-
*
|
|
45
|
+
* A message to be displayed to the user in the request prompt.
|
|
46
|
+
*/
|
|
47
|
+
readonly message: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
48
|
+
}, undefined>;
|
|
49
|
+
type GetAddressesParams = v.InferOutput<typeof getAddressesParamsSchema>;
|
|
50
|
+
declare const getAddressesResultSchema: v.ObjectSchema<{
|
|
51
|
+
/**
|
|
52
|
+
* The addresses generated for the given purposes.
|
|
53
|
+
*/
|
|
54
|
+
readonly addresses: v.ArraySchema<v.ObjectSchema<{
|
|
55
|
+
readonly address: v.StringSchema<undefined>;
|
|
56
|
+
readonly publicKey: v.StringSchema<undefined>;
|
|
57
|
+
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
58
|
+
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
59
|
+
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
60
|
+
}, undefined>, undefined>;
|
|
61
|
+
readonly network: v.ObjectSchema<{
|
|
62
|
+
readonly bitcoin: v.ObjectSchema<{
|
|
63
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
64
|
+
}, undefined>;
|
|
65
|
+
readonly stacks: v.ObjectSchema<{
|
|
66
|
+
readonly name: v.EnumSchema<typeof StacksNetworkType, undefined>;
|
|
67
|
+
}, undefined>;
|
|
68
|
+
readonly spark: v.ObjectSchema<{
|
|
69
|
+
readonly name: v.EnumSchema<typeof SparkNetworkType, undefined>;
|
|
70
|
+
}, undefined>;
|
|
71
|
+
}, undefined>;
|
|
72
|
+
}, undefined>;
|
|
73
|
+
type GetAddressesResult = v.InferOutput<typeof getAddressesResultSchema>;
|
|
74
|
+
declare const getAddressesRequestMessageSchema: v.ObjectSchema<{
|
|
75
|
+
readonly method: v.LiteralSchema<"getAddresses", undefined>;
|
|
76
|
+
readonly params: v.ObjectSchema<{
|
|
77
|
+
/**
|
|
78
|
+
* The purposes for which to generate addresses. See
|
|
79
|
+
* {@linkcode AddressPurpose} for available purposes.
|
|
80
|
+
*/
|
|
81
|
+
readonly purposes: v.ArraySchema<v.EnumSchema<typeof AddressPurpose, undefined>, undefined>;
|
|
82
|
+
/**
|
|
83
|
+
* A message to be displayed to the user in the request prompt.
|
|
84
|
+
*/
|
|
85
|
+
readonly message: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
86
|
+
}, undefined>;
|
|
87
|
+
readonly id: v.StringSchema<undefined>;
|
|
88
|
+
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
89
|
+
}, undefined>;
|
|
90
|
+
type GetAddressesRequestMessage = v.InferOutput<typeof getAddressesRequestMessageSchema>;
|
|
91
|
+
type GetAddresses = MethodParamsAndResult<v.InferOutput<typeof getAddressesParamsSchema>, v.InferOutput<typeof getAddressesResultSchema>>;
|
|
92
|
+
declare const signMessageMethodName = "signMessage";
|
|
93
|
+
declare enum MessageSigningProtocols {
|
|
94
|
+
ECDSA = "ECDSA",
|
|
95
|
+
BIP322 = "BIP322"
|
|
96
|
+
}
|
|
97
|
+
declare const signMessageParamsSchema: v.ObjectSchema<{
|
|
98
|
+
/**
|
|
99
|
+
* The address used for signing.
|
|
68
100
|
**/
|
|
69
|
-
|
|
101
|
+
readonly address: v.StringSchema<undefined>;
|
|
70
102
|
/**
|
|
71
|
-
* The
|
|
103
|
+
* The message to sign.
|
|
72
104
|
**/
|
|
73
|
-
|
|
105
|
+
readonly message: v.StringSchema<undefined>;
|
|
74
106
|
/**
|
|
75
|
-
*
|
|
107
|
+
* The protocol to use for signing the message.
|
|
76
108
|
*/
|
|
77
|
-
|
|
109
|
+
readonly protocol: v.OptionalSchema<v.EnumSchema<typeof MessageSigningProtocols, undefined>, undefined>;
|
|
110
|
+
}, undefined>;
|
|
111
|
+
type SignMessageParams = v.InferOutput<typeof signMessageParamsSchema>;
|
|
112
|
+
declare const signMessageResultSchema: v.ObjectSchema<{
|
|
78
113
|
/**
|
|
79
|
-
*
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
INTERNAL_ERROR = -32603,
|
|
114
|
+
* The signature of the message.
|
|
115
|
+
*/
|
|
116
|
+
readonly signature: v.StringSchema<undefined>;
|
|
83
117
|
/**
|
|
84
|
-
*
|
|
118
|
+
* hash of the message.
|
|
85
119
|
*/
|
|
86
|
-
|
|
120
|
+
readonly messageHash: v.StringSchema<undefined>;
|
|
87
121
|
/**
|
|
88
|
-
*
|
|
122
|
+
* The address used for signing.
|
|
89
123
|
*/
|
|
90
|
-
|
|
124
|
+
readonly address: v.StringSchema<undefined>;
|
|
91
125
|
/**
|
|
92
|
-
* The
|
|
126
|
+
* The protocol to use for signing the message.
|
|
93
127
|
*/
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
declare const rpcSuccessResponseMessageSchema: v.ObjectSchema<{
|
|
97
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
98
|
-
readonly result: v.NonOptionalSchema<v.UnknownSchema, undefined>;
|
|
99
|
-
readonly id: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>, v.NullSchema<undefined>], undefined>, undefined>;
|
|
128
|
+
readonly protocol: v.EnumSchema<typeof MessageSigningProtocols, undefined>;
|
|
100
129
|
}, undefined>;
|
|
101
|
-
type
|
|
102
|
-
declare const
|
|
130
|
+
type SignMessageResult = v.InferOutput<typeof signMessageResultSchema>;
|
|
131
|
+
declare const signMessageRequestMessageSchema: v.ObjectSchema<{
|
|
132
|
+
readonly method: v.LiteralSchema<"signMessage", undefined>;
|
|
133
|
+
readonly params: v.ObjectSchema<{
|
|
134
|
+
/**
|
|
135
|
+
* The address used for signing.
|
|
136
|
+
**/
|
|
137
|
+
readonly address: v.StringSchema<undefined>;
|
|
138
|
+
/**
|
|
139
|
+
* The message to sign.
|
|
140
|
+
**/
|
|
141
|
+
readonly message: v.StringSchema<undefined>;
|
|
142
|
+
/**
|
|
143
|
+
* The protocol to use for signing the message.
|
|
144
|
+
*/
|
|
145
|
+
readonly protocol: v.OptionalSchema<v.EnumSchema<typeof MessageSigningProtocols, undefined>, undefined>;
|
|
146
|
+
}, undefined>;
|
|
147
|
+
readonly id: v.StringSchema<undefined>;
|
|
103
148
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
104
|
-
readonly error: v.NonOptionalSchema<v.UnknownSchema, undefined>;
|
|
105
|
-
readonly id: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>, v.NullSchema<undefined>], undefined>, undefined>;
|
|
106
149
|
}, undefined>;
|
|
107
|
-
type
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
150
|
+
type SignMessageRequestMessage = v.InferOutput<typeof signMessageRequestMessageSchema>;
|
|
151
|
+
type SignMessage = MethodParamsAndResult<v.InferOutput<typeof signMessageParamsSchema>, v.InferOutput<typeof signMessageResultSchema>>;
|
|
152
|
+
declare const sendTransferMethodName = "sendTransfer";
|
|
153
|
+
declare const sendTransferParamsSchema: v.ObjectSchema<{
|
|
154
|
+
/**
|
|
155
|
+
* Array of recipients to send to.
|
|
156
|
+
* The amount to send to each recipient is in satoshis.
|
|
157
|
+
*/
|
|
158
|
+
readonly recipients: v.ArraySchema<v.ObjectSchema<{
|
|
159
|
+
readonly address: v.StringSchema<undefined>;
|
|
160
|
+
readonly amount: v.NumberSchema<undefined>;
|
|
161
|
+
}, undefined>, undefined>;
|
|
162
|
+
}, undefined>;
|
|
163
|
+
type SendTransferParams = v.InferOutput<typeof sendTransferParamsSchema>;
|
|
164
|
+
declare const sendTransferResultSchema: v.ObjectSchema<{
|
|
165
|
+
/**
|
|
166
|
+
* The transaction id as a hex-encoded string.
|
|
167
|
+
*/
|
|
168
|
+
readonly txid: v.StringSchema<undefined>;
|
|
169
|
+
}, undefined>;
|
|
170
|
+
type SendTransferResult = v.InferOutput<typeof sendTransferResultSchema>;
|
|
171
|
+
declare const sendTransferRequestMessageSchema: v.ObjectSchema<{
|
|
172
|
+
readonly method: v.LiteralSchema<"sendTransfer", undefined>;
|
|
173
|
+
readonly params: v.ObjectSchema<{
|
|
174
|
+
/**
|
|
175
|
+
* Array of recipients to send to.
|
|
176
|
+
* The amount to send to each recipient is in satoshis.
|
|
177
|
+
*/
|
|
178
|
+
readonly recipients: v.ArraySchema<v.ObjectSchema<{
|
|
179
|
+
readonly address: v.StringSchema<undefined>;
|
|
180
|
+
readonly amount: v.NumberSchema<undefined>;
|
|
181
|
+
}, undefined>, undefined>;
|
|
182
|
+
}, undefined>;
|
|
183
|
+
readonly id: v.StringSchema<undefined>;
|
|
113
184
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
185
|
+
}, undefined>;
|
|
186
|
+
type SendTransferRequestMessage = v.InferOutput<typeof sendTransferRequestMessageSchema>;
|
|
187
|
+
type SendTransfer = MethodParamsAndResult<SendTransferParams, SendTransferResult>;
|
|
188
|
+
declare const signPsbtMethodName = "signPsbt";
|
|
189
|
+
declare const signPsbtParamsSchema: v.ObjectSchema<{
|
|
190
|
+
/**
|
|
191
|
+
* The base64 encoded PSBT to sign.
|
|
192
|
+
*/
|
|
193
|
+
readonly psbt: v.StringSchema<undefined>;
|
|
194
|
+
/**
|
|
195
|
+
* The inputs to sign.
|
|
196
|
+
* The key is the address and the value is an array of indexes of the inputs to sign.
|
|
197
|
+
*/
|
|
198
|
+
readonly signInputs: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ArraySchema<v.NumberSchema<undefined>, undefined>, undefined>, undefined>;
|
|
199
|
+
/**
|
|
200
|
+
* Whether to broadcast the transaction after signing.
|
|
201
|
+
**/
|
|
202
|
+
readonly broadcast: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
203
|
+
}, undefined>;
|
|
204
|
+
type SignPsbtParams = v.InferOutput<typeof signPsbtParamsSchema>;
|
|
205
|
+
declare const signPsbtResultSchema: v.ObjectSchema<{
|
|
206
|
+
/**
|
|
207
|
+
* The base64 encoded PSBT after signing.
|
|
208
|
+
*/
|
|
209
|
+
readonly psbt: v.StringSchema<undefined>;
|
|
210
|
+
/**
|
|
211
|
+
* The transaction id as a hex-encoded string.
|
|
212
|
+
* This is only returned if the transaction was broadcast.
|
|
213
|
+
**/
|
|
214
|
+
readonly txid: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
215
|
+
}, undefined>;
|
|
216
|
+
type SignPsbtResult = v.InferOutput<typeof signPsbtResultSchema>;
|
|
217
|
+
declare const signPsbtRequestMessageSchema: v.ObjectSchema<{
|
|
218
|
+
readonly method: v.LiteralSchema<"signPsbt", undefined>;
|
|
219
|
+
readonly params: v.ObjectSchema<{
|
|
220
|
+
/**
|
|
221
|
+
* The base64 encoded PSBT to sign.
|
|
222
|
+
*/
|
|
223
|
+
readonly psbt: v.StringSchema<undefined>;
|
|
224
|
+
/**
|
|
225
|
+
* The inputs to sign.
|
|
226
|
+
* The key is the address and the value is an array of indexes of the inputs to sign.
|
|
227
|
+
*/
|
|
228
|
+
readonly signInputs: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ArraySchema<v.NumberSchema<undefined>, undefined>, undefined>, undefined>;
|
|
229
|
+
/**
|
|
230
|
+
* Whether to broadcast the transaction after signing.
|
|
231
|
+
**/
|
|
232
|
+
readonly broadcast: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
233
|
+
}, undefined>;
|
|
234
|
+
readonly id: v.StringSchema<undefined>;
|
|
235
|
+
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
236
|
+
}, undefined>;
|
|
237
|
+
type SignPsbtRequestMessage = v.InferOutput<typeof signPsbtRequestMessageSchema>;
|
|
238
|
+
type SignPsbt = MethodParamsAndResult<SignPsbtParams, SignPsbtResult>;
|
|
239
|
+
declare const getAccountsMethodName = "getAccounts";
|
|
240
|
+
declare const getAccountsParamsSchema: v.ObjectSchema<{
|
|
241
|
+
/**
|
|
242
|
+
* The purposes for which to generate addresses. See
|
|
243
|
+
* {@linkcode AddressPurpose} for available purposes.
|
|
244
|
+
*/
|
|
245
|
+
readonly purposes: v.ArraySchema<v.EnumSchema<typeof AddressPurpose, undefined>, undefined>;
|
|
246
|
+
/**
|
|
247
|
+
* A message to be displayed to the user in the request prompt.
|
|
248
|
+
*/
|
|
249
|
+
readonly message: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
250
|
+
}, undefined>;
|
|
251
|
+
type GetAccountsParams = v.InferOutput<typeof getAccountsParamsSchema>;
|
|
252
|
+
declare const getAccountsResultSchema: v.ArraySchema<v.ObjectSchema<{
|
|
253
|
+
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
160
254
|
readonly address: v.StringSchema<undefined>;
|
|
161
255
|
readonly publicKey: v.StringSchema<undefined>;
|
|
162
256
|
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
163
257
|
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
164
|
-
|
|
258
|
+
}, undefined>, undefined>;
|
|
259
|
+
type GetAccountsResult = v.InferOutput<typeof getAccountsResultSchema>;
|
|
260
|
+
declare const getAccountsRequestMessageSchema: v.ObjectSchema<{
|
|
261
|
+
readonly method: v.LiteralSchema<"getAccounts", undefined>;
|
|
262
|
+
readonly params: v.ObjectSchema<{
|
|
263
|
+
/**
|
|
264
|
+
* The purposes for which to generate addresses. See
|
|
265
|
+
* {@linkcode AddressPurpose} for available purposes.
|
|
266
|
+
*/
|
|
267
|
+
readonly purposes: v.ArraySchema<v.EnumSchema<typeof AddressPurpose, undefined>, undefined>;
|
|
268
|
+
/**
|
|
269
|
+
* A message to be displayed to the user in the request prompt.
|
|
270
|
+
*/
|
|
271
|
+
readonly message: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
272
|
+
}, undefined>;
|
|
273
|
+
readonly id: v.StringSchema<undefined>;
|
|
274
|
+
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
165
275
|
}, undefined>;
|
|
166
|
-
type
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
type
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
276
|
+
type GetAccountsRequestMessage = v.InferOutput<typeof getAccountsRequestMessageSchema>;
|
|
277
|
+
type GetAccounts = MethodParamsAndResult<v.InferOutput<typeof getAccountsParamsSchema>, v.InferOutput<typeof getAccountsResultSchema>>;
|
|
278
|
+
declare const getBalanceMethodName = "getBalance";
|
|
279
|
+
declare const getBalanceParamsSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
280
|
+
type GetBalanceParams = v.InferOutput<typeof getBalanceParamsSchema>;
|
|
281
|
+
declare const getBalanceResultSchema: v.ObjectSchema<{
|
|
282
|
+
/**
|
|
283
|
+
* The confirmed balance of the wallet in sats. Using a string due to chrome
|
|
284
|
+
* messages not supporting bigint
|
|
285
|
+
* (https://issues.chromium.org/issues/40116184).
|
|
286
|
+
*/
|
|
287
|
+
readonly confirmed: v.StringSchema<undefined>;
|
|
288
|
+
/**
|
|
289
|
+
* The unconfirmed balance of the wallet in sats. Using a string due to chrome
|
|
290
|
+
* messages not supporting bigint
|
|
291
|
+
* (https://issues.chromium.org/issues/40116184).
|
|
292
|
+
*/
|
|
293
|
+
readonly unconfirmed: v.StringSchema<undefined>;
|
|
294
|
+
/**
|
|
295
|
+
* The total balance (both confirmed and unconfrimed UTXOs) of the wallet in
|
|
296
|
+
* sats. Using a string due to chrome messages not supporting bigint
|
|
297
|
+
* (https://issues.chromium.org/issues/40116184).
|
|
298
|
+
*/
|
|
299
|
+
readonly total: v.StringSchema<undefined>;
|
|
300
|
+
}, undefined>;
|
|
301
|
+
type GetBalanceResult = v.InferOutput<typeof getBalanceResultSchema>;
|
|
302
|
+
declare const getBalanceRequestMessageSchema: v.ObjectSchema<{
|
|
303
|
+
readonly method: v.LiteralSchema<"getBalance", undefined>;
|
|
304
|
+
readonly id: v.StringSchema<undefined>;
|
|
305
|
+
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
306
|
+
readonly params: v.OptionalSchema<v.UnionSchema<[v.ArraySchema<v.UnknownSchema, undefined>, v.LooseObjectSchema<{}, undefined>, v.NullSchema<undefined>], undefined>, undefined>;
|
|
307
|
+
}, undefined>;
|
|
308
|
+
type GetBalanceRequestMessage = v.InferOutput<typeof getBalanceRequestMessageSchema>;
|
|
309
|
+
type GetBalance = MethodParamsAndResult<GetBalanceParams, GetBalanceResult>;
|
|
181
310
|
|
|
182
|
-
declare const
|
|
311
|
+
declare const getInscriptionsMethodName = "ord_getInscriptions";
|
|
312
|
+
declare const getInscriptionsParamsSchema: v.ObjectSchema<{
|
|
313
|
+
readonly offset: v.NumberSchema<undefined>;
|
|
314
|
+
readonly limit: v.NumberSchema<undefined>;
|
|
315
|
+
}, undefined>;
|
|
316
|
+
type GetInscriptionsParams = v.InferOutput<typeof getInscriptionsParamsSchema>;
|
|
317
|
+
declare const getInscriptionsResultSchema: v.ObjectSchema<{
|
|
318
|
+
readonly total: v.NumberSchema<undefined>;
|
|
319
|
+
readonly limit: v.NumberSchema<undefined>;
|
|
320
|
+
readonly offset: v.NumberSchema<undefined>;
|
|
321
|
+
readonly inscriptions: v.ArraySchema<v.ObjectSchema<{
|
|
322
|
+
readonly inscriptionId: v.StringSchema<undefined>;
|
|
323
|
+
readonly inscriptionNumber: v.StringSchema<undefined>;
|
|
324
|
+
readonly address: v.StringSchema<undefined>;
|
|
325
|
+
readonly collectionName: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
326
|
+
readonly postage: v.StringSchema<undefined>;
|
|
327
|
+
readonly contentLength: v.StringSchema<undefined>;
|
|
328
|
+
readonly contentType: v.StringSchema<undefined>;
|
|
329
|
+
readonly timestamp: v.NumberSchema<undefined>;
|
|
330
|
+
readonly offset: v.NumberSchema<undefined>;
|
|
331
|
+
readonly genesisTransaction: v.StringSchema<undefined>;
|
|
332
|
+
readonly output: v.StringSchema<undefined>;
|
|
333
|
+
}, undefined>, undefined>;
|
|
334
|
+
}, undefined>;
|
|
335
|
+
type GetInscriptionsResult = v.InferOutput<typeof getInscriptionsResultSchema>;
|
|
336
|
+
declare const getInscriptionsRequestMessageSchema: v.ObjectSchema<{
|
|
337
|
+
readonly method: v.LiteralSchema<"ord_getInscriptions", undefined>;
|
|
338
|
+
readonly params: v.ObjectSchema<{
|
|
339
|
+
readonly offset: v.NumberSchema<undefined>;
|
|
340
|
+
readonly limit: v.NumberSchema<undefined>;
|
|
341
|
+
}, undefined>;
|
|
342
|
+
readonly id: v.StringSchema<undefined>;
|
|
343
|
+
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
344
|
+
}, undefined>;
|
|
345
|
+
type GetInscriptionsRequestMessage = v.InferOutput<typeof getInscriptionsRequestMessageSchema>;
|
|
346
|
+
type GetInscriptions = MethodParamsAndResult<GetInscriptionsParams, GetInscriptionsResult>;
|
|
347
|
+
declare const sendInscriptionsMethodName = "ord_sendInscriptions";
|
|
348
|
+
declare const sendInscriptionsParamsSchema: v.ObjectSchema<{
|
|
349
|
+
readonly transfers: v.ArraySchema<v.ObjectSchema<{
|
|
350
|
+
readonly address: v.StringSchema<undefined>;
|
|
351
|
+
readonly inscriptionId: v.StringSchema<undefined>;
|
|
352
|
+
}, undefined>, undefined>;
|
|
353
|
+
}, undefined>;
|
|
354
|
+
type SendInscriptionsParams = v.InferOutput<typeof sendInscriptionsParamsSchema>;
|
|
355
|
+
declare const sendInscriptionsResultSchema: v.ObjectSchema<{
|
|
356
|
+
readonly txid: v.StringSchema<undefined>;
|
|
357
|
+
}, undefined>;
|
|
358
|
+
type SendInscriptionsResult = v.InferOutput<typeof sendInscriptionsResultSchema>;
|
|
359
|
+
declare const sendInscriptionsRequestMessageSchema: v.ObjectSchema<{
|
|
360
|
+
readonly method: v.LiteralSchema<"ord_sendInscriptions", undefined>;
|
|
361
|
+
readonly params: v.ObjectSchema<{
|
|
362
|
+
readonly transfers: v.ArraySchema<v.ObjectSchema<{
|
|
363
|
+
readonly address: v.StringSchema<undefined>;
|
|
364
|
+
readonly inscriptionId: v.StringSchema<undefined>;
|
|
365
|
+
}, undefined>, undefined>;
|
|
366
|
+
}, undefined>;
|
|
367
|
+
readonly id: v.StringSchema<undefined>;
|
|
368
|
+
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
369
|
+
}, undefined>;
|
|
370
|
+
type SendInscriptionsRequestMessage = v.InferOutput<typeof sendInscriptionsRequestMessageSchema>;
|
|
371
|
+
type SendInscriptions = MethodParamsAndResult<SendInscriptionsParams, SendInscriptionsResult>;
|
|
183
372
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
}
|
|
193
|
-
interface CreateRepeatInscriptionsPayload extends CreateInscriptionPayload {
|
|
194
|
-
repeat: number;
|
|
195
|
-
}
|
|
196
|
-
type CreateInscriptionResponse = {
|
|
197
|
-
txId: string;
|
|
373
|
+
type CreateMintOrderRequest = {
|
|
374
|
+
runeName: string;
|
|
375
|
+
repeats: number;
|
|
376
|
+
refundAddress: string;
|
|
377
|
+
destinationAddress: string;
|
|
378
|
+
feeRate: number;
|
|
379
|
+
appServiceFee?: number;
|
|
380
|
+
appServiceFeeAddress?: string;
|
|
198
381
|
};
|
|
199
|
-
type
|
|
200
|
-
|
|
382
|
+
type EstimateMintOrderRequest = Omit<CreateMintOrderRequest, 'refundAddress'>;
|
|
383
|
+
type EstimateOrderResponse = {
|
|
384
|
+
totalSize: number;
|
|
385
|
+
totalCost: number;
|
|
386
|
+
costBreakdown: {
|
|
387
|
+
postage: number;
|
|
388
|
+
networkFee: number;
|
|
389
|
+
serviceFee: number;
|
|
390
|
+
appServiceFee: number;
|
|
391
|
+
};
|
|
201
392
|
};
|
|
202
|
-
type
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
393
|
+
type CreateEtchOrderRequest = {
|
|
394
|
+
runeName: string;
|
|
395
|
+
divisibility?: number;
|
|
396
|
+
symbol?: string;
|
|
397
|
+
premine?: string;
|
|
398
|
+
isMintable: boolean;
|
|
399
|
+
terms?: {
|
|
400
|
+
amount?: string;
|
|
401
|
+
cap?: string;
|
|
402
|
+
heightStart?: string;
|
|
403
|
+
heightEnd?: string;
|
|
404
|
+
offsetStart?: string;
|
|
405
|
+
offsetEnd?: string;
|
|
406
|
+
};
|
|
407
|
+
inscriptionDetails?: {
|
|
408
|
+
contentType: string;
|
|
409
|
+
contentBase64: string;
|
|
410
|
+
};
|
|
411
|
+
delegateInscriptionId?: string;
|
|
412
|
+
destinationAddress: string;
|
|
413
|
+
refundAddress: string;
|
|
414
|
+
feeRate: number;
|
|
415
|
+
appServiceFee?: number;
|
|
416
|
+
appServiceFeeAddress?: string;
|
|
225
417
|
};
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
message?: string;
|
|
230
|
-
}
|
|
231
|
-
type SerializedSendBtcTransactionPayload = Omit<SendBtcTransactionPayload, 'recipients'> & {
|
|
232
|
-
recipients: SerializedRecipient[];
|
|
418
|
+
type EstimateEtchOrderRequest = Omit<CreateEtchOrderRequest, 'refundAddress'>;
|
|
419
|
+
type GetOrderRequest = {
|
|
420
|
+
id: string;
|
|
233
421
|
};
|
|
234
|
-
type
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
type PsbtPayload = {
|
|
242
|
-
psbtBase64: string;
|
|
243
|
-
inputsToSign?: InputToSign[];
|
|
244
|
-
broadcast?: boolean;
|
|
422
|
+
type GetOrderResponse = {
|
|
423
|
+
id: string;
|
|
424
|
+
orderType: 'rune_mint' | 'rune_etch';
|
|
425
|
+
state: 'new' | 'pending' | 'executing' | 'complete' | 'failed' | 'refunded' | 'stale';
|
|
426
|
+
fundingAddress: string;
|
|
427
|
+
reason?: string;
|
|
428
|
+
createdAt: string;
|
|
245
429
|
};
|
|
246
|
-
type
|
|
247
|
-
|
|
248
|
-
|
|
430
|
+
type RBFOrderRequest = {
|
|
431
|
+
orderId: string;
|
|
432
|
+
newFeeRate: number;
|
|
433
|
+
};
|
|
434
|
+
type RBFOrderResponse = {
|
|
435
|
+
rbfCost: number;
|
|
436
|
+
fundingAddress: string;
|
|
249
437
|
};
|
|
250
|
-
interface SignTransactionPayload extends RequestPayload, PsbtPayload {
|
|
251
|
-
message: string;
|
|
252
|
-
}
|
|
253
|
-
interface SignTransactionResponse {
|
|
254
|
-
psbtBase64: string;
|
|
255
|
-
txId?: string;
|
|
256
|
-
}
|
|
257
|
-
type SignTransactionOptions = RequestOptions<SignTransactionPayload, SignTransactionResponse>;
|
|
258
|
-
interface SignMultipleTransactionsPayload extends RequestPayload {
|
|
259
|
-
message: string;
|
|
260
|
-
psbts: SignMultiplePsbtPayload[];
|
|
261
|
-
}
|
|
262
|
-
type SignMultipleTransactionsResponse = SignTransactionResponse[];
|
|
263
|
-
type SignMultipleTransactionOptions = RequestOptions<SignMultipleTransactionsPayload, SignMultipleTransactionsResponse>;
|
|
264
438
|
|
|
265
|
-
|
|
439
|
+
interface RunesEstimateEtchParams extends EstimateEtchOrderRequest {
|
|
440
|
+
network?: BitcoinNetworkType;
|
|
441
|
+
}
|
|
442
|
+
type RunesEstimateEtchResult = EstimateOrderResponse;
|
|
443
|
+
type RunesEstimateEtch = MethodParamsAndResult<RunesEstimateEtchParams, RunesEstimateEtchResult>;
|
|
266
444
|
|
|
267
|
-
|
|
445
|
+
interface runesEstimateMintParams extends EstimateMintOrderRequest {
|
|
446
|
+
network?: BitcoinNetworkType;
|
|
447
|
+
}
|
|
448
|
+
type runesEstimateMintResult = EstimateOrderResponse;
|
|
449
|
+
type RunesEstimateMint = MethodParamsAndResult<runesEstimateMintParams, runesEstimateMintResult>;
|
|
268
450
|
|
|
269
|
-
|
|
451
|
+
interface RunesEstimateRbfOrderParams extends RBFOrderRequest {
|
|
452
|
+
network?: BitcoinNetworkType;
|
|
453
|
+
}
|
|
454
|
+
type RunesEstimateRbfOrder = MethodParamsAndResult<RunesEstimateRbfOrderParams, RBFOrderResponse>;
|
|
270
455
|
|
|
271
|
-
declare const
|
|
272
|
-
declare const
|
|
273
|
-
readonly
|
|
274
|
-
readonly
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
456
|
+
declare const runesEtchMethodName = "runes_etch";
|
|
457
|
+
declare const runesEtchParamsSchema: v.ObjectSchema<{
|
|
458
|
+
readonly runeName: v.StringSchema<undefined>;
|
|
459
|
+
readonly divisibility: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
460
|
+
readonly symbol: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
461
|
+
readonly premine: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
462
|
+
readonly isMintable: v.BooleanSchema<undefined>;
|
|
463
|
+
readonly delegateInscriptionId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
464
|
+
readonly destinationAddress: v.StringSchema<undefined>;
|
|
465
|
+
readonly refundAddress: v.StringSchema<undefined>;
|
|
466
|
+
readonly feeRate: v.NumberSchema<undefined>;
|
|
467
|
+
readonly appServiceFee: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
468
|
+
readonly appServiceFeeAddress: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
469
|
+
readonly terms: v.OptionalSchema<v.ObjectSchema<{
|
|
470
|
+
readonly amount: v.StringSchema<undefined>;
|
|
471
|
+
readonly cap: v.StringSchema<undefined>;
|
|
472
|
+
readonly heightStart: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
473
|
+
readonly heightEnd: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
474
|
+
readonly offsetStart: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
475
|
+
readonly offsetEnd: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
476
|
+
}, undefined>, undefined>;
|
|
477
|
+
readonly inscriptionDetails: v.OptionalSchema<v.ObjectSchema<{
|
|
478
|
+
readonly contentType: v.StringSchema<undefined>;
|
|
479
|
+
readonly contentBase64: v.StringSchema<undefined>;
|
|
480
|
+
}, undefined>, undefined>;
|
|
481
|
+
readonly network: v.OptionalSchema<v.EnumSchema<typeof BitcoinNetworkType, undefined>, undefined>;
|
|
281
482
|
}, undefined>;
|
|
282
|
-
type
|
|
283
|
-
declare const
|
|
284
|
-
|
|
285
|
-
readonly
|
|
286
|
-
readonly
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
483
|
+
type RunesEtchParams = v.InferOutput<typeof runesEtchParamsSchema>;
|
|
484
|
+
declare const runesEtchResultSchema: v.ObjectSchema<{
|
|
485
|
+
readonly orderId: v.StringSchema<undefined>;
|
|
486
|
+
readonly fundTransactionId: v.StringSchema<undefined>;
|
|
487
|
+
readonly fundingAddress: v.StringSchema<undefined>;
|
|
488
|
+
}, undefined>;
|
|
489
|
+
type RunesEtchResult = v.InferOutput<typeof runesEtchResultSchema>;
|
|
490
|
+
declare const runesEtchRequestMessageSchema: v.ObjectSchema<{
|
|
491
|
+
readonly method: v.LiteralSchema<"runes_etch", undefined>;
|
|
492
|
+
readonly params: v.ObjectSchema<{
|
|
493
|
+
readonly runeName: v.StringSchema<undefined>;
|
|
494
|
+
readonly divisibility: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
495
|
+
readonly symbol: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
496
|
+
readonly premine: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
497
|
+
readonly isMintable: v.BooleanSchema<undefined>;
|
|
498
|
+
readonly delegateInscriptionId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
499
|
+
readonly destinationAddress: v.StringSchema<undefined>;
|
|
500
|
+
readonly refundAddress: v.StringSchema<undefined>;
|
|
501
|
+
readonly feeRate: v.NumberSchema<undefined>;
|
|
502
|
+
readonly appServiceFee: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
503
|
+
readonly appServiceFeeAddress: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
504
|
+
readonly terms: v.OptionalSchema<v.ObjectSchema<{
|
|
505
|
+
readonly amount: v.StringSchema<undefined>;
|
|
506
|
+
readonly cap: v.StringSchema<undefined>;
|
|
507
|
+
readonly heightStart: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
508
|
+
readonly heightEnd: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
509
|
+
readonly offsetStart: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
510
|
+
readonly offsetEnd: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
511
|
+
}, undefined>, undefined>;
|
|
512
|
+
readonly inscriptionDetails: v.OptionalSchema<v.ObjectSchema<{
|
|
513
|
+
readonly contentType: v.StringSchema<undefined>;
|
|
514
|
+
readonly contentBase64: v.StringSchema<undefined>;
|
|
515
|
+
}, undefined>, undefined>;
|
|
516
|
+
readonly network: v.OptionalSchema<v.EnumSchema<typeof BitcoinNetworkType, undefined>, undefined>;
|
|
291
517
|
}, undefined>;
|
|
292
|
-
readonly
|
|
293
|
-
|
|
294
|
-
readonly publicKey: v.StringSchema<undefined>;
|
|
295
|
-
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
296
|
-
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
297
|
-
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
298
|
-
}, undefined>, undefined>, undefined>;
|
|
518
|
+
readonly id: v.StringSchema<undefined>;
|
|
519
|
+
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
299
520
|
}, undefined>;
|
|
300
|
-
type
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
521
|
+
type RunesEtchRequestMessage = v.InferOutput<typeof runesEtchRequestMessageSchema>;
|
|
522
|
+
type RunesEtch = MethodParamsAndResult<v.InferOutput<typeof runesEtchParamsSchema>, v.InferOutput<typeof runesEtchResultSchema>>;
|
|
523
|
+
|
|
524
|
+
declare const runesGetBalanceMethodName = "runes_getBalance";
|
|
525
|
+
declare const runesGetBalanceParamsSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
526
|
+
type RunesGetBalanceParams = v.InferOutput<typeof runesGetBalanceParamsSchema>;
|
|
527
|
+
declare const runesGetBalanceResultSchema: v.ObjectSchema<{
|
|
528
|
+
readonly balances: v.ArraySchema<v.ObjectSchema<{
|
|
529
|
+
readonly runeName: v.StringSchema<undefined>;
|
|
530
|
+
readonly amount: v.StringSchema<undefined>;
|
|
531
|
+
readonly divisibility: v.NumberSchema<undefined>;
|
|
532
|
+
readonly symbol: v.StringSchema<undefined>;
|
|
533
|
+
readonly inscriptionId: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
534
|
+
readonly spendableBalance: v.StringSchema<undefined>;
|
|
535
|
+
}, undefined>, undefined>;
|
|
304
536
|
}, undefined>;
|
|
305
|
-
type
|
|
306
|
-
declare const
|
|
307
|
-
readonly
|
|
308
|
-
readonly
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
readonly bitcoin: v.ObjectSchema<{
|
|
318
|
-
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
319
|
-
}, undefined>;
|
|
320
|
-
readonly stacks: v.ObjectSchema<{
|
|
321
|
-
readonly name: v.StringSchema<undefined>;
|
|
322
|
-
}, undefined>;
|
|
323
|
-
readonly addresses: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
324
|
-
readonly address: v.StringSchema<undefined>;
|
|
325
|
-
readonly publicKey: v.StringSchema<undefined>;
|
|
326
|
-
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
327
|
-
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
328
|
-
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
329
|
-
}, undefined>, undefined>, undefined>;
|
|
330
|
-
}, undefined>, v.ObjectSchema<{
|
|
331
|
-
readonly type: v.LiteralSchema<"disconnect", undefined>;
|
|
332
|
-
}, undefined>], undefined>;
|
|
333
|
-
type WalletEvent = v.InferOutput<typeof walletEventSchema>;
|
|
334
|
-
type AccountChangeCallback = (e: AccountChangeEvent) => void;
|
|
335
|
-
type DisconnectCallback = (e: DisconnectEvent) => void;
|
|
336
|
-
type NetworkChangeCallback = (e: NetworkChangeEvent) => void;
|
|
337
|
-
type ListenerInfo = {
|
|
338
|
-
eventName: typeof accountChangeEventName;
|
|
339
|
-
cb: AccountChangeCallback;
|
|
340
|
-
} | {
|
|
341
|
-
eventName: typeof disconnectEventName;
|
|
342
|
-
cb: DisconnectCallback;
|
|
343
|
-
} | {
|
|
344
|
-
eventName: typeof networkChangeEventName;
|
|
345
|
-
cb: NetworkChangeCallback;
|
|
346
|
-
};
|
|
347
|
-
type AddListener = (arg: ListenerInfo) => () => void;
|
|
348
|
-
interface BaseBitcoinProvider {
|
|
349
|
-
version?: number;
|
|
350
|
-
request: <Method extends keyof Requests>(method: Method, options: Params<Method>, providerId?: string) => Promise<RpcResponse<Method>>;
|
|
351
|
-
connect: (request: string) => Promise<GetAddressResponse>;
|
|
352
|
-
signMessage: (request: string) => Promise<SignMessageResponse>;
|
|
353
|
-
signTransaction: (request: string) => Promise<SignTransactionResponse>;
|
|
354
|
-
sendBtcTransaction: (request: string) => Promise<SendBtcTransactionResponse>;
|
|
355
|
-
createInscription: (request: string) => Promise<CreateInscriptionResponse>;
|
|
356
|
-
createRepeatInscriptions: (request: string) => Promise<CreateRepeatInscriptionsResponse>;
|
|
357
|
-
signMultipleTransactions: (request: string) => Promise<SignMultipleTransactionsResponse>;
|
|
358
|
-
addListener: AddListener;
|
|
359
|
-
}
|
|
360
|
-
type Capability = keyof BaseBitcoinProvider;
|
|
361
|
-
interface BitcoinProvider extends BaseBitcoinProvider {
|
|
362
|
-
version: 1;
|
|
363
|
-
getCapabilities?: (request: string) => Promise<GetCapabilitiesResponse>;
|
|
364
|
-
}
|
|
365
|
-
interface Provider {
|
|
366
|
-
id: string;
|
|
367
|
-
name: string;
|
|
368
|
-
icon: string;
|
|
369
|
-
webUrl?: string;
|
|
370
|
-
chromeWebStoreUrl?: string;
|
|
371
|
-
mozillaAddOnsUrl?: string;
|
|
372
|
-
googlePlayStoreUrl?: string;
|
|
373
|
-
iOSAppStoreUrl?: string;
|
|
374
|
-
methods?: (StxRequestMethod | BtcRequestMethod | RunesRequestMethod | OrdinalsRequestMethod)[];
|
|
537
|
+
type RunesGetBalanceResult = v.InferOutput<typeof runesGetBalanceResultSchema>;
|
|
538
|
+
declare const runesGetBalanceRequestMessageSchema: v.ObjectSchema<{
|
|
539
|
+
readonly method: v.LiteralSchema<"runes_getBalance", undefined>;
|
|
540
|
+
readonly params: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
541
|
+
readonly id: v.StringSchema<undefined>;
|
|
542
|
+
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
543
|
+
}, undefined>;
|
|
544
|
+
type runesGetBalanceRequestMessage = v.InferOutput<typeof runesGetBalanceRequestMessageSchema>;
|
|
545
|
+
type RunesGetBalance = MethodParamsAndResult<RunesGetBalanceParams, RunesGetBalanceResult>;
|
|
546
|
+
|
|
547
|
+
interface RunesGetOrderParams extends GetOrderRequest {
|
|
548
|
+
network?: BitcoinNetworkType;
|
|
375
549
|
}
|
|
376
|
-
|
|
377
|
-
|
|
550
|
+
type RunesGetOrder = MethodParamsAndResult<RunesGetOrderParams, GetOrderResponse>;
|
|
551
|
+
|
|
552
|
+
declare const runesMintMethodName = "runes_mint";
|
|
553
|
+
declare const runesMintParamsSchema: v.ObjectSchema<{
|
|
554
|
+
readonly appServiceFee: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
555
|
+
readonly appServiceFeeAddress: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
556
|
+
readonly destinationAddress: v.StringSchema<undefined>;
|
|
557
|
+
readonly feeRate: v.NumberSchema<undefined>;
|
|
558
|
+
readonly refundAddress: v.StringSchema<undefined>;
|
|
559
|
+
readonly repeats: v.NumberSchema<undefined>;
|
|
560
|
+
readonly runeName: v.StringSchema<undefined>;
|
|
561
|
+
readonly network: v.OptionalSchema<v.EnumSchema<typeof BitcoinNetworkType, undefined>, undefined>;
|
|
562
|
+
}, undefined>;
|
|
563
|
+
type RunesMintParams = v.InferOutput<typeof runesMintParamsSchema>;
|
|
564
|
+
declare const runesMintResultSchema: v.ObjectSchema<{
|
|
565
|
+
readonly orderId: v.StringSchema<undefined>;
|
|
566
|
+
readonly fundTransactionId: v.StringSchema<undefined>;
|
|
567
|
+
readonly fundingAddress: v.StringSchema<undefined>;
|
|
568
|
+
}, undefined>;
|
|
569
|
+
type RunesMintResult = v.InferOutput<typeof runesMintResultSchema>;
|
|
570
|
+
declare const runesMintRequestMessageSchema: v.ObjectSchema<{
|
|
571
|
+
readonly method: v.LiteralSchema<"runes_mint", undefined>;
|
|
572
|
+
readonly params: v.ObjectSchema<{
|
|
573
|
+
readonly appServiceFee: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
574
|
+
readonly appServiceFeeAddress: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
575
|
+
readonly destinationAddress: v.StringSchema<undefined>;
|
|
576
|
+
readonly feeRate: v.NumberSchema<undefined>;
|
|
577
|
+
readonly refundAddress: v.StringSchema<undefined>;
|
|
578
|
+
readonly repeats: v.NumberSchema<undefined>;
|
|
579
|
+
readonly runeName: v.StringSchema<undefined>;
|
|
580
|
+
readonly network: v.OptionalSchema<v.EnumSchema<typeof BitcoinNetworkType, undefined>, undefined>;
|
|
581
|
+
}, undefined>;
|
|
582
|
+
readonly id: v.StringSchema<undefined>;
|
|
583
|
+
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
584
|
+
}, undefined>;
|
|
585
|
+
type RunesMintRequestMessage = v.InferOutput<typeof runesMintRequestMessageSchema>;
|
|
586
|
+
type RunesMint = MethodParamsAndResult<v.InferOutput<typeof runesMintParamsSchema>, v.InferOutput<typeof runesMintResultSchema>>;
|
|
587
|
+
|
|
588
|
+
interface RunesRbfOrderParams extends RBFOrderRequest {
|
|
589
|
+
network?: BitcoinNetworkType;
|
|
378
590
|
}
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
interface Window {
|
|
384
|
-
BitcoinProvider?: BitcoinProvider;
|
|
385
|
-
XverseProviders?: XverseProviders;
|
|
386
|
-
btc_providers?: Provider[];
|
|
387
|
-
}
|
|
591
|
+
interface RunesRbfOrderResult {
|
|
592
|
+
orderId: string;
|
|
593
|
+
fundRBFTransactionId: string;
|
|
594
|
+
fundingAddress: string;
|
|
388
595
|
}
|
|
596
|
+
type RunesRbfOrder = MethodParamsAndResult<RunesRbfOrderParams, RunesRbfOrderResult>;
|
|
389
597
|
|
|
390
|
-
declare
|
|
391
|
-
declare
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
declare function getSupportedWallets(): SupportedWallet[];
|
|
398
|
-
|
|
399
|
-
declare const getInfoMethodName = "getInfo";
|
|
400
|
-
declare const getInfoParamsSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
401
|
-
type GetInfoParams = v.InferOutput<typeof getInfoParamsSchema>;
|
|
402
|
-
declare const getInfoResultSchema: v.ObjectSchema<{
|
|
403
|
-
/**
|
|
404
|
-
* Version of the wallet.
|
|
405
|
-
*/
|
|
406
|
-
readonly version: v.StringSchema<undefined>;
|
|
407
|
-
/**
|
|
408
|
-
* [WBIP](https://wbips.netlify.app/wbips/WBIP002) methods supported by the wallet.
|
|
409
|
-
*/
|
|
410
|
-
readonly methods: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
411
|
-
/**
|
|
412
|
-
* List of WBIP standards supported by the wallet. Not currently used.
|
|
413
|
-
*/
|
|
414
|
-
readonly supports: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
598
|
+
declare const runesTransferMethodName = "runes_transfer";
|
|
599
|
+
declare const runesTransferParamsSchema: v.ObjectSchema<{
|
|
600
|
+
readonly recipients: v.ArraySchema<v.ObjectSchema<{
|
|
601
|
+
readonly runeName: v.StringSchema<undefined>;
|
|
602
|
+
readonly amount: v.StringSchema<undefined>;
|
|
603
|
+
readonly address: v.StringSchema<undefined>;
|
|
604
|
+
}, undefined>, undefined>;
|
|
415
605
|
}, undefined>;
|
|
416
|
-
type
|
|
417
|
-
declare const
|
|
418
|
-
readonly
|
|
419
|
-
|
|
606
|
+
type TransferRunesParams = v.InferOutput<typeof runesTransferParamsSchema>;
|
|
607
|
+
declare const runesTransferResultSchema: v.ObjectSchema<{
|
|
608
|
+
readonly txid: v.StringSchema<undefined>;
|
|
609
|
+
}, undefined>;
|
|
610
|
+
type RunesTransferResult = v.InferOutput<typeof runesTransferResultSchema>;
|
|
611
|
+
declare const runesTransferRequestMessageSchema: v.ObjectSchema<{
|
|
612
|
+
readonly method: v.LiteralSchema<"runes_transfer", undefined>;
|
|
613
|
+
readonly params: v.ObjectSchema<{
|
|
614
|
+
readonly recipients: v.ArraySchema<v.ObjectSchema<{
|
|
615
|
+
readonly runeName: v.StringSchema<undefined>;
|
|
616
|
+
readonly amount: v.StringSchema<undefined>;
|
|
617
|
+
readonly address: v.StringSchema<undefined>;
|
|
618
|
+
}, undefined>, undefined>;
|
|
619
|
+
}, undefined>;
|
|
420
620
|
readonly id: v.StringSchema<undefined>;
|
|
421
621
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
422
622
|
}, undefined>;
|
|
423
|
-
type
|
|
424
|
-
type
|
|
425
|
-
|
|
426
|
-
declare const
|
|
427
|
-
|
|
428
|
-
* The purposes for which to generate addresses. See
|
|
429
|
-
* {@linkcode AddressPurpose} for available purposes.
|
|
430
|
-
*/
|
|
431
|
-
readonly purposes: v.ArraySchema<v.EnumSchema<typeof AddressPurpose, undefined>, undefined>;
|
|
623
|
+
type RunesTransferRequestMessage = v.InferOutput<typeof runesTransferRequestMessageSchema>;
|
|
624
|
+
type RunesTransfer = MethodParamsAndResult<TransferRunesParams, RunesTransferResult>;
|
|
625
|
+
|
|
626
|
+
declare const sparkGetAddressesMethodName = "spark_getAddresses";
|
|
627
|
+
declare const sparkGetAddressesParamsSchema: v.NullishSchema<v.ObjectSchema<{
|
|
432
628
|
/**
|
|
433
629
|
* A message to be displayed to the user in the request prompt.
|
|
434
630
|
*/
|
|
435
631
|
readonly message: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
436
|
-
}, undefined>;
|
|
437
|
-
type
|
|
438
|
-
declare const
|
|
632
|
+
}, undefined>, undefined>;
|
|
633
|
+
type SparkGetAddressesParams = v.InferOutput<typeof sparkGetAddressesParamsSchema>;
|
|
634
|
+
declare const sparkGetAddressesResultSchema: v.ObjectSchema<{
|
|
439
635
|
/**
|
|
440
636
|
* The addresses generated for the given purposes.
|
|
441
637
|
*/
|
|
@@ -458,1721 +654,1531 @@ declare const getAddressesResultSchema: v.ObjectSchema<{
|
|
|
458
654
|
}, undefined>;
|
|
459
655
|
}, undefined>;
|
|
460
656
|
}, undefined>;
|
|
461
|
-
type
|
|
462
|
-
declare const
|
|
463
|
-
readonly method: v.LiteralSchema<"
|
|
464
|
-
readonly params: v.ObjectSchema<{
|
|
465
|
-
/**
|
|
466
|
-
* The purposes for which to generate addresses. See
|
|
467
|
-
* {@linkcode AddressPurpose} for available purposes.
|
|
468
|
-
*/
|
|
469
|
-
readonly purposes: v.ArraySchema<v.EnumSchema<typeof AddressPurpose, undefined>, undefined>;
|
|
657
|
+
type SparkGetAddressesResult = v.InferOutput<typeof sparkGetAddressesResultSchema>;
|
|
658
|
+
declare const sparkGetAddressesRequestMessageSchema: v.ObjectSchema<{
|
|
659
|
+
readonly method: v.LiteralSchema<"spark_getAddresses", undefined>;
|
|
660
|
+
readonly params: v.NullishSchema<v.ObjectSchema<{
|
|
470
661
|
/**
|
|
471
662
|
* A message to be displayed to the user in the request prompt.
|
|
472
663
|
*/
|
|
473
664
|
readonly message: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
474
|
-
}, undefined>;
|
|
665
|
+
}, undefined>, undefined>;
|
|
475
666
|
readonly id: v.StringSchema<undefined>;
|
|
476
667
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
477
668
|
}, undefined>;
|
|
478
|
-
type
|
|
479
|
-
type
|
|
480
|
-
|
|
481
|
-
declare
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
declare const signMessageParamsSchema: v.ObjectSchema<{
|
|
486
|
-
/**
|
|
487
|
-
* The address used for signing.
|
|
488
|
-
**/
|
|
489
|
-
readonly address: v.StringSchema<undefined>;
|
|
490
|
-
/**
|
|
491
|
-
* The message to sign.
|
|
492
|
-
**/
|
|
493
|
-
readonly message: v.StringSchema<undefined>;
|
|
669
|
+
type SparkGetAddressesRequestMessage = v.InferOutput<typeof sparkGetAddressesRequestMessageSchema>;
|
|
670
|
+
type SparkGetAddresses = MethodParamsAndResult<v.InferOutput<typeof sparkGetAddressesParamsSchema>, v.InferOutput<typeof sparkGetAddressesResultSchema>>;
|
|
671
|
+
|
|
672
|
+
declare const sparkGetBalanceMethodName = "spark_getBalance";
|
|
673
|
+
declare const sparkGetBalanceParamsSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
674
|
+
type SparkGetBalanceParams = v.InferOutput<typeof sparkGetBalanceParamsSchema>;
|
|
675
|
+
declare const sparkGetBalanceResultSchema: v.ObjectSchema<{
|
|
494
676
|
/**
|
|
495
|
-
* The
|
|
677
|
+
* The Spark Bitcoin address balance in sats in string form.
|
|
496
678
|
*/
|
|
497
|
-
readonly
|
|
679
|
+
readonly balance: v.StringSchema<undefined>;
|
|
680
|
+
readonly tokenBalances: v.ArraySchema<v.ObjectSchema<{
|
|
681
|
+
readonly balance: v.StringSchema<undefined>;
|
|
682
|
+
readonly tokenMetadata: v.ObjectSchema<{
|
|
683
|
+
readonly tokenIdentifier: v.StringSchema<undefined>;
|
|
684
|
+
readonly tokenName: v.StringSchema<undefined>;
|
|
685
|
+
readonly tokenTicker: v.StringSchema<undefined>;
|
|
686
|
+
readonly decimals: v.NumberSchema<undefined>;
|
|
687
|
+
readonly maxSupply: v.StringSchema<undefined>;
|
|
688
|
+
}, undefined>;
|
|
689
|
+
}, undefined>, undefined>;
|
|
498
690
|
}, undefined>;
|
|
499
|
-
type
|
|
500
|
-
declare const
|
|
691
|
+
type SparkGetBalanceResult = v.InferOutput<typeof sparkGetBalanceResultSchema>;
|
|
692
|
+
declare const sparkGetBalanceRequestMessageSchema: v.ObjectSchema<{
|
|
693
|
+
readonly method: v.LiteralSchema<"spark_getBalance", undefined>;
|
|
694
|
+
readonly params: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
695
|
+
readonly id: v.StringSchema<undefined>;
|
|
696
|
+
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
697
|
+
}, undefined>;
|
|
698
|
+
type SparkGetBalanceRequestMessage = v.InferOutput<typeof sparkGetBalanceRequestMessageSchema>;
|
|
699
|
+
type SparkGetBalance = MethodParamsAndResult<SparkGetBalanceParams, SparkGetBalanceResult>;
|
|
700
|
+
|
|
701
|
+
declare const sparkTransferMethodName = "spark_transfer";
|
|
702
|
+
declare const sparkTransferParamsSchema: v.ObjectSchema<{
|
|
501
703
|
/**
|
|
502
|
-
*
|
|
704
|
+
* Amount of SATS to transfer as a string or number.
|
|
503
705
|
*/
|
|
504
|
-
readonly
|
|
706
|
+
readonly amountSats: v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>], undefined>;
|
|
505
707
|
/**
|
|
506
|
-
*
|
|
507
|
-
*/
|
|
508
|
-
readonly messageHash: v.StringSchema<undefined>;
|
|
509
|
-
/**
|
|
510
|
-
* The address used for signing.
|
|
708
|
+
* The recipient's spark address.
|
|
511
709
|
*/
|
|
512
|
-
readonly
|
|
710
|
+
readonly receiverSparkAddress: v.StringSchema<undefined>;
|
|
711
|
+
}, undefined>;
|
|
712
|
+
type SparkTransferParams = v.InferOutput<typeof sparkTransferParamsSchema>;
|
|
713
|
+
declare const sparkTransferResultSchema: v.ObjectSchema<{
|
|
513
714
|
/**
|
|
514
|
-
* The
|
|
715
|
+
* The ID of the transaction.
|
|
515
716
|
*/
|
|
516
|
-
readonly
|
|
717
|
+
readonly id: v.StringSchema<undefined>;
|
|
517
718
|
}, undefined>;
|
|
518
|
-
type
|
|
519
|
-
declare const
|
|
520
|
-
readonly method: v.LiteralSchema<"
|
|
719
|
+
type SparkTransferResult = v.InferOutput<typeof sparkTransferResultSchema>;
|
|
720
|
+
declare const sparkTransferRequestMessageSchema: v.ObjectSchema<{
|
|
721
|
+
readonly method: v.LiteralSchema<"spark_transfer", undefined>;
|
|
521
722
|
readonly params: v.ObjectSchema<{
|
|
522
723
|
/**
|
|
523
|
-
*
|
|
524
|
-
|
|
525
|
-
readonly
|
|
526
|
-
/**
|
|
527
|
-
* The message to sign.
|
|
528
|
-
**/
|
|
529
|
-
readonly message: v.StringSchema<undefined>;
|
|
724
|
+
* Amount of SATS to transfer as a string or number.
|
|
725
|
+
*/
|
|
726
|
+
readonly amountSats: v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>], undefined>;
|
|
530
727
|
/**
|
|
531
|
-
* The
|
|
728
|
+
* The recipient's spark address.
|
|
532
729
|
*/
|
|
533
|
-
readonly
|
|
730
|
+
readonly receiverSparkAddress: v.StringSchema<undefined>;
|
|
534
731
|
}, undefined>;
|
|
535
732
|
readonly id: v.StringSchema<undefined>;
|
|
536
733
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
537
734
|
}, undefined>;
|
|
538
|
-
type
|
|
539
|
-
type
|
|
540
|
-
|
|
541
|
-
declare const
|
|
735
|
+
type SparkTransferRequestMessage = v.InferOutput<typeof sparkTransferRequestMessageSchema>;
|
|
736
|
+
type SparkTransfer = MethodParamsAndResult<SparkTransferParams, SparkTransferResult>;
|
|
737
|
+
|
|
738
|
+
declare const sparkTransferTokenMethodName = "spark_transferToken";
|
|
739
|
+
declare const sparkTransferTokenParamsSchema: v.ObjectSchema<{
|
|
542
740
|
/**
|
|
543
|
-
*
|
|
544
|
-
* The amount to send to each recipient is in satoshis.
|
|
741
|
+
* Amount of units of the token to transfer as a string or number.
|
|
545
742
|
*/
|
|
546
|
-
readonly
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
743
|
+
readonly tokenAmount: v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>], undefined>;
|
|
744
|
+
/**
|
|
745
|
+
* The Bech32m token identifier.
|
|
746
|
+
*/
|
|
747
|
+
readonly tokenIdentifier: v.StringSchema<undefined>;
|
|
748
|
+
/**
|
|
749
|
+
* The recipient's spark address.
|
|
750
|
+
*/
|
|
751
|
+
readonly receiverSparkAddress: v.StringSchema<undefined>;
|
|
550
752
|
}, undefined>;
|
|
551
|
-
type
|
|
552
|
-
declare const
|
|
753
|
+
type SparkTransferTokenParams = v.InferOutput<typeof sparkTransferTokenParamsSchema>;
|
|
754
|
+
declare const sparkTransferTokenResultSchema: v.ObjectSchema<{
|
|
553
755
|
/**
|
|
554
|
-
* The
|
|
756
|
+
* The ID of the transaction.
|
|
555
757
|
*/
|
|
556
|
-
readonly
|
|
758
|
+
readonly id: v.StringSchema<undefined>;
|
|
557
759
|
}, undefined>;
|
|
558
|
-
type
|
|
559
|
-
declare const
|
|
560
|
-
readonly method: v.LiteralSchema<"
|
|
760
|
+
type SparkTransferTokenResult = v.InferOutput<typeof sparkTransferTokenResultSchema>;
|
|
761
|
+
declare const sparkTransferTokenRequestMessageSchema: v.ObjectSchema<{
|
|
762
|
+
readonly method: v.LiteralSchema<"spark_transferToken", undefined>;
|
|
561
763
|
readonly params: v.ObjectSchema<{
|
|
562
764
|
/**
|
|
563
|
-
*
|
|
564
|
-
* The amount to send to each recipient is in satoshis.
|
|
765
|
+
* Amount of units of the token to transfer as a string or number.
|
|
565
766
|
*/
|
|
566
|
-
readonly
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
767
|
+
readonly tokenAmount: v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>], undefined>;
|
|
768
|
+
/**
|
|
769
|
+
* The Bech32m token identifier.
|
|
770
|
+
*/
|
|
771
|
+
readonly tokenIdentifier: v.StringSchema<undefined>;
|
|
772
|
+
/**
|
|
773
|
+
* The recipient's spark address.
|
|
774
|
+
*/
|
|
775
|
+
readonly receiverSparkAddress: v.StringSchema<undefined>;
|
|
570
776
|
}, undefined>;
|
|
571
777
|
readonly id: v.StringSchema<undefined>;
|
|
572
778
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
573
779
|
}, undefined>;
|
|
574
|
-
type
|
|
575
|
-
type
|
|
576
|
-
|
|
577
|
-
declare const
|
|
780
|
+
type SparkTransferTokenRequestMessage = v.InferOutput<typeof sparkTransferTokenRequestMessageSchema>;
|
|
781
|
+
type SparkTransferToken = MethodParamsAndResult<SparkTransferTokenParams, SparkTransferTokenResult>;
|
|
782
|
+
|
|
783
|
+
declare const stxCallContractMethodName = "stx_callContract";
|
|
784
|
+
declare const stxCallContractParamsSchema: v.ObjectSchema<{
|
|
578
785
|
/**
|
|
579
|
-
* The
|
|
786
|
+
* The contract principal.
|
|
787
|
+
*
|
|
788
|
+
* E.g. `"SPKE...GD5C.my-contract"`
|
|
580
789
|
*/
|
|
581
|
-
readonly
|
|
790
|
+
readonly contract: v.StringSchema<undefined>;
|
|
582
791
|
/**
|
|
583
|
-
* The
|
|
584
|
-
*
|
|
792
|
+
* The name of the function to call.
|
|
793
|
+
*
|
|
794
|
+
* Note: spec changes ongoing,
|
|
795
|
+
* https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
|
|
585
796
|
*/
|
|
586
|
-
readonly
|
|
797
|
+
readonly functionName: v.StringSchema<undefined>;
|
|
587
798
|
/**
|
|
588
|
-
*
|
|
589
|
-
|
|
590
|
-
readonly
|
|
799
|
+
* @deprecated in favor of `functionArgs` for @stacks/connect compatibility
|
|
800
|
+
*/
|
|
801
|
+
readonly arguments: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
802
|
+
/**
|
|
803
|
+
* The function's arguments. The arguments are expected to be hex-encoded
|
|
804
|
+
* strings of Clarity values.
|
|
805
|
+
*
|
|
806
|
+
* To convert Clarity values to their hex representation, the `cvToHex`
|
|
807
|
+
* helper from the `@stacks/transactions` package may be helpful.
|
|
808
|
+
*
|
|
809
|
+
* ```js
|
|
810
|
+
* import { cvToHex } from '@stacks/transactions';
|
|
811
|
+
*
|
|
812
|
+
* const functionArgs = [someClarityValue1, someClarityValue2];
|
|
813
|
+
* const hexArgs = functionArgs.map(cvToHex);
|
|
814
|
+
* ```
|
|
815
|
+
*/
|
|
816
|
+
readonly functionArgs: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
817
|
+
/**
|
|
818
|
+
* The post conditions to apply to the contract call.
|
|
819
|
+
*/
|
|
820
|
+
readonly postConditions: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
821
|
+
/**
|
|
822
|
+
* The mode to apply to the post conditions.
|
|
823
|
+
*/
|
|
824
|
+
readonly postConditionMode: v.OptionalSchema<v.UnionSchema<[v.LiteralSchema<"allow", undefined>, v.LiteralSchema<"deny", undefined>], undefined>, undefined>;
|
|
591
825
|
}, undefined>;
|
|
592
|
-
type
|
|
593
|
-
declare const
|
|
826
|
+
type StxCallContractParams = v.InferOutput<typeof stxCallContractParamsSchema>;
|
|
827
|
+
declare const stxCallContractResultSchema: v.ObjectSchema<{
|
|
594
828
|
/**
|
|
595
|
-
* The
|
|
829
|
+
* The ID of the transaction.
|
|
596
830
|
*/
|
|
597
|
-
readonly
|
|
831
|
+
readonly txid: v.StringSchema<undefined>;
|
|
598
832
|
/**
|
|
599
|
-
*
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
readonly txid: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
833
|
+
* A Stacks transaction as a hex-encoded string.
|
|
834
|
+
*/
|
|
835
|
+
readonly transaction: v.StringSchema<undefined>;
|
|
603
836
|
}, undefined>;
|
|
604
|
-
type
|
|
605
|
-
declare const
|
|
606
|
-
readonly method: v.LiteralSchema<"
|
|
837
|
+
type StxCallContractResult = v.InferOutput<typeof stxCallContractResultSchema>;
|
|
838
|
+
declare const stxCallContractRequestMessageSchema: v.ObjectSchema<{
|
|
839
|
+
readonly method: v.LiteralSchema<"stx_callContract", undefined>;
|
|
607
840
|
readonly params: v.ObjectSchema<{
|
|
608
841
|
/**
|
|
609
|
-
* The
|
|
842
|
+
* The contract principal.
|
|
843
|
+
*
|
|
844
|
+
* E.g. `"SPKE...GD5C.my-contract"`
|
|
610
845
|
*/
|
|
611
|
-
readonly
|
|
846
|
+
readonly contract: v.StringSchema<undefined>;
|
|
612
847
|
/**
|
|
613
|
-
* The
|
|
614
|
-
*
|
|
848
|
+
* The name of the function to call.
|
|
849
|
+
*
|
|
850
|
+
* Note: spec changes ongoing,
|
|
851
|
+
* https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
|
|
615
852
|
*/
|
|
616
|
-
readonly
|
|
853
|
+
readonly functionName: v.StringSchema<undefined>;
|
|
617
854
|
/**
|
|
618
|
-
*
|
|
619
|
-
|
|
620
|
-
readonly
|
|
621
|
-
}, undefined>;
|
|
622
|
-
readonly id: v.StringSchema<undefined>;
|
|
623
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
624
|
-
}, undefined>;
|
|
625
|
-
type SignPsbtRequestMessage = v.InferOutput<typeof signPsbtRequestMessageSchema>;
|
|
626
|
-
type SignPsbt = MethodParamsAndResult<SignPsbtParams, SignPsbtResult>;
|
|
627
|
-
declare const getAccountsMethodName = "getAccounts";
|
|
628
|
-
declare const getAccountsParamsSchema: v.ObjectSchema<{
|
|
629
|
-
/**
|
|
630
|
-
* The purposes for which to generate addresses. See
|
|
631
|
-
* {@linkcode AddressPurpose} for available purposes.
|
|
632
|
-
*/
|
|
633
|
-
readonly purposes: v.ArraySchema<v.EnumSchema<typeof AddressPurpose, undefined>, undefined>;
|
|
634
|
-
/**
|
|
635
|
-
* A message to be displayed to the user in the request prompt.
|
|
636
|
-
*/
|
|
637
|
-
readonly message: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
638
|
-
}, undefined>;
|
|
639
|
-
type GetAccountsParams = v.InferOutput<typeof getAccountsParamsSchema>;
|
|
640
|
-
declare const getAccountsResultSchema: v.ArraySchema<v.ObjectSchema<{
|
|
641
|
-
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
642
|
-
readonly address: v.StringSchema<undefined>;
|
|
643
|
-
readonly publicKey: v.StringSchema<undefined>;
|
|
644
|
-
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
645
|
-
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
646
|
-
}, undefined>, undefined>;
|
|
647
|
-
type GetAccountsResult = v.InferOutput<typeof getAccountsResultSchema>;
|
|
648
|
-
declare const getAccountsRequestMessageSchema: v.ObjectSchema<{
|
|
649
|
-
readonly method: v.LiteralSchema<"getAccounts", undefined>;
|
|
650
|
-
readonly params: v.ObjectSchema<{
|
|
855
|
+
* @deprecated in favor of `functionArgs` for @stacks/connect compatibility
|
|
856
|
+
*/
|
|
857
|
+
readonly arguments: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
651
858
|
/**
|
|
652
|
-
* The
|
|
653
|
-
*
|
|
859
|
+
* The function's arguments. The arguments are expected to be hex-encoded
|
|
860
|
+
* strings of Clarity values.
|
|
861
|
+
*
|
|
862
|
+
* To convert Clarity values to their hex representation, the `cvToHex`
|
|
863
|
+
* helper from the `@stacks/transactions` package may be helpful.
|
|
864
|
+
*
|
|
865
|
+
* ```js
|
|
866
|
+
* import { cvToHex } from '@stacks/transactions';
|
|
867
|
+
*
|
|
868
|
+
* const functionArgs = [someClarityValue1, someClarityValue2];
|
|
869
|
+
* const hexArgs = functionArgs.map(cvToHex);
|
|
870
|
+
* ```
|
|
654
871
|
*/
|
|
655
|
-
readonly
|
|
872
|
+
readonly functionArgs: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
656
873
|
/**
|
|
657
|
-
*
|
|
874
|
+
* The post conditions to apply to the contract call.
|
|
658
875
|
*/
|
|
659
|
-
readonly
|
|
876
|
+
readonly postConditions: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
877
|
+
/**
|
|
878
|
+
* The mode to apply to the post conditions.
|
|
879
|
+
*/
|
|
880
|
+
readonly postConditionMode: v.OptionalSchema<v.UnionSchema<[v.LiteralSchema<"allow", undefined>, v.LiteralSchema<"deny", undefined>], undefined>, undefined>;
|
|
660
881
|
}, undefined>;
|
|
661
882
|
readonly id: v.StringSchema<undefined>;
|
|
662
883
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
663
884
|
}, undefined>;
|
|
664
|
-
type
|
|
665
|
-
type
|
|
666
|
-
|
|
667
|
-
declare const
|
|
668
|
-
|
|
669
|
-
declare const getBalanceResultSchema: v.ObjectSchema<{
|
|
885
|
+
type StxCallContractRequestMessage = v.InferOutput<typeof stxCallContractRequestMessageSchema>;
|
|
886
|
+
type StxCallContract = MethodParamsAndResult<StxCallContractParams, StxCallContractResult>;
|
|
887
|
+
|
|
888
|
+
declare const stxDeployContractMethodName = "stx_deployContract";
|
|
889
|
+
declare const stxDeployContractParamsSchema: v.ObjectSchema<{
|
|
670
890
|
/**
|
|
671
|
-
*
|
|
672
|
-
* messages not supporting bigint
|
|
673
|
-
* (https://issues.chromium.org/issues/40116184).
|
|
891
|
+
* Name of the contract.
|
|
674
892
|
*/
|
|
675
|
-
readonly
|
|
893
|
+
readonly name: v.StringSchema<undefined>;
|
|
676
894
|
/**
|
|
677
|
-
* The
|
|
678
|
-
* messages not supporting bigint
|
|
679
|
-
* (https://issues.chromium.org/issues/40116184).
|
|
895
|
+
* The source code of the Clarity contract.
|
|
680
896
|
*/
|
|
681
|
-
readonly
|
|
897
|
+
readonly clarityCode: v.StringSchema<undefined>;
|
|
682
898
|
/**
|
|
683
|
-
* The
|
|
684
|
-
* sats. Using a string due to chrome messages not supporting bigint
|
|
685
|
-
* (https://issues.chromium.org/issues/40116184).
|
|
899
|
+
* The version of the Clarity contract.
|
|
686
900
|
*/
|
|
687
|
-
readonly
|
|
901
|
+
readonly clarityVersion: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
902
|
+
/**
|
|
903
|
+
* The post conditions to apply to the contract call.
|
|
904
|
+
*/
|
|
905
|
+
readonly postConditions: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
906
|
+
/**
|
|
907
|
+
* The mode to apply to the post conditions.
|
|
908
|
+
*/
|
|
909
|
+
readonly postConditionMode: v.OptionalSchema<v.UnionSchema<[v.LiteralSchema<"allow", undefined>, v.LiteralSchema<"deny", undefined>], undefined>, undefined>;
|
|
688
910
|
}, undefined>;
|
|
689
|
-
type
|
|
690
|
-
declare const
|
|
691
|
-
|
|
911
|
+
type StxDeployContractParams = v.InferOutput<typeof stxDeployContractParamsSchema>;
|
|
912
|
+
declare const stxDeployContractResultSchema: v.ObjectSchema<{
|
|
913
|
+
/**
|
|
914
|
+
* The ID of the transaction.
|
|
915
|
+
*/
|
|
916
|
+
readonly txid: v.StringSchema<undefined>;
|
|
917
|
+
/**
|
|
918
|
+
* A Stacks transaction as a hex-encoded string.
|
|
919
|
+
*/
|
|
920
|
+
readonly transaction: v.StringSchema<undefined>;
|
|
921
|
+
}, undefined>;
|
|
922
|
+
type StxDeployContractResult = v.InferOutput<typeof stxDeployContractResultSchema>;
|
|
923
|
+
declare const stxDeployContractRequestMessageSchema: v.ObjectSchema<{
|
|
924
|
+
readonly method: v.LiteralSchema<"stx_deployContract", undefined>;
|
|
925
|
+
readonly params: v.ObjectSchema<{
|
|
926
|
+
/**
|
|
927
|
+
* Name of the contract.
|
|
928
|
+
*/
|
|
929
|
+
readonly name: v.StringSchema<undefined>;
|
|
930
|
+
/**
|
|
931
|
+
* The source code of the Clarity contract.
|
|
932
|
+
*/
|
|
933
|
+
readonly clarityCode: v.StringSchema<undefined>;
|
|
934
|
+
/**
|
|
935
|
+
* The version of the Clarity contract.
|
|
936
|
+
*/
|
|
937
|
+
readonly clarityVersion: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
938
|
+
/**
|
|
939
|
+
* The post conditions to apply to the contract call.
|
|
940
|
+
*/
|
|
941
|
+
readonly postConditions: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
942
|
+
/**
|
|
943
|
+
* The mode to apply to the post conditions.
|
|
944
|
+
*/
|
|
945
|
+
readonly postConditionMode: v.OptionalSchema<v.UnionSchema<[v.LiteralSchema<"allow", undefined>, v.LiteralSchema<"deny", undefined>], undefined>, undefined>;
|
|
946
|
+
}, undefined>;
|
|
692
947
|
readonly id: v.StringSchema<undefined>;
|
|
693
948
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
694
|
-
readonly params: v.OptionalSchema<v.UnionSchema<[v.ArraySchema<v.UnknownSchema, undefined>, v.LooseObjectSchema<{}, undefined>, v.NullSchema<undefined>], undefined>, undefined>;
|
|
695
949
|
}, undefined>;
|
|
696
|
-
type
|
|
697
|
-
type
|
|
950
|
+
type StxDeployContractRequestMessage = v.InferOutput<typeof stxDeployContractRequestMessageSchema>;
|
|
951
|
+
type StxDeployContract = MethodParamsAndResult<StxDeployContractParams, StxDeployContractResult>;
|
|
698
952
|
|
|
699
|
-
declare const
|
|
700
|
-
declare const
|
|
701
|
-
|
|
702
|
-
|
|
953
|
+
declare const stxGetAccountsMethodName = "stx_getAccounts";
|
|
954
|
+
declare const stxGetAccountsParamsSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
955
|
+
type StxGetAccountsParams = v.InferOutput<typeof stxGetAccountsParamsSchema>;
|
|
956
|
+
declare const stxGetAccountsResultSchema: v.ObjectSchema<{
|
|
957
|
+
/**
|
|
958
|
+
* The addresses generated for the given purposes.
|
|
959
|
+
*/
|
|
960
|
+
readonly addresses: v.ArraySchema<v.ObjectSchema<{
|
|
961
|
+
readonly address: v.StringSchema<undefined>;
|
|
962
|
+
readonly publicKey: v.StringSchema<undefined>;
|
|
963
|
+
readonly gaiaHubUrl: v.StringSchema<undefined>;
|
|
964
|
+
readonly gaiaAppKey: v.StringSchema<undefined>;
|
|
965
|
+
}, undefined>, undefined>;
|
|
966
|
+
readonly network: v.ObjectSchema<{
|
|
967
|
+
readonly bitcoin: v.ObjectSchema<{
|
|
968
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
969
|
+
}, undefined>;
|
|
970
|
+
readonly stacks: v.ObjectSchema<{
|
|
971
|
+
readonly name: v.EnumSchema<typeof StacksNetworkType, undefined>;
|
|
972
|
+
}, undefined>;
|
|
973
|
+
readonly spark: v.ObjectSchema<{
|
|
974
|
+
readonly name: v.EnumSchema<typeof SparkNetworkType, undefined>;
|
|
975
|
+
}, undefined>;
|
|
976
|
+
}, undefined>;
|
|
703
977
|
}, undefined>;
|
|
704
|
-
type
|
|
705
|
-
declare const
|
|
706
|
-
readonly
|
|
707
|
-
readonly
|
|
708
|
-
readonly
|
|
709
|
-
readonly
|
|
710
|
-
|
|
711
|
-
|
|
978
|
+
type StxGetAccountsResult = v.InferOutput<typeof stxGetAccountsResultSchema>;
|
|
979
|
+
declare const stxGetAccountsRequestMessageSchema: v.ObjectSchema<{
|
|
980
|
+
readonly method: v.LiteralSchema<"stx_getAccounts", undefined>;
|
|
981
|
+
readonly params: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
982
|
+
readonly id: v.StringSchema<undefined>;
|
|
983
|
+
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
984
|
+
}, undefined>;
|
|
985
|
+
type StxGetAccountsRequestMessage = v.InferOutput<typeof stxGetAccountsRequestMessageSchema>;
|
|
986
|
+
type StxGetAccounts = MethodParamsAndResult<StxGetAccountsParams, StxGetAccountsResult>;
|
|
987
|
+
|
|
988
|
+
declare const stxGetAddressesMethodName = "stx_getAddresses";
|
|
989
|
+
declare const stxGetAddressesParamsSchema: v.NullishSchema<v.ObjectSchema<{
|
|
990
|
+
/**
|
|
991
|
+
* A message to be displayed to the user in the request prompt.
|
|
992
|
+
*/
|
|
993
|
+
readonly message: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
994
|
+
}, undefined>, undefined>;
|
|
995
|
+
type StxGetAddressesParams = v.InferOutput<typeof stxGetAddressesParamsSchema>;
|
|
996
|
+
declare const stxGetAddressesResultSchema: v.ObjectSchema<{
|
|
997
|
+
/**
|
|
998
|
+
* The addresses generated for the given purposes.
|
|
999
|
+
*/
|
|
1000
|
+
readonly addresses: v.ArraySchema<v.ObjectSchema<{
|
|
712
1001
|
readonly address: v.StringSchema<undefined>;
|
|
713
|
-
readonly
|
|
714
|
-
readonly
|
|
715
|
-
readonly
|
|
716
|
-
readonly
|
|
717
|
-
readonly timestamp: v.NumberSchema<undefined>;
|
|
718
|
-
readonly offset: v.NumberSchema<undefined>;
|
|
719
|
-
readonly genesisTransaction: v.StringSchema<undefined>;
|
|
720
|
-
readonly output: v.StringSchema<undefined>;
|
|
1002
|
+
readonly publicKey: v.StringSchema<undefined>;
|
|
1003
|
+
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
1004
|
+
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
1005
|
+
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
721
1006
|
}, undefined>, undefined>;
|
|
1007
|
+
readonly network: v.ObjectSchema<{
|
|
1008
|
+
readonly bitcoin: v.ObjectSchema<{
|
|
1009
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1010
|
+
}, undefined>;
|
|
1011
|
+
readonly stacks: v.ObjectSchema<{
|
|
1012
|
+
readonly name: v.EnumSchema<typeof StacksNetworkType, undefined>;
|
|
1013
|
+
}, undefined>;
|
|
1014
|
+
readonly spark: v.ObjectSchema<{
|
|
1015
|
+
readonly name: v.EnumSchema<typeof SparkNetworkType, undefined>;
|
|
1016
|
+
}, undefined>;
|
|
1017
|
+
}, undefined>;
|
|
722
1018
|
}, undefined>;
|
|
723
|
-
type
|
|
724
|
-
declare const
|
|
725
|
-
readonly method: v.LiteralSchema<"
|
|
1019
|
+
type StxGetAddressesResult = v.InferOutput<typeof stxGetAddressesResultSchema>;
|
|
1020
|
+
declare const stxGetAddressesRequestMessageSchema: v.ObjectSchema<{
|
|
1021
|
+
readonly method: v.LiteralSchema<"stx_getAddresses", undefined>;
|
|
1022
|
+
readonly params: v.NullishSchema<v.ObjectSchema<{
|
|
1023
|
+
/**
|
|
1024
|
+
* A message to be displayed to the user in the request prompt.
|
|
1025
|
+
*/
|
|
1026
|
+
readonly message: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1027
|
+
}, undefined>, undefined>;
|
|
1028
|
+
readonly id: v.StringSchema<undefined>;
|
|
1029
|
+
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1030
|
+
}, undefined>;
|
|
1031
|
+
type StxGetAddressesRequestMessage = v.InferOutput<typeof stxGetAddressesRequestMessageSchema>;
|
|
1032
|
+
type StxGetAddresses = MethodParamsAndResult<v.InferOutput<typeof stxGetAddressesParamsSchema>, v.InferOutput<typeof stxGetAddressesResultSchema>>;
|
|
1033
|
+
|
|
1034
|
+
declare const stxSignMessageMethodName = "stx_signMessage";
|
|
1035
|
+
declare const stxSignMessageParamsSchema: v.ObjectSchema<{
|
|
1036
|
+
/**
|
|
1037
|
+
* The message to sign.
|
|
1038
|
+
*/
|
|
1039
|
+
readonly message: v.StringSchema<undefined>;
|
|
1040
|
+
}, undefined>;
|
|
1041
|
+
type StxSignMessageParams = v.InferOutput<typeof stxSignMessageParamsSchema>;
|
|
1042
|
+
declare const stxSignMessageResultSchema: v.ObjectSchema<{
|
|
1043
|
+
/**
|
|
1044
|
+
* The signature of the message.
|
|
1045
|
+
*/
|
|
1046
|
+
readonly signature: v.StringSchema<undefined>;
|
|
1047
|
+
/**
|
|
1048
|
+
* The public key used to sign the message.
|
|
1049
|
+
*/
|
|
1050
|
+
readonly publicKey: v.StringSchema<undefined>;
|
|
1051
|
+
}, undefined>;
|
|
1052
|
+
type StxSignMessageResult = v.InferOutput<typeof stxSignMessageResultSchema>;
|
|
1053
|
+
declare const stxSignMessageRequestMessageSchema: v.ObjectSchema<{
|
|
1054
|
+
readonly method: v.LiteralSchema<"stx_signMessage", undefined>;
|
|
726
1055
|
readonly params: v.ObjectSchema<{
|
|
727
|
-
|
|
728
|
-
|
|
1056
|
+
/**
|
|
1057
|
+
* The message to sign.
|
|
1058
|
+
*/
|
|
1059
|
+
readonly message: v.StringSchema<undefined>;
|
|
729
1060
|
}, undefined>;
|
|
730
1061
|
readonly id: v.StringSchema<undefined>;
|
|
731
1062
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
732
1063
|
}, undefined>;
|
|
733
|
-
type
|
|
734
|
-
type
|
|
735
|
-
|
|
736
|
-
declare const
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
1064
|
+
type StxSignMessageRequestMessage = v.InferOutput<typeof stxSignMessageRequestMessageSchema>;
|
|
1065
|
+
type StxSignMessage = MethodParamsAndResult<StxSignMessageParams, StxSignMessageResult>;
|
|
1066
|
+
|
|
1067
|
+
declare const stxSignStructuredMessageMethodName = "stx_signStructuredMessage";
|
|
1068
|
+
declare const stxSignStructuredMessageParamsSchema: v.ObjectSchema<{
|
|
1069
|
+
/**
|
|
1070
|
+
* The domain to be signed.
|
|
1071
|
+
*/
|
|
1072
|
+
readonly domain: v.StringSchema<undefined>;
|
|
1073
|
+
/**
|
|
1074
|
+
* Message payload to be signed.
|
|
1075
|
+
*/
|
|
1076
|
+
readonly message: v.StringSchema<undefined>;
|
|
1077
|
+
/**
|
|
1078
|
+
* The public key to sign the message with.
|
|
1079
|
+
*/
|
|
1080
|
+
readonly publicKey: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
741
1081
|
}, undefined>;
|
|
742
|
-
type
|
|
743
|
-
declare const
|
|
744
|
-
|
|
1082
|
+
type StxSignStructuredMessageParams = v.InferOutput<typeof stxSignStructuredMessageParamsSchema>;
|
|
1083
|
+
declare const stxSignStructuredMessageResultSchema: v.ObjectSchema<{
|
|
1084
|
+
/**
|
|
1085
|
+
* Signature of the message.
|
|
1086
|
+
*/
|
|
1087
|
+
readonly signature: v.StringSchema<undefined>;
|
|
1088
|
+
/**
|
|
1089
|
+
* Public key as hex-encoded string.
|
|
1090
|
+
*/
|
|
1091
|
+
readonly publicKey: v.StringSchema<undefined>;
|
|
745
1092
|
}, undefined>;
|
|
746
|
-
type
|
|
747
|
-
declare const
|
|
748
|
-
readonly method: v.LiteralSchema<"
|
|
1093
|
+
type StxSignStructuredMessageResult = v.InferOutput<typeof stxSignStructuredMessageResultSchema>;
|
|
1094
|
+
declare const stxSignStructuredMessageRequestMessageSchema: v.ObjectSchema<{
|
|
1095
|
+
readonly method: v.LiteralSchema<"stx_signStructuredMessage", undefined>;
|
|
749
1096
|
readonly params: v.ObjectSchema<{
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
1097
|
+
/**
|
|
1098
|
+
* The domain to be signed.
|
|
1099
|
+
*/
|
|
1100
|
+
readonly domain: v.StringSchema<undefined>;
|
|
1101
|
+
/**
|
|
1102
|
+
* Message payload to be signed.
|
|
1103
|
+
*/
|
|
1104
|
+
readonly message: v.StringSchema<undefined>;
|
|
1105
|
+
/**
|
|
1106
|
+
* The public key to sign the message with.
|
|
1107
|
+
*/
|
|
1108
|
+
readonly publicKey: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
754
1109
|
}, undefined>;
|
|
755
1110
|
readonly id: v.StringSchema<undefined>;
|
|
756
1111
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
757
1112
|
}, undefined>;
|
|
758
|
-
type
|
|
759
|
-
type
|
|
1113
|
+
type StxSignStructuredMessageRequestMessage = v.InferOutput<typeof stxSignStructuredMessageRequestMessageSchema>;
|
|
1114
|
+
type StxSignStructuredMessage = MethodParamsAndResult<StxSignStructuredMessageParams, StxSignStructuredMessageResult>;
|
|
760
1115
|
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
networkFee: number;
|
|
777
|
-
serviceFee: number;
|
|
778
|
-
appServiceFee: number;
|
|
779
|
-
};
|
|
780
|
-
};
|
|
781
|
-
type CreateEtchOrderRequest = {
|
|
782
|
-
runeName: string;
|
|
783
|
-
divisibility?: number;
|
|
784
|
-
symbol?: string;
|
|
785
|
-
premine?: string;
|
|
786
|
-
isMintable: boolean;
|
|
787
|
-
terms?: {
|
|
788
|
-
amount?: string;
|
|
789
|
-
cap?: string;
|
|
790
|
-
heightStart?: string;
|
|
791
|
-
heightEnd?: string;
|
|
792
|
-
offsetStart?: string;
|
|
793
|
-
offsetEnd?: string;
|
|
794
|
-
};
|
|
795
|
-
inscriptionDetails?: {
|
|
796
|
-
contentType: string;
|
|
797
|
-
contentBase64: string;
|
|
798
|
-
};
|
|
799
|
-
delegateInscriptionId?: string;
|
|
800
|
-
destinationAddress: string;
|
|
801
|
-
refundAddress: string;
|
|
802
|
-
feeRate: number;
|
|
803
|
-
appServiceFee?: number;
|
|
804
|
-
appServiceFeeAddress?: string;
|
|
805
|
-
};
|
|
806
|
-
type EstimateEtchOrderRequest = Omit<CreateEtchOrderRequest, 'refundAddress'>;
|
|
807
|
-
type GetOrderRequest = {
|
|
808
|
-
id: string;
|
|
809
|
-
};
|
|
810
|
-
type GetOrderResponse = {
|
|
811
|
-
id: string;
|
|
812
|
-
orderType: 'rune_mint' | 'rune_etch';
|
|
813
|
-
state: 'new' | 'pending' | 'executing' | 'complete' | 'failed' | 'refunded' | 'stale';
|
|
814
|
-
fundingAddress: string;
|
|
815
|
-
reason?: string;
|
|
816
|
-
createdAt: string;
|
|
817
|
-
};
|
|
818
|
-
type RBFOrderRequest = {
|
|
819
|
-
orderId: string;
|
|
820
|
-
newFeeRate: number;
|
|
821
|
-
};
|
|
822
|
-
type RBFOrderResponse = {
|
|
823
|
-
rbfCost: number;
|
|
824
|
-
fundingAddress: string;
|
|
825
|
-
};
|
|
826
|
-
|
|
827
|
-
interface RunesEstimateEtchParams extends EstimateEtchOrderRequest {
|
|
828
|
-
network?: BitcoinNetworkType;
|
|
829
|
-
}
|
|
830
|
-
type RunesEstimateEtchResult = EstimateOrderResponse;
|
|
831
|
-
type RunesEstimateEtch = MethodParamsAndResult<RunesEstimateEtchParams, RunesEstimateEtchResult>;
|
|
832
|
-
|
|
833
|
-
interface runesEstimateMintParams extends EstimateMintOrderRequest {
|
|
834
|
-
network?: BitcoinNetworkType;
|
|
835
|
-
}
|
|
836
|
-
type runesEstimateMintResult = EstimateOrderResponse;
|
|
837
|
-
type RunesEstimateMint = MethodParamsAndResult<runesEstimateMintParams, runesEstimateMintResult>;
|
|
838
|
-
|
|
839
|
-
interface RunesEstimateRbfOrderParams extends RBFOrderRequest {
|
|
840
|
-
network?: BitcoinNetworkType;
|
|
841
|
-
}
|
|
842
|
-
type RunesEstimateRbfOrder = MethodParamsAndResult<RunesEstimateRbfOrderParams, RBFOrderResponse>;
|
|
843
|
-
|
|
844
|
-
declare const runesEtchMethodName = "runes_etch";
|
|
845
|
-
declare const runesEtchParamsSchema: v.ObjectSchema<{
|
|
846
|
-
readonly runeName: v.StringSchema<undefined>;
|
|
847
|
-
readonly divisibility: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
848
|
-
readonly symbol: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
849
|
-
readonly premine: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
850
|
-
readonly isMintable: v.BooleanSchema<undefined>;
|
|
851
|
-
readonly delegateInscriptionId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
852
|
-
readonly destinationAddress: v.StringSchema<undefined>;
|
|
853
|
-
readonly refundAddress: v.StringSchema<undefined>;
|
|
854
|
-
readonly feeRate: v.NumberSchema<undefined>;
|
|
855
|
-
readonly appServiceFee: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
856
|
-
readonly appServiceFeeAddress: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
857
|
-
readonly terms: v.OptionalSchema<v.ObjectSchema<{
|
|
858
|
-
readonly amount: v.StringSchema<undefined>;
|
|
859
|
-
readonly cap: v.StringSchema<undefined>;
|
|
860
|
-
readonly heightStart: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
861
|
-
readonly heightEnd: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
862
|
-
readonly offsetStart: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
863
|
-
readonly offsetEnd: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
864
|
-
}, undefined>, undefined>;
|
|
865
|
-
readonly inscriptionDetails: v.OptionalSchema<v.ObjectSchema<{
|
|
866
|
-
readonly contentType: v.StringSchema<undefined>;
|
|
867
|
-
readonly contentBase64: v.StringSchema<undefined>;
|
|
868
|
-
}, undefined>, undefined>;
|
|
869
|
-
readonly network: v.OptionalSchema<v.EnumSchema<typeof BitcoinNetworkType, undefined>, undefined>;
|
|
1116
|
+
declare const stxSignTransactionMethodName = "stx_signTransaction";
|
|
1117
|
+
declare const stxSignTransactionParamsSchema: v.ObjectSchema<{
|
|
1118
|
+
/**
|
|
1119
|
+
* The transaction to sign as a hex-encoded string.
|
|
1120
|
+
*/
|
|
1121
|
+
readonly transaction: v.StringSchema<undefined>;
|
|
1122
|
+
/**
|
|
1123
|
+
* The public key to sign the transaction with. The wallet may use any key
|
|
1124
|
+
* when not provided.
|
|
1125
|
+
*/
|
|
1126
|
+
readonly pubkey: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1127
|
+
/**
|
|
1128
|
+
* Whether to broadcast the transaction after signing. Defaults to `true`.
|
|
1129
|
+
*/
|
|
1130
|
+
readonly broadcast: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
870
1131
|
}, undefined>;
|
|
871
|
-
type
|
|
872
|
-
declare const
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
1132
|
+
type StxSignTransactionParams = v.InferOutput<typeof stxSignTransactionParamsSchema>;
|
|
1133
|
+
declare const stxSignTransactionResultSchema: v.ObjectSchema<{
|
|
1134
|
+
/**
|
|
1135
|
+
* The signed transaction as a hex-encoded string.
|
|
1136
|
+
*/
|
|
1137
|
+
readonly transaction: v.StringSchema<undefined>;
|
|
876
1138
|
}, undefined>;
|
|
877
|
-
type
|
|
878
|
-
declare const
|
|
879
|
-
readonly method: v.LiteralSchema<"
|
|
1139
|
+
type StxSignTransactionResult = v.InferOutput<typeof stxSignTransactionResultSchema>;
|
|
1140
|
+
declare const stxSignTransactionRequestMessageSchema: v.ObjectSchema<{
|
|
1141
|
+
readonly method: v.LiteralSchema<"stx_signTransaction", undefined>;
|
|
880
1142
|
readonly params: v.ObjectSchema<{
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
readonly
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
readonly
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
readonly cap: v.StringSchema<undefined>;
|
|
895
|
-
readonly heightStart: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
896
|
-
readonly heightEnd: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
897
|
-
readonly offsetStart: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
898
|
-
readonly offsetEnd: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
899
|
-
}, undefined>, undefined>;
|
|
900
|
-
readonly inscriptionDetails: v.OptionalSchema<v.ObjectSchema<{
|
|
901
|
-
readonly contentType: v.StringSchema<undefined>;
|
|
902
|
-
readonly contentBase64: v.StringSchema<undefined>;
|
|
903
|
-
}, undefined>, undefined>;
|
|
904
|
-
readonly network: v.OptionalSchema<v.EnumSchema<typeof BitcoinNetworkType, undefined>, undefined>;
|
|
1143
|
+
/**
|
|
1144
|
+
* The transaction to sign as a hex-encoded string.
|
|
1145
|
+
*/
|
|
1146
|
+
readonly transaction: v.StringSchema<undefined>;
|
|
1147
|
+
/**
|
|
1148
|
+
* The public key to sign the transaction with. The wallet may use any key
|
|
1149
|
+
* when not provided.
|
|
1150
|
+
*/
|
|
1151
|
+
readonly pubkey: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1152
|
+
/**
|
|
1153
|
+
* Whether to broadcast the transaction after signing. Defaults to `true`.
|
|
1154
|
+
*/
|
|
1155
|
+
readonly broadcast: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
905
1156
|
}, undefined>;
|
|
906
1157
|
readonly id: v.StringSchema<undefined>;
|
|
907
1158
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
908
1159
|
}, undefined>;
|
|
909
|
-
type
|
|
910
|
-
type
|
|
1160
|
+
type StxSignTransactionRequestMessage = v.InferOutput<typeof stxSignTransactionRequestMessageSchema>;
|
|
1161
|
+
type StxSignTransaction = MethodParamsAndResult<StxSignTransactionParams, StxSignTransactionResult>;
|
|
911
1162
|
|
|
912
|
-
declare const
|
|
913
|
-
declare const
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
}, undefined>, undefined>;
|
|
1163
|
+
declare const stxSignTransactionsMethodName = "stx_signTransactions";
|
|
1164
|
+
declare const stxSignTransactionsParamsSchema: v.ObjectSchema<{
|
|
1165
|
+
/**
|
|
1166
|
+
* The transactions to sign as hex-encoded strings.
|
|
1167
|
+
*/
|
|
1168
|
+
readonly transactions: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "Invalid hex-encoded Stacks transaction.">]>, undefined>, v.MinLengthAction<string[], 1, undefined>]>;
|
|
1169
|
+
/**
|
|
1170
|
+
* Whether the signed transactions should be broadcast after signing. Defaults
|
|
1171
|
+
* to `true`.
|
|
1172
|
+
*/
|
|
1173
|
+
readonly broadcast: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
924
1174
|
}, undefined>;
|
|
925
|
-
type
|
|
926
|
-
declare const
|
|
927
|
-
|
|
928
|
-
|
|
1175
|
+
type StxSignTransactionsParams = v.InferOutput<typeof stxSignTransactionsParamsSchema>;
|
|
1176
|
+
declare const stxSignTransactionsResultSchema: v.ObjectSchema<{
|
|
1177
|
+
/**
|
|
1178
|
+
* The signed transactions as hex-encoded strings, in the same order as in the
|
|
1179
|
+
* sign request.
|
|
1180
|
+
*/
|
|
1181
|
+
readonly transactions: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
1182
|
+
}, undefined>;
|
|
1183
|
+
type StxSignTransactionsResult = v.InferOutput<typeof stxSignTransactionsResultSchema>;
|
|
1184
|
+
declare const stxSignTransactionsRequestMessageSchema: v.ObjectSchema<{
|
|
1185
|
+
readonly method: v.LiteralSchema<"stx_signTransactions", undefined>;
|
|
1186
|
+
readonly params: v.ObjectSchema<{
|
|
1187
|
+
/**
|
|
1188
|
+
* The transactions to sign as hex-encoded strings.
|
|
1189
|
+
*/
|
|
1190
|
+
readonly transactions: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "Invalid hex-encoded Stacks transaction.">]>, undefined>, v.MinLengthAction<string[], 1, undefined>]>;
|
|
1191
|
+
/**
|
|
1192
|
+
* Whether the signed transactions should be broadcast after signing. Defaults
|
|
1193
|
+
* to `true`.
|
|
1194
|
+
*/
|
|
1195
|
+
readonly broadcast: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1196
|
+
}, undefined>;
|
|
929
1197
|
readonly id: v.StringSchema<undefined>;
|
|
930
1198
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
931
1199
|
}, undefined>;
|
|
932
|
-
type
|
|
933
|
-
type
|
|
934
|
-
|
|
935
|
-
interface RunesGetOrderParams extends GetOrderRequest {
|
|
936
|
-
network?: BitcoinNetworkType;
|
|
937
|
-
}
|
|
938
|
-
type RunesGetOrder = MethodParamsAndResult<RunesGetOrderParams, GetOrderResponse>;
|
|
1200
|
+
type StxSignTransactionsRequestMessage = v.InferOutput<typeof stxSignTransactionsRequestMessageSchema>;
|
|
1201
|
+
type StxSignTransactions = MethodParamsAndResult<StxSignTransactionsParams, StxSignTransactionsResult>;
|
|
939
1202
|
|
|
940
|
-
declare const
|
|
941
|
-
declare const
|
|
942
|
-
readonly appServiceFee: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
943
|
-
readonly appServiceFeeAddress: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
944
|
-
readonly destinationAddress: v.StringSchema<undefined>;
|
|
945
|
-
readonly feeRate: v.NumberSchema<undefined>;
|
|
946
|
-
readonly refundAddress: v.StringSchema<undefined>;
|
|
947
|
-
readonly repeats: v.NumberSchema<undefined>;
|
|
948
|
-
readonly runeName: v.StringSchema<undefined>;
|
|
949
|
-
readonly network: v.OptionalSchema<v.EnumSchema<typeof BitcoinNetworkType, undefined>, undefined>;
|
|
950
|
-
}, undefined>;
|
|
951
|
-
type RunesMintParams = v.InferOutput<typeof runesMintParamsSchema>;
|
|
952
|
-
declare const runesMintResultSchema: v.ObjectSchema<{
|
|
953
|
-
readonly orderId: v.StringSchema<undefined>;
|
|
954
|
-
readonly fundTransactionId: v.StringSchema<undefined>;
|
|
955
|
-
readonly fundingAddress: v.StringSchema<undefined>;
|
|
956
|
-
}, undefined>;
|
|
957
|
-
type RunesMintResult = v.InferOutput<typeof runesMintResultSchema>;
|
|
958
|
-
declare const runesMintRequestMessageSchema: v.ObjectSchema<{
|
|
959
|
-
readonly method: v.LiteralSchema<"runes_mint", undefined>;
|
|
960
|
-
readonly params: v.ObjectSchema<{
|
|
961
|
-
readonly appServiceFee: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
962
|
-
readonly appServiceFeeAddress: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
963
|
-
readonly destinationAddress: v.StringSchema<undefined>;
|
|
964
|
-
readonly feeRate: v.NumberSchema<undefined>;
|
|
965
|
-
readonly refundAddress: v.StringSchema<undefined>;
|
|
966
|
-
readonly repeats: v.NumberSchema<undefined>;
|
|
967
|
-
readonly runeName: v.StringSchema<undefined>;
|
|
968
|
-
readonly network: v.OptionalSchema<v.EnumSchema<typeof BitcoinNetworkType, undefined>, undefined>;
|
|
969
|
-
}, undefined>;
|
|
970
|
-
readonly id: v.StringSchema<undefined>;
|
|
971
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
972
|
-
}, undefined>;
|
|
973
|
-
type RunesMintRequestMessage = v.InferOutput<typeof runesMintRequestMessageSchema>;
|
|
974
|
-
type RunesMint = MethodParamsAndResult<v.InferOutput<typeof runesMintParamsSchema>, v.InferOutput<typeof runesMintResultSchema>>;
|
|
975
|
-
|
|
976
|
-
interface RunesRbfOrderParams extends RBFOrderRequest {
|
|
977
|
-
network?: BitcoinNetworkType;
|
|
978
|
-
}
|
|
979
|
-
interface RunesRbfOrderResult {
|
|
980
|
-
orderId: string;
|
|
981
|
-
fundRBFTransactionId: string;
|
|
982
|
-
fundingAddress: string;
|
|
983
|
-
}
|
|
984
|
-
type RunesRbfOrder = MethodParamsAndResult<RunesRbfOrderParams, RunesRbfOrderResult>;
|
|
985
|
-
|
|
986
|
-
declare const runesTransferMethodName = "runes_transfer";
|
|
987
|
-
declare const runesTransferParamsSchema: v.ObjectSchema<{
|
|
988
|
-
readonly recipients: v.ArraySchema<v.ObjectSchema<{
|
|
989
|
-
readonly runeName: v.StringSchema<undefined>;
|
|
990
|
-
readonly amount: v.StringSchema<undefined>;
|
|
991
|
-
readonly address: v.StringSchema<undefined>;
|
|
992
|
-
}, undefined>, undefined>;
|
|
993
|
-
}, undefined>;
|
|
994
|
-
type TransferRunesParams = v.InferOutput<typeof runesTransferParamsSchema>;
|
|
995
|
-
declare const runesTransferResultSchema: v.ObjectSchema<{
|
|
996
|
-
readonly txid: v.StringSchema<undefined>;
|
|
997
|
-
}, undefined>;
|
|
998
|
-
type RunesTransferResult = v.InferOutput<typeof runesTransferResultSchema>;
|
|
999
|
-
declare const runesTransferRequestMessageSchema: v.ObjectSchema<{
|
|
1000
|
-
readonly method: v.LiteralSchema<"runes_transfer", undefined>;
|
|
1001
|
-
readonly params: v.ObjectSchema<{
|
|
1002
|
-
readonly recipients: v.ArraySchema<v.ObjectSchema<{
|
|
1003
|
-
readonly runeName: v.StringSchema<undefined>;
|
|
1004
|
-
readonly amount: v.StringSchema<undefined>;
|
|
1005
|
-
readonly address: v.StringSchema<undefined>;
|
|
1006
|
-
}, undefined>, undefined>;
|
|
1007
|
-
}, undefined>;
|
|
1008
|
-
readonly id: v.StringSchema<undefined>;
|
|
1009
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1010
|
-
}, undefined>;
|
|
1011
|
-
type RunesTransferRequestMessage = v.InferOutput<typeof runesTransferRequestMessageSchema>;
|
|
1012
|
-
type RunesTransfer = MethodParamsAndResult<TransferRunesParams, RunesTransferResult>;
|
|
1013
|
-
|
|
1014
|
-
declare const sparkGetAddressesMethodName = "spark_getAddresses";
|
|
1015
|
-
declare const sparkGetAddressesParamsSchema: v.NullishSchema<v.ObjectSchema<{
|
|
1016
|
-
/**
|
|
1017
|
-
* A message to be displayed to the user in the request prompt.
|
|
1018
|
-
*/
|
|
1019
|
-
readonly message: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1020
|
-
}, undefined>, undefined>;
|
|
1021
|
-
type SparkGetAddressesParams = v.InferOutput<typeof sparkGetAddressesParamsSchema>;
|
|
1022
|
-
declare const sparkGetAddressesResultSchema: v.ObjectSchema<{
|
|
1023
|
-
/**
|
|
1024
|
-
* The addresses generated for the given purposes.
|
|
1025
|
-
*/
|
|
1026
|
-
readonly addresses: v.ArraySchema<v.ObjectSchema<{
|
|
1027
|
-
readonly address: v.StringSchema<undefined>;
|
|
1028
|
-
readonly publicKey: v.StringSchema<undefined>;
|
|
1029
|
-
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
1030
|
-
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
1031
|
-
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1032
|
-
}, undefined>, undefined>;
|
|
1033
|
-
readonly network: v.ObjectSchema<{
|
|
1034
|
-
readonly bitcoin: v.ObjectSchema<{
|
|
1035
|
-
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1036
|
-
}, undefined>;
|
|
1037
|
-
readonly stacks: v.ObjectSchema<{
|
|
1038
|
-
readonly name: v.EnumSchema<typeof StacksNetworkType, undefined>;
|
|
1039
|
-
}, undefined>;
|
|
1040
|
-
readonly spark: v.ObjectSchema<{
|
|
1041
|
-
readonly name: v.EnumSchema<typeof SparkNetworkType, undefined>;
|
|
1042
|
-
}, undefined>;
|
|
1043
|
-
}, undefined>;
|
|
1044
|
-
}, undefined>;
|
|
1045
|
-
type SparkGetAddressesResult = v.InferOutput<typeof sparkGetAddressesResultSchema>;
|
|
1046
|
-
declare const sparkGetAddressesRequestMessageSchema: v.ObjectSchema<{
|
|
1047
|
-
readonly method: v.LiteralSchema<"spark_getAddresses", undefined>;
|
|
1048
|
-
readonly params: v.NullishSchema<v.ObjectSchema<{
|
|
1049
|
-
/**
|
|
1050
|
-
* A message to be displayed to the user in the request prompt.
|
|
1051
|
-
*/
|
|
1052
|
-
readonly message: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1053
|
-
}, undefined>, undefined>;
|
|
1054
|
-
readonly id: v.StringSchema<undefined>;
|
|
1055
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1056
|
-
}, undefined>;
|
|
1057
|
-
type SparkGetAddressesRequestMessage = v.InferOutput<typeof sparkGetAddressesRequestMessageSchema>;
|
|
1058
|
-
type SparkGetAddresses = MethodParamsAndResult<v.InferOutput<typeof sparkGetAddressesParamsSchema>, v.InferOutput<typeof sparkGetAddressesResultSchema>>;
|
|
1059
|
-
|
|
1060
|
-
declare const sparkGetBalanceMethodName = "spark_getBalance";
|
|
1061
|
-
declare const sparkGetBalanceParamsSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1062
|
-
type SparkGetBalanceParams = v.InferOutput<typeof sparkGetBalanceParamsSchema>;
|
|
1063
|
-
declare const sparkGetBalanceResultSchema: v.ObjectSchema<{
|
|
1203
|
+
declare const stxTransferStxMethodName = "stx_transferStx";
|
|
1204
|
+
declare const stxTransferStxParamsSchema: v.ObjectSchema<{
|
|
1064
1205
|
/**
|
|
1065
|
-
*
|
|
1206
|
+
* Amount of STX tokens to transfer in microstacks as a string. Anything
|
|
1207
|
+
* parseable by `BigInt` is acceptable.
|
|
1208
|
+
*
|
|
1209
|
+
* Example,
|
|
1210
|
+
*
|
|
1211
|
+
* ```js
|
|
1212
|
+
* const amount1 = 1234;
|
|
1213
|
+
* const amount2 = 1234n;
|
|
1214
|
+
* const amount3 = '1234';
|
|
1215
|
+
* ```
|
|
1066
1216
|
*/
|
|
1067
|
-
readonly
|
|
1068
|
-
readonly tokenBalances: v.ArraySchema<v.ObjectSchema<{
|
|
1069
|
-
readonly balance: v.StringSchema<undefined>;
|
|
1070
|
-
readonly tokenMetadata: v.ObjectSchema<{
|
|
1071
|
-
readonly tokenIdentifier: v.StringSchema<undefined>;
|
|
1072
|
-
readonly tokenName: v.StringSchema<undefined>;
|
|
1073
|
-
readonly tokenTicker: v.StringSchema<undefined>;
|
|
1074
|
-
readonly decimals: v.NumberSchema<undefined>;
|
|
1075
|
-
readonly maxSupply: v.StringSchema<undefined>;
|
|
1076
|
-
}, undefined>;
|
|
1077
|
-
}, undefined>, undefined>;
|
|
1078
|
-
}, undefined>;
|
|
1079
|
-
type SparkGetBalanceResult = v.InferOutput<typeof sparkGetBalanceResultSchema>;
|
|
1080
|
-
declare const sparkGetBalanceRequestMessageSchema: v.ObjectSchema<{
|
|
1081
|
-
readonly method: v.LiteralSchema<"spark_getBalance", undefined>;
|
|
1082
|
-
readonly params: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1083
|
-
readonly id: v.StringSchema<undefined>;
|
|
1084
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1085
|
-
}, undefined>;
|
|
1086
|
-
type SparkGetBalanceRequestMessage = v.InferOutput<typeof sparkGetBalanceRequestMessageSchema>;
|
|
1087
|
-
type SparkGetBalance = MethodParamsAndResult<SparkGetBalanceParams, SparkGetBalanceResult>;
|
|
1088
|
-
|
|
1089
|
-
declare const sparkTransferMethodName = "spark_transfer";
|
|
1090
|
-
declare const sparkTransferParamsSchema: v.ObjectSchema<{
|
|
1217
|
+
readonly amount: v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>], undefined>;
|
|
1091
1218
|
/**
|
|
1092
|
-
*
|
|
1219
|
+
* The recipient's principal.
|
|
1093
1220
|
*/
|
|
1094
|
-
readonly
|
|
1221
|
+
readonly recipient: v.StringSchema<undefined>;
|
|
1095
1222
|
/**
|
|
1096
|
-
*
|
|
1223
|
+
* A string representing the memo.
|
|
1097
1224
|
*/
|
|
1098
|
-
readonly
|
|
1099
|
-
}, undefined>;
|
|
1100
|
-
type SparkTransferParams = v.InferOutput<typeof sparkTransferParamsSchema>;
|
|
1101
|
-
declare const sparkTransferResultSchema: v.ObjectSchema<{
|
|
1225
|
+
readonly memo: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1102
1226
|
/**
|
|
1103
|
-
*
|
|
1227
|
+
* Version of parameter format.
|
|
1104
1228
|
*/
|
|
1105
|
-
readonly
|
|
1106
|
-
}, undefined>;
|
|
1107
|
-
type SparkTransferResult = v.InferOutput<typeof sparkTransferResultSchema>;
|
|
1108
|
-
declare const sparkTransferRequestMessageSchema: v.ObjectSchema<{
|
|
1109
|
-
readonly method: v.LiteralSchema<"spark_transfer", undefined>;
|
|
1110
|
-
readonly params: v.ObjectSchema<{
|
|
1111
|
-
/**
|
|
1112
|
-
* Amount of SATS to transfer as a string or number.
|
|
1113
|
-
*/
|
|
1114
|
-
readonly amountSats: v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>], undefined>;
|
|
1115
|
-
/**
|
|
1116
|
-
* The recipient's spark address.
|
|
1117
|
-
*/
|
|
1118
|
-
readonly receiverSparkAddress: v.StringSchema<undefined>;
|
|
1119
|
-
}, undefined>;
|
|
1120
|
-
readonly id: v.StringSchema<undefined>;
|
|
1121
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1122
|
-
}, undefined>;
|
|
1123
|
-
type SparkTransferRequestMessage = v.InferOutput<typeof sparkTransferRequestMessageSchema>;
|
|
1124
|
-
type SparkTransfer = MethodParamsAndResult<SparkTransferParams, SparkTransferResult>;
|
|
1125
|
-
|
|
1126
|
-
declare const sparkTransferTokenMethodName = "spark_transferToken";
|
|
1127
|
-
declare const sparkTransferTokenParamsSchema: v.ObjectSchema<{
|
|
1229
|
+
readonly version: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1128
1230
|
/**
|
|
1129
|
-
*
|
|
1231
|
+
* The mode of the post conditions.
|
|
1130
1232
|
*/
|
|
1131
|
-
readonly
|
|
1233
|
+
readonly postConditionMode: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1132
1234
|
/**
|
|
1133
|
-
*
|
|
1235
|
+
* A hex-encoded string representing the post conditions.
|
|
1236
|
+
*
|
|
1237
|
+
* A post condition may be converted to it's hex representation using the `serializePostCondition` helper from the `@stacks/transactions` package,
|
|
1238
|
+
*
|
|
1239
|
+
* ```js
|
|
1240
|
+
* import { serializePostCondition } from '@stacks/transactions';
|
|
1241
|
+
*
|
|
1242
|
+
* const postCondition = somePostCondition;
|
|
1243
|
+
* const hexPostCondition = serializePostCondition(postCondition).toString('hex');
|
|
1244
|
+
* ```
|
|
1134
1245
|
*/
|
|
1135
|
-
readonly
|
|
1246
|
+
readonly postConditions: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
1136
1247
|
/**
|
|
1137
|
-
* The
|
|
1248
|
+
* The public key to sign the transaction with. The wallet may use any key
|
|
1249
|
+
* when not provided.
|
|
1138
1250
|
*/
|
|
1139
|
-
readonly
|
|
1251
|
+
readonly pubkey: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1140
1252
|
}, undefined>;
|
|
1141
|
-
type
|
|
1142
|
-
declare const
|
|
1253
|
+
type StxTransferStxParams = v.InferOutput<typeof stxTransferStxParamsSchema>;
|
|
1254
|
+
declare const stxTransferStxResultSchema: v.ObjectSchema<{
|
|
1143
1255
|
/**
|
|
1144
1256
|
* The ID of the transaction.
|
|
1145
1257
|
*/
|
|
1146
|
-
readonly
|
|
1258
|
+
readonly txid: v.StringSchema<undefined>;
|
|
1259
|
+
/**
|
|
1260
|
+
* A Stacks transaction as a hex-encoded string.
|
|
1261
|
+
*/
|
|
1262
|
+
readonly transaction: v.StringSchema<undefined>;
|
|
1147
1263
|
}, undefined>;
|
|
1148
|
-
type
|
|
1149
|
-
declare const
|
|
1150
|
-
readonly method: v.LiteralSchema<"
|
|
1264
|
+
type StxTransferStxResult = v.InferOutput<typeof stxTransferStxResultSchema>;
|
|
1265
|
+
declare const stxTransferStxRequestMessageSchema: v.ObjectSchema<{
|
|
1266
|
+
readonly method: v.LiteralSchema<"stx_transferStx", undefined>;
|
|
1151
1267
|
readonly params: v.ObjectSchema<{
|
|
1152
1268
|
/**
|
|
1153
|
-
* Amount of
|
|
1269
|
+
* Amount of STX tokens to transfer in microstacks as a string. Anything
|
|
1270
|
+
* parseable by `BigInt` is acceptable.
|
|
1271
|
+
*
|
|
1272
|
+
* Example,
|
|
1273
|
+
*
|
|
1274
|
+
* ```js
|
|
1275
|
+
* const amount1 = 1234;
|
|
1276
|
+
* const amount2 = 1234n;
|
|
1277
|
+
* const amount3 = '1234';
|
|
1278
|
+
* ```
|
|
1154
1279
|
*/
|
|
1155
|
-
readonly
|
|
1280
|
+
readonly amount: v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>], undefined>;
|
|
1156
1281
|
/**
|
|
1157
|
-
* The
|
|
1282
|
+
* The recipient's principal.
|
|
1158
1283
|
*/
|
|
1159
|
-
readonly
|
|
1284
|
+
readonly recipient: v.StringSchema<undefined>;
|
|
1160
1285
|
/**
|
|
1161
|
-
*
|
|
1286
|
+
* A string representing the memo.
|
|
1162
1287
|
*/
|
|
1163
|
-
readonly
|
|
1164
|
-
}, undefined>;
|
|
1165
|
-
readonly id: v.StringSchema<undefined>;
|
|
1166
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1167
|
-
}, undefined>;
|
|
1168
|
-
type SparkTransferTokenRequestMessage = v.InferOutput<typeof sparkTransferTokenRequestMessageSchema>;
|
|
1169
|
-
type SparkTransferToken = MethodParamsAndResult<SparkTransferTokenParams, SparkTransferTokenResult>;
|
|
1170
|
-
|
|
1171
|
-
declare const stxCallContractMethodName = "stx_callContract";
|
|
1172
|
-
declare const stxCallContractParamsSchema: v.ObjectSchema<{
|
|
1173
|
-
/**
|
|
1174
|
-
* The contract principal.
|
|
1175
|
-
*
|
|
1176
|
-
* E.g. `"SPKE...GD5C.my-contract"`
|
|
1177
|
-
*/
|
|
1178
|
-
readonly contract: v.StringSchema<undefined>;
|
|
1179
|
-
/**
|
|
1180
|
-
* The name of the function to call.
|
|
1181
|
-
*
|
|
1182
|
-
* Note: spec changes ongoing,
|
|
1183
|
-
* https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
|
|
1184
|
-
*/
|
|
1185
|
-
readonly functionName: v.StringSchema<undefined>;
|
|
1186
|
-
/**
|
|
1187
|
-
* @deprecated in favor of `functionArgs` for @stacks/connect compatibility
|
|
1188
|
-
*/
|
|
1189
|
-
readonly arguments: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
1190
|
-
/**
|
|
1191
|
-
* The function's arguments. The arguments are expected to be hex-encoded
|
|
1192
|
-
* strings of Clarity values.
|
|
1193
|
-
*
|
|
1194
|
-
* To convert Clarity values to their hex representation, the `cvToHex`
|
|
1195
|
-
* helper from the `@stacks/transactions` package may be helpful.
|
|
1196
|
-
*
|
|
1197
|
-
* ```js
|
|
1198
|
-
* import { cvToHex } from '@stacks/transactions';
|
|
1199
|
-
*
|
|
1200
|
-
* const functionArgs = [someClarityValue1, someClarityValue2];
|
|
1201
|
-
* const hexArgs = functionArgs.map(cvToHex);
|
|
1202
|
-
* ```
|
|
1203
|
-
*/
|
|
1204
|
-
readonly functionArgs: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
1205
|
-
/**
|
|
1206
|
-
* The post conditions to apply to the contract call.
|
|
1207
|
-
*/
|
|
1208
|
-
readonly postConditions: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
1209
|
-
/**
|
|
1210
|
-
* The mode to apply to the post conditions.
|
|
1211
|
-
*/
|
|
1212
|
-
readonly postConditionMode: v.OptionalSchema<v.UnionSchema<[v.LiteralSchema<"allow", undefined>, v.LiteralSchema<"deny", undefined>], undefined>, undefined>;
|
|
1213
|
-
}, undefined>;
|
|
1214
|
-
type StxCallContractParams = v.InferOutput<typeof stxCallContractParamsSchema>;
|
|
1215
|
-
declare const stxCallContractResultSchema: v.ObjectSchema<{
|
|
1216
|
-
/**
|
|
1217
|
-
* The ID of the transaction.
|
|
1218
|
-
*/
|
|
1219
|
-
readonly txid: v.StringSchema<undefined>;
|
|
1220
|
-
/**
|
|
1221
|
-
* A Stacks transaction as a hex-encoded string.
|
|
1222
|
-
*/
|
|
1223
|
-
readonly transaction: v.StringSchema<undefined>;
|
|
1224
|
-
}, undefined>;
|
|
1225
|
-
type StxCallContractResult = v.InferOutput<typeof stxCallContractResultSchema>;
|
|
1226
|
-
declare const stxCallContractRequestMessageSchema: v.ObjectSchema<{
|
|
1227
|
-
readonly method: v.LiteralSchema<"stx_callContract", undefined>;
|
|
1228
|
-
readonly params: v.ObjectSchema<{
|
|
1229
|
-
/**
|
|
1230
|
-
* The contract principal.
|
|
1231
|
-
*
|
|
1232
|
-
* E.g. `"SPKE...GD5C.my-contract"`
|
|
1233
|
-
*/
|
|
1234
|
-
readonly contract: v.StringSchema<undefined>;
|
|
1288
|
+
readonly memo: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1235
1289
|
/**
|
|
1236
|
-
*
|
|
1237
|
-
*
|
|
1238
|
-
* Note: spec changes ongoing,
|
|
1239
|
-
* https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
|
|
1290
|
+
* Version of parameter format.
|
|
1240
1291
|
*/
|
|
1241
|
-
readonly
|
|
1292
|
+
readonly version: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1242
1293
|
/**
|
|
1243
|
-
*
|
|
1294
|
+
* The mode of the post conditions.
|
|
1244
1295
|
*/
|
|
1245
|
-
readonly
|
|
1296
|
+
readonly postConditionMode: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1246
1297
|
/**
|
|
1247
|
-
*
|
|
1248
|
-
* strings of Clarity values.
|
|
1298
|
+
* A hex-encoded string representing the post conditions.
|
|
1249
1299
|
*
|
|
1250
|
-
*
|
|
1251
|
-
* helper from the `@stacks/transactions` package may be helpful.
|
|
1300
|
+
* A post condition may be converted to it's hex representation using the `serializePostCondition` helper from the `@stacks/transactions` package,
|
|
1252
1301
|
*
|
|
1253
1302
|
* ```js
|
|
1254
|
-
* import {
|
|
1303
|
+
* import { serializePostCondition } from '@stacks/transactions';
|
|
1255
1304
|
*
|
|
1256
|
-
* const
|
|
1257
|
-
* const
|
|
1305
|
+
* const postCondition = somePostCondition;
|
|
1306
|
+
* const hexPostCondition = serializePostCondition(postCondition).toString('hex');
|
|
1258
1307
|
* ```
|
|
1259
1308
|
*/
|
|
1260
|
-
readonly functionArgs: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
1261
|
-
/**
|
|
1262
|
-
* The post conditions to apply to the contract call.
|
|
1263
|
-
*/
|
|
1264
1309
|
readonly postConditions: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
1265
1310
|
/**
|
|
1266
|
-
* The
|
|
1311
|
+
* The public key to sign the transaction with. The wallet may use any key
|
|
1312
|
+
* when not provided.
|
|
1267
1313
|
*/
|
|
1268
|
-
readonly
|
|
1314
|
+
readonly pubkey: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1269
1315
|
}, undefined>;
|
|
1270
1316
|
readonly id: v.StringSchema<undefined>;
|
|
1271
1317
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1272
1318
|
}, undefined>;
|
|
1273
|
-
type
|
|
1274
|
-
type
|
|
1319
|
+
type StxTransferStxRequestMessage = v.InferOutput<typeof stxTransferStxRequestMessageSchema>;
|
|
1320
|
+
type StxTransferStx = MethodParamsAndResult<StxTransferStxParams, StxTransferStxResult>;
|
|
1275
1321
|
|
|
1276
|
-
declare const
|
|
1277
|
-
|
|
1278
|
-
/**
|
|
1279
|
-
* Name of the contract.
|
|
1280
|
-
*/
|
|
1281
|
-
readonly name: v.StringSchema<undefined>;
|
|
1282
|
-
/**
|
|
1283
|
-
* The source code of the Clarity contract.
|
|
1284
|
-
*/
|
|
1285
|
-
readonly clarityCode: v.StringSchema<undefined>;
|
|
1286
|
-
/**
|
|
1287
|
-
* The version of the Clarity contract.
|
|
1288
|
-
*/
|
|
1289
|
-
readonly clarityVersion: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1290
|
-
/**
|
|
1291
|
-
* The post conditions to apply to the contract call.
|
|
1292
|
-
*/
|
|
1293
|
-
readonly postConditions: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
1294
|
-
/**
|
|
1295
|
-
* The mode to apply to the post conditions.
|
|
1296
|
-
*/
|
|
1297
|
-
readonly postConditionMode: v.OptionalSchema<v.UnionSchema<[v.LiteralSchema<"allow", undefined>, v.LiteralSchema<"deny", undefined>], undefined>, undefined>;
|
|
1322
|
+
declare const accountActionsSchema: v.ObjectSchema<{
|
|
1323
|
+
readonly read: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1298
1324
|
}, undefined>;
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
/**
|
|
1302
|
-
* The ID of the transaction.
|
|
1303
|
-
*/
|
|
1304
|
-
readonly txid: v.StringSchema<undefined>;
|
|
1305
|
-
/**
|
|
1306
|
-
* A Stacks transaction as a hex-encoded string.
|
|
1307
|
-
*/
|
|
1308
|
-
readonly transaction: v.StringSchema<undefined>;
|
|
1325
|
+
declare const walletActionsSchema: v.ObjectSchema<{
|
|
1326
|
+
readonly readNetwork: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1309
1327
|
}, undefined>;
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
readonly
|
|
1313
|
-
readonly
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
*/
|
|
1317
|
-
readonly name: v.StringSchema<undefined>;
|
|
1318
|
-
/**
|
|
1319
|
-
* The source code of the Clarity contract.
|
|
1320
|
-
*/
|
|
1321
|
-
readonly clarityCode: v.StringSchema<undefined>;
|
|
1322
|
-
/**
|
|
1323
|
-
* The version of the Clarity contract.
|
|
1324
|
-
*/
|
|
1325
|
-
readonly clarityVersion: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1326
|
-
/**
|
|
1327
|
-
* The post conditions to apply to the contract call.
|
|
1328
|
-
*/
|
|
1329
|
-
readonly postConditions: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
1330
|
-
/**
|
|
1331
|
-
* The mode to apply to the post conditions.
|
|
1332
|
-
*/
|
|
1333
|
-
readonly postConditionMode: v.OptionalSchema<v.UnionSchema<[v.LiteralSchema<"allow", undefined>, v.LiteralSchema<"deny", undefined>], undefined>, undefined>;
|
|
1328
|
+
declare const accountPermissionSchema: v.ObjectSchema<{
|
|
1329
|
+
readonly type: v.LiteralSchema<"account", undefined>;
|
|
1330
|
+
readonly resourceId: v.StringSchema<undefined>;
|
|
1331
|
+
readonly clientId: v.StringSchema<undefined>;
|
|
1332
|
+
readonly actions: v.ObjectSchema<{
|
|
1333
|
+
readonly read: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1334
1334
|
}, undefined>;
|
|
1335
|
-
readonly id: v.StringSchema<undefined>;
|
|
1336
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1337
1335
|
}, undefined>;
|
|
1338
|
-
|
|
1339
|
-
type
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
declare const stxGetAccountsResultSchema: v.ObjectSchema<{
|
|
1345
|
-
/**
|
|
1346
|
-
* The addresses generated for the given purposes.
|
|
1347
|
-
*/
|
|
1348
|
-
readonly addresses: v.ArraySchema<v.ObjectSchema<{
|
|
1349
|
-
readonly address: v.StringSchema<undefined>;
|
|
1350
|
-
readonly publicKey: v.StringSchema<undefined>;
|
|
1351
|
-
readonly gaiaHubUrl: v.StringSchema<undefined>;
|
|
1352
|
-
readonly gaiaAppKey: v.StringSchema<undefined>;
|
|
1353
|
-
}, undefined>, undefined>;
|
|
1354
|
-
readonly network: v.ObjectSchema<{
|
|
1355
|
-
readonly bitcoin: v.ObjectSchema<{
|
|
1356
|
-
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1357
|
-
}, undefined>;
|
|
1358
|
-
readonly stacks: v.ObjectSchema<{
|
|
1359
|
-
readonly name: v.EnumSchema<typeof StacksNetworkType, undefined>;
|
|
1360
|
-
}, undefined>;
|
|
1361
|
-
readonly spark: v.ObjectSchema<{
|
|
1362
|
-
readonly name: v.EnumSchema<typeof SparkNetworkType, undefined>;
|
|
1363
|
-
}, undefined>;
|
|
1336
|
+
declare const walletPermissionSchema: v.ObjectSchema<{
|
|
1337
|
+
readonly type: v.LiteralSchema<"wallet", undefined>;
|
|
1338
|
+
readonly resourceId: v.StringSchema<undefined>;
|
|
1339
|
+
readonly clientId: v.StringSchema<undefined>;
|
|
1340
|
+
readonly actions: v.ObjectSchema<{
|
|
1341
|
+
readonly readNetwork: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1364
1342
|
}, undefined>;
|
|
1365
1343
|
}, undefined>;
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
type
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
declare const stxGetAddressesParamsSchema: v.NullishSchema<v.ObjectSchema<{
|
|
1378
|
-
/**
|
|
1379
|
-
* A message to be displayed to the user in the request prompt.
|
|
1380
|
-
*/
|
|
1381
|
-
readonly message: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1382
|
-
}, undefined>, undefined>;
|
|
1383
|
-
type StxGetAddressesParams = v.InferOutput<typeof stxGetAddressesParamsSchema>;
|
|
1384
|
-
declare const stxGetAddressesResultSchema: v.ObjectSchema<{
|
|
1385
|
-
/**
|
|
1386
|
-
* The addresses generated for the given purposes.
|
|
1387
|
-
*/
|
|
1388
|
-
readonly addresses: v.ArraySchema<v.ObjectSchema<{
|
|
1389
|
-
readonly address: v.StringSchema<undefined>;
|
|
1390
|
-
readonly publicKey: v.StringSchema<undefined>;
|
|
1391
|
-
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
1392
|
-
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
1393
|
-
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1394
|
-
}, undefined>, undefined>;
|
|
1395
|
-
readonly network: v.ObjectSchema<{
|
|
1396
|
-
readonly bitcoin: v.ObjectSchema<{
|
|
1397
|
-
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1398
|
-
}, undefined>;
|
|
1399
|
-
readonly stacks: v.ObjectSchema<{
|
|
1400
|
-
readonly name: v.EnumSchema<typeof StacksNetworkType, undefined>;
|
|
1401
|
-
}, undefined>;
|
|
1402
|
-
readonly spark: v.ObjectSchema<{
|
|
1403
|
-
readonly name: v.EnumSchema<typeof SparkNetworkType, undefined>;
|
|
1404
|
-
}, undefined>;
|
|
1344
|
+
/**
|
|
1345
|
+
* Permissions with the clientId field omitted and optional actions. Used for
|
|
1346
|
+
* permission requests, since the wallet performs authentication based on the
|
|
1347
|
+
* client's tab origin and should not rely on the client authenticating
|
|
1348
|
+
* themselves.
|
|
1349
|
+
*/
|
|
1350
|
+
declare const PermissionRequestParams: v.VariantSchema<"type", [v.ObjectSchema<{
|
|
1351
|
+
readonly type: v.LiteralSchema<"account", undefined>;
|
|
1352
|
+
readonly resourceId: v.StringSchema<undefined>;
|
|
1353
|
+
readonly actions: v.ObjectSchema<{
|
|
1354
|
+
readonly read: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1405
1355
|
}, undefined>;
|
|
1406
|
-
}, undefined
|
|
1407
|
-
type
|
|
1408
|
-
|
|
1409
|
-
readonly
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
readonly
|
|
1417
|
-
readonly
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
declare const
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
readonly
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
declare const stxSignMessageRequestMessageSchema: v.ObjectSchema<{
|
|
1442
|
-
readonly method: v.LiteralSchema<"stx_signMessage", undefined>;
|
|
1443
|
-
readonly params: v.ObjectSchema<{
|
|
1444
|
-
/**
|
|
1445
|
-
* The message to sign.
|
|
1446
|
-
*/
|
|
1447
|
-
readonly message: v.StringSchema<undefined>;
|
|
1356
|
+
}, undefined>, v.ObjectSchema<{
|
|
1357
|
+
readonly type: v.LiteralSchema<"wallet", undefined>;
|
|
1358
|
+
readonly resourceId: v.StringSchema<undefined>;
|
|
1359
|
+
readonly actions: v.ObjectSchema<{
|
|
1360
|
+
readonly readNetwork: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1361
|
+
}, undefined>;
|
|
1362
|
+
}, undefined>], undefined>;
|
|
1363
|
+
declare const permission: v.VariantSchema<"type", [v.ObjectSchema<{
|
|
1364
|
+
readonly type: v.LiteralSchema<"account", undefined>;
|
|
1365
|
+
readonly resourceId: v.StringSchema<undefined>;
|
|
1366
|
+
readonly clientId: v.StringSchema<undefined>;
|
|
1367
|
+
readonly actions: v.ObjectSchema<{
|
|
1368
|
+
readonly read: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1369
|
+
}, undefined>;
|
|
1370
|
+
}, undefined>, v.ObjectSchema<{
|
|
1371
|
+
readonly type: v.LiteralSchema<"wallet", undefined>;
|
|
1372
|
+
readonly resourceId: v.StringSchema<undefined>;
|
|
1373
|
+
readonly clientId: v.StringSchema<undefined>;
|
|
1374
|
+
readonly actions: v.ObjectSchema<{
|
|
1375
|
+
readonly readNetwork: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1376
|
+
}, undefined>;
|
|
1377
|
+
}, undefined>], undefined>;
|
|
1378
|
+
type PermissionWithoutClientId = v.InferOutput<typeof PermissionRequestParams>;
|
|
1379
|
+
declare const requestPermissionsMethodName = "wallet_requestPermissions";
|
|
1380
|
+
declare const requestPermissionsParamsSchema: v.NullishSchema<v.ArraySchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
1381
|
+
readonly type: v.LiteralSchema<"account", undefined>;
|
|
1382
|
+
readonly resourceId: v.StringSchema<undefined>;
|
|
1383
|
+
readonly actions: v.ObjectSchema<{
|
|
1384
|
+
readonly read: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1385
|
+
}, undefined>;
|
|
1386
|
+
}, undefined>, v.ObjectSchema<{
|
|
1387
|
+
readonly type: v.LiteralSchema<"wallet", undefined>;
|
|
1388
|
+
readonly resourceId: v.StringSchema<undefined>;
|
|
1389
|
+
readonly actions: v.ObjectSchema<{
|
|
1390
|
+
readonly readNetwork: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1448
1391
|
}, undefined>;
|
|
1392
|
+
}, undefined>], undefined>, undefined>, undefined>;
|
|
1393
|
+
type RequestPermissionsParams = v.InferOutput<typeof requestPermissionsParamsSchema>;
|
|
1394
|
+
declare const requestPermissionsResultSchema: v.LiteralSchema<true, undefined>;
|
|
1395
|
+
type RequestPermissionsResult = v.InferOutput<typeof requestPermissionsResultSchema>;
|
|
1396
|
+
declare const requestPermissionsRequestMessageSchema: v.ObjectSchema<{
|
|
1397
|
+
readonly method: v.LiteralSchema<"wallet_requestPermissions", undefined>;
|
|
1398
|
+
readonly params: v.NullishSchema<v.ArraySchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
1399
|
+
readonly type: v.LiteralSchema<"account", undefined>;
|
|
1400
|
+
readonly resourceId: v.StringSchema<undefined>;
|
|
1401
|
+
readonly actions: v.ObjectSchema<{
|
|
1402
|
+
readonly read: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1403
|
+
}, undefined>;
|
|
1404
|
+
}, undefined>, v.ObjectSchema<{
|
|
1405
|
+
readonly type: v.LiteralSchema<"wallet", undefined>;
|
|
1406
|
+
readonly resourceId: v.StringSchema<undefined>;
|
|
1407
|
+
readonly actions: v.ObjectSchema<{
|
|
1408
|
+
readonly readNetwork: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1409
|
+
}, undefined>;
|
|
1410
|
+
}, undefined>], undefined>, undefined>, undefined>;
|
|
1449
1411
|
readonly id: v.StringSchema<undefined>;
|
|
1450
1412
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1451
1413
|
}, undefined>;
|
|
1452
|
-
type
|
|
1453
|
-
type
|
|
1454
|
-
|
|
1455
|
-
declare const
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
readonly
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
readonly message: v.StringSchema<undefined>;
|
|
1465
|
-
/**
|
|
1466
|
-
* The public key to sign the message with.
|
|
1467
|
-
*/
|
|
1468
|
-
readonly publicKey: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1414
|
+
type RequestPermissionsRequestMessage = v.InferOutput<typeof requestPermissionsRequestMessageSchema>;
|
|
1415
|
+
type RequestPermissions = MethodParamsAndResult<RequestPermissionsParams, RequestPermissionsResult>;
|
|
1416
|
+
declare const renouncePermissionsMethodName = "wallet_renouncePermissions";
|
|
1417
|
+
declare const renouncePermissionsParamsSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1418
|
+
type RenouncePermissionsParams = v.InferOutput<typeof renouncePermissionsParamsSchema>;
|
|
1419
|
+
declare const renouncePermissionsResultSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1420
|
+
type RenouncePermissionsResult = v.InferOutput<typeof renouncePermissionsResultSchema>;
|
|
1421
|
+
declare const renouncePermissionsRequestMessageSchema: v.ObjectSchema<{
|
|
1422
|
+
readonly method: v.LiteralSchema<"wallet_renouncePermissions", undefined>;
|
|
1423
|
+
readonly params: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1424
|
+
readonly id: v.StringSchema<undefined>;
|
|
1425
|
+
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1469
1426
|
}, undefined>;
|
|
1470
|
-
type
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
readonly
|
|
1427
|
+
type RenouncePermissionsRequestMessage = v.InferOutput<typeof renouncePermissionsRequestMessageSchema>;
|
|
1428
|
+
type RenouncePermissions = MethodParamsAndResult<RenouncePermissionsParams, RenouncePermissionsResult>;
|
|
1429
|
+
declare const disconnectMethodName = "wallet_disconnect";
|
|
1430
|
+
declare const disconnectParamsSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1431
|
+
type DisconnectParams = v.InferOutput<typeof disconnectParamsSchema>;
|
|
1432
|
+
declare const disconnectResultSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1433
|
+
type DisconnectResult = v.InferOutput<typeof disconnectResultSchema>;
|
|
1434
|
+
declare const disconnectRequestMessageSchema: v.ObjectSchema<{
|
|
1435
|
+
readonly method: v.LiteralSchema<"wallet_disconnect", undefined>;
|
|
1436
|
+
readonly params: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1437
|
+
readonly id: v.StringSchema<undefined>;
|
|
1438
|
+
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1480
1439
|
}, undefined>;
|
|
1481
|
-
type
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1440
|
+
type DisconnectRequestMessage = v.InferOutput<typeof disconnectRequestMessageSchema>;
|
|
1441
|
+
type Disconnect = MethodParamsAndResult<DisconnectParams, DisconnectResult>;
|
|
1442
|
+
declare const getWalletTypeMethodName = "wallet_getWalletType";
|
|
1443
|
+
declare const getWalletTypeParamsSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1444
|
+
type GetWalletTypeParams = v.InferOutput<typeof getWalletTypeParamsSchema>;
|
|
1445
|
+
declare const getWalletTypeResultSchema: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1446
|
+
type GetWalletTypeResult = v.InferOutput<typeof getWalletTypeResultSchema>;
|
|
1447
|
+
declare const getWalletTypeRequestMessageSchema: v.ObjectSchema<{
|
|
1448
|
+
readonly method: v.LiteralSchema<"wallet_getWalletType", undefined>;
|
|
1449
|
+
readonly params: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1450
|
+
readonly id: v.StringSchema<undefined>;
|
|
1451
|
+
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1452
|
+
}, undefined>;
|
|
1453
|
+
type GetWalletTypeRequestMessage = v.InferOutput<typeof getWalletTypeRequestMessageSchema>;
|
|
1454
|
+
type GetWalletType = MethodParamsAndResult<GetWalletTypeParams, GetWalletTypeResult>;
|
|
1455
|
+
declare const getCurrentPermissionsMethodName = "wallet_getCurrentPermissions";
|
|
1456
|
+
declare const getCurrentPermissionsParamsSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1457
|
+
type GetCurrentPermissionsParams = v.InferOutput<typeof getCurrentPermissionsParamsSchema>;
|
|
1458
|
+
declare const getCurrentPermissionsResultSchema: v.ArraySchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
1459
|
+
readonly type: v.LiteralSchema<"account", undefined>;
|
|
1460
|
+
readonly resourceId: v.StringSchema<undefined>;
|
|
1461
|
+
readonly clientId: v.StringSchema<undefined>;
|
|
1462
|
+
readonly actions: v.ObjectSchema<{
|
|
1463
|
+
readonly read: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1464
|
+
}, undefined>;
|
|
1465
|
+
}, undefined>, v.ObjectSchema<{
|
|
1466
|
+
readonly type: v.LiteralSchema<"wallet", undefined>;
|
|
1467
|
+
readonly resourceId: v.StringSchema<undefined>;
|
|
1468
|
+
readonly clientId: v.StringSchema<undefined>;
|
|
1469
|
+
readonly actions: v.ObjectSchema<{
|
|
1470
|
+
readonly readNetwork: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1497
1471
|
}, undefined>;
|
|
1472
|
+
}, undefined>], undefined>, undefined>;
|
|
1473
|
+
type GetCurrentPermissionsResult = v.InferOutput<typeof getCurrentPermissionsResultSchema>;
|
|
1474
|
+
declare const getCurrentPermissionsRequestMessageSchema: v.ObjectSchema<{
|
|
1475
|
+
readonly method: v.LiteralSchema<"wallet_getCurrentPermissions", undefined>;
|
|
1476
|
+
readonly params: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1498
1477
|
readonly id: v.StringSchema<undefined>;
|
|
1499
1478
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1500
1479
|
}, undefined>;
|
|
1501
|
-
type
|
|
1502
|
-
type
|
|
1503
|
-
|
|
1504
|
-
declare const
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
* Whether to broadcast the transaction after signing. Defaults to `true`.
|
|
1517
|
-
*/
|
|
1518
|
-
readonly broadcast: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1480
|
+
type GetCurrentPermissionsRequestMessage = v.InferOutput<typeof getCurrentPermissionsRequestMessageSchema>;
|
|
1481
|
+
type GetCurrentPermissions = MethodParamsAndResult<GetCurrentPermissionsParams, GetCurrentPermissionsResult>;
|
|
1482
|
+
declare const getNetworkMethodName = "wallet_getNetwork";
|
|
1483
|
+
declare const getNetworkParamsSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1484
|
+
type GetNetworkParams = v.InferOutput<typeof getNetworkParamsSchema>;
|
|
1485
|
+
declare const getNetworkResultSchema: v.ObjectSchema<{
|
|
1486
|
+
readonly bitcoin: v.ObjectSchema<{
|
|
1487
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1488
|
+
}, undefined>;
|
|
1489
|
+
readonly stacks: v.ObjectSchema<{
|
|
1490
|
+
readonly name: v.EnumSchema<typeof StacksNetworkType, undefined>;
|
|
1491
|
+
}, undefined>;
|
|
1492
|
+
readonly spark: v.ObjectSchema<{
|
|
1493
|
+
readonly name: v.EnumSchema<typeof SparkNetworkType, undefined>;
|
|
1494
|
+
}, undefined>;
|
|
1519
1495
|
}, undefined>;
|
|
1520
|
-
type
|
|
1521
|
-
declare const
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
readonly
|
|
1496
|
+
type GetNetworkResult = v.InferOutput<typeof getNetworkResultSchema>;
|
|
1497
|
+
declare const getNetworkRequestMessageSchema: v.ObjectSchema<{
|
|
1498
|
+
readonly method: v.LiteralSchema<"wallet_getNetwork", undefined>;
|
|
1499
|
+
readonly params: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1500
|
+
readonly id: v.StringSchema<undefined>;
|
|
1501
|
+
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1526
1502
|
}, undefined>;
|
|
1527
|
-
type
|
|
1528
|
-
|
|
1529
|
-
|
|
1503
|
+
type GetNetworkRequestMessage = v.InferOutput<typeof getNetworkRequestMessageSchema>;
|
|
1504
|
+
type GetNetwork = MethodParamsAndResult<GetNetworkParams, GetNetworkResult>;
|
|
1505
|
+
declare const changeNetworkMethodName = "wallet_changeNetwork";
|
|
1506
|
+
declare const changeNetworkParamsSchema: v.ObjectSchema<{
|
|
1507
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1508
|
+
}, undefined>;
|
|
1509
|
+
type ChangeNetworkParams = v.InferOutput<typeof changeNetworkParamsSchema>;
|
|
1510
|
+
declare const changeNetworkResultSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1511
|
+
type ChangeNetworkResult = v.InferOutput<typeof changeNetworkResultSchema>;
|
|
1512
|
+
declare const changeNetworkRequestMessageSchema: v.ObjectSchema<{
|
|
1513
|
+
readonly method: v.LiteralSchema<"wallet_changeNetwork", undefined>;
|
|
1530
1514
|
readonly params: v.ObjectSchema<{
|
|
1531
|
-
|
|
1532
|
-
* The transaction to sign as a hex-encoded string.
|
|
1533
|
-
*/
|
|
1534
|
-
readonly transaction: v.StringSchema<undefined>;
|
|
1535
|
-
/**
|
|
1536
|
-
* The public key to sign the transaction with. The wallet may use any key
|
|
1537
|
-
* when not provided.
|
|
1538
|
-
*/
|
|
1539
|
-
readonly pubkey: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1540
|
-
/**
|
|
1541
|
-
* Whether to broadcast the transaction after signing. Defaults to `true`.
|
|
1542
|
-
*/
|
|
1543
|
-
readonly broadcast: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1515
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1544
1516
|
}, undefined>;
|
|
1545
1517
|
readonly id: v.StringSchema<undefined>;
|
|
1546
1518
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1547
1519
|
}, undefined>;
|
|
1548
|
-
type
|
|
1549
|
-
type
|
|
1550
|
-
|
|
1551
|
-
declare const
|
|
1552
|
-
|
|
1553
|
-
/**
|
|
1554
|
-
* The transactions to sign as hex-encoded strings.
|
|
1555
|
-
*/
|
|
1556
|
-
readonly transactions: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "Invalid hex-encoded Stacks transaction.">]>, undefined>, v.MinLengthAction<string[], 1, undefined>]>;
|
|
1557
|
-
/**
|
|
1558
|
-
* Whether the signed transactions should be broadcast after signing. Defaults
|
|
1559
|
-
* to `true`.
|
|
1560
|
-
*/
|
|
1561
|
-
readonly broadcast: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1562
|
-
}, undefined>;
|
|
1563
|
-
type StxSignTransactionsParams = v.InferOutput<typeof stxSignTransactionsParamsSchema>;
|
|
1564
|
-
declare const stxSignTransactionsResultSchema: v.ObjectSchema<{
|
|
1565
|
-
/**
|
|
1566
|
-
* The signed transactions as hex-encoded strings, in the same order as in the
|
|
1567
|
-
* sign request.
|
|
1568
|
-
*/
|
|
1569
|
-
readonly transactions: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
1520
|
+
type ChangeNetworkRequestMessage = v.InferOutput<typeof changeNetworkRequestMessageSchema>;
|
|
1521
|
+
type ChangeNetwork = MethodParamsAndResult<ChangeNetworkParams, ChangeNetworkResult>;
|
|
1522
|
+
declare const changeNetworkByIdMethodName = "wallet_changeNetworkById";
|
|
1523
|
+
declare const changeNetworkByIdParamsSchema: v.ObjectSchema<{
|
|
1524
|
+
readonly id: v.StringSchema<undefined>;
|
|
1570
1525
|
}, undefined>;
|
|
1571
|
-
type
|
|
1572
|
-
declare const
|
|
1573
|
-
|
|
1526
|
+
type ChangeNetworkByIdParams = v.InferOutput<typeof changeNetworkByIdParamsSchema>;
|
|
1527
|
+
declare const changeNetworkByIdResultSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1528
|
+
type ChangeNetworkByIdResult = v.InferOutput<typeof changeNetworkByIdResultSchema>;
|
|
1529
|
+
declare const changeNetworkByIdRequestMessageSchema: v.ObjectSchema<{
|
|
1530
|
+
readonly method: v.LiteralSchema<"wallet_changeNetworkById", undefined>;
|
|
1574
1531
|
readonly params: v.ObjectSchema<{
|
|
1575
|
-
|
|
1576
|
-
* The transactions to sign as hex-encoded strings.
|
|
1577
|
-
*/
|
|
1578
|
-
readonly transactions: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "Invalid hex-encoded Stacks transaction.">]>, undefined>, v.MinLengthAction<string[], 1, undefined>]>;
|
|
1579
|
-
/**
|
|
1580
|
-
* Whether the signed transactions should be broadcast after signing. Defaults
|
|
1581
|
-
* to `true`.
|
|
1582
|
-
*/
|
|
1583
|
-
readonly broadcast: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1532
|
+
readonly id: v.StringSchema<undefined>;
|
|
1584
1533
|
}, undefined>;
|
|
1585
1534
|
readonly id: v.StringSchema<undefined>;
|
|
1586
1535
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1587
1536
|
}, undefined>;
|
|
1588
|
-
type
|
|
1589
|
-
type
|
|
1590
|
-
|
|
1591
|
-
declare const
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
/**
|
|
1615
|
-
* Version of parameter format.
|
|
1616
|
-
*/
|
|
1617
|
-
readonly version: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1618
|
-
/**
|
|
1619
|
-
* The mode of the post conditions.
|
|
1620
|
-
*/
|
|
1621
|
-
readonly postConditionMode: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1622
|
-
/**
|
|
1623
|
-
* A hex-encoded string representing the post conditions.
|
|
1624
|
-
*
|
|
1625
|
-
* A post condition may be converted to it's hex representation using the `serializePostCondition` helper from the `@stacks/transactions` package,
|
|
1626
|
-
*
|
|
1627
|
-
* ```js
|
|
1628
|
-
* import { serializePostCondition } from '@stacks/transactions';
|
|
1629
|
-
*
|
|
1630
|
-
* const postCondition = somePostCondition;
|
|
1631
|
-
* const hexPostCondition = serializePostCondition(postCondition).toString('hex');
|
|
1632
|
-
* ```
|
|
1633
|
-
*/
|
|
1634
|
-
readonly postConditions: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
1635
|
-
/**
|
|
1636
|
-
* The public key to sign the transaction with. The wallet may use any key
|
|
1637
|
-
* when not provided.
|
|
1638
|
-
*/
|
|
1639
|
-
readonly pubkey: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1537
|
+
type ChangeNetworkByIdRequestMessage = v.InferOutput<typeof changeNetworkByIdRequestMessageSchema>;
|
|
1538
|
+
type ChangeNetworkById = MethodParamsAndResult<ChangeNetworkByIdParams, ChangeNetworkByIdResult>;
|
|
1539
|
+
declare const getAccountMethodName = "wallet_getAccount";
|
|
1540
|
+
declare const getAccountParamsSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1541
|
+
type GetAccountParams = v.InferOutput<typeof getAccountParamsSchema>;
|
|
1542
|
+
declare const getAccountResultSchema: v.ObjectSchema<{
|
|
1543
|
+
readonly id: v.StringSchema<undefined>;
|
|
1544
|
+
readonly addresses: v.ArraySchema<v.ObjectSchema<{
|
|
1545
|
+
readonly address: v.StringSchema<undefined>;
|
|
1546
|
+
readonly publicKey: v.StringSchema<undefined>;
|
|
1547
|
+
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
1548
|
+
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
1549
|
+
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1550
|
+
}, undefined>, undefined>;
|
|
1551
|
+
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1552
|
+
readonly network: v.ObjectSchema<{
|
|
1553
|
+
readonly bitcoin: v.ObjectSchema<{
|
|
1554
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1555
|
+
}, undefined>;
|
|
1556
|
+
readonly stacks: v.ObjectSchema<{
|
|
1557
|
+
readonly name: v.EnumSchema<typeof StacksNetworkType, undefined>;
|
|
1558
|
+
}, undefined>;
|
|
1559
|
+
readonly spark: v.ObjectSchema<{
|
|
1560
|
+
readonly name: v.EnumSchema<typeof SparkNetworkType, undefined>;
|
|
1561
|
+
}, undefined>;
|
|
1562
|
+
}, undefined>;
|
|
1640
1563
|
}, undefined>;
|
|
1641
|
-
type
|
|
1642
|
-
declare const
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
readonly
|
|
1647
|
-
/**
|
|
1648
|
-
* A Stacks transaction as a hex-encoded string.
|
|
1649
|
-
*/
|
|
1650
|
-
readonly transaction: v.StringSchema<undefined>;
|
|
1564
|
+
type GetAccountResult = v.InferOutput<typeof getAccountResultSchema>;
|
|
1565
|
+
declare const getAccountRequestMessageSchema: v.ObjectSchema<{
|
|
1566
|
+
readonly method: v.LiteralSchema<"wallet_getAccount", undefined>;
|
|
1567
|
+
readonly params: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1568
|
+
readonly id: v.StringSchema<undefined>;
|
|
1569
|
+
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1651
1570
|
}, undefined>;
|
|
1652
|
-
type
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
readonly
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
* const hexPostCondition = serializePostCondition(postCondition).toString('hex');
|
|
1695
|
-
* ```
|
|
1696
|
-
*/
|
|
1697
|
-
readonly postConditions: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
1698
|
-
/**
|
|
1699
|
-
* The public key to sign the transaction with. The wallet may use any key
|
|
1700
|
-
* when not provided.
|
|
1701
|
-
*/
|
|
1702
|
-
readonly pubkey: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1571
|
+
type GetAccountRequestMessage = v.InferOutput<typeof getAccountRequestMessageSchema>;
|
|
1572
|
+
type GetAccount = MethodParamsAndResult<GetAccountParams, GetAccountResult>;
|
|
1573
|
+
declare const connectMethodName = "wallet_connect";
|
|
1574
|
+
declare const connectParamsSchema: v.NullishSchema<v.ObjectSchema<{
|
|
1575
|
+
readonly permissions: v.OptionalSchema<v.ArraySchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
1576
|
+
readonly type: v.LiteralSchema<"account", undefined>;
|
|
1577
|
+
readonly resourceId: v.StringSchema<undefined>;
|
|
1578
|
+
readonly actions: v.ObjectSchema<{
|
|
1579
|
+
readonly read: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1580
|
+
}, undefined>;
|
|
1581
|
+
}, undefined>, v.ObjectSchema<{
|
|
1582
|
+
readonly type: v.LiteralSchema<"wallet", undefined>;
|
|
1583
|
+
readonly resourceId: v.StringSchema<undefined>;
|
|
1584
|
+
readonly actions: v.ObjectSchema<{
|
|
1585
|
+
readonly readNetwork: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1586
|
+
}, undefined>;
|
|
1587
|
+
}, undefined>], undefined>, undefined>, undefined>;
|
|
1588
|
+
readonly addresses: v.OptionalSchema<v.ArraySchema<v.EnumSchema<typeof AddressPurpose, undefined>, undefined>, undefined>;
|
|
1589
|
+
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 80, "The message must not exceed 80 characters.">]>, undefined>;
|
|
1590
|
+
readonly network: v.OptionalSchema<v.EnumSchema<typeof BitcoinNetworkType, undefined>, undefined>;
|
|
1591
|
+
}, undefined>, undefined>;
|
|
1592
|
+
type ConnectParams = v.InferOutput<typeof connectParamsSchema>;
|
|
1593
|
+
declare const connectResultSchema: v.ObjectSchema<{
|
|
1594
|
+
readonly id: v.StringSchema<undefined>;
|
|
1595
|
+
readonly addresses: v.ArraySchema<v.ObjectSchema<{
|
|
1596
|
+
readonly address: v.StringSchema<undefined>;
|
|
1597
|
+
readonly publicKey: v.StringSchema<undefined>;
|
|
1598
|
+
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
1599
|
+
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
1600
|
+
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1601
|
+
}, undefined>, undefined>;
|
|
1602
|
+
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1603
|
+
readonly network: v.ObjectSchema<{
|
|
1604
|
+
readonly bitcoin: v.ObjectSchema<{
|
|
1605
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1606
|
+
}, undefined>;
|
|
1607
|
+
readonly stacks: v.ObjectSchema<{
|
|
1608
|
+
readonly name: v.EnumSchema<typeof StacksNetworkType, undefined>;
|
|
1609
|
+
}, undefined>;
|
|
1610
|
+
readonly spark: v.ObjectSchema<{
|
|
1611
|
+
readonly name: v.EnumSchema<typeof SparkNetworkType, undefined>;
|
|
1612
|
+
}, undefined>;
|
|
1703
1613
|
}, undefined>;
|
|
1614
|
+
}, undefined>;
|
|
1615
|
+
type ConnectResult = v.InferOutput<typeof connectResultSchema>;
|
|
1616
|
+
declare const connectRequestMessageSchema: v.ObjectSchema<{
|
|
1617
|
+
readonly method: v.LiteralSchema<"wallet_connect", undefined>;
|
|
1618
|
+
readonly params: v.NullishSchema<v.ObjectSchema<{
|
|
1619
|
+
readonly permissions: v.OptionalSchema<v.ArraySchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
1620
|
+
readonly type: v.LiteralSchema<"account", undefined>;
|
|
1621
|
+
readonly resourceId: v.StringSchema<undefined>;
|
|
1622
|
+
readonly actions: v.ObjectSchema<{
|
|
1623
|
+
readonly read: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1624
|
+
}, undefined>;
|
|
1625
|
+
}, undefined>, v.ObjectSchema<{
|
|
1626
|
+
readonly type: v.LiteralSchema<"wallet", undefined>;
|
|
1627
|
+
readonly resourceId: v.StringSchema<undefined>;
|
|
1628
|
+
readonly actions: v.ObjectSchema<{
|
|
1629
|
+
readonly readNetwork: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1630
|
+
}, undefined>;
|
|
1631
|
+
}, undefined>], undefined>, undefined>, undefined>;
|
|
1632
|
+
readonly addresses: v.OptionalSchema<v.ArraySchema<v.EnumSchema<typeof AddressPurpose, undefined>, undefined>, undefined>;
|
|
1633
|
+
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 80, "The message must not exceed 80 characters.">]>, undefined>;
|
|
1634
|
+
readonly network: v.OptionalSchema<v.EnumSchema<typeof BitcoinNetworkType, undefined>, undefined>;
|
|
1635
|
+
}, undefined>, undefined>;
|
|
1704
1636
|
readonly id: v.StringSchema<undefined>;
|
|
1705
1637
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1706
1638
|
}, undefined>;
|
|
1707
|
-
type
|
|
1708
|
-
type
|
|
1709
|
-
|
|
1710
|
-
declare const
|
|
1711
|
-
readonly
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
readonly
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
readonly
|
|
1718
|
-
readonly
|
|
1719
|
-
|
|
1720
|
-
readonly
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
readonly
|
|
1726
|
-
|
|
1727
|
-
readonly
|
|
1728
|
-
readonly
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1639
|
+
type ConnectRequestMessage = v.InferOutput<typeof connectRequestMessageSchema>;
|
|
1640
|
+
type Connect = MethodParamsAndResult<ConnectParams, ConnectResult>;
|
|
1641
|
+
declare const addNetworkMethodName = "wallet_addNetwork";
|
|
1642
|
+
declare const addNetworkParamsSchema: v.VariantSchema<"chain", [v.ObjectSchema<{
|
|
1643
|
+
readonly chain: v.LiteralSchema<"bitcoin", undefined>;
|
|
1644
|
+
readonly type: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1645
|
+
readonly name: v.StringSchema<undefined>;
|
|
1646
|
+
readonly rpcUrl: v.StringSchema<undefined>;
|
|
1647
|
+
readonly rpcFallbackUrl: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1648
|
+
readonly indexerUrl: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1649
|
+
readonly blockExplorerUrl: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1650
|
+
readonly switch: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1651
|
+
}, undefined>, v.ObjectSchema<{
|
|
1652
|
+
readonly chain: v.LiteralSchema<"stacks", undefined>;
|
|
1653
|
+
readonly name: v.StringSchema<undefined>;
|
|
1654
|
+
readonly type: v.EnumSchema<typeof StacksNetworkType, undefined>;
|
|
1655
|
+
readonly rpcUrl: v.StringSchema<undefined>;
|
|
1656
|
+
readonly blockExplorerUrl: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1657
|
+
readonly switch: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1658
|
+
}, undefined>, v.ObjectSchema<{
|
|
1659
|
+
readonly chain: v.LiteralSchema<"starknet", undefined>;
|
|
1660
|
+
readonly name: v.StringSchema<undefined>;
|
|
1661
|
+
readonly type: v.EnumSchema<typeof StarknetNetworkType, undefined>;
|
|
1662
|
+
readonly rpcUrl: v.StringSchema<undefined>;
|
|
1663
|
+
readonly blockExplorerUrl: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1664
|
+
readonly switch: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1665
|
+
}, undefined>], undefined>;
|
|
1666
|
+
type AddNetworkParams = v.InferOutput<typeof addNetworkParamsSchema>;
|
|
1667
|
+
declare const addNetworkRequestMessageSchema: v.ObjectSchema<{
|
|
1668
|
+
readonly method: v.LiteralSchema<"wallet_addNetwork", undefined>;
|
|
1669
|
+
readonly params: v.VariantSchema<"chain", [v.ObjectSchema<{
|
|
1670
|
+
readonly chain: v.LiteralSchema<"bitcoin", undefined>;
|
|
1671
|
+
readonly type: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1672
|
+
readonly name: v.StringSchema<undefined>;
|
|
1673
|
+
readonly rpcUrl: v.StringSchema<undefined>;
|
|
1674
|
+
readonly rpcFallbackUrl: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1675
|
+
readonly indexerUrl: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1676
|
+
readonly blockExplorerUrl: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1677
|
+
readonly switch: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1678
|
+
}, undefined>, v.ObjectSchema<{
|
|
1679
|
+
readonly chain: v.LiteralSchema<"stacks", undefined>;
|
|
1680
|
+
readonly name: v.StringSchema<undefined>;
|
|
1681
|
+
readonly type: v.EnumSchema<typeof StacksNetworkType, undefined>;
|
|
1682
|
+
readonly rpcUrl: v.StringSchema<undefined>;
|
|
1683
|
+
readonly blockExplorerUrl: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1684
|
+
readonly switch: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1685
|
+
}, undefined>, v.ObjectSchema<{
|
|
1686
|
+
readonly chain: v.LiteralSchema<"starknet", undefined>;
|
|
1687
|
+
readonly name: v.StringSchema<undefined>;
|
|
1688
|
+
readonly type: v.EnumSchema<typeof StarknetNetworkType, undefined>;
|
|
1689
|
+
readonly rpcUrl: v.StringSchema<undefined>;
|
|
1690
|
+
readonly blockExplorerUrl: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1691
|
+
readonly switch: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1692
|
+
}, undefined>], undefined>;
|
|
1693
|
+
readonly id: v.StringSchema<undefined>;
|
|
1694
|
+
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1695
|
+
}, undefined>;
|
|
1696
|
+
type AddNetworkRequestMessage = v.InferOutput<typeof addNetworkRequestMessageSchema>;
|
|
1697
|
+
declare const addNetworkResultSchema: v.ObjectSchema<{
|
|
1698
|
+
readonly id: v.StringSchema<undefined>;
|
|
1699
|
+
}, undefined>;
|
|
1700
|
+
type AddNetworkResult = v.InferOutput<typeof addNetworkResultSchema>;
|
|
1701
|
+
type AddNetwork = MethodParamsAndResult<AddNetworkParams, AddNetworkResult>;
|
|
1702
|
+
|
|
1703
|
+
declare const walletTypes: readonly ["software", "ledger", "keystone"];
|
|
1704
|
+
declare const walletTypeSchema: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1705
|
+
type WalletType = v.InferOutput<typeof walletTypeSchema>;
|
|
1706
|
+
|
|
1707
|
+
type StxRequests = {
|
|
1708
|
+
stx_callContract: StxCallContract;
|
|
1709
|
+
stx_deployContract: StxDeployContract;
|
|
1710
|
+
stx_getAccounts: StxGetAccounts;
|
|
1711
|
+
stx_getAddresses: StxGetAddresses;
|
|
1712
|
+
stx_signMessage: StxSignMessage;
|
|
1713
|
+
stx_signStructuredMessage: StxSignStructuredMessage;
|
|
1714
|
+
stx_signTransaction: StxSignTransaction;
|
|
1715
|
+
stx_transferStx: StxTransferStx;
|
|
1716
|
+
stx_signTransactions: StxSignTransactions;
|
|
1717
|
+
};
|
|
1718
|
+
type StxRequestMethod = keyof StxRequests;
|
|
1719
|
+
type SparkRequests = {
|
|
1720
|
+
[sparkGetAddressesMethodName]: SparkGetAddresses;
|
|
1721
|
+
[sparkGetBalanceMethodName]: SparkGetBalance;
|
|
1722
|
+
[sparkTransferMethodName]: SparkTransfer;
|
|
1723
|
+
[sparkTransferTokenMethodName]: SparkTransferToken;
|
|
1724
|
+
};
|
|
1725
|
+
type SparkRequestMethod = keyof SparkRequests;
|
|
1726
|
+
type BtcRequests = {
|
|
1727
|
+
getInfo: GetInfo;
|
|
1728
|
+
getAddresses: GetAddresses;
|
|
1729
|
+
getAccounts: GetAccounts;
|
|
1730
|
+
getBalance: GetBalance;
|
|
1731
|
+
signMessage: SignMessage;
|
|
1732
|
+
sendTransfer: SendTransfer;
|
|
1733
|
+
signPsbt: SignPsbt;
|
|
1734
|
+
};
|
|
1735
|
+
type BtcRequestMethod = keyof BtcRequests;
|
|
1736
|
+
type RunesRequests = {
|
|
1737
|
+
runes_estimateEtch: RunesEstimateEtch;
|
|
1738
|
+
runes_estimateMint: RunesEstimateMint;
|
|
1739
|
+
runes_estimateRbfOrder: RunesEstimateRbfOrder;
|
|
1740
|
+
runes_etch: RunesEtch;
|
|
1741
|
+
runes_getBalance: RunesGetBalance;
|
|
1742
|
+
runes_getOrder: RunesGetOrder;
|
|
1743
|
+
runes_mint: RunesMint;
|
|
1744
|
+
runes_rbfOrder: RunesRbfOrder;
|
|
1745
|
+
runes_transfer: RunesTransfer;
|
|
1746
|
+
};
|
|
1747
|
+
type RunesRequestMethod = keyof RunesRequests;
|
|
1748
|
+
type OrdinalsRequests = {
|
|
1749
|
+
ord_getInscriptions: GetInscriptions;
|
|
1750
|
+
ord_sendInscriptions: SendInscriptions;
|
|
1751
|
+
};
|
|
1752
|
+
type OrdinalsRequestMethod = keyof OrdinalsRequests;
|
|
1753
|
+
type WalletRequests = {
|
|
1754
|
+
wallet_addNetwork: AddNetwork;
|
|
1755
|
+
wallet_changeNetwork: ChangeNetwork;
|
|
1756
|
+
wallet_changeNetworkById: ChangeNetworkById;
|
|
1757
|
+
wallet_connect: Connect;
|
|
1758
|
+
wallet_disconnect: Disconnect;
|
|
1759
|
+
wallet_getAccount: GetAccount;
|
|
1760
|
+
wallet_getCurrentPermissions: GetCurrentPermissions;
|
|
1761
|
+
wallet_getNetwork: GetNetwork;
|
|
1762
|
+
wallet_getWalletType: GetWalletType;
|
|
1763
|
+
wallet_renouncePermissions: RenouncePermissions;
|
|
1764
|
+
wallet_requestPermissions: RequestPermissions;
|
|
1765
|
+
};
|
|
1766
|
+
type Requests = BtcRequests & StxRequests & SparkRequests & RunesRequests & WalletRequests & OrdinalsRequests;
|
|
1767
|
+
type Return<Method> = Method extends keyof Requests ? Requests[Method]['result'] : never;
|
|
1768
|
+
type Params<Method> = Method extends keyof Requests ? Requests[Method]['params'] : never;
|
|
1769
|
+
|
|
1770
|
+
declare const request: <Method extends keyof Requests>(method: Method, params: Params<Method>,
|
|
1771
|
+
/**
|
|
1772
|
+
* The providerId is the object path to the provider in the window object.
|
|
1773
|
+
* E.g., a provider available at `window.Foo.BarProvider` would have a
|
|
1774
|
+
* providerId of `Foo.BarProvider`.
|
|
1775
|
+
*/
|
|
1776
|
+
providerId?: string) => Promise<RpcResult<Method>>;
|
|
1777
|
+
/**
|
|
1778
|
+
* Adds an event listener.
|
|
1779
|
+
*
|
|
1780
|
+
* Currently expects 2 arguments, although is also capable of handling legacy
|
|
1781
|
+
* calls with 3 arguments consisting of:
|
|
1782
|
+
*
|
|
1783
|
+
* - event name (string)
|
|
1784
|
+
* - callback (function)
|
|
1785
|
+
* - provider ID (optional string)
|
|
1786
|
+
*/
|
|
1787
|
+
declare const addListener: (...rawArgs: unknown[]) => ReturnType<AddListener>;
|
|
1788
|
+
|
|
1789
|
+
declare enum BitcoinNetworkType {
|
|
1790
|
+
Mainnet = "Mainnet",
|
|
1791
|
+
Testnet = "Testnet",
|
|
1792
|
+
Testnet4 = "Testnet4",
|
|
1793
|
+
Signet = "Signet",
|
|
1794
|
+
Regtest = "Regtest"
|
|
1795
|
+
}
|
|
1796
|
+
declare enum StacksNetworkType {
|
|
1797
|
+
Mainnet = "mainnet",
|
|
1798
|
+
Testnet = "testnet"
|
|
1799
|
+
}
|
|
1800
|
+
declare enum StarknetNetworkType {
|
|
1801
|
+
Mainnet = "mainnet",
|
|
1802
|
+
Sepolia = "sepolia"
|
|
1803
|
+
}
|
|
1804
|
+
declare enum SparkNetworkType {
|
|
1805
|
+
Mainnet = "mainnet",
|
|
1806
|
+
Regtest = "regtest"
|
|
1807
|
+
}
|
|
1808
|
+
interface BitcoinNetwork {
|
|
1809
|
+
type: BitcoinNetworkType;
|
|
1810
|
+
address?: string;
|
|
1811
|
+
}
|
|
1812
|
+
interface RequestPayload {
|
|
1813
|
+
network: BitcoinNetwork;
|
|
1814
|
+
}
|
|
1815
|
+
interface RequestOptions<Payload extends RequestPayload, Response> {
|
|
1816
|
+
onFinish: (response: Response) => void;
|
|
1817
|
+
onCancel: () => void;
|
|
1818
|
+
payload: Payload;
|
|
1819
|
+
getProvider?: () => Promise<BitcoinProvider | undefined>;
|
|
1820
|
+
}
|
|
1821
|
+
declare const RpcIdSchema: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>, v.NullSchema<undefined>], undefined>, undefined>;
|
|
1822
|
+
type RpcId = v.InferOutput<typeof RpcIdSchema>;
|
|
1823
|
+
declare const rpcRequestMessageSchema: v.ObjectSchema<{
|
|
1824
|
+
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1825
|
+
readonly method: v.StringSchema<undefined>;
|
|
1826
|
+
readonly params: v.OptionalSchema<v.UnionSchema<[v.ArraySchema<v.UnknownSchema, undefined>, v.LooseObjectSchema<{}, undefined>, v.NullSchema<undefined>], undefined>, undefined>;
|
|
1827
|
+
readonly id: v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>, v.NullSchema<undefined>], undefined>;
|
|
1828
|
+
}, undefined>;
|
|
1829
|
+
type RpcRequestMessage = v.InferOutput<typeof rpcRequestMessageSchema>;
|
|
1830
|
+
interface RpcBase {
|
|
1831
|
+
jsonrpc: '2.0';
|
|
1832
|
+
id: RpcId;
|
|
1833
|
+
}
|
|
1834
|
+
interface RpcRequest<T extends string, U> extends RpcBase {
|
|
1835
|
+
method: T;
|
|
1836
|
+
params: U;
|
|
1837
|
+
}
|
|
1838
|
+
interface MethodParamsAndResult<TParams, TResult> {
|
|
1839
|
+
params: TParams;
|
|
1840
|
+
result: TResult;
|
|
1841
|
+
}
|
|
1732
1842
|
/**
|
|
1733
|
-
*
|
|
1734
|
-
*
|
|
1735
|
-
*
|
|
1736
|
-
* themselves.
|
|
1843
|
+
* @enum {number} RpcErrorCode
|
|
1844
|
+
* @description JSON-RPC error codes
|
|
1845
|
+
* @see https://www.jsonrpc.org/specification#error_object
|
|
1737
1846
|
*/
|
|
1738
|
-
declare
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
}, undefined>, v.ObjectSchema<{
|
|
1775
|
-
readonly type: v.LiteralSchema<"wallet", undefined>;
|
|
1776
|
-
readonly resourceId: v.StringSchema<undefined>;
|
|
1777
|
-
readonly actions: v.ObjectSchema<{
|
|
1778
|
-
readonly readNetwork: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1779
|
-
}, undefined>;
|
|
1780
|
-
}, undefined>], undefined>, undefined>, undefined>;
|
|
1781
|
-
type RequestPermissionsParams = v.InferOutput<typeof requestPermissionsParamsSchema>;
|
|
1782
|
-
declare const requestPermissionsResultSchema: v.LiteralSchema<true, undefined>;
|
|
1783
|
-
type RequestPermissionsResult = v.InferOutput<typeof requestPermissionsResultSchema>;
|
|
1784
|
-
declare const requestPermissionsRequestMessageSchema: v.ObjectSchema<{
|
|
1785
|
-
readonly method: v.LiteralSchema<"wallet_requestPermissions", undefined>;
|
|
1786
|
-
readonly params: v.NullishSchema<v.ArraySchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
1787
|
-
readonly type: v.LiteralSchema<"account", undefined>;
|
|
1788
|
-
readonly resourceId: v.StringSchema<undefined>;
|
|
1789
|
-
readonly actions: v.ObjectSchema<{
|
|
1790
|
-
readonly read: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1791
|
-
}, undefined>;
|
|
1792
|
-
}, undefined>, v.ObjectSchema<{
|
|
1793
|
-
readonly type: v.LiteralSchema<"wallet", undefined>;
|
|
1794
|
-
readonly resourceId: v.StringSchema<undefined>;
|
|
1795
|
-
readonly actions: v.ObjectSchema<{
|
|
1796
|
-
readonly readNetwork: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1797
|
-
}, undefined>;
|
|
1798
|
-
}, undefined>], undefined>, undefined>, undefined>;
|
|
1799
|
-
readonly id: v.StringSchema<undefined>;
|
|
1800
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1801
|
-
}, undefined>;
|
|
1802
|
-
type RequestPermissionsRequestMessage = v.InferOutput<typeof requestPermissionsRequestMessageSchema>;
|
|
1803
|
-
type RequestPermissions = MethodParamsAndResult<RequestPermissionsParams, RequestPermissionsResult>;
|
|
1804
|
-
declare const renouncePermissionsMethodName = "wallet_renouncePermissions";
|
|
1805
|
-
declare const renouncePermissionsParamsSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1806
|
-
type RenouncePermissionsParams = v.InferOutput<typeof renouncePermissionsParamsSchema>;
|
|
1807
|
-
declare const renouncePermissionsResultSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1808
|
-
type RenouncePermissionsResult = v.InferOutput<typeof renouncePermissionsResultSchema>;
|
|
1809
|
-
declare const renouncePermissionsRequestMessageSchema: v.ObjectSchema<{
|
|
1810
|
-
readonly method: v.LiteralSchema<"wallet_renouncePermissions", undefined>;
|
|
1811
|
-
readonly params: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1812
|
-
readonly id: v.StringSchema<undefined>;
|
|
1847
|
+
declare enum RpcErrorCode {
|
|
1848
|
+
/**
|
|
1849
|
+
* Parse error Invalid JSON
|
|
1850
|
+
**/
|
|
1851
|
+
PARSE_ERROR = -32700,
|
|
1852
|
+
/**
|
|
1853
|
+
* The JSON sent is not a valid Request object.
|
|
1854
|
+
**/
|
|
1855
|
+
INVALID_REQUEST = -32600,
|
|
1856
|
+
/**
|
|
1857
|
+
* The method does not exist/is not available.
|
|
1858
|
+
**/
|
|
1859
|
+
METHOD_NOT_FOUND = -32601,
|
|
1860
|
+
/**
|
|
1861
|
+
* Invalid method parameter(s).
|
|
1862
|
+
*/
|
|
1863
|
+
INVALID_PARAMS = -32602,
|
|
1864
|
+
/**
|
|
1865
|
+
* Internal JSON-RPC error.
|
|
1866
|
+
* This is a generic error, used when the server encounters an error in performing the request.
|
|
1867
|
+
**/
|
|
1868
|
+
INTERNAL_ERROR = -32603,
|
|
1869
|
+
/**
|
|
1870
|
+
* user rejected/canceled the request
|
|
1871
|
+
*/
|
|
1872
|
+
USER_REJECTION = -32000,
|
|
1873
|
+
/**
|
|
1874
|
+
* method is not supported for the address provided
|
|
1875
|
+
*/
|
|
1876
|
+
METHOD_NOT_SUPPORTED = -32001,
|
|
1877
|
+
/**
|
|
1878
|
+
* The client does not have permission to access the requested resource.
|
|
1879
|
+
*/
|
|
1880
|
+
ACCESS_DENIED = -32002
|
|
1881
|
+
}
|
|
1882
|
+
declare const rpcSuccessResponseMessageSchema: v.ObjectSchema<{
|
|
1813
1883
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1884
|
+
readonly result: v.NonOptionalSchema<v.UnknownSchema, undefined>;
|
|
1885
|
+
readonly id: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>, v.NullSchema<undefined>], undefined>, undefined>;
|
|
1814
1886
|
}, undefined>;
|
|
1815
|
-
type
|
|
1816
|
-
|
|
1817
|
-
declare const disconnectMethodName = "wallet_disconnect";
|
|
1818
|
-
declare const disconnectParamsSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1819
|
-
type DisconnectParams = v.InferOutput<typeof disconnectParamsSchema>;
|
|
1820
|
-
declare const disconnectResultSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1821
|
-
type DisconnectResult = v.InferOutput<typeof disconnectResultSchema>;
|
|
1822
|
-
declare const disconnectRequestMessageSchema: v.ObjectSchema<{
|
|
1823
|
-
readonly method: v.LiteralSchema<"wallet_disconnect", undefined>;
|
|
1824
|
-
readonly params: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1825
|
-
readonly id: v.StringSchema<undefined>;
|
|
1887
|
+
type RpcSuccessResponseMessage = v.InferOutput<typeof rpcSuccessResponseMessageSchema>;
|
|
1888
|
+
declare const rpcErrorResponseMessageSchema: v.ObjectSchema<{
|
|
1826
1889
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1890
|
+
readonly error: v.NonOptionalSchema<v.UnknownSchema, undefined>;
|
|
1891
|
+
readonly id: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>, v.NullSchema<undefined>], undefined>, undefined>;
|
|
1827
1892
|
}, undefined>;
|
|
1828
|
-
type
|
|
1829
|
-
|
|
1830
|
-
declare const getWalletTypeMethodName = "wallet_getWalletType";
|
|
1831
|
-
declare const getWalletTypeParamsSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1832
|
-
type GetWalletTypeParams = v.InferOutput<typeof getWalletTypeParamsSchema>;
|
|
1833
|
-
declare const getWalletTypeResultSchema: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1834
|
-
type GetWalletTypeResult = v.InferOutput<typeof getWalletTypeResultSchema>;
|
|
1835
|
-
declare const getWalletTypeRequestMessageSchema: v.ObjectSchema<{
|
|
1836
|
-
readonly method: v.LiteralSchema<"wallet_getWalletType", undefined>;
|
|
1837
|
-
readonly params: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1838
|
-
readonly id: v.StringSchema<undefined>;
|
|
1893
|
+
type RpcErrorResponseMessage = v.InferOutput<typeof rpcErrorResponseMessageSchema>;
|
|
1894
|
+
declare const rpcResponseMessageSchema: v.UnionSchema<[v.ObjectSchema<{
|
|
1839
1895
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
type GetWalletType = MethodParamsAndResult<GetWalletTypeParams, GetWalletTypeResult>;
|
|
1843
|
-
declare const getCurrentPermissionsMethodName = "wallet_getCurrentPermissions";
|
|
1844
|
-
declare const getCurrentPermissionsParamsSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1845
|
-
type GetCurrentPermissionsParams = v.InferOutput<typeof getCurrentPermissionsParamsSchema>;
|
|
1846
|
-
declare const getCurrentPermissionsResultSchema: v.ArraySchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
1847
|
-
readonly type: v.LiteralSchema<"account", undefined>;
|
|
1848
|
-
readonly resourceId: v.StringSchema<undefined>;
|
|
1849
|
-
readonly clientId: v.StringSchema<undefined>;
|
|
1850
|
-
readonly actions: v.ObjectSchema<{
|
|
1851
|
-
readonly read: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1852
|
-
}, undefined>;
|
|
1896
|
+
readonly result: v.NonOptionalSchema<v.UnknownSchema, undefined>;
|
|
1897
|
+
readonly id: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>, v.NullSchema<undefined>], undefined>, undefined>;
|
|
1853
1898
|
}, undefined>, v.ObjectSchema<{
|
|
1854
|
-
readonly type: v.LiteralSchema<"wallet", undefined>;
|
|
1855
|
-
readonly resourceId: v.StringSchema<undefined>;
|
|
1856
|
-
readonly clientId: v.StringSchema<undefined>;
|
|
1857
|
-
readonly actions: v.ObjectSchema<{
|
|
1858
|
-
readonly readNetwork: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1859
|
-
}, undefined>;
|
|
1860
|
-
}, undefined>], undefined>, undefined>;
|
|
1861
|
-
type GetCurrentPermissionsResult = v.InferOutput<typeof getCurrentPermissionsResultSchema>;
|
|
1862
|
-
declare const getCurrentPermissionsRequestMessageSchema: v.ObjectSchema<{
|
|
1863
|
-
readonly method: v.LiteralSchema<"wallet_getCurrentPermissions", undefined>;
|
|
1864
|
-
readonly params: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1865
|
-
readonly id: v.StringSchema<undefined>;
|
|
1866
1899
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1900
|
+
readonly error: v.NonOptionalSchema<v.UnknownSchema, undefined>;
|
|
1901
|
+
readonly id: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>, v.NullSchema<undefined>], undefined>, undefined>;
|
|
1902
|
+
}, undefined>], undefined>;
|
|
1903
|
+
type RpcResponseMessage = v.InferOutput<typeof rpcResponseMessageSchema>;
|
|
1904
|
+
interface RpcError {
|
|
1905
|
+
code: number | RpcErrorCode;
|
|
1906
|
+
message: string;
|
|
1907
|
+
data?: any;
|
|
1908
|
+
}
|
|
1909
|
+
interface RpcErrorResponse<TError extends RpcError = RpcError> extends RpcBase {
|
|
1910
|
+
error: TError;
|
|
1911
|
+
}
|
|
1912
|
+
interface RpcSuccessResponse<Method extends keyof Requests> extends RpcBase {
|
|
1913
|
+
result: Return<Method>;
|
|
1914
|
+
}
|
|
1915
|
+
type RpcResponse<Method extends keyof Requests> = RpcSuccessResponse<Method> | RpcErrorResponse;
|
|
1916
|
+
type RpcResult<Method extends keyof Requests> = {
|
|
1917
|
+
result: RpcSuccessResponse<Method>['result'];
|
|
1918
|
+
status: 'success';
|
|
1919
|
+
} | {
|
|
1920
|
+
error: RpcErrorResponse['error'];
|
|
1921
|
+
status: 'error';
|
|
1922
|
+
};
|
|
1923
|
+
|
|
1924
|
+
declare enum AddressPurpose {
|
|
1925
|
+
Ordinals = "ordinals",
|
|
1926
|
+
Payment = "payment",
|
|
1927
|
+
Stacks = "stacks",
|
|
1928
|
+
Starknet = "starknet",
|
|
1929
|
+
Spark = "spark"
|
|
1930
|
+
}
|
|
1931
|
+
interface GetAddressPayload extends RequestPayload {
|
|
1932
|
+
purposes: AddressPurpose[];
|
|
1933
|
+
message: string;
|
|
1934
|
+
}
|
|
1935
|
+
declare enum AddressType {
|
|
1936
|
+
p2pkh = "p2pkh",
|
|
1937
|
+
p2sh = "p2sh",
|
|
1938
|
+
p2wpkh = "p2wpkh",
|
|
1939
|
+
p2wsh = "p2wsh",
|
|
1940
|
+
p2tr = "p2tr",
|
|
1941
|
+
stacks = "stacks",
|
|
1942
|
+
starknet = "starknet",
|
|
1943
|
+
spark = "spark"
|
|
1944
|
+
}
|
|
1945
|
+
declare const addressSchema: v.ObjectSchema<{
|
|
1946
|
+
readonly address: v.StringSchema<undefined>;
|
|
1947
|
+
readonly publicKey: v.StringSchema<undefined>;
|
|
1948
|
+
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
1949
|
+
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
1950
|
+
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1867
1951
|
}, undefined>;
|
|
1868
|
-
type
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
type
|
|
1873
|
-
|
|
1952
|
+
type Address = v.InferOutput<typeof addressSchema>;
|
|
1953
|
+
interface GetAddressResponse {
|
|
1954
|
+
addresses: Address[];
|
|
1955
|
+
}
|
|
1956
|
+
type GetAddressOptions = RequestOptions<GetAddressPayload, GetAddressResponse>;
|
|
1957
|
+
|
|
1958
|
+
/**
|
|
1959
|
+
* @deprecated Use `request()` instead
|
|
1960
|
+
*/
|
|
1961
|
+
declare const getAddress: (options: GetAddressOptions) => Promise<void>;
|
|
1962
|
+
|
|
1963
|
+
interface GetCapabilitiesPayload extends RequestPayload {
|
|
1964
|
+
}
|
|
1965
|
+
type GetCapabilitiesResponse = Capability[];
|
|
1966
|
+
type GetCapabilitiesOptions = RequestOptions<GetCapabilitiesPayload, GetCapabilitiesResponse>;
|
|
1967
|
+
|
|
1968
|
+
declare const getCapabilities: (options: GetCapabilitiesOptions) => Promise<void>;
|
|
1969
|
+
|
|
1970
|
+
interface CreateInscriptionPayload extends RequestPayload {
|
|
1971
|
+
contentType: string;
|
|
1972
|
+
content: string;
|
|
1973
|
+
payloadType: 'PLAIN_TEXT' | 'BASE_64';
|
|
1974
|
+
appFee?: number;
|
|
1975
|
+
appFeeAddress?: string;
|
|
1976
|
+
suggestedMinerFeeRate?: number;
|
|
1977
|
+
token?: string;
|
|
1978
|
+
}
|
|
1979
|
+
interface CreateRepeatInscriptionsPayload extends CreateInscriptionPayload {
|
|
1980
|
+
repeat: number;
|
|
1981
|
+
}
|
|
1982
|
+
type CreateInscriptionResponse = {
|
|
1983
|
+
txId: string;
|
|
1984
|
+
};
|
|
1985
|
+
type CreateRepeatInscriptionsResponse = {
|
|
1986
|
+
txId: string;
|
|
1987
|
+
};
|
|
1988
|
+
type CreateInscriptionOptions = RequestOptions<CreateInscriptionPayload, CreateInscriptionResponse>;
|
|
1989
|
+
type CreateRepeatInscriptionsOptions = RequestOptions<CreateRepeatInscriptionsPayload, CreateRepeatInscriptionsResponse>;
|
|
1990
|
+
|
|
1991
|
+
declare const createInscription: (options: CreateInscriptionOptions) => Promise<void>;
|
|
1992
|
+
|
|
1993
|
+
declare const createRepeatInscriptions: (options: CreateRepeatInscriptionsOptions) => Promise<void>;
|
|
1994
|
+
|
|
1995
|
+
interface SignMessagePayload extends RequestPayload {
|
|
1996
|
+
address: string;
|
|
1997
|
+
message: string;
|
|
1998
|
+
protocol?: MessageSigningProtocols;
|
|
1999
|
+
}
|
|
2000
|
+
type SignMessageResponse = string;
|
|
2001
|
+
type SignMessageOptions = RequestOptions<SignMessagePayload, SignMessageResponse>;
|
|
2002
|
+
|
|
2003
|
+
declare const signMessage: (options: SignMessageOptions) => Promise<void>;
|
|
2004
|
+
|
|
2005
|
+
interface Recipient {
|
|
2006
|
+
address: string;
|
|
2007
|
+
amountSats: bigint;
|
|
2008
|
+
}
|
|
2009
|
+
type SerializedRecipient = Omit<Recipient, 'amountSats'> & {
|
|
2010
|
+
amountSats: string;
|
|
2011
|
+
};
|
|
2012
|
+
interface SendBtcTransactionPayload extends RequestPayload {
|
|
2013
|
+
recipients: Recipient[];
|
|
2014
|
+
senderAddress: string;
|
|
2015
|
+
message?: string;
|
|
2016
|
+
}
|
|
2017
|
+
type SerializedSendBtcTransactionPayload = Omit<SendBtcTransactionPayload, 'recipients'> & {
|
|
2018
|
+
recipients: SerializedRecipient[];
|
|
2019
|
+
};
|
|
2020
|
+
type SendBtcTransactionResponse = string;
|
|
2021
|
+
type SendBtcTransactionOptions = RequestOptions<SendBtcTransactionPayload, SendBtcTransactionResponse>;
|
|
2022
|
+
interface InputToSign {
|
|
2023
|
+
address: string;
|
|
2024
|
+
signingIndexes: number[];
|
|
2025
|
+
sigHash?: number;
|
|
2026
|
+
}
|
|
2027
|
+
type PsbtPayload = {
|
|
2028
|
+
psbtBase64: string;
|
|
2029
|
+
inputsToSign?: InputToSign[];
|
|
2030
|
+
broadcast?: boolean;
|
|
2031
|
+
};
|
|
2032
|
+
type SignMultiplePsbtPayload = {
|
|
2033
|
+
psbtBase64: string;
|
|
2034
|
+
inputsToSign?: InputToSign[];
|
|
2035
|
+
};
|
|
2036
|
+
interface SignTransactionPayload extends RequestPayload, PsbtPayload {
|
|
2037
|
+
message: string;
|
|
2038
|
+
}
|
|
2039
|
+
interface SignTransactionResponse {
|
|
2040
|
+
psbtBase64: string;
|
|
2041
|
+
txId?: string;
|
|
2042
|
+
}
|
|
2043
|
+
type SignTransactionOptions = RequestOptions<SignTransactionPayload, SignTransactionResponse>;
|
|
2044
|
+
interface SignMultipleTransactionsPayload extends RequestPayload {
|
|
2045
|
+
message: string;
|
|
2046
|
+
psbts: SignMultiplePsbtPayload[];
|
|
2047
|
+
}
|
|
2048
|
+
type SignMultipleTransactionsResponse = SignTransactionResponse[];
|
|
2049
|
+
type SignMultipleTransactionOptions = RequestOptions<SignMultipleTransactionsPayload, SignMultipleTransactionsResponse>;
|
|
2050
|
+
|
|
2051
|
+
declare const sendBtcTransaction: (options: SendBtcTransactionOptions) => Promise<void>;
|
|
2052
|
+
|
|
2053
|
+
declare const signTransaction: (options: SignTransactionOptions) => Promise<void>;
|
|
2054
|
+
|
|
2055
|
+
declare const signMultipleTransactions: (options: SignMultipleTransactionOptions) => Promise<void>;
|
|
2056
|
+
|
|
2057
|
+
declare const accountChangeEventName = "accountChange";
|
|
2058
|
+
declare const accountChangeSchema: v.ObjectSchema<{
|
|
2059
|
+
readonly type: v.LiteralSchema<"accountChange", undefined>;
|
|
2060
|
+
readonly addresses: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2061
|
+
readonly address: v.StringSchema<undefined>;
|
|
2062
|
+
readonly publicKey: v.StringSchema<undefined>;
|
|
2063
|
+
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
2064
|
+
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
2065
|
+
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
2066
|
+
}, undefined>, undefined>, undefined>;
|
|
2067
|
+
}, undefined>;
|
|
2068
|
+
type AccountChangeEvent = v.InferOutput<typeof accountChangeSchema>;
|
|
2069
|
+
declare const networkChangeEventName = "networkChange";
|
|
2070
|
+
declare const networkChangeSchema: v.ObjectSchema<{
|
|
2071
|
+
readonly type: v.LiteralSchema<"networkChange", undefined>;
|
|
1874
2072
|
readonly bitcoin: v.ObjectSchema<{
|
|
1875
2073
|
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1876
2074
|
}, undefined>;
|
|
1877
2075
|
readonly stacks: v.ObjectSchema<{
|
|
1878
|
-
readonly name: v.
|
|
1879
|
-
}, undefined>;
|
|
1880
|
-
readonly spark: v.ObjectSchema<{
|
|
1881
|
-
readonly name: v.EnumSchema<typeof SparkNetworkType, undefined>;
|
|
1882
|
-
}, undefined>;
|
|
1883
|
-
}, undefined>;
|
|
1884
|
-
type GetNetworkResult = v.InferOutput<typeof getNetworkResultSchema>;
|
|
1885
|
-
declare const getNetworkRequestMessageSchema: v.ObjectSchema<{
|
|
1886
|
-
readonly method: v.LiteralSchema<"wallet_getNetwork", undefined>;
|
|
1887
|
-
readonly params: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1888
|
-
readonly id: v.StringSchema<undefined>;
|
|
1889
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1890
|
-
}, undefined>;
|
|
1891
|
-
type GetNetworkRequestMessage = v.InferOutput<typeof getNetworkRequestMessageSchema>;
|
|
1892
|
-
type GetNetwork = MethodParamsAndResult<GetNetworkParams, GetNetworkResult>;
|
|
1893
|
-
declare const changeNetworkMethodName = "wallet_changeNetwork";
|
|
1894
|
-
declare const changeNetworkParamsSchema: v.ObjectSchema<{
|
|
1895
|
-
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1896
|
-
}, undefined>;
|
|
1897
|
-
type ChangeNetworkParams = v.InferOutput<typeof changeNetworkParamsSchema>;
|
|
1898
|
-
declare const changeNetworkResultSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1899
|
-
type ChangeNetworkResult = v.InferOutput<typeof changeNetworkResultSchema>;
|
|
1900
|
-
declare const changeNetworkRequestMessageSchema: v.ObjectSchema<{
|
|
1901
|
-
readonly method: v.LiteralSchema<"wallet_changeNetwork", undefined>;
|
|
1902
|
-
readonly params: v.ObjectSchema<{
|
|
1903
|
-
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1904
|
-
}, undefined>;
|
|
1905
|
-
readonly id: v.StringSchema<undefined>;
|
|
1906
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1907
|
-
}, undefined>;
|
|
1908
|
-
type ChangeNetworkRequestMessage = v.InferOutput<typeof changeNetworkRequestMessageSchema>;
|
|
1909
|
-
type ChangeNetwork = MethodParamsAndResult<ChangeNetworkParams, ChangeNetworkResult>;
|
|
1910
|
-
declare const changeNetworkByIdMethodName = "wallet_changeNetworkById";
|
|
1911
|
-
declare const changeNetworkByIdParamsSchema: v.ObjectSchema<{
|
|
1912
|
-
readonly id: v.StringSchema<undefined>;
|
|
1913
|
-
}, undefined>;
|
|
1914
|
-
type ChangeNetworkByIdParams = v.InferOutput<typeof changeNetworkByIdParamsSchema>;
|
|
1915
|
-
declare const changeNetworkByIdResultSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1916
|
-
type ChangeNetworkByIdResult = v.InferOutput<typeof changeNetworkByIdResultSchema>;
|
|
1917
|
-
declare const changeNetworkByIdRequestMessageSchema: v.ObjectSchema<{
|
|
1918
|
-
readonly method: v.LiteralSchema<"wallet_changeNetworkById", undefined>;
|
|
1919
|
-
readonly params: v.ObjectSchema<{
|
|
1920
|
-
readonly id: v.StringSchema<undefined>;
|
|
2076
|
+
readonly name: v.StringSchema<undefined>;
|
|
1921
2077
|
}, undefined>;
|
|
1922
|
-
readonly
|
|
1923
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1924
|
-
}, undefined>;
|
|
1925
|
-
type ChangeNetworkByIdRequestMessage = v.InferOutput<typeof changeNetworkByIdRequestMessageSchema>;
|
|
1926
|
-
type ChangeNetworkById = MethodParamsAndResult<ChangeNetworkByIdParams, ChangeNetworkByIdResult>;
|
|
1927
|
-
declare const getAccountMethodName = "wallet_getAccount";
|
|
1928
|
-
declare const getAccountParamsSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1929
|
-
type GetAccountParams = v.InferOutput<typeof getAccountParamsSchema>;
|
|
1930
|
-
declare const getAccountResultSchema: v.ObjectSchema<{
|
|
1931
|
-
readonly id: v.StringSchema<undefined>;
|
|
1932
|
-
readonly addresses: v.ArraySchema<v.ObjectSchema<{
|
|
2078
|
+
readonly addresses: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1933
2079
|
readonly address: v.StringSchema<undefined>;
|
|
1934
2080
|
readonly publicKey: v.StringSchema<undefined>;
|
|
1935
2081
|
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
1936
2082
|
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
1937
2083
|
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1938
|
-
}, undefined>, undefined>;
|
|
1939
|
-
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1940
|
-
readonly network: v.ObjectSchema<{
|
|
1941
|
-
readonly bitcoin: v.ObjectSchema<{
|
|
1942
|
-
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1943
|
-
}, undefined>;
|
|
1944
|
-
readonly stacks: v.ObjectSchema<{
|
|
1945
|
-
readonly name: v.EnumSchema<typeof StacksNetworkType, undefined>;
|
|
1946
|
-
}, undefined>;
|
|
1947
|
-
readonly spark: v.ObjectSchema<{
|
|
1948
|
-
readonly name: v.EnumSchema<typeof SparkNetworkType, undefined>;
|
|
1949
|
-
}, undefined>;
|
|
1950
|
-
}, undefined>;
|
|
2084
|
+
}, undefined>, undefined>, undefined>;
|
|
1951
2085
|
}, undefined>;
|
|
1952
|
-
type
|
|
1953
|
-
declare const
|
|
1954
|
-
|
|
1955
|
-
readonly
|
|
1956
|
-
readonly id: v.StringSchema<undefined>;
|
|
1957
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
2086
|
+
type NetworkChangeEvent = v.InferOutput<typeof networkChangeSchema>;
|
|
2087
|
+
declare const disconnectEventName = "disconnect";
|
|
2088
|
+
declare const disconnectSchema: v.ObjectSchema<{
|
|
2089
|
+
readonly type: v.LiteralSchema<"disconnect", undefined>;
|
|
1958
2090
|
}, undefined>;
|
|
1959
|
-
type
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
readonly
|
|
1965
|
-
readonly
|
|
1966
|
-
readonly
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
readonly
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
readonly
|
|
1978
|
-
readonly network: v.OptionalSchema<v.EnumSchema<typeof BitcoinNetworkType, undefined>, undefined>;
|
|
1979
|
-
}, undefined>, undefined>;
|
|
1980
|
-
type ConnectParams = v.InferOutput<typeof connectParamsSchema>;
|
|
1981
|
-
declare const connectResultSchema: v.ObjectSchema<{
|
|
1982
|
-
readonly id: v.StringSchema<undefined>;
|
|
1983
|
-
readonly addresses: v.ArraySchema<v.ObjectSchema<{
|
|
2091
|
+
type DisconnectEvent = v.InferOutput<typeof disconnectSchema>;
|
|
2092
|
+
declare const walletEventSchema: v.VariantSchema<"type", [v.ObjectSchema<{
|
|
2093
|
+
readonly type: v.LiteralSchema<"accountChange", undefined>;
|
|
2094
|
+
readonly addresses: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2095
|
+
readonly address: v.StringSchema<undefined>;
|
|
2096
|
+
readonly publicKey: v.StringSchema<undefined>;
|
|
2097
|
+
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
2098
|
+
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
2099
|
+
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
2100
|
+
}, undefined>, undefined>, undefined>;
|
|
2101
|
+
}, undefined>, v.ObjectSchema<{
|
|
2102
|
+
readonly type: v.LiteralSchema<"networkChange", undefined>;
|
|
2103
|
+
readonly bitcoin: v.ObjectSchema<{
|
|
2104
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
2105
|
+
}, undefined>;
|
|
2106
|
+
readonly stacks: v.ObjectSchema<{
|
|
2107
|
+
readonly name: v.StringSchema<undefined>;
|
|
2108
|
+
}, undefined>;
|
|
2109
|
+
readonly addresses: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
1984
2110
|
readonly address: v.StringSchema<undefined>;
|
|
1985
2111
|
readonly publicKey: v.StringSchema<undefined>;
|
|
1986
2112
|
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
1987
2113
|
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
1988
2114
|
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1989
|
-
}, undefined>, undefined>;
|
|
1990
|
-
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1991
|
-
readonly network: v.ObjectSchema<{
|
|
1992
|
-
readonly bitcoin: v.ObjectSchema<{
|
|
1993
|
-
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1994
|
-
}, undefined>;
|
|
1995
|
-
readonly stacks: v.ObjectSchema<{
|
|
1996
|
-
readonly name: v.EnumSchema<typeof StacksNetworkType, undefined>;
|
|
1997
|
-
}, undefined>;
|
|
1998
|
-
readonly spark: v.ObjectSchema<{
|
|
1999
|
-
readonly name: v.EnumSchema<typeof SparkNetworkType, undefined>;
|
|
2000
|
-
}, undefined>;
|
|
2001
|
-
}, undefined>;
|
|
2002
|
-
}, undefined>;
|
|
2003
|
-
type ConnectResult = v.InferOutput<typeof connectResultSchema>;
|
|
2004
|
-
declare const connectRequestMessageSchema: v.ObjectSchema<{
|
|
2005
|
-
readonly method: v.LiteralSchema<"wallet_connect", undefined>;
|
|
2006
|
-
readonly params: v.NullishSchema<v.ObjectSchema<{
|
|
2007
|
-
readonly permissions: v.OptionalSchema<v.ArraySchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
2008
|
-
readonly type: v.LiteralSchema<"account", undefined>;
|
|
2009
|
-
readonly resourceId: v.StringSchema<undefined>;
|
|
2010
|
-
readonly actions: v.ObjectSchema<{
|
|
2011
|
-
readonly read: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
2012
|
-
}, undefined>;
|
|
2013
|
-
}, undefined>, v.ObjectSchema<{
|
|
2014
|
-
readonly type: v.LiteralSchema<"wallet", undefined>;
|
|
2015
|
-
readonly resourceId: v.StringSchema<undefined>;
|
|
2016
|
-
readonly actions: v.ObjectSchema<{
|
|
2017
|
-
readonly readNetwork: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
2018
|
-
}, undefined>;
|
|
2019
|
-
}, undefined>], undefined>, undefined>, undefined>;
|
|
2020
|
-
readonly addresses: v.OptionalSchema<v.ArraySchema<v.EnumSchema<typeof AddressPurpose, undefined>, undefined>, undefined>;
|
|
2021
|
-
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 80, "The message must not exceed 80 characters.">]>, undefined>;
|
|
2022
|
-
readonly network: v.OptionalSchema<v.EnumSchema<typeof BitcoinNetworkType, undefined>, undefined>;
|
|
2023
|
-
}, undefined>, undefined>;
|
|
2024
|
-
readonly id: v.StringSchema<undefined>;
|
|
2025
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
2026
|
-
}, undefined>;
|
|
2027
|
-
type ConnectRequestMessage = v.InferOutput<typeof connectRequestMessageSchema>;
|
|
2028
|
-
type Connect = MethodParamsAndResult<ConnectParams, ConnectResult>;
|
|
2029
|
-
declare const addNetworkMethodName = "wallet_addNetwork";
|
|
2030
|
-
declare const addNetworkParamsSchema: v.VariantSchema<"chain", [v.ObjectSchema<{
|
|
2031
|
-
readonly chain: v.LiteralSchema<"bitcoin", undefined>;
|
|
2032
|
-
readonly type: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
2033
|
-
readonly name: v.StringSchema<undefined>;
|
|
2034
|
-
readonly rpcUrl: v.StringSchema<undefined>;
|
|
2035
|
-
readonly rpcFallbackUrl: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2036
|
-
readonly indexerUrl: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2037
|
-
readonly blockExplorerUrl: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2038
|
-
readonly switch: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
2039
|
-
}, undefined>, v.ObjectSchema<{
|
|
2040
|
-
readonly chain: v.LiteralSchema<"stacks", undefined>;
|
|
2041
|
-
readonly name: v.StringSchema<undefined>;
|
|
2042
|
-
readonly type: v.EnumSchema<typeof StacksNetworkType, undefined>;
|
|
2043
|
-
readonly rpcUrl: v.StringSchema<undefined>;
|
|
2044
|
-
readonly blockExplorerUrl: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2045
|
-
readonly switch: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
2115
|
+
}, undefined>, undefined>, undefined>;
|
|
2046
2116
|
}, undefined>, v.ObjectSchema<{
|
|
2047
|
-
readonly
|
|
2048
|
-
readonly name: v.StringSchema<undefined>;
|
|
2049
|
-
readonly type: v.EnumSchema<typeof StarknetNetworkType, undefined>;
|
|
2050
|
-
readonly rpcUrl: v.StringSchema<undefined>;
|
|
2051
|
-
readonly blockExplorerUrl: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2052
|
-
readonly switch: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
2117
|
+
readonly type: v.LiteralSchema<"disconnect", undefined>;
|
|
2053
2118
|
}, undefined>], undefined>;
|
|
2054
|
-
type
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
readonly chain: v.LiteralSchema<"stacks", undefined>;
|
|
2068
|
-
readonly name: v.StringSchema<undefined>;
|
|
2069
|
-
readonly type: v.EnumSchema<typeof StacksNetworkType, undefined>;
|
|
2070
|
-
readonly rpcUrl: v.StringSchema<undefined>;
|
|
2071
|
-
readonly blockExplorerUrl: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2072
|
-
readonly switch: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
2073
|
-
}, undefined>, v.ObjectSchema<{
|
|
2074
|
-
readonly chain: v.LiteralSchema<"starknet", undefined>;
|
|
2075
|
-
readonly name: v.StringSchema<undefined>;
|
|
2076
|
-
readonly type: v.EnumSchema<typeof StarknetNetworkType, undefined>;
|
|
2077
|
-
readonly rpcUrl: v.StringSchema<undefined>;
|
|
2078
|
-
readonly blockExplorerUrl: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2079
|
-
readonly switch: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
2080
|
-
}, undefined>], undefined>;
|
|
2081
|
-
readonly id: v.StringSchema<undefined>;
|
|
2082
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
2083
|
-
}, undefined>;
|
|
2084
|
-
type AddNetworkRequestMessage = v.InferOutput<typeof addNetworkRequestMessageSchema>;
|
|
2085
|
-
declare const addNetworkResultSchema: v.ObjectSchema<{
|
|
2086
|
-
readonly id: v.StringSchema<undefined>;
|
|
2087
|
-
}, undefined>;
|
|
2088
|
-
type AddNetworkResult = v.InferOutput<typeof addNetworkResultSchema>;
|
|
2089
|
-
type AddNetwork = MethodParamsAndResult<AddNetworkParams, AddNetworkResult>;
|
|
2090
|
-
|
|
2091
|
-
declare const walletTypes: readonly ["software", "ledger", "keystone"];
|
|
2092
|
-
declare const walletTypeSchema: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
2093
|
-
type WalletType = v.InferOutput<typeof walletTypeSchema>;
|
|
2094
|
-
|
|
2095
|
-
type StxRequests = {
|
|
2096
|
-
stx_callContract: StxCallContract;
|
|
2097
|
-
stx_deployContract: StxDeployContract;
|
|
2098
|
-
stx_getAccounts: StxGetAccounts;
|
|
2099
|
-
stx_getAddresses: StxGetAddresses;
|
|
2100
|
-
stx_signMessage: StxSignMessage;
|
|
2101
|
-
stx_signStructuredMessage: StxSignStructuredMessage;
|
|
2102
|
-
stx_signTransaction: StxSignTransaction;
|
|
2103
|
-
stx_transferStx: StxTransferStx;
|
|
2104
|
-
stx_signTransactions: StxSignTransactions;
|
|
2105
|
-
};
|
|
2106
|
-
type StxRequestMethod = keyof StxRequests;
|
|
2107
|
-
type SparkRequests = {
|
|
2108
|
-
[sparkGetAddressesMethodName]: SparkGetAddresses;
|
|
2109
|
-
[sparkGetBalanceMethodName]: SparkGetBalance;
|
|
2110
|
-
[sparkTransferMethodName]: SparkTransfer;
|
|
2111
|
-
[sparkTransferTokenMethodName]: SparkTransferToken;
|
|
2112
|
-
};
|
|
2113
|
-
type SparkRequestMethod = keyof SparkRequests;
|
|
2114
|
-
type BtcRequests = {
|
|
2115
|
-
getInfo: GetInfo;
|
|
2116
|
-
getAddresses: GetAddresses;
|
|
2117
|
-
getAccounts: GetAccounts;
|
|
2118
|
-
getBalance: GetBalance;
|
|
2119
|
-
signMessage: SignMessage;
|
|
2120
|
-
sendTransfer: SendTransfer;
|
|
2121
|
-
signPsbt: SignPsbt;
|
|
2122
|
-
};
|
|
2123
|
-
type BtcRequestMethod = keyof BtcRequests;
|
|
2124
|
-
type RunesRequests = {
|
|
2125
|
-
runes_estimateEtch: RunesEstimateEtch;
|
|
2126
|
-
runes_estimateMint: RunesEstimateMint;
|
|
2127
|
-
runes_estimateRbfOrder: RunesEstimateRbfOrder;
|
|
2128
|
-
runes_etch: RunesEtch;
|
|
2129
|
-
runes_getBalance: RunesGetBalance;
|
|
2130
|
-
runes_getOrder: RunesGetOrder;
|
|
2131
|
-
runes_mint: RunesMint;
|
|
2132
|
-
runes_rbfOrder: RunesRbfOrder;
|
|
2133
|
-
runes_transfer: RunesTransfer;
|
|
2134
|
-
};
|
|
2135
|
-
type RunesRequestMethod = keyof RunesRequests;
|
|
2136
|
-
type OrdinalsRequests = {
|
|
2137
|
-
ord_getInscriptions: GetInscriptions;
|
|
2138
|
-
ord_sendInscriptions: SendInscriptions;
|
|
2139
|
-
};
|
|
2140
|
-
type OrdinalsRequestMethod = keyof OrdinalsRequests;
|
|
2141
|
-
type WalletRequests = {
|
|
2142
|
-
wallet_addNetwork: AddNetwork;
|
|
2143
|
-
wallet_changeNetwork: ChangeNetwork;
|
|
2144
|
-
wallet_changeNetworkById: ChangeNetworkById;
|
|
2145
|
-
wallet_connect: Connect;
|
|
2146
|
-
wallet_disconnect: Disconnect;
|
|
2147
|
-
wallet_getAccount: GetAccount;
|
|
2148
|
-
wallet_getCurrentPermissions: GetCurrentPermissions;
|
|
2149
|
-
wallet_getNetwork: GetNetwork;
|
|
2150
|
-
wallet_getWalletType: GetWalletType;
|
|
2151
|
-
wallet_renouncePermissions: RenouncePermissions;
|
|
2152
|
-
wallet_requestPermissions: RequestPermissions;
|
|
2119
|
+
type WalletEvent = v.InferOutput<typeof walletEventSchema>;
|
|
2120
|
+
type AccountChangeCallback = (e: AccountChangeEvent) => void;
|
|
2121
|
+
type DisconnectCallback = (e: DisconnectEvent) => void;
|
|
2122
|
+
type NetworkChangeCallback = (e: NetworkChangeEvent) => void;
|
|
2123
|
+
type ListenerInfo = {
|
|
2124
|
+
eventName: typeof accountChangeEventName;
|
|
2125
|
+
cb: AccountChangeCallback;
|
|
2126
|
+
} | {
|
|
2127
|
+
eventName: typeof disconnectEventName;
|
|
2128
|
+
cb: DisconnectCallback;
|
|
2129
|
+
} | {
|
|
2130
|
+
eventName: typeof networkChangeEventName;
|
|
2131
|
+
cb: NetworkChangeCallback;
|
|
2153
2132
|
};
|
|
2154
|
-
type
|
|
2155
|
-
|
|
2156
|
-
|
|
2133
|
+
type AddListener = (arg: ListenerInfo) => () => void;
|
|
2134
|
+
interface BaseBitcoinProvider {
|
|
2135
|
+
request: <Method extends keyof Requests>(method: Method, options: Params<Method>, providerId?: string) => Promise<RpcResponse<Method>>;
|
|
2136
|
+
connect: (request: string) => Promise<GetAddressResponse>;
|
|
2137
|
+
signMessage: (request: string) => Promise<SignMessageResponse>;
|
|
2138
|
+
signTransaction: (request: string) => Promise<SignTransactionResponse>;
|
|
2139
|
+
sendBtcTransaction: (request: string) => Promise<SendBtcTransactionResponse>;
|
|
2140
|
+
createInscription: (request: string) => Promise<CreateInscriptionResponse>;
|
|
2141
|
+
createRepeatInscriptions: (request: string) => Promise<CreateRepeatInscriptionsResponse>;
|
|
2142
|
+
signMultipleTransactions: (request: string) => Promise<SignMultipleTransactionsResponse>;
|
|
2143
|
+
addListener: AddListener;
|
|
2144
|
+
}
|
|
2145
|
+
type Capability = keyof BaseBitcoinProvider;
|
|
2146
|
+
interface BitcoinProvider extends BaseBitcoinProvider {
|
|
2147
|
+
getCapabilities?: (request: string) => Promise<GetCapabilitiesResponse>;
|
|
2148
|
+
}
|
|
2149
|
+
interface Provider {
|
|
2150
|
+
id: string;
|
|
2151
|
+
name: string;
|
|
2152
|
+
icon: string;
|
|
2153
|
+
webUrl?: string;
|
|
2154
|
+
chromeWebStoreUrl?: string;
|
|
2155
|
+
mozillaAddOnsUrl?: string;
|
|
2156
|
+
googlePlayStoreUrl?: string;
|
|
2157
|
+
iOSAppStoreUrl?: string;
|
|
2158
|
+
methods?: (StxRequestMethod | BtcRequestMethod | RunesRequestMethod | OrdinalsRequestMethod)[];
|
|
2159
|
+
}
|
|
2160
|
+
interface SupportedWallet extends Provider {
|
|
2161
|
+
isInstalled: boolean;
|
|
2162
|
+
}
|
|
2163
|
+
declare global {
|
|
2164
|
+
interface XverseProviders {
|
|
2165
|
+
BitcoinProvider?: BitcoinProvider;
|
|
2166
|
+
}
|
|
2167
|
+
interface Window {
|
|
2168
|
+
BitcoinProvider?: BitcoinProvider;
|
|
2169
|
+
XverseProviders?: XverseProviders;
|
|
2170
|
+
btc_providers?: Provider[];
|
|
2171
|
+
}
|
|
2172
|
+
}
|
|
2157
2173
|
|
|
2158
|
-
declare
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
* Adds an event listener.
|
|
2167
|
-
*
|
|
2168
|
-
* Currently expects 2 arguments, although is also capable of handling legacy
|
|
2169
|
-
* calls with 3 arguments consisting of:
|
|
2170
|
-
*
|
|
2171
|
-
* - event name (string)
|
|
2172
|
-
* - callback (function)
|
|
2173
|
-
* - provider ID (optional string)
|
|
2174
|
-
*/
|
|
2175
|
-
declare const addListener: (...rawArgs: unknown[]) => ReturnType<AddListener>;
|
|
2174
|
+
declare function getProviderOrThrow(getProvider?: () => Promise<BitcoinProvider | undefined>): Promise<BitcoinProvider>;
|
|
2175
|
+
declare function getProviders(): Provider[];
|
|
2176
|
+
declare function getProviderById(providerId: string): any;
|
|
2177
|
+
declare function isProviderInstalled(providerId: string): boolean;
|
|
2178
|
+
declare function setDefaultProvider(providerId: string): void;
|
|
2179
|
+
declare function getDefaultProvider(): string | null;
|
|
2180
|
+
declare function removeDefaultProvider(): void;
|
|
2181
|
+
declare function getSupportedWallets(): SupportedWallet[];
|
|
2176
2182
|
|
|
2177
2183
|
declare abstract class SatsConnectAdapter {
|
|
2178
2184
|
abstract readonly id: string;
|
|
@@ -2198,4 +2204,4 @@ declare class BaseAdapter extends SatsConnectAdapter {
|
|
|
2198
2204
|
declare const DefaultAdaptersInfo: Record<string, Provider>;
|
|
2199
2205
|
declare const defaultAdapters: Record<string, new () => SatsConnectAdapter>;
|
|
2200
2206
|
|
|
2201
|
-
export { type AccountChangeCallback, type AccountChangeEvent, type AddListener, type AddNetwork, type AddNetworkParams, type AddNetworkRequestMessage, type AddNetworkResult, type Address, AddressPurpose, AddressType, BaseAdapter, type BitcoinNetwork, BitcoinNetworkType, type BitcoinProvider, type BtcRequestMethod, type BtcRequests, type Capability, type ChangeNetwork, type ChangeNetworkById, type ChangeNetworkByIdParams, type ChangeNetworkByIdRequestMessage, type ChangeNetworkByIdResult, 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 DisconnectCallback, 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, type ListenerInfo, MessageSigningProtocols, type MethodParamsAndResult, type NetworkChangeCallback, 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 SparkGetAddresses, type SparkGetAddressesParams, type SparkGetAddressesRequestMessage, type SparkGetAddressesResult, type SparkGetBalance, type SparkGetBalanceParams, type SparkGetBalanceRequestMessage, type SparkGetBalanceResult, SparkNetworkType, type SparkRequestMethod, type SparkRequests, type SparkTransfer, type SparkTransferParams, type SparkTransferRequestMessage, type SparkTransferResult, type SparkTransferToken, type SparkTransferTokenParams, type SparkTransferTokenRequestMessage, type SparkTransferTokenResult, StacksNetworkType, StarknetNetworkType, 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, addNetworkMethodName, addNetworkParamsSchema, addNetworkRequestMessageSchema, addNetworkResultSchema, addressSchema, changeNetworkByIdMethodName, changeNetworkByIdParamsSchema, changeNetworkByIdRequestMessageSchema, changeNetworkByIdResultSchema, 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, sparkGetAddressesMethodName, sparkGetAddressesParamsSchema, sparkGetAddressesRequestMessageSchema, sparkGetAddressesResultSchema, sparkGetBalanceMethodName, sparkGetBalanceParamsSchema, sparkGetBalanceRequestMessageSchema, sparkGetBalanceResultSchema, sparkTransferMethodName, sparkTransferParamsSchema, sparkTransferRequestMessageSchema, sparkTransferResultSchema, sparkTransferTokenMethodName, sparkTransferTokenParamsSchema, sparkTransferTokenRequestMessageSchema, sparkTransferTokenResultSchema, 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 };
|
|
2207
|
+
export { type AccountChangeCallback, type AccountChangeEvent, type AddListener, type AddNetwork, type AddNetworkParams, type AddNetworkRequestMessage, type AddNetworkResult, type Address, AddressPurpose, AddressType, BaseAdapter, type BitcoinNetwork, BitcoinNetworkType, type BitcoinProvider, type BtcRequestMethod, type BtcRequests, type Capability, type ChangeNetwork, type ChangeNetworkById, type ChangeNetworkByIdParams, type ChangeNetworkByIdRequestMessage, type ChangeNetworkByIdResult, 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 DisconnectCallback, 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, type ListenerInfo, MessageSigningProtocols, type MethodParamsAndResult, type NetworkChangeCallback, type NetworkChangeEvent, type OrdinalsRequestMethod, type OrdinalsRequests, type Params, PermissionRequestParams, type PermissionWithoutClientId, type Provider, ProviderPlatform, 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 SparkGetAddresses, type SparkGetAddressesParams, type SparkGetAddressesRequestMessage, type SparkGetAddressesResult, type SparkGetBalance, type SparkGetBalanceParams, type SparkGetBalanceRequestMessage, type SparkGetBalanceResult, SparkNetworkType, type SparkRequestMethod, type SparkRequests, type SparkTransfer, type SparkTransferParams, type SparkTransferRequestMessage, type SparkTransferResult, type SparkTransferToken, type SparkTransferTokenParams, type SparkTransferTokenRequestMessage, type SparkTransferTokenResult, StacksNetworkType, StarknetNetworkType, 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, addNetworkMethodName, addNetworkParamsSchema, addNetworkRequestMessageSchema, addNetworkResultSchema, addressSchema, changeNetworkByIdMethodName, changeNetworkByIdParamsSchema, changeNetworkByIdRequestMessageSchema, changeNetworkByIdResultSchema, 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, sparkGetAddressesMethodName, sparkGetAddressesParamsSchema, sparkGetAddressesRequestMessageSchema, sparkGetAddressesResultSchema, sparkGetBalanceMethodName, sparkGetBalanceParamsSchema, sparkGetBalanceRequestMessageSchema, sparkGetBalanceResultSchema, sparkTransferMethodName, sparkTransferParamsSchema, sparkTransferRequestMessageSchema, sparkTransferResultSchema, sparkTransferTokenMethodName, sparkTransferTokenParamsSchema, sparkTransferTokenRequestMessageSchema, sparkTransferTokenResultSchema, 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 };
|