@sats-connect/core 0.8.1-91ac91b → 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 +1884 -2016
- package/dist/index.d.ts +1884 -2016
- package/dist/index.js +1157 -1195
- package/dist/index.mjs +1156 -1184
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,439 +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
|
-
request: <Method extends keyof Requests>(method: Method, options: Params<Method>, providerId?: string) => Promise<RpcResponse<Method>>;
|
|
350
|
-
connect: (request: string) => Promise<GetAddressResponse>;
|
|
351
|
-
signMessage: (request: string) => Promise<SignMessageResponse>;
|
|
352
|
-
signTransaction: (request: string) => Promise<SignTransactionResponse>;
|
|
353
|
-
sendBtcTransaction: (request: string) => Promise<SendBtcTransactionResponse>;
|
|
354
|
-
createInscription: (request: string) => Promise<CreateInscriptionResponse>;
|
|
355
|
-
createRepeatInscriptions: (request: string) => Promise<CreateRepeatInscriptionsResponse>;
|
|
356
|
-
signMultipleTransactions: (request: string) => Promise<SignMultipleTransactionsResponse>;
|
|
357
|
-
addListener: AddListener;
|
|
358
|
-
}
|
|
359
|
-
type Capability = keyof BaseBitcoinProvider;
|
|
360
|
-
interface BitcoinProvider extends BaseBitcoinProvider {
|
|
361
|
-
getCapabilities?: (request: string) => Promise<GetCapabilitiesResponse>;
|
|
362
|
-
}
|
|
363
|
-
interface Provider {
|
|
364
|
-
id: string;
|
|
365
|
-
name: string;
|
|
366
|
-
icon: string;
|
|
367
|
-
webUrl?: string;
|
|
368
|
-
chromeWebStoreUrl?: string;
|
|
369
|
-
mozillaAddOnsUrl?: string;
|
|
370
|
-
googlePlayStoreUrl?: string;
|
|
371
|
-
iOSAppStoreUrl?: string;
|
|
372
|
-
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;
|
|
373
549
|
}
|
|
374
|
-
|
|
375
|
-
|
|
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;
|
|
376
590
|
}
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
interface Window {
|
|
382
|
-
BitcoinProvider?: BitcoinProvider;
|
|
383
|
-
XverseProviders?: XverseProviders;
|
|
384
|
-
btc_providers?: Provider[];
|
|
385
|
-
}
|
|
591
|
+
interface RunesRbfOrderResult {
|
|
592
|
+
orderId: string;
|
|
593
|
+
fundRBFTransactionId: string;
|
|
594
|
+
fundingAddress: string;
|
|
386
595
|
}
|
|
596
|
+
type RunesRbfOrder = MethodParamsAndResult<RunesRbfOrderParams, RunesRbfOrderResult>;
|
|
387
597
|
|
|
388
|
-
declare
|
|
389
|
-
declare
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
declare function getSupportedWallets(): SupportedWallet[];
|
|
396
|
-
|
|
397
|
-
declare const getInfoMethodName = "getInfo";
|
|
398
|
-
declare const getInfoParamsSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
399
|
-
type GetInfoParams = v.InferOutput<typeof getInfoParamsSchema>;
|
|
400
|
-
declare const getInfoResultSchema: v.ObjectSchema<{
|
|
401
|
-
/**
|
|
402
|
-
* Version of the wallet.
|
|
403
|
-
*/
|
|
404
|
-
readonly version: v.StringSchema<undefined>;
|
|
405
|
-
/**
|
|
406
|
-
* [WBIP](https://wbips.netlify.app/wbips/WBIP002) methods supported by the wallet.
|
|
407
|
-
*/
|
|
408
|
-
readonly methods: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
409
|
-
/**
|
|
410
|
-
* List of WBIP standards supported by the wallet. Not currently used.
|
|
411
|
-
*/
|
|
412
|
-
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>;
|
|
413
605
|
}, undefined>;
|
|
414
|
-
type
|
|
415
|
-
declare const
|
|
416
|
-
readonly
|
|
417
|
-
|
|
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>;
|
|
418
620
|
readonly id: v.StringSchema<undefined>;
|
|
419
621
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
420
622
|
}, undefined>;
|
|
421
|
-
type
|
|
422
|
-
type
|
|
423
|
-
|
|
424
|
-
declare const
|
|
425
|
-
|
|
426
|
-
* The purposes for which to generate addresses. See
|
|
427
|
-
* {@linkcode AddressPurpose} for available purposes.
|
|
428
|
-
*/
|
|
429
|
-
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<{
|
|
430
628
|
/**
|
|
431
629
|
* A message to be displayed to the user in the request prompt.
|
|
432
630
|
*/
|
|
433
631
|
readonly message: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
434
|
-
}, undefined>;
|
|
435
|
-
type
|
|
436
|
-
declare const
|
|
632
|
+
}, undefined>, undefined>;
|
|
633
|
+
type SparkGetAddressesParams = v.InferOutput<typeof sparkGetAddressesParamsSchema>;
|
|
634
|
+
declare const sparkGetAddressesResultSchema: v.ObjectSchema<{
|
|
437
635
|
/**
|
|
438
636
|
* The addresses generated for the given purposes.
|
|
439
637
|
*/
|
|
@@ -456,1861 +654,1531 @@ declare const getAddressesResultSchema: v.ObjectSchema<{
|
|
|
456
654
|
}, undefined>;
|
|
457
655
|
}, undefined>;
|
|
458
656
|
}, undefined>;
|
|
459
|
-
type
|
|
460
|
-
declare const
|
|
461
|
-
readonly method: v.LiteralSchema<"
|
|
462
|
-
readonly params: v.ObjectSchema<{
|
|
463
|
-
/**
|
|
464
|
-
* The purposes for which to generate addresses. See
|
|
465
|
-
* {@linkcode AddressPurpose} for available purposes.
|
|
466
|
-
*/
|
|
467
|
-
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<{
|
|
468
661
|
/**
|
|
469
662
|
* A message to be displayed to the user in the request prompt.
|
|
470
663
|
*/
|
|
471
664
|
readonly message: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
472
|
-
}, undefined>;
|
|
665
|
+
}, undefined>, undefined>;
|
|
473
666
|
readonly id: v.StringSchema<undefined>;
|
|
474
667
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
475
668
|
}, undefined>;
|
|
476
|
-
type
|
|
477
|
-
type
|
|
478
|
-
|
|
479
|
-
declare
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
declare const signMessageParamsSchema: v.ObjectSchema<{
|
|
484
|
-
/**
|
|
485
|
-
* The address used for signing.
|
|
486
|
-
**/
|
|
487
|
-
readonly address: v.StringSchema<undefined>;
|
|
488
|
-
/**
|
|
489
|
-
* The message to sign.
|
|
490
|
-
**/
|
|
491
|
-
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<{
|
|
492
676
|
/**
|
|
493
|
-
* The
|
|
677
|
+
* The Spark Bitcoin address balance in sats in string form.
|
|
494
678
|
*/
|
|
495
|
-
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>;
|
|
496
690
|
}, undefined>;
|
|
497
|
-
type
|
|
498
|
-
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<{
|
|
499
703
|
/**
|
|
500
|
-
*
|
|
704
|
+
* Amount of SATS to transfer as a string or number.
|
|
501
705
|
*/
|
|
502
|
-
readonly
|
|
706
|
+
readonly amountSats: v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>], undefined>;
|
|
503
707
|
/**
|
|
504
|
-
*
|
|
505
|
-
*/
|
|
506
|
-
readonly messageHash: v.StringSchema<undefined>;
|
|
507
|
-
/**
|
|
508
|
-
* The address used for signing.
|
|
708
|
+
* The recipient's spark address.
|
|
509
709
|
*/
|
|
510
|
-
readonly
|
|
710
|
+
readonly receiverSparkAddress: v.StringSchema<undefined>;
|
|
711
|
+
}, undefined>;
|
|
712
|
+
type SparkTransferParams = v.InferOutput<typeof sparkTransferParamsSchema>;
|
|
713
|
+
declare const sparkTransferResultSchema: v.ObjectSchema<{
|
|
511
714
|
/**
|
|
512
|
-
* The
|
|
715
|
+
* The ID of the transaction.
|
|
513
716
|
*/
|
|
514
|
-
readonly
|
|
717
|
+
readonly id: v.StringSchema<undefined>;
|
|
515
718
|
}, undefined>;
|
|
516
|
-
type
|
|
517
|
-
declare const
|
|
518
|
-
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>;
|
|
519
722
|
readonly params: v.ObjectSchema<{
|
|
520
723
|
/**
|
|
521
|
-
*
|
|
522
|
-
|
|
523
|
-
readonly
|
|
524
|
-
/**
|
|
525
|
-
* The message to sign.
|
|
526
|
-
**/
|
|
527
|
-
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>;
|
|
528
727
|
/**
|
|
529
|
-
* The
|
|
728
|
+
* The recipient's spark address.
|
|
530
729
|
*/
|
|
531
|
-
readonly
|
|
730
|
+
readonly receiverSparkAddress: v.StringSchema<undefined>;
|
|
532
731
|
}, undefined>;
|
|
533
732
|
readonly id: v.StringSchema<undefined>;
|
|
534
733
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
535
734
|
}, undefined>;
|
|
536
|
-
type
|
|
537
|
-
type
|
|
538
|
-
|
|
539
|
-
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<{
|
|
540
740
|
/**
|
|
541
|
-
*
|
|
542
|
-
* The amount to send to each recipient is in satoshis.
|
|
741
|
+
* Amount of units of the token to transfer as a string or number.
|
|
543
742
|
*/
|
|
544
|
-
readonly
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
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>;
|
|
548
752
|
}, undefined>;
|
|
549
|
-
type
|
|
550
|
-
declare const
|
|
753
|
+
type SparkTransferTokenParams = v.InferOutput<typeof sparkTransferTokenParamsSchema>;
|
|
754
|
+
declare const sparkTransferTokenResultSchema: v.ObjectSchema<{
|
|
551
755
|
/**
|
|
552
|
-
* The
|
|
756
|
+
* The ID of the transaction.
|
|
553
757
|
*/
|
|
554
|
-
readonly
|
|
758
|
+
readonly id: v.StringSchema<undefined>;
|
|
555
759
|
}, undefined>;
|
|
556
|
-
type
|
|
557
|
-
declare const
|
|
558
|
-
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>;
|
|
559
763
|
readonly params: v.ObjectSchema<{
|
|
560
764
|
/**
|
|
561
|
-
*
|
|
562
|
-
* The amount to send to each recipient is in satoshis.
|
|
765
|
+
* Amount of units of the token to transfer as a string or number.
|
|
563
766
|
*/
|
|
564
|
-
readonly
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
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>;
|
|
568
776
|
}, undefined>;
|
|
569
777
|
readonly id: v.StringSchema<undefined>;
|
|
570
778
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
571
779
|
}, undefined>;
|
|
572
|
-
type
|
|
573
|
-
type
|
|
574
|
-
|
|
575
|
-
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<{
|
|
576
785
|
/**
|
|
577
|
-
* The
|
|
786
|
+
* The contract principal.
|
|
787
|
+
*
|
|
788
|
+
* E.g. `"SPKE...GD5C.my-contract"`
|
|
578
789
|
*/
|
|
579
|
-
readonly
|
|
790
|
+
readonly contract: v.StringSchema<undefined>;
|
|
580
791
|
/**
|
|
581
|
-
* The
|
|
582
|
-
*
|
|
792
|
+
* The name of the function to call.
|
|
793
|
+
*
|
|
794
|
+
* Note: spec changes ongoing,
|
|
795
|
+
* https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
|
|
583
796
|
*/
|
|
584
|
-
readonly
|
|
797
|
+
readonly functionName: v.StringSchema<undefined>;
|
|
585
798
|
/**
|
|
586
|
-
*
|
|
587
|
-
|
|
588
|
-
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>;
|
|
589
825
|
}, undefined>;
|
|
590
|
-
type
|
|
591
|
-
declare const
|
|
826
|
+
type StxCallContractParams = v.InferOutput<typeof stxCallContractParamsSchema>;
|
|
827
|
+
declare const stxCallContractResultSchema: v.ObjectSchema<{
|
|
592
828
|
/**
|
|
593
|
-
* The
|
|
829
|
+
* The ID of the transaction.
|
|
594
830
|
*/
|
|
595
|
-
readonly
|
|
831
|
+
readonly txid: v.StringSchema<undefined>;
|
|
596
832
|
/**
|
|
597
|
-
*
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
readonly txid: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
833
|
+
* A Stacks transaction as a hex-encoded string.
|
|
834
|
+
*/
|
|
835
|
+
readonly transaction: v.StringSchema<undefined>;
|
|
601
836
|
}, undefined>;
|
|
602
|
-
type
|
|
603
|
-
declare const
|
|
604
|
-
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>;
|
|
605
840
|
readonly params: v.ObjectSchema<{
|
|
606
841
|
/**
|
|
607
|
-
* The
|
|
842
|
+
* The contract principal.
|
|
843
|
+
*
|
|
844
|
+
* E.g. `"SPKE...GD5C.my-contract"`
|
|
608
845
|
*/
|
|
609
|
-
readonly
|
|
846
|
+
readonly contract: v.StringSchema<undefined>;
|
|
610
847
|
/**
|
|
611
|
-
* The
|
|
612
|
-
*
|
|
848
|
+
* The name of the function to call.
|
|
849
|
+
*
|
|
850
|
+
* Note: spec changes ongoing,
|
|
851
|
+
* https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
|
|
613
852
|
*/
|
|
614
|
-
readonly
|
|
853
|
+
readonly functionName: v.StringSchema<undefined>;
|
|
615
854
|
/**
|
|
616
|
-
*
|
|
617
|
-
|
|
618
|
-
readonly
|
|
619
|
-
}, undefined>;
|
|
620
|
-
readonly id: v.StringSchema<undefined>;
|
|
621
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
622
|
-
}, undefined>;
|
|
623
|
-
type SignPsbtRequestMessage = v.InferOutput<typeof signPsbtRequestMessageSchema>;
|
|
624
|
-
type SignPsbt = MethodParamsAndResult<SignPsbtParams, SignPsbtResult>;
|
|
625
|
-
declare const getAccountsMethodName = "getAccounts";
|
|
626
|
-
declare const getAccountsParamsSchema: v.ObjectSchema<{
|
|
627
|
-
/**
|
|
628
|
-
* The purposes for which to generate addresses. See
|
|
629
|
-
* {@linkcode AddressPurpose} for available purposes.
|
|
630
|
-
*/
|
|
631
|
-
readonly purposes: v.ArraySchema<v.EnumSchema<typeof AddressPurpose, undefined>, undefined>;
|
|
632
|
-
/**
|
|
633
|
-
* A message to be displayed to the user in the request prompt.
|
|
634
|
-
*/
|
|
635
|
-
readonly message: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
636
|
-
}, undefined>;
|
|
637
|
-
type GetAccountsParams = v.InferOutput<typeof getAccountsParamsSchema>;
|
|
638
|
-
declare const getAccountsResultSchema: v.ArraySchema<v.ObjectSchema<{
|
|
639
|
-
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
640
|
-
readonly address: v.StringSchema<undefined>;
|
|
641
|
-
readonly publicKey: v.StringSchema<undefined>;
|
|
642
|
-
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
643
|
-
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
644
|
-
}, undefined>, undefined>;
|
|
645
|
-
type GetAccountsResult = v.InferOutput<typeof getAccountsResultSchema>;
|
|
646
|
-
declare const getAccountsRequestMessageSchema: v.ObjectSchema<{
|
|
647
|
-
readonly method: v.LiteralSchema<"getAccounts", undefined>;
|
|
648
|
-
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>;
|
|
649
858
|
/**
|
|
650
|
-
* The
|
|
651
|
-
*
|
|
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
|
+
* ```
|
|
652
871
|
*/
|
|
653
|
-
readonly
|
|
872
|
+
readonly functionArgs: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
654
873
|
/**
|
|
655
|
-
*
|
|
874
|
+
* The post conditions to apply to the contract call.
|
|
656
875
|
*/
|
|
657
|
-
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>;
|
|
658
881
|
}, undefined>;
|
|
659
882
|
readonly id: v.StringSchema<undefined>;
|
|
660
883
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
661
884
|
}, undefined>;
|
|
662
|
-
type
|
|
663
|
-
type
|
|
664
|
-
|
|
665
|
-
declare const
|
|
666
|
-
|
|
667
|
-
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<{
|
|
668
890
|
/**
|
|
669
|
-
*
|
|
670
|
-
* messages not supporting bigint
|
|
671
|
-
* (https://issues.chromium.org/issues/40116184).
|
|
891
|
+
* Name of the contract.
|
|
672
892
|
*/
|
|
673
|
-
readonly
|
|
893
|
+
readonly name: v.StringSchema<undefined>;
|
|
674
894
|
/**
|
|
675
|
-
* The
|
|
676
|
-
* messages not supporting bigint
|
|
677
|
-
* (https://issues.chromium.org/issues/40116184).
|
|
895
|
+
* The source code of the Clarity contract.
|
|
678
896
|
*/
|
|
679
|
-
readonly
|
|
897
|
+
readonly clarityCode: v.StringSchema<undefined>;
|
|
680
898
|
/**
|
|
681
|
-
* The
|
|
682
|
-
* sats. Using a string due to chrome messages not supporting bigint
|
|
683
|
-
* (https://issues.chromium.org/issues/40116184).
|
|
899
|
+
* The version of the Clarity contract.
|
|
684
900
|
*/
|
|
685
|
-
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>;
|
|
686
910
|
}, undefined>;
|
|
687
|
-
type
|
|
688
|
-
declare const
|
|
689
|
-
|
|
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>;
|
|
690
947
|
readonly id: v.StringSchema<undefined>;
|
|
691
948
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
692
|
-
readonly params: v.OptionalSchema<v.UnionSchema<[v.ArraySchema<v.UnknownSchema, undefined>, v.LooseObjectSchema<{}, undefined>, v.NullSchema<undefined>], undefined>, undefined>;
|
|
693
949
|
}, undefined>;
|
|
694
|
-
type
|
|
695
|
-
type
|
|
950
|
+
type StxDeployContractRequestMessage = v.InferOutput<typeof stxDeployContractRequestMessageSchema>;
|
|
951
|
+
type StxDeployContract = MethodParamsAndResult<StxDeployContractParams, StxDeployContractResult>;
|
|
696
952
|
|
|
697
|
-
declare const
|
|
698
|
-
declare const
|
|
699
|
-
|
|
700
|
-
|
|
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>;
|
|
701
977
|
}, undefined>;
|
|
702
|
-
type
|
|
703
|
-
declare const
|
|
704
|
-
readonly
|
|
705
|
-
readonly
|
|
706
|
-
readonly
|
|
707
|
-
readonly
|
|
708
|
-
|
|
709
|
-
|
|
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<{
|
|
710
1001
|
readonly address: v.StringSchema<undefined>;
|
|
711
|
-
readonly
|
|
712
|
-
readonly
|
|
713
|
-
readonly
|
|
714
|
-
readonly
|
|
715
|
-
readonly timestamp: v.NumberSchema<undefined>;
|
|
716
|
-
readonly offset: v.NumberSchema<undefined>;
|
|
717
|
-
readonly genesisTransaction: v.StringSchema<undefined>;
|
|
718
|
-
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>;
|
|
719
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>;
|
|
720
1018
|
}, undefined>;
|
|
721
|
-
type
|
|
722
|
-
declare const
|
|
723
|
-
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>;
|
|
724
1055
|
readonly params: v.ObjectSchema<{
|
|
725
|
-
|
|
726
|
-
|
|
1056
|
+
/**
|
|
1057
|
+
* The message to sign.
|
|
1058
|
+
*/
|
|
1059
|
+
readonly message: v.StringSchema<undefined>;
|
|
727
1060
|
}, undefined>;
|
|
728
1061
|
readonly id: v.StringSchema<undefined>;
|
|
729
1062
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
730
1063
|
}, undefined>;
|
|
731
|
-
type
|
|
732
|
-
type
|
|
733
|
-
|
|
734
|
-
declare const
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
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>;
|
|
739
1081
|
}, undefined>;
|
|
740
|
-
type
|
|
741
|
-
declare const
|
|
742
|
-
|
|
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>;
|
|
743
1092
|
}, undefined>;
|
|
744
|
-
type
|
|
745
|
-
declare const
|
|
746
|
-
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>;
|
|
747
1096
|
readonly params: v.ObjectSchema<{
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
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>;
|
|
752
1109
|
}, undefined>;
|
|
753
1110
|
readonly id: v.StringSchema<undefined>;
|
|
754
1111
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
755
1112
|
}, undefined>;
|
|
756
|
-
type
|
|
757
|
-
type
|
|
1113
|
+
type StxSignStructuredMessageRequestMessage = v.InferOutput<typeof stxSignStructuredMessageRequestMessageSchema>;
|
|
1114
|
+
type StxSignStructuredMessage = MethodParamsAndResult<StxSignStructuredMessageParams, StxSignStructuredMessageResult>;
|
|
758
1115
|
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
networkFee: number;
|
|
775
|
-
serviceFee: number;
|
|
776
|
-
appServiceFee: number;
|
|
777
|
-
};
|
|
778
|
-
};
|
|
779
|
-
type CreateEtchOrderRequest = {
|
|
780
|
-
runeName: string;
|
|
781
|
-
divisibility?: number;
|
|
782
|
-
symbol?: string;
|
|
783
|
-
premine?: string;
|
|
784
|
-
isMintable: boolean;
|
|
785
|
-
terms?: {
|
|
786
|
-
amount?: string;
|
|
787
|
-
cap?: string;
|
|
788
|
-
heightStart?: string;
|
|
789
|
-
heightEnd?: string;
|
|
790
|
-
offsetStart?: string;
|
|
791
|
-
offsetEnd?: string;
|
|
792
|
-
};
|
|
793
|
-
inscriptionDetails?: {
|
|
794
|
-
contentType: string;
|
|
795
|
-
contentBase64: string;
|
|
796
|
-
};
|
|
797
|
-
delegateInscriptionId?: string;
|
|
798
|
-
destinationAddress: string;
|
|
799
|
-
refundAddress: string;
|
|
800
|
-
feeRate: number;
|
|
801
|
-
appServiceFee?: number;
|
|
802
|
-
appServiceFeeAddress?: string;
|
|
803
|
-
};
|
|
804
|
-
type EstimateEtchOrderRequest = Omit<CreateEtchOrderRequest, 'refundAddress'>;
|
|
805
|
-
type GetOrderRequest = {
|
|
806
|
-
id: string;
|
|
807
|
-
};
|
|
808
|
-
type GetOrderResponse = {
|
|
809
|
-
id: string;
|
|
810
|
-
orderType: 'rune_mint' | 'rune_etch';
|
|
811
|
-
state: 'new' | 'pending' | 'executing' | 'complete' | 'failed' | 'refunded' | 'stale';
|
|
812
|
-
fundingAddress: string;
|
|
813
|
-
reason?: string;
|
|
814
|
-
createdAt: string;
|
|
815
|
-
};
|
|
816
|
-
type RBFOrderRequest = {
|
|
817
|
-
orderId: string;
|
|
818
|
-
newFeeRate: number;
|
|
819
|
-
};
|
|
820
|
-
type RBFOrderResponse = {
|
|
821
|
-
rbfCost: number;
|
|
822
|
-
fundingAddress: string;
|
|
823
|
-
};
|
|
824
|
-
|
|
825
|
-
interface RunesEstimateEtchParams extends EstimateEtchOrderRequest {
|
|
826
|
-
network?: BitcoinNetworkType;
|
|
827
|
-
}
|
|
828
|
-
type RunesEstimateEtchResult = EstimateOrderResponse;
|
|
829
|
-
type RunesEstimateEtch = MethodParamsAndResult<RunesEstimateEtchParams, RunesEstimateEtchResult>;
|
|
830
|
-
|
|
831
|
-
interface runesEstimateMintParams extends EstimateMintOrderRequest {
|
|
832
|
-
network?: BitcoinNetworkType;
|
|
833
|
-
}
|
|
834
|
-
type runesEstimateMintResult = EstimateOrderResponse;
|
|
835
|
-
type RunesEstimateMint = MethodParamsAndResult<runesEstimateMintParams, runesEstimateMintResult>;
|
|
836
|
-
|
|
837
|
-
interface RunesEstimateRbfOrderParams extends RBFOrderRequest {
|
|
838
|
-
network?: BitcoinNetworkType;
|
|
839
|
-
}
|
|
840
|
-
type RunesEstimateRbfOrder = MethodParamsAndResult<RunesEstimateRbfOrderParams, RBFOrderResponse>;
|
|
841
|
-
|
|
842
|
-
declare const runesEtchMethodName = "runes_etch";
|
|
843
|
-
declare const runesEtchParamsSchema: v.ObjectSchema<{
|
|
844
|
-
readonly runeName: v.StringSchema<undefined>;
|
|
845
|
-
readonly divisibility: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
846
|
-
readonly symbol: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
847
|
-
readonly premine: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
848
|
-
readonly isMintable: v.BooleanSchema<undefined>;
|
|
849
|
-
readonly delegateInscriptionId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
850
|
-
readonly destinationAddress: v.StringSchema<undefined>;
|
|
851
|
-
readonly refundAddress: v.StringSchema<undefined>;
|
|
852
|
-
readonly feeRate: v.NumberSchema<undefined>;
|
|
853
|
-
readonly appServiceFee: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
854
|
-
readonly appServiceFeeAddress: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
855
|
-
readonly terms: v.OptionalSchema<v.ObjectSchema<{
|
|
856
|
-
readonly amount: v.StringSchema<undefined>;
|
|
857
|
-
readonly cap: v.StringSchema<undefined>;
|
|
858
|
-
readonly heightStart: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
859
|
-
readonly heightEnd: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
860
|
-
readonly offsetStart: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
861
|
-
readonly offsetEnd: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
862
|
-
}, undefined>, undefined>;
|
|
863
|
-
readonly inscriptionDetails: v.OptionalSchema<v.ObjectSchema<{
|
|
864
|
-
readonly contentType: v.StringSchema<undefined>;
|
|
865
|
-
readonly contentBase64: v.StringSchema<undefined>;
|
|
866
|
-
}, undefined>, undefined>;
|
|
867
|
-
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>;
|
|
868
1131
|
}, undefined>;
|
|
869
|
-
type
|
|
870
|
-
declare const
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
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>;
|
|
874
1138
|
}, undefined>;
|
|
875
|
-
type
|
|
876
|
-
declare const
|
|
877
|
-
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>;
|
|
878
1142
|
readonly params: v.ObjectSchema<{
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
readonly
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
readonly
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
readonly cap: v.StringSchema<undefined>;
|
|
893
|
-
readonly heightStart: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
894
|
-
readonly heightEnd: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
895
|
-
readonly offsetStart: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
896
|
-
readonly offsetEnd: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
897
|
-
}, undefined>, undefined>;
|
|
898
|
-
readonly inscriptionDetails: v.OptionalSchema<v.ObjectSchema<{
|
|
899
|
-
readonly contentType: v.StringSchema<undefined>;
|
|
900
|
-
readonly contentBase64: v.StringSchema<undefined>;
|
|
901
|
-
}, undefined>, undefined>;
|
|
902
|
-
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>;
|
|
903
1156
|
}, undefined>;
|
|
904
1157
|
readonly id: v.StringSchema<undefined>;
|
|
905
1158
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
906
1159
|
}, undefined>;
|
|
907
|
-
type
|
|
908
|
-
type
|
|
1160
|
+
type StxSignTransactionRequestMessage = v.InferOutput<typeof stxSignTransactionRequestMessageSchema>;
|
|
1161
|
+
type StxSignTransaction = MethodParamsAndResult<StxSignTransactionParams, StxSignTransactionResult>;
|
|
909
1162
|
|
|
910
|
-
declare const
|
|
911
|
-
declare const
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
}, 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>;
|
|
922
1174
|
}, undefined>;
|
|
923
|
-
type
|
|
924
|
-
declare const
|
|
925
|
-
|
|
926
|
-
|
|
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>;
|
|
927
1197
|
readonly id: v.StringSchema<undefined>;
|
|
928
1198
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
929
1199
|
}, undefined>;
|
|
930
|
-
type
|
|
931
|
-
type
|
|
932
|
-
|
|
933
|
-
interface RunesGetOrderParams extends GetOrderRequest {
|
|
934
|
-
network?: BitcoinNetworkType;
|
|
935
|
-
}
|
|
936
|
-
type RunesGetOrder = MethodParamsAndResult<RunesGetOrderParams, GetOrderResponse>;
|
|
1200
|
+
type StxSignTransactionsRequestMessage = v.InferOutput<typeof stxSignTransactionsRequestMessageSchema>;
|
|
1201
|
+
type StxSignTransactions = MethodParamsAndResult<StxSignTransactionsParams, StxSignTransactionsResult>;
|
|
937
1202
|
|
|
938
|
-
declare const
|
|
939
|
-
declare const
|
|
940
|
-
readonly appServiceFee: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
941
|
-
readonly appServiceFeeAddress: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
942
|
-
readonly destinationAddress: v.StringSchema<undefined>;
|
|
943
|
-
readonly feeRate: v.NumberSchema<undefined>;
|
|
944
|
-
readonly refundAddress: v.StringSchema<undefined>;
|
|
945
|
-
readonly repeats: v.NumberSchema<undefined>;
|
|
946
|
-
readonly runeName: v.StringSchema<undefined>;
|
|
947
|
-
readonly network: v.OptionalSchema<v.EnumSchema<typeof BitcoinNetworkType, undefined>, undefined>;
|
|
948
|
-
}, undefined>;
|
|
949
|
-
type RunesMintParams = v.InferOutput<typeof runesMintParamsSchema>;
|
|
950
|
-
declare const runesMintResultSchema: v.ObjectSchema<{
|
|
951
|
-
readonly orderId: v.StringSchema<undefined>;
|
|
952
|
-
readonly fundTransactionId: v.StringSchema<undefined>;
|
|
953
|
-
readonly fundingAddress: v.StringSchema<undefined>;
|
|
954
|
-
}, undefined>;
|
|
955
|
-
type RunesMintResult = v.InferOutput<typeof runesMintResultSchema>;
|
|
956
|
-
declare const runesMintRequestMessageSchema: v.ObjectSchema<{
|
|
957
|
-
readonly method: v.LiteralSchema<"runes_mint", undefined>;
|
|
958
|
-
readonly params: v.ObjectSchema<{
|
|
959
|
-
readonly appServiceFee: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
960
|
-
readonly appServiceFeeAddress: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
961
|
-
readonly destinationAddress: v.StringSchema<undefined>;
|
|
962
|
-
readonly feeRate: v.NumberSchema<undefined>;
|
|
963
|
-
readonly refundAddress: v.StringSchema<undefined>;
|
|
964
|
-
readonly repeats: v.NumberSchema<undefined>;
|
|
965
|
-
readonly runeName: v.StringSchema<undefined>;
|
|
966
|
-
readonly network: v.OptionalSchema<v.EnumSchema<typeof BitcoinNetworkType, undefined>, undefined>;
|
|
967
|
-
}, undefined>;
|
|
968
|
-
readonly id: v.StringSchema<undefined>;
|
|
969
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
970
|
-
}, undefined>;
|
|
971
|
-
type RunesMintRequestMessage = v.InferOutput<typeof runesMintRequestMessageSchema>;
|
|
972
|
-
type RunesMint = MethodParamsAndResult<v.InferOutput<typeof runesMintParamsSchema>, v.InferOutput<typeof runesMintResultSchema>>;
|
|
973
|
-
|
|
974
|
-
interface RunesRbfOrderParams extends RBFOrderRequest {
|
|
975
|
-
network?: BitcoinNetworkType;
|
|
976
|
-
}
|
|
977
|
-
interface RunesRbfOrderResult {
|
|
978
|
-
orderId: string;
|
|
979
|
-
fundRBFTransactionId: string;
|
|
980
|
-
fundingAddress: string;
|
|
981
|
-
}
|
|
982
|
-
type RunesRbfOrder = MethodParamsAndResult<RunesRbfOrderParams, RunesRbfOrderResult>;
|
|
983
|
-
|
|
984
|
-
declare const runesTransferMethodName = "runes_transfer";
|
|
985
|
-
declare const runesTransferParamsSchema: v.ObjectSchema<{
|
|
986
|
-
readonly recipients: v.ArraySchema<v.ObjectSchema<{
|
|
987
|
-
readonly runeName: v.StringSchema<undefined>;
|
|
988
|
-
readonly amount: v.StringSchema<undefined>;
|
|
989
|
-
readonly address: v.StringSchema<undefined>;
|
|
990
|
-
}, undefined>, undefined>;
|
|
991
|
-
}, undefined>;
|
|
992
|
-
type TransferRunesParams = v.InferOutput<typeof runesTransferParamsSchema>;
|
|
993
|
-
declare const runesTransferResultSchema: v.ObjectSchema<{
|
|
994
|
-
readonly txid: v.StringSchema<undefined>;
|
|
995
|
-
}, undefined>;
|
|
996
|
-
type RunesTransferResult = v.InferOutput<typeof runesTransferResultSchema>;
|
|
997
|
-
declare const runesTransferRequestMessageSchema: v.ObjectSchema<{
|
|
998
|
-
readonly method: v.LiteralSchema<"runes_transfer", undefined>;
|
|
999
|
-
readonly params: v.ObjectSchema<{
|
|
1000
|
-
readonly recipients: v.ArraySchema<v.ObjectSchema<{
|
|
1001
|
-
readonly runeName: v.StringSchema<undefined>;
|
|
1002
|
-
readonly amount: v.StringSchema<undefined>;
|
|
1003
|
-
readonly address: v.StringSchema<undefined>;
|
|
1004
|
-
}, undefined>, undefined>;
|
|
1005
|
-
}, undefined>;
|
|
1006
|
-
readonly id: v.StringSchema<undefined>;
|
|
1007
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1008
|
-
}, undefined>;
|
|
1009
|
-
type RunesTransferRequestMessage = v.InferOutput<typeof runesTransferRequestMessageSchema>;
|
|
1010
|
-
type RunesTransfer = MethodParamsAndResult<TransferRunesParams, RunesTransferResult>;
|
|
1011
|
-
|
|
1012
|
-
declare const sparkFlashnetGetJwtMethodName = "spark_flashnet_getJwt";
|
|
1013
|
-
declare const sparkFlashnetGetJwtParamsSchema: v.NullishSchema<v.ObjectSchema<{
|
|
1014
|
-
/**
|
|
1015
|
-
* A message to be displayed to the user in the request prompt.
|
|
1016
|
-
*/
|
|
1017
|
-
readonly message: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1018
|
-
}, undefined>, undefined>;
|
|
1019
|
-
type SparkFlashnetGetJwtParams = v.InferOutput<typeof sparkFlashnetGetJwtParamsSchema>;
|
|
1020
|
-
declare const sparkFlashnetGetJwtResultSchema: v.ObjectSchema<{
|
|
1203
|
+
declare const stxTransferStxMethodName = "stx_transferStx";
|
|
1204
|
+
declare const stxTransferStxParamsSchema: v.ObjectSchema<{
|
|
1021
1205
|
/**
|
|
1022
|
-
*
|
|
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
|
+
* ```
|
|
1023
1216
|
*/
|
|
1024
|
-
readonly
|
|
1025
|
-
}, undefined>;
|
|
1026
|
-
type SparkFlashnetGetJwtResult = v.InferOutput<typeof sparkFlashnetGetJwtResultSchema>;
|
|
1027
|
-
declare const sparkFlashnetGetJwtRequestMessageSchema: v.ObjectSchema<{
|
|
1028
|
-
readonly method: v.LiteralSchema<"spark_flashnet_getJwt", undefined>;
|
|
1029
|
-
readonly params: v.NullishSchema<v.ObjectSchema<{
|
|
1030
|
-
/**
|
|
1031
|
-
* A message to be displayed to the user in the request prompt.
|
|
1032
|
-
*/
|
|
1033
|
-
readonly message: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1034
|
-
}, undefined>, undefined>;
|
|
1035
|
-
readonly id: v.StringSchema<undefined>;
|
|
1036
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1037
|
-
}, undefined>;
|
|
1038
|
-
type SparkFlashnetGetJwtRequestMessage = v.InferOutput<typeof sparkFlashnetGetJwtRequestMessageSchema>;
|
|
1039
|
-
type SparkFlashnetGetJwt = MethodParamsAndResult<SparkFlashnetGetJwtParams, SparkFlashnetGetJwtResult>;
|
|
1040
|
-
|
|
1041
|
-
declare enum FlashnetIntentType {
|
|
1042
|
-
Swap = "swap",
|
|
1043
|
-
RouteSwap = "route-swap"
|
|
1044
|
-
}
|
|
1045
|
-
|
|
1046
|
-
declare const sparkFlashnetRouteSwapIntentSchema: v.ObjectSchema<{
|
|
1047
|
-
readonly intentType: v.LiteralSchema<FlashnetIntentType.RouteSwap, undefined>;
|
|
1048
|
-
readonly userPublicKey: v.StringSchema<undefined>;
|
|
1049
|
-
readonly initialSparkTransferId: v.StringSchema<undefined>;
|
|
1050
|
-
readonly hops: v.ArraySchema<v.ObjectSchema<{
|
|
1051
|
-
readonly poolId: v.StringSchema<undefined>;
|
|
1052
|
-
readonly assetInAddress: v.StringSchema<undefined>;
|
|
1053
|
-
readonly assetOutAddress: v.StringSchema<undefined>;
|
|
1054
|
-
readonly hopIntegratorFeeRateBps: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1055
|
-
}, undefined>, undefined>;
|
|
1056
|
-
readonly inputAmount: v.StringSchema<undefined>;
|
|
1057
|
-
readonly maxRouteSlippageBps: v.NumberSchema<undefined>;
|
|
1058
|
-
readonly minAmountOut: v.StringSchema<undefined>;
|
|
1059
|
-
readonly defaultIntegratorFeeRateBps: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1060
|
-
readonly nonce: v.StringSchema<undefined>;
|
|
1061
|
-
}, undefined>;
|
|
1062
|
-
|
|
1063
|
-
declare const sparkFlashnetSwapIntentSchema: v.ObjectSchema<{
|
|
1064
|
-
readonly intentType: v.LiteralSchema<FlashnetIntentType.Swap, undefined>;
|
|
1065
|
-
readonly userPublicKey: v.StringSchema<undefined>;
|
|
1066
|
-
readonly poolId: v.StringSchema<undefined>;
|
|
1067
|
-
readonly transferId: v.StringSchema<undefined>;
|
|
1068
|
-
readonly assetInAddress: v.StringSchema<undefined>;
|
|
1069
|
-
readonly assetOutAddress: v.StringSchema<undefined>;
|
|
1070
|
-
readonly amountIn: v.StringSchema<undefined>;
|
|
1071
|
-
readonly maxSlippageBps: v.NumberSchema<undefined>;
|
|
1072
|
-
readonly minAmountOut: v.StringSchema<undefined>;
|
|
1073
|
-
readonly totalIntegratorFeeRateBps: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1074
|
-
readonly nonce: v.StringSchema<undefined>;
|
|
1075
|
-
}, undefined>;
|
|
1076
|
-
|
|
1077
|
-
declare const sparkFlashnetSignIntentMethodName = "spark_flashnet_signIntent";
|
|
1078
|
-
declare const sparkFlashnetSignIntentParamsSchema: v.UnionSchema<[v.ObjectSchema<{
|
|
1079
|
-
readonly intentType: v.LiteralSchema<FlashnetIntentType.Swap, undefined>;
|
|
1080
|
-
readonly userPublicKey: v.StringSchema<undefined>;
|
|
1081
|
-
readonly poolId: v.StringSchema<undefined>;
|
|
1082
|
-
readonly transferId: v.StringSchema<undefined>;
|
|
1083
|
-
readonly assetInAddress: v.StringSchema<undefined>;
|
|
1084
|
-
readonly assetOutAddress: v.StringSchema<undefined>;
|
|
1085
|
-
readonly amountIn: v.StringSchema<undefined>;
|
|
1086
|
-
readonly maxSlippageBps: v.NumberSchema<undefined>;
|
|
1087
|
-
readonly minAmountOut: v.StringSchema<undefined>;
|
|
1088
|
-
readonly totalIntegratorFeeRateBps: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1089
|
-
readonly nonce: v.StringSchema<undefined>;
|
|
1090
|
-
}, undefined>, v.ObjectSchema<{
|
|
1091
|
-
readonly intentType: v.LiteralSchema<FlashnetIntentType.RouteSwap, undefined>;
|
|
1092
|
-
readonly userPublicKey: v.StringSchema<undefined>;
|
|
1093
|
-
readonly initialSparkTransferId: v.StringSchema<undefined>;
|
|
1094
|
-
readonly hops: v.ArraySchema<v.ObjectSchema<{
|
|
1095
|
-
readonly poolId: v.StringSchema<undefined>;
|
|
1096
|
-
readonly assetInAddress: v.StringSchema<undefined>;
|
|
1097
|
-
readonly assetOutAddress: v.StringSchema<undefined>;
|
|
1098
|
-
readonly hopIntegratorFeeRateBps: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1099
|
-
}, undefined>, undefined>;
|
|
1100
|
-
readonly inputAmount: v.StringSchema<undefined>;
|
|
1101
|
-
readonly maxRouteSlippageBps: v.NumberSchema<undefined>;
|
|
1102
|
-
readonly minAmountOut: v.StringSchema<undefined>;
|
|
1103
|
-
readonly defaultIntegratorFeeRateBps: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1104
|
-
readonly nonce: v.StringSchema<undefined>;
|
|
1105
|
-
}, undefined>], undefined>;
|
|
1106
|
-
type SparkFlashnetSignIntentParams = v.InferOutput<typeof sparkFlashnetSignIntentParamsSchema>;
|
|
1107
|
-
declare const sparkFlashnetSignIntentResultSchema: v.ObjectSchema<{
|
|
1217
|
+
readonly amount: v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>], undefined>;
|
|
1108
1218
|
/**
|
|
1109
|
-
* The
|
|
1219
|
+
* The recipient's principal.
|
|
1110
1220
|
*/
|
|
1111
|
-
readonly
|
|
1112
|
-
}, undefined>;
|
|
1113
|
-
type SparkFlashnetSignIntentResult = v.InferOutput<typeof sparkFlashnetSignIntentResultSchema>;
|
|
1114
|
-
declare const sparkFlashnetSignIntentRequestMessageSchema: v.ObjectSchema<{
|
|
1115
|
-
readonly method: v.LiteralSchema<"spark_flashnet_signIntent", undefined>;
|
|
1116
|
-
readonly params: v.UnionSchema<[v.ObjectSchema<{
|
|
1117
|
-
readonly intentType: v.LiteralSchema<FlashnetIntentType.Swap, undefined>;
|
|
1118
|
-
readonly userPublicKey: v.StringSchema<undefined>;
|
|
1119
|
-
readonly poolId: v.StringSchema<undefined>;
|
|
1120
|
-
readonly transferId: v.StringSchema<undefined>;
|
|
1121
|
-
readonly assetInAddress: v.StringSchema<undefined>;
|
|
1122
|
-
readonly assetOutAddress: v.StringSchema<undefined>;
|
|
1123
|
-
readonly amountIn: v.StringSchema<undefined>;
|
|
1124
|
-
readonly maxSlippageBps: v.NumberSchema<undefined>;
|
|
1125
|
-
readonly minAmountOut: v.StringSchema<undefined>;
|
|
1126
|
-
readonly totalIntegratorFeeRateBps: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1127
|
-
readonly nonce: v.StringSchema<undefined>;
|
|
1128
|
-
}, undefined>, v.ObjectSchema<{
|
|
1129
|
-
readonly intentType: v.LiteralSchema<FlashnetIntentType.RouteSwap, undefined>;
|
|
1130
|
-
readonly userPublicKey: v.StringSchema<undefined>;
|
|
1131
|
-
readonly initialSparkTransferId: v.StringSchema<undefined>;
|
|
1132
|
-
readonly hops: v.ArraySchema<v.ObjectSchema<{
|
|
1133
|
-
readonly poolId: v.StringSchema<undefined>;
|
|
1134
|
-
readonly assetInAddress: v.StringSchema<undefined>;
|
|
1135
|
-
readonly assetOutAddress: v.StringSchema<undefined>;
|
|
1136
|
-
readonly hopIntegratorFeeRateBps: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1137
|
-
}, undefined>, undefined>;
|
|
1138
|
-
readonly inputAmount: v.StringSchema<undefined>;
|
|
1139
|
-
readonly maxRouteSlippageBps: v.NumberSchema<undefined>;
|
|
1140
|
-
readonly minAmountOut: v.StringSchema<undefined>;
|
|
1141
|
-
readonly defaultIntegratorFeeRateBps: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1142
|
-
readonly nonce: v.StringSchema<undefined>;
|
|
1143
|
-
}, undefined>], undefined>;
|
|
1144
|
-
readonly id: v.StringSchema<undefined>;
|
|
1145
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1146
|
-
}, undefined>;
|
|
1147
|
-
type SparkFlashnetSignIntentRequestMessage = v.InferOutput<typeof sparkFlashnetSignIntentRequestMessageSchema>;
|
|
1148
|
-
type SparkFlashnetSignIntent = MethodParamsAndResult<SparkFlashnetSignIntentParams, SparkFlashnetSignIntentResult>;
|
|
1149
|
-
|
|
1150
|
-
declare const sparkGetAddressesMethodName = "spark_getAddresses";
|
|
1151
|
-
declare const sparkGetAddressesParamsSchema: v.NullishSchema<v.ObjectSchema<{
|
|
1221
|
+
readonly recipient: v.StringSchema<undefined>;
|
|
1152
1222
|
/**
|
|
1153
|
-
* A
|
|
1223
|
+
* A string representing the memo.
|
|
1154
1224
|
*/
|
|
1155
|
-
readonly
|
|
1156
|
-
}, undefined>, undefined>;
|
|
1157
|
-
type SparkGetAddressesParams = v.InferOutput<typeof sparkGetAddressesParamsSchema>;
|
|
1158
|
-
declare const sparkGetAddressesResultSchema: v.ObjectSchema<{
|
|
1225
|
+
readonly memo: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1159
1226
|
/**
|
|
1160
|
-
*
|
|
1227
|
+
* Version of parameter format.
|
|
1161
1228
|
*/
|
|
1162
|
-
readonly
|
|
1163
|
-
readonly address: v.StringSchema<undefined>;
|
|
1164
|
-
readonly publicKey: v.StringSchema<undefined>;
|
|
1165
|
-
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
1166
|
-
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
1167
|
-
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1168
|
-
}, undefined>, undefined>;
|
|
1169
|
-
readonly network: v.ObjectSchema<{
|
|
1170
|
-
readonly bitcoin: v.ObjectSchema<{
|
|
1171
|
-
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1172
|
-
}, undefined>;
|
|
1173
|
-
readonly stacks: v.ObjectSchema<{
|
|
1174
|
-
readonly name: v.EnumSchema<typeof StacksNetworkType, undefined>;
|
|
1175
|
-
}, undefined>;
|
|
1176
|
-
readonly spark: v.ObjectSchema<{
|
|
1177
|
-
readonly name: v.EnumSchema<typeof SparkNetworkType, undefined>;
|
|
1178
|
-
}, undefined>;
|
|
1179
|
-
}, undefined>;
|
|
1180
|
-
}, undefined>;
|
|
1181
|
-
type SparkGetAddressesResult = v.InferOutput<typeof sparkGetAddressesResultSchema>;
|
|
1182
|
-
declare const sparkGetAddressesRequestMessageSchema: v.ObjectSchema<{
|
|
1183
|
-
readonly method: v.LiteralSchema<"spark_getAddresses", undefined>;
|
|
1184
|
-
readonly params: v.NullishSchema<v.ObjectSchema<{
|
|
1185
|
-
/**
|
|
1186
|
-
* A message to be displayed to the user in the request prompt.
|
|
1187
|
-
*/
|
|
1188
|
-
readonly message: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1189
|
-
}, undefined>, undefined>;
|
|
1190
|
-
readonly id: v.StringSchema<undefined>;
|
|
1191
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1192
|
-
}, undefined>;
|
|
1193
|
-
type SparkGetAddressesRequestMessage = v.InferOutput<typeof sparkGetAddressesRequestMessageSchema>;
|
|
1194
|
-
type SparkGetAddresses = MethodParamsAndResult<v.InferOutput<typeof sparkGetAddressesParamsSchema>, v.InferOutput<typeof sparkGetAddressesResultSchema>>;
|
|
1195
|
-
|
|
1196
|
-
declare const sparkGetBalanceMethodName = "spark_getBalance";
|
|
1197
|
-
declare const sparkGetBalanceParamsSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1198
|
-
type SparkGetBalanceParams = v.InferOutput<typeof sparkGetBalanceParamsSchema>;
|
|
1199
|
-
declare const sparkGetBalanceResultSchema: v.ObjectSchema<{
|
|
1229
|
+
readonly version: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1200
1230
|
/**
|
|
1201
|
-
* The
|
|
1231
|
+
* The mode of the post conditions.
|
|
1202
1232
|
*/
|
|
1203
|
-
readonly
|
|
1204
|
-
readonly tokenBalances: v.ArraySchema<v.ObjectSchema<{
|
|
1205
|
-
readonly balance: v.StringSchema<undefined>;
|
|
1206
|
-
readonly tokenMetadata: v.ObjectSchema<{
|
|
1207
|
-
readonly tokenIdentifier: v.StringSchema<undefined>;
|
|
1208
|
-
readonly tokenName: v.StringSchema<undefined>;
|
|
1209
|
-
readonly tokenTicker: v.StringSchema<undefined>;
|
|
1210
|
-
readonly decimals: v.NumberSchema<undefined>;
|
|
1211
|
-
readonly maxSupply: v.StringSchema<undefined>;
|
|
1212
|
-
}, undefined>;
|
|
1213
|
-
}, undefined>, undefined>;
|
|
1214
|
-
}, undefined>;
|
|
1215
|
-
type SparkGetBalanceResult = v.InferOutput<typeof sparkGetBalanceResultSchema>;
|
|
1216
|
-
declare const sparkGetBalanceRequestMessageSchema: v.ObjectSchema<{
|
|
1217
|
-
readonly method: v.LiteralSchema<"spark_getBalance", undefined>;
|
|
1218
|
-
readonly params: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1219
|
-
readonly id: v.StringSchema<undefined>;
|
|
1220
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1221
|
-
}, undefined>;
|
|
1222
|
-
type SparkGetBalanceRequestMessage = v.InferOutput<typeof sparkGetBalanceRequestMessageSchema>;
|
|
1223
|
-
type SparkGetBalance = MethodParamsAndResult<SparkGetBalanceParams, SparkGetBalanceResult>;
|
|
1224
|
-
|
|
1225
|
-
declare const sparkTransferMethodName = "spark_transfer";
|
|
1226
|
-
declare const sparkTransferParamsSchema: v.ObjectSchema<{
|
|
1233
|
+
readonly postConditionMode: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1227
1234
|
/**
|
|
1228
|
-
*
|
|
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
|
+
* ```
|
|
1229
1245
|
*/
|
|
1230
|
-
readonly
|
|
1246
|
+
readonly postConditions: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
1231
1247
|
/**
|
|
1232
|
-
* The
|
|
1248
|
+
* The public key to sign the transaction with. The wallet may use any key
|
|
1249
|
+
* when not provided.
|
|
1233
1250
|
*/
|
|
1234
|
-
readonly
|
|
1251
|
+
readonly pubkey: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1235
1252
|
}, undefined>;
|
|
1236
|
-
type
|
|
1237
|
-
declare const
|
|
1253
|
+
type StxTransferStxParams = v.InferOutput<typeof stxTransferStxParamsSchema>;
|
|
1254
|
+
declare const stxTransferStxResultSchema: v.ObjectSchema<{
|
|
1238
1255
|
/**
|
|
1239
1256
|
* The ID of the transaction.
|
|
1240
1257
|
*/
|
|
1241
|
-
readonly
|
|
1258
|
+
readonly txid: v.StringSchema<undefined>;
|
|
1259
|
+
/**
|
|
1260
|
+
* A Stacks transaction as a hex-encoded string.
|
|
1261
|
+
*/
|
|
1262
|
+
readonly transaction: v.StringSchema<undefined>;
|
|
1242
1263
|
}, undefined>;
|
|
1243
|
-
type
|
|
1244
|
-
declare const
|
|
1245
|
-
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>;
|
|
1246
1267
|
readonly params: v.ObjectSchema<{
|
|
1247
1268
|
/**
|
|
1248
|
-
* 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
|
+
* ```
|
|
1249
1279
|
*/
|
|
1250
|
-
readonly
|
|
1280
|
+
readonly amount: v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>], undefined>;
|
|
1251
1281
|
/**
|
|
1252
|
-
* The recipient's
|
|
1282
|
+
* The recipient's principal.
|
|
1253
1283
|
*/
|
|
1254
|
-
readonly
|
|
1255
|
-
}, undefined>;
|
|
1256
|
-
readonly id: v.StringSchema<undefined>;
|
|
1257
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1258
|
-
}, undefined>;
|
|
1259
|
-
type SparkTransferRequestMessage = v.InferOutput<typeof sparkTransferRequestMessageSchema>;
|
|
1260
|
-
type SparkTransfer = MethodParamsAndResult<SparkTransferParams, SparkTransferResult>;
|
|
1261
|
-
|
|
1262
|
-
declare const sparkTransferTokenMethodName = "spark_transferToken";
|
|
1263
|
-
declare const sparkTransferTokenParamsSchema: v.ObjectSchema<{
|
|
1264
|
-
/**
|
|
1265
|
-
* Amount of units of the token to transfer as a string or number.
|
|
1266
|
-
*/
|
|
1267
|
-
readonly tokenAmount: v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>], undefined>;
|
|
1268
|
-
/**
|
|
1269
|
-
* The Bech32m token identifier.
|
|
1270
|
-
*/
|
|
1271
|
-
readonly tokenIdentifier: v.StringSchema<undefined>;
|
|
1272
|
-
/**
|
|
1273
|
-
* The recipient's spark address.
|
|
1274
|
-
*/
|
|
1275
|
-
readonly receiverSparkAddress: v.StringSchema<undefined>;
|
|
1276
|
-
}, undefined>;
|
|
1277
|
-
type SparkTransferTokenParams = v.InferOutput<typeof sparkTransferTokenParamsSchema>;
|
|
1278
|
-
declare const sparkTransferTokenResultSchema: v.ObjectSchema<{
|
|
1279
|
-
/**
|
|
1280
|
-
* The ID of the transaction.
|
|
1281
|
-
*/
|
|
1282
|
-
readonly id: v.StringSchema<undefined>;
|
|
1283
|
-
}, undefined>;
|
|
1284
|
-
type SparkTransferTokenResult = v.InferOutput<typeof sparkTransferTokenResultSchema>;
|
|
1285
|
-
declare const sparkTransferTokenRequestMessageSchema: v.ObjectSchema<{
|
|
1286
|
-
readonly method: v.LiteralSchema<"spark_transferToken", undefined>;
|
|
1287
|
-
readonly params: v.ObjectSchema<{
|
|
1288
|
-
/**
|
|
1289
|
-
* Amount of units of the token to transfer as a string or number.
|
|
1290
|
-
*/
|
|
1291
|
-
readonly tokenAmount: v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>], undefined>;
|
|
1292
|
-
/**
|
|
1293
|
-
* The Bech32m token identifier.
|
|
1294
|
-
*/
|
|
1295
|
-
readonly tokenIdentifier: v.StringSchema<undefined>;
|
|
1296
|
-
/**
|
|
1297
|
-
* The recipient's spark address.
|
|
1298
|
-
*/
|
|
1299
|
-
readonly receiverSparkAddress: v.StringSchema<undefined>;
|
|
1300
|
-
}, undefined>;
|
|
1301
|
-
readonly id: v.StringSchema<undefined>;
|
|
1302
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1303
|
-
}, undefined>;
|
|
1304
|
-
type SparkTransferTokenRequestMessage = v.InferOutput<typeof sparkTransferTokenRequestMessageSchema>;
|
|
1305
|
-
type SparkTransferToken = MethodParamsAndResult<SparkTransferTokenParams, SparkTransferTokenResult>;
|
|
1306
|
-
|
|
1307
|
-
declare const stxCallContractMethodName = "stx_callContract";
|
|
1308
|
-
declare const stxCallContractParamsSchema: v.ObjectSchema<{
|
|
1309
|
-
/**
|
|
1310
|
-
* The contract principal.
|
|
1311
|
-
*
|
|
1312
|
-
* E.g. `"SPKE...GD5C.my-contract"`
|
|
1313
|
-
*/
|
|
1314
|
-
readonly contract: v.StringSchema<undefined>;
|
|
1315
|
-
/**
|
|
1316
|
-
* The name of the function to call.
|
|
1317
|
-
*
|
|
1318
|
-
* Note: spec changes ongoing,
|
|
1319
|
-
* https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
|
|
1320
|
-
*/
|
|
1321
|
-
readonly functionName: v.StringSchema<undefined>;
|
|
1322
|
-
/**
|
|
1323
|
-
* @deprecated in favor of `functionArgs` for @stacks/connect compatibility
|
|
1324
|
-
*/
|
|
1325
|
-
readonly arguments: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
1326
|
-
/**
|
|
1327
|
-
* The function's arguments. The arguments are expected to be hex-encoded
|
|
1328
|
-
* strings of Clarity values.
|
|
1329
|
-
*
|
|
1330
|
-
* To convert Clarity values to their hex representation, the `cvToHex`
|
|
1331
|
-
* helper from the `@stacks/transactions` package may be helpful.
|
|
1332
|
-
*
|
|
1333
|
-
* ```js
|
|
1334
|
-
* import { cvToHex } from '@stacks/transactions';
|
|
1335
|
-
*
|
|
1336
|
-
* const functionArgs = [someClarityValue1, someClarityValue2];
|
|
1337
|
-
* const hexArgs = functionArgs.map(cvToHex);
|
|
1338
|
-
* ```
|
|
1339
|
-
*/
|
|
1340
|
-
readonly functionArgs: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
1341
|
-
/**
|
|
1342
|
-
* The post conditions to apply to the contract call.
|
|
1343
|
-
*/
|
|
1344
|
-
readonly postConditions: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
1345
|
-
/**
|
|
1346
|
-
* The mode to apply to the post conditions.
|
|
1347
|
-
*/
|
|
1348
|
-
readonly postConditionMode: v.OptionalSchema<v.UnionSchema<[v.LiteralSchema<"allow", undefined>, v.LiteralSchema<"deny", undefined>], undefined>, undefined>;
|
|
1349
|
-
}, undefined>;
|
|
1350
|
-
type StxCallContractParams = v.InferOutput<typeof stxCallContractParamsSchema>;
|
|
1351
|
-
declare const stxCallContractResultSchema: v.ObjectSchema<{
|
|
1352
|
-
/**
|
|
1353
|
-
* The ID of the transaction.
|
|
1354
|
-
*/
|
|
1355
|
-
readonly txid: v.StringSchema<undefined>;
|
|
1356
|
-
/**
|
|
1357
|
-
* A Stacks transaction as a hex-encoded string.
|
|
1358
|
-
*/
|
|
1359
|
-
readonly transaction: v.StringSchema<undefined>;
|
|
1360
|
-
}, undefined>;
|
|
1361
|
-
type StxCallContractResult = v.InferOutput<typeof stxCallContractResultSchema>;
|
|
1362
|
-
declare const stxCallContractRequestMessageSchema: v.ObjectSchema<{
|
|
1363
|
-
readonly method: v.LiteralSchema<"stx_callContract", undefined>;
|
|
1364
|
-
readonly params: v.ObjectSchema<{
|
|
1284
|
+
readonly recipient: v.StringSchema<undefined>;
|
|
1365
1285
|
/**
|
|
1366
|
-
*
|
|
1367
|
-
*
|
|
1368
|
-
* E.g. `"SPKE...GD5C.my-contract"`
|
|
1286
|
+
* A string representing the memo.
|
|
1369
1287
|
*/
|
|
1370
|
-
readonly
|
|
1288
|
+
readonly memo: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1371
1289
|
/**
|
|
1372
|
-
*
|
|
1373
|
-
*
|
|
1374
|
-
* Note: spec changes ongoing,
|
|
1375
|
-
* https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
|
|
1290
|
+
* Version of parameter format.
|
|
1376
1291
|
*/
|
|
1377
|
-
readonly
|
|
1292
|
+
readonly version: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1378
1293
|
/**
|
|
1379
|
-
*
|
|
1294
|
+
* The mode of the post conditions.
|
|
1380
1295
|
*/
|
|
1381
|
-
readonly
|
|
1296
|
+
readonly postConditionMode: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1382
1297
|
/**
|
|
1383
|
-
*
|
|
1384
|
-
* strings of Clarity values.
|
|
1298
|
+
* A hex-encoded string representing the post conditions.
|
|
1385
1299
|
*
|
|
1386
|
-
*
|
|
1387
|
-
* 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,
|
|
1388
1301
|
*
|
|
1389
1302
|
* ```js
|
|
1390
|
-
* import {
|
|
1303
|
+
* import { serializePostCondition } from '@stacks/transactions';
|
|
1391
1304
|
*
|
|
1392
|
-
* const
|
|
1393
|
-
* const
|
|
1305
|
+
* const postCondition = somePostCondition;
|
|
1306
|
+
* const hexPostCondition = serializePostCondition(postCondition).toString('hex');
|
|
1394
1307
|
* ```
|
|
1395
1308
|
*/
|
|
1396
|
-
readonly functionArgs: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
1397
|
-
/**
|
|
1398
|
-
* The post conditions to apply to the contract call.
|
|
1399
|
-
*/
|
|
1400
1309
|
readonly postConditions: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
1401
1310
|
/**
|
|
1402
|
-
* The
|
|
1311
|
+
* The public key to sign the transaction with. The wallet may use any key
|
|
1312
|
+
* when not provided.
|
|
1403
1313
|
*/
|
|
1404
|
-
readonly
|
|
1314
|
+
readonly pubkey: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1405
1315
|
}, undefined>;
|
|
1406
1316
|
readonly id: v.StringSchema<undefined>;
|
|
1407
1317
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1408
1318
|
}, undefined>;
|
|
1409
|
-
type
|
|
1410
|
-
type
|
|
1319
|
+
type StxTransferStxRequestMessage = v.InferOutput<typeof stxTransferStxRequestMessageSchema>;
|
|
1320
|
+
type StxTransferStx = MethodParamsAndResult<StxTransferStxParams, StxTransferStxResult>;
|
|
1411
1321
|
|
|
1412
|
-
declare const
|
|
1413
|
-
|
|
1414
|
-
/**
|
|
1415
|
-
* Name of the contract.
|
|
1416
|
-
*/
|
|
1417
|
-
readonly name: v.StringSchema<undefined>;
|
|
1418
|
-
/**
|
|
1419
|
-
* The source code of the Clarity contract.
|
|
1420
|
-
*/
|
|
1421
|
-
readonly clarityCode: v.StringSchema<undefined>;
|
|
1422
|
-
/**
|
|
1423
|
-
* The version of the Clarity contract.
|
|
1424
|
-
*/
|
|
1425
|
-
readonly clarityVersion: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1426
|
-
/**
|
|
1427
|
-
* The post conditions to apply to the contract call.
|
|
1428
|
-
*/
|
|
1429
|
-
readonly postConditions: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
1430
|
-
/**
|
|
1431
|
-
* The mode to apply to the post conditions.
|
|
1432
|
-
*/
|
|
1433
|
-
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>;
|
|
1434
1324
|
}, undefined>;
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
/**
|
|
1438
|
-
* The ID of the transaction.
|
|
1439
|
-
*/
|
|
1440
|
-
readonly txid: v.StringSchema<undefined>;
|
|
1441
|
-
/**
|
|
1442
|
-
* A Stacks transaction as a hex-encoded string.
|
|
1443
|
-
*/
|
|
1444
|
-
readonly transaction: v.StringSchema<undefined>;
|
|
1325
|
+
declare const walletActionsSchema: v.ObjectSchema<{
|
|
1326
|
+
readonly readNetwork: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1445
1327
|
}, undefined>;
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
readonly
|
|
1449
|
-
readonly
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
*/
|
|
1453
|
-
readonly name: v.StringSchema<undefined>;
|
|
1454
|
-
/**
|
|
1455
|
-
* The source code of the Clarity contract.
|
|
1456
|
-
*/
|
|
1457
|
-
readonly clarityCode: v.StringSchema<undefined>;
|
|
1458
|
-
/**
|
|
1459
|
-
* The version of the Clarity contract.
|
|
1460
|
-
*/
|
|
1461
|
-
readonly clarityVersion: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1462
|
-
/**
|
|
1463
|
-
* The post conditions to apply to the contract call.
|
|
1464
|
-
*/
|
|
1465
|
-
readonly postConditions: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
1466
|
-
/**
|
|
1467
|
-
* The mode to apply to the post conditions.
|
|
1468
|
-
*/
|
|
1469
|
-
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>;
|
|
1470
1334
|
}, undefined>;
|
|
1471
|
-
readonly id: v.StringSchema<undefined>;
|
|
1472
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1473
1335
|
}, undefined>;
|
|
1474
|
-
|
|
1475
|
-
type
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
declare const stxGetAccountsResultSchema: v.ObjectSchema<{
|
|
1481
|
-
/**
|
|
1482
|
-
* The addresses generated for the given purposes.
|
|
1483
|
-
*/
|
|
1484
|
-
readonly addresses: v.ArraySchema<v.ObjectSchema<{
|
|
1485
|
-
readonly address: v.StringSchema<undefined>;
|
|
1486
|
-
readonly publicKey: v.StringSchema<undefined>;
|
|
1487
|
-
readonly gaiaHubUrl: v.StringSchema<undefined>;
|
|
1488
|
-
readonly gaiaAppKey: v.StringSchema<undefined>;
|
|
1489
|
-
}, undefined>, undefined>;
|
|
1490
|
-
readonly network: v.ObjectSchema<{
|
|
1491
|
-
readonly bitcoin: v.ObjectSchema<{
|
|
1492
|
-
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1493
|
-
}, undefined>;
|
|
1494
|
-
readonly stacks: v.ObjectSchema<{
|
|
1495
|
-
readonly name: v.EnumSchema<typeof StacksNetworkType, undefined>;
|
|
1496
|
-
}, undefined>;
|
|
1497
|
-
readonly spark: v.ObjectSchema<{
|
|
1498
|
-
readonly name: v.EnumSchema<typeof SparkNetworkType, undefined>;
|
|
1499
|
-
}, 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>;
|
|
1500
1342
|
}, undefined>;
|
|
1501
1343
|
}, undefined>;
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
type
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
readonly
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
readonly
|
|
1525
|
-
|
|
1526
|
-
readonly
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
readonly
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
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>;
|
|
1355
|
+
}, 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>;
|
|
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>;
|
|
1537
1403
|
}, undefined>;
|
|
1538
|
-
|
|
1539
|
-
|
|
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>;
|
|
1540
1409
|
}, undefined>;
|
|
1541
|
-
}, undefined>;
|
|
1410
|
+
}, undefined>], undefined>, undefined>, undefined>;
|
|
1411
|
+
readonly id: v.StringSchema<undefined>;
|
|
1412
|
+
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1542
1413
|
}, undefined>;
|
|
1543
|
-
type
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
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>;
|
|
1552
1424
|
readonly id: v.StringSchema<undefined>;
|
|
1553
1425
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1554
1426
|
}, undefined>;
|
|
1555
|
-
type
|
|
1556
|
-
type
|
|
1557
|
-
|
|
1558
|
-
declare const
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
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>;
|
|
1564
1439
|
}, undefined>;
|
|
1565
|
-
type
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
readonly
|
|
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>;
|
|
1575
1452
|
}, undefined>;
|
|
1576
|
-
type
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
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>;
|
|
1584
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>;
|
|
1585
1477
|
readonly id: v.StringSchema<undefined>;
|
|
1586
1478
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1587
1479
|
}, undefined>;
|
|
1588
|
-
type
|
|
1589
|
-
type
|
|
1590
|
-
|
|
1591
|
-
declare const
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
readonly
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
*/
|
|
1604
|
-
readonly publicKey: v.OptionalSchema<v.StringSchema<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>;
|
|
1605
1495
|
}, undefined>;
|
|
1606
|
-
type
|
|
1607
|
-
declare const
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
readonly
|
|
1612
|
-
/**
|
|
1613
|
-
* Public key as hex-encoded string.
|
|
1614
|
-
*/
|
|
1615
|
-
readonly publicKey: v.StringSchema<undefined>;
|
|
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>;
|
|
1616
1502
|
}, undefined>;
|
|
1617
|
-
type
|
|
1618
|
-
|
|
1619
|
-
|
|
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>;
|
|
1620
1514
|
readonly params: v.ObjectSchema<{
|
|
1621
|
-
|
|
1622
|
-
* The domain to be signed.
|
|
1623
|
-
*/
|
|
1624
|
-
readonly domain: v.StringSchema<undefined>;
|
|
1625
|
-
/**
|
|
1626
|
-
* Message payload to be signed.
|
|
1627
|
-
*/
|
|
1628
|
-
readonly message: v.StringSchema<undefined>;
|
|
1629
|
-
/**
|
|
1630
|
-
* The public key to sign the message with.
|
|
1631
|
-
*/
|
|
1632
|
-
readonly publicKey: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1515
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1633
1516
|
}, undefined>;
|
|
1634
1517
|
readonly id: v.StringSchema<undefined>;
|
|
1635
1518
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1636
1519
|
}, undefined>;
|
|
1637
|
-
type
|
|
1638
|
-
type
|
|
1639
|
-
|
|
1640
|
-
declare const
|
|
1641
|
-
|
|
1642
|
-
/**
|
|
1643
|
-
* The transaction to sign as a hex-encoded string.
|
|
1644
|
-
*/
|
|
1645
|
-
readonly transaction: v.StringSchema<undefined>;
|
|
1646
|
-
/**
|
|
1647
|
-
* The public key to sign the transaction with. The wallet may use any key
|
|
1648
|
-
* when not provided.
|
|
1649
|
-
*/
|
|
1650
|
-
readonly pubkey: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1651
|
-
/**
|
|
1652
|
-
* Whether to broadcast the transaction after signing. Defaults to `true`.
|
|
1653
|
-
*/
|
|
1654
|
-
readonly broadcast: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1655
|
-
}, undefined>;
|
|
1656
|
-
type StxSignTransactionParams = v.InferOutput<typeof stxSignTransactionParamsSchema>;
|
|
1657
|
-
declare const stxSignTransactionResultSchema: v.ObjectSchema<{
|
|
1658
|
-
/**
|
|
1659
|
-
* The signed transaction as a hex-encoded string.
|
|
1660
|
-
*/
|
|
1661
|
-
readonly transaction: v.StringSchema<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>;
|
|
1662
1525
|
}, undefined>;
|
|
1663
|
-
type
|
|
1664
|
-
declare const
|
|
1665
|
-
|
|
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>;
|
|
1666
1531
|
readonly params: v.ObjectSchema<{
|
|
1667
|
-
|
|
1668
|
-
* The transaction to sign as a hex-encoded string.
|
|
1669
|
-
*/
|
|
1670
|
-
readonly transaction: v.StringSchema<undefined>;
|
|
1671
|
-
/**
|
|
1672
|
-
* The public key to sign the transaction with. The wallet may use any key
|
|
1673
|
-
* when not provided.
|
|
1674
|
-
*/
|
|
1675
|
-
readonly pubkey: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1676
|
-
/**
|
|
1677
|
-
* Whether to broadcast the transaction after signing. Defaults to `true`.
|
|
1678
|
-
*/
|
|
1679
|
-
readonly broadcast: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1532
|
+
readonly id: v.StringSchema<undefined>;
|
|
1680
1533
|
}, undefined>;
|
|
1681
1534
|
readonly id: v.StringSchema<undefined>;
|
|
1682
1535
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1683
1536
|
}, undefined>;
|
|
1684
|
-
type
|
|
1685
|
-
type
|
|
1686
|
-
|
|
1687
|
-
declare const
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
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>;
|
|
1698
1563
|
}, undefined>;
|
|
1699
|
-
type
|
|
1700
|
-
declare const
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
readonly transactions: v.ArraySchema<v.StringSchema<undefined>, 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>;
|
|
1706
1570
|
}, undefined>;
|
|
1707
|
-
type
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
readonly
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
readonly
|
|
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>;
|
|
1720
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>;
|
|
1721
1636
|
readonly id: v.StringSchema<undefined>;
|
|
1722
1637
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1723
1638
|
}, undefined>;
|
|
1724
|
-
type
|
|
1725
|
-
type
|
|
1726
|
-
|
|
1727
|
-
declare const
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
readonly
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
readonly
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
readonly
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
readonly
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
* The ID of the transaction.
|
|
1781
|
-
*/
|
|
1782
|
-
readonly txid: v.StringSchema<undefined>;
|
|
1783
|
-
/**
|
|
1784
|
-
* A Stacks transaction as a hex-encoded string.
|
|
1785
|
-
*/
|
|
1786
|
-
readonly transaction: v.StringSchema<undefined>;
|
|
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>;
|
|
1787
1695
|
}, undefined>;
|
|
1788
|
-
type
|
|
1789
|
-
declare const
|
|
1790
|
-
readonly method: v.LiteralSchema<"stx_transferStx", undefined>;
|
|
1791
|
-
readonly params: v.ObjectSchema<{
|
|
1792
|
-
/**
|
|
1793
|
-
* Amount of STX tokens to transfer in microstacks as a string. Anything
|
|
1794
|
-
* parseable by `BigInt` is acceptable.
|
|
1795
|
-
*
|
|
1796
|
-
* Example,
|
|
1797
|
-
*
|
|
1798
|
-
* ```js
|
|
1799
|
-
* const amount1 = 1234;
|
|
1800
|
-
* const amount2 = 1234n;
|
|
1801
|
-
* const amount3 = '1234';
|
|
1802
|
-
* ```
|
|
1803
|
-
*/
|
|
1804
|
-
readonly amount: v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>], undefined>;
|
|
1805
|
-
/**
|
|
1806
|
-
* The recipient's principal.
|
|
1807
|
-
*/
|
|
1808
|
-
readonly recipient: v.StringSchema<undefined>;
|
|
1809
|
-
/**
|
|
1810
|
-
* A string representing the memo.
|
|
1811
|
-
*/
|
|
1812
|
-
readonly memo: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1813
|
-
/**
|
|
1814
|
-
* Version of parameter format.
|
|
1815
|
-
*/
|
|
1816
|
-
readonly version: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1817
|
-
/**
|
|
1818
|
-
* The mode of the post conditions.
|
|
1819
|
-
*/
|
|
1820
|
-
readonly postConditionMode: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
1821
|
-
/**
|
|
1822
|
-
* A hex-encoded string representing the post conditions.
|
|
1823
|
-
*
|
|
1824
|
-
* A post condition may be converted to it's hex representation using the `serializePostCondition` helper from the `@stacks/transactions` package,
|
|
1825
|
-
*
|
|
1826
|
-
* ```js
|
|
1827
|
-
* import { serializePostCondition } from '@stacks/transactions';
|
|
1828
|
-
*
|
|
1829
|
-
* const postCondition = somePostCondition;
|
|
1830
|
-
* const hexPostCondition = serializePostCondition(postCondition).toString('hex');
|
|
1831
|
-
* ```
|
|
1832
|
-
*/
|
|
1833
|
-
readonly postConditions: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
1834
|
-
/**
|
|
1835
|
-
* The public key to sign the transaction with. The wallet may use any key
|
|
1836
|
-
* when not provided.
|
|
1837
|
-
*/
|
|
1838
|
-
readonly pubkey: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1839
|
-
}, undefined>;
|
|
1696
|
+
type AddNetworkRequestMessage = v.InferOutput<typeof addNetworkRequestMessageSchema>;
|
|
1697
|
+
declare const addNetworkResultSchema: v.ObjectSchema<{
|
|
1840
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<{
|
|
1841
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>;
|
|
1842
1828
|
}, undefined>;
|
|
1843
|
-
type
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
}
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
readonly actions: v.ObjectSchema<{
|
|
1857
|
-
readonly read: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1858
|
-
}, undefined>;
|
|
1859
|
-
}, undefined>;
|
|
1860
|
-
declare const walletPermissionSchema: v.ObjectSchema<{
|
|
1861
|
-
readonly type: v.LiteralSchema<"wallet", undefined>;
|
|
1862
|
-
readonly resourceId: v.StringSchema<undefined>;
|
|
1863
|
-
readonly clientId: v.StringSchema<undefined>;
|
|
1864
|
-
readonly actions: v.ObjectSchema<{
|
|
1865
|
-
readonly readNetwork: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1866
|
-
}, undefined>;
|
|
1867
|
-
}, 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
|
+
}
|
|
1868
1842
|
/**
|
|
1869
|
-
*
|
|
1870
|
-
*
|
|
1871
|
-
*
|
|
1872
|
-
* themselves.
|
|
1843
|
+
* @enum {number} RpcErrorCode
|
|
1844
|
+
* @description JSON-RPC error codes
|
|
1845
|
+
* @see https://www.jsonrpc.org/specification#error_object
|
|
1873
1846
|
*/
|
|
1874
|
-
declare
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
}, undefined>, v.ObjectSchema<{
|
|
1911
|
-
readonly type: v.LiteralSchema<"wallet", undefined>;
|
|
1912
|
-
readonly resourceId: v.StringSchema<undefined>;
|
|
1913
|
-
readonly actions: v.ObjectSchema<{
|
|
1914
|
-
readonly readNetwork: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1915
|
-
}, undefined>;
|
|
1916
|
-
}, undefined>], undefined>, undefined>, undefined>;
|
|
1917
|
-
type RequestPermissionsParams = v.InferOutput<typeof requestPermissionsParamsSchema>;
|
|
1918
|
-
declare const requestPermissionsResultSchema: v.LiteralSchema<true, undefined>;
|
|
1919
|
-
type RequestPermissionsResult = v.InferOutput<typeof requestPermissionsResultSchema>;
|
|
1920
|
-
declare const requestPermissionsRequestMessageSchema: v.ObjectSchema<{
|
|
1921
|
-
readonly method: v.LiteralSchema<"wallet_requestPermissions", undefined>;
|
|
1922
|
-
readonly params: v.NullishSchema<v.ArraySchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
1923
|
-
readonly type: v.LiteralSchema<"account", undefined>;
|
|
1924
|
-
readonly resourceId: v.StringSchema<undefined>;
|
|
1925
|
-
readonly actions: v.ObjectSchema<{
|
|
1926
|
-
readonly read: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1927
|
-
}, undefined>;
|
|
1928
|
-
}, undefined>, v.ObjectSchema<{
|
|
1929
|
-
readonly type: v.LiteralSchema<"wallet", undefined>;
|
|
1930
|
-
readonly resourceId: v.StringSchema<undefined>;
|
|
1931
|
-
readonly actions: v.ObjectSchema<{
|
|
1932
|
-
readonly readNetwork: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1933
|
-
}, undefined>;
|
|
1934
|
-
}, undefined>], undefined>, undefined>, undefined>;
|
|
1935
|
-
readonly id: v.StringSchema<undefined>;
|
|
1936
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1937
|
-
}, undefined>;
|
|
1938
|
-
type RequestPermissionsRequestMessage = v.InferOutput<typeof requestPermissionsRequestMessageSchema>;
|
|
1939
|
-
type RequestPermissions = MethodParamsAndResult<RequestPermissionsParams, RequestPermissionsResult>;
|
|
1940
|
-
declare const renouncePermissionsMethodName = "wallet_renouncePermissions";
|
|
1941
|
-
declare const renouncePermissionsParamsSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1942
|
-
type RenouncePermissionsParams = v.InferOutput<typeof renouncePermissionsParamsSchema>;
|
|
1943
|
-
declare const renouncePermissionsResultSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1944
|
-
type RenouncePermissionsResult = v.InferOutput<typeof renouncePermissionsResultSchema>;
|
|
1945
|
-
declare const renouncePermissionsRequestMessageSchema: v.ObjectSchema<{
|
|
1946
|
-
readonly method: v.LiteralSchema<"wallet_renouncePermissions", undefined>;
|
|
1947
|
-
readonly params: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1948
|
-
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<{
|
|
1949
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>;
|
|
1950
1886
|
}, undefined>;
|
|
1951
|
-
type
|
|
1952
|
-
|
|
1953
|
-
declare const disconnectMethodName = "wallet_disconnect";
|
|
1954
|
-
declare const disconnectParamsSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1955
|
-
type DisconnectParams = v.InferOutput<typeof disconnectParamsSchema>;
|
|
1956
|
-
declare const disconnectResultSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1957
|
-
type DisconnectResult = v.InferOutput<typeof disconnectResultSchema>;
|
|
1958
|
-
declare const disconnectRequestMessageSchema: v.ObjectSchema<{
|
|
1959
|
-
readonly method: v.LiteralSchema<"wallet_disconnect", undefined>;
|
|
1960
|
-
readonly params: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1961
|
-
readonly id: v.StringSchema<undefined>;
|
|
1887
|
+
type RpcSuccessResponseMessage = v.InferOutput<typeof rpcSuccessResponseMessageSchema>;
|
|
1888
|
+
declare const rpcErrorResponseMessageSchema: v.ObjectSchema<{
|
|
1962
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>;
|
|
1963
1892
|
}, undefined>;
|
|
1964
|
-
type
|
|
1965
|
-
|
|
1966
|
-
declare const getWalletTypeMethodName = "wallet_getWalletType";
|
|
1967
|
-
declare const getWalletTypeParamsSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1968
|
-
type GetWalletTypeParams = v.InferOutput<typeof getWalletTypeParamsSchema>;
|
|
1969
|
-
declare const getWalletTypeResultSchema: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1970
|
-
type GetWalletTypeResult = v.InferOutput<typeof getWalletTypeResultSchema>;
|
|
1971
|
-
declare const getWalletTypeRequestMessageSchema: v.ObjectSchema<{
|
|
1972
|
-
readonly method: v.LiteralSchema<"wallet_getWalletType", undefined>;
|
|
1973
|
-
readonly params: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1974
|
-
readonly id: v.StringSchema<undefined>;
|
|
1893
|
+
type RpcErrorResponseMessage = v.InferOutput<typeof rpcErrorResponseMessageSchema>;
|
|
1894
|
+
declare const rpcResponseMessageSchema: v.UnionSchema<[v.ObjectSchema<{
|
|
1975
1895
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
type GetWalletType = MethodParamsAndResult<GetWalletTypeParams, GetWalletTypeResult>;
|
|
1979
|
-
declare const getCurrentPermissionsMethodName = "wallet_getCurrentPermissions";
|
|
1980
|
-
declare const getCurrentPermissionsParamsSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
1981
|
-
type GetCurrentPermissionsParams = v.InferOutput<typeof getCurrentPermissionsParamsSchema>;
|
|
1982
|
-
declare const getCurrentPermissionsResultSchema: v.ArraySchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
1983
|
-
readonly type: v.LiteralSchema<"account", undefined>;
|
|
1984
|
-
readonly resourceId: v.StringSchema<undefined>;
|
|
1985
|
-
readonly clientId: v.StringSchema<undefined>;
|
|
1986
|
-
readonly actions: v.ObjectSchema<{
|
|
1987
|
-
readonly read: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1988
|
-
}, 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>;
|
|
1989
1898
|
}, undefined>, v.ObjectSchema<{
|
|
1990
|
-
readonly type: v.LiteralSchema<"wallet", undefined>;
|
|
1991
|
-
readonly resourceId: v.StringSchema<undefined>;
|
|
1992
|
-
readonly clientId: v.StringSchema<undefined>;
|
|
1993
|
-
readonly actions: v.ObjectSchema<{
|
|
1994
|
-
readonly readNetwork: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
1995
|
-
}, undefined>;
|
|
1996
|
-
}, undefined>], undefined>, undefined>;
|
|
1997
|
-
type GetCurrentPermissionsResult = v.InferOutput<typeof getCurrentPermissionsResultSchema>;
|
|
1998
|
-
declare const getCurrentPermissionsRequestMessageSchema: v.ObjectSchema<{
|
|
1999
|
-
readonly method: v.LiteralSchema<"wallet_getCurrentPermissions", undefined>;
|
|
2000
|
-
readonly params: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
2001
|
-
readonly id: v.StringSchema<undefined>;
|
|
2002
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>;
|
|
2003
1951
|
}, undefined>;
|
|
2004
|
-
type
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
type
|
|
2009
|
-
|
|
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>;
|
|
2010
2072
|
readonly bitcoin: v.ObjectSchema<{
|
|
2011
2073
|
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
2012
2074
|
}, undefined>;
|
|
2013
2075
|
readonly stacks: v.ObjectSchema<{
|
|
2014
|
-
readonly name: v.
|
|
2015
|
-
}, undefined>;
|
|
2016
|
-
readonly spark: v.ObjectSchema<{
|
|
2017
|
-
readonly name: v.EnumSchema<typeof SparkNetworkType, undefined>;
|
|
2018
|
-
}, undefined>;
|
|
2019
|
-
}, undefined>;
|
|
2020
|
-
type GetNetworkResult = v.InferOutput<typeof getNetworkResultSchema>;
|
|
2021
|
-
declare const getNetworkRequestMessageSchema: v.ObjectSchema<{
|
|
2022
|
-
readonly method: v.LiteralSchema<"wallet_getNetwork", undefined>;
|
|
2023
|
-
readonly params: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
2024
|
-
readonly id: v.StringSchema<undefined>;
|
|
2025
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
2026
|
-
}, undefined>;
|
|
2027
|
-
type GetNetworkRequestMessage = v.InferOutput<typeof getNetworkRequestMessageSchema>;
|
|
2028
|
-
type GetNetwork = MethodParamsAndResult<GetNetworkParams, GetNetworkResult>;
|
|
2029
|
-
declare const changeNetworkMethodName = "wallet_changeNetwork";
|
|
2030
|
-
declare const changeNetworkParamsSchema: v.ObjectSchema<{
|
|
2031
|
-
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
2032
|
-
}, undefined>;
|
|
2033
|
-
type ChangeNetworkParams = v.InferOutput<typeof changeNetworkParamsSchema>;
|
|
2034
|
-
declare const changeNetworkResultSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
2035
|
-
type ChangeNetworkResult = v.InferOutput<typeof changeNetworkResultSchema>;
|
|
2036
|
-
declare const changeNetworkRequestMessageSchema: v.ObjectSchema<{
|
|
2037
|
-
readonly method: v.LiteralSchema<"wallet_changeNetwork", undefined>;
|
|
2038
|
-
readonly params: v.ObjectSchema<{
|
|
2039
|
-
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
2040
|
-
}, undefined>;
|
|
2041
|
-
readonly id: v.StringSchema<undefined>;
|
|
2042
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
2043
|
-
}, undefined>;
|
|
2044
|
-
type ChangeNetworkRequestMessage = v.InferOutput<typeof changeNetworkRequestMessageSchema>;
|
|
2045
|
-
type ChangeNetwork = MethodParamsAndResult<ChangeNetworkParams, ChangeNetworkResult>;
|
|
2046
|
-
declare const changeNetworkByIdMethodName = "wallet_changeNetworkById";
|
|
2047
|
-
declare const changeNetworkByIdParamsSchema: v.ObjectSchema<{
|
|
2048
|
-
readonly id: v.StringSchema<undefined>;
|
|
2049
|
-
}, undefined>;
|
|
2050
|
-
type ChangeNetworkByIdParams = v.InferOutput<typeof changeNetworkByIdParamsSchema>;
|
|
2051
|
-
declare const changeNetworkByIdResultSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
2052
|
-
type ChangeNetworkByIdResult = v.InferOutput<typeof changeNetworkByIdResultSchema>;
|
|
2053
|
-
declare const changeNetworkByIdRequestMessageSchema: v.ObjectSchema<{
|
|
2054
|
-
readonly method: v.LiteralSchema<"wallet_changeNetworkById", undefined>;
|
|
2055
|
-
readonly params: v.ObjectSchema<{
|
|
2056
|
-
readonly id: v.StringSchema<undefined>;
|
|
2076
|
+
readonly name: v.StringSchema<undefined>;
|
|
2057
2077
|
}, undefined>;
|
|
2058
|
-
readonly
|
|
2059
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
2060
|
-
}, undefined>;
|
|
2061
|
-
type ChangeNetworkByIdRequestMessage = v.InferOutput<typeof changeNetworkByIdRequestMessageSchema>;
|
|
2062
|
-
type ChangeNetworkById = MethodParamsAndResult<ChangeNetworkByIdParams, ChangeNetworkByIdResult>;
|
|
2063
|
-
declare const getAccountMethodName = "wallet_getAccount";
|
|
2064
|
-
declare const getAccountParamsSchema: v.NullishSchema<v.NullSchema<undefined>, undefined>;
|
|
2065
|
-
type GetAccountParams = v.InferOutput<typeof getAccountParamsSchema>;
|
|
2066
|
-
declare const getAccountResultSchema: v.ObjectSchema<{
|
|
2067
|
-
readonly id: v.StringSchema<undefined>;
|
|
2068
|
-
readonly addresses: v.ArraySchema<v.ObjectSchema<{
|
|
2078
|
+
readonly addresses: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2069
2079
|
readonly address: v.StringSchema<undefined>;
|
|
2070
2080
|
readonly publicKey: v.StringSchema<undefined>;
|
|
2071
2081
|
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
2072
2082
|
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
2073
2083
|
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
2074
|
-
}, undefined>, undefined>;
|
|
2075
|
-
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
2076
|
-
readonly network: v.ObjectSchema<{
|
|
2077
|
-
readonly bitcoin: v.ObjectSchema<{
|
|
2078
|
-
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
2079
|
-
}, undefined>;
|
|
2080
|
-
readonly stacks: v.ObjectSchema<{
|
|
2081
|
-
readonly name: v.EnumSchema<typeof StacksNetworkType, undefined>;
|
|
2082
|
-
}, undefined>;
|
|
2083
|
-
readonly spark: v.ObjectSchema<{
|
|
2084
|
-
readonly name: v.EnumSchema<typeof SparkNetworkType, undefined>;
|
|
2085
|
-
}, undefined>;
|
|
2086
|
-
}, undefined>;
|
|
2084
|
+
}, undefined>, undefined>, undefined>;
|
|
2087
2085
|
}, undefined>;
|
|
2088
|
-
type
|
|
2089
|
-
declare const
|
|
2090
|
-
|
|
2091
|
-
readonly
|
|
2092
|
-
readonly id: v.StringSchema<undefined>;
|
|
2093
|
-
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>;
|
|
2094
2090
|
}, undefined>;
|
|
2095
|
-
type
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
readonly
|
|
2101
|
-
readonly
|
|
2102
|
-
readonly
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
readonly
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
readonly
|
|
2114
|
-
readonly network: v.OptionalSchema<v.EnumSchema<typeof BitcoinNetworkType, undefined>, undefined>;
|
|
2115
|
-
}, undefined>, undefined>;
|
|
2116
|
-
type ConnectParams = v.InferOutput<typeof connectParamsSchema>;
|
|
2117
|
-
declare const connectResultSchema: v.ObjectSchema<{
|
|
2118
|
-
readonly id: v.StringSchema<undefined>;
|
|
2119
|
-
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<{
|
|
2120
2110
|
readonly address: v.StringSchema<undefined>;
|
|
2121
2111
|
readonly publicKey: v.StringSchema<undefined>;
|
|
2122
2112
|
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
2123
2113
|
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
2124
2114
|
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
2125
|
-
}, undefined>, undefined>;
|
|
2126
|
-
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
2127
|
-
readonly network: v.ObjectSchema<{
|
|
2128
|
-
readonly bitcoin: v.ObjectSchema<{
|
|
2129
|
-
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
2130
|
-
}, undefined>;
|
|
2131
|
-
readonly stacks: v.ObjectSchema<{
|
|
2132
|
-
readonly name: v.EnumSchema<typeof StacksNetworkType, undefined>;
|
|
2133
|
-
}, undefined>;
|
|
2134
|
-
readonly spark: v.ObjectSchema<{
|
|
2135
|
-
readonly name: v.EnumSchema<typeof SparkNetworkType, undefined>;
|
|
2136
|
-
}, undefined>;
|
|
2137
|
-
}, undefined>;
|
|
2138
|
-
}, undefined>;
|
|
2139
|
-
type ConnectResult = v.InferOutput<typeof connectResultSchema>;
|
|
2140
|
-
declare const connectRequestMessageSchema: v.ObjectSchema<{
|
|
2141
|
-
readonly method: v.LiteralSchema<"wallet_connect", undefined>;
|
|
2142
|
-
readonly params: v.NullishSchema<v.ObjectSchema<{
|
|
2143
|
-
readonly permissions: v.OptionalSchema<v.ArraySchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
2144
|
-
readonly type: v.LiteralSchema<"account", undefined>;
|
|
2145
|
-
readonly resourceId: v.StringSchema<undefined>;
|
|
2146
|
-
readonly actions: v.ObjectSchema<{
|
|
2147
|
-
readonly read: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
2148
|
-
}, undefined>;
|
|
2149
|
-
}, undefined>, v.ObjectSchema<{
|
|
2150
|
-
readonly type: v.LiteralSchema<"wallet", undefined>;
|
|
2151
|
-
readonly resourceId: v.StringSchema<undefined>;
|
|
2152
|
-
readonly actions: v.ObjectSchema<{
|
|
2153
|
-
readonly readNetwork: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
2154
|
-
}, undefined>;
|
|
2155
|
-
}, undefined>], undefined>, undefined>, undefined>;
|
|
2156
|
-
readonly addresses: v.OptionalSchema<v.ArraySchema<v.EnumSchema<typeof AddressPurpose, undefined>, undefined>, undefined>;
|
|
2157
|
-
readonly message: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 80, "The message must not exceed 80 characters.">]>, undefined>;
|
|
2158
|
-
readonly network: v.OptionalSchema<v.EnumSchema<typeof BitcoinNetworkType, undefined>, undefined>;
|
|
2159
|
-
}, undefined>, undefined>;
|
|
2160
|
-
readonly id: v.StringSchema<undefined>;
|
|
2161
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
2162
|
-
}, undefined>;
|
|
2163
|
-
type ConnectRequestMessage = v.InferOutput<typeof connectRequestMessageSchema>;
|
|
2164
|
-
type Connect = MethodParamsAndResult<ConnectParams, ConnectResult>;
|
|
2165
|
-
declare const addNetworkMethodName = "wallet_addNetwork";
|
|
2166
|
-
declare const addNetworkParamsSchema: v.VariantSchema<"chain", [v.ObjectSchema<{
|
|
2167
|
-
readonly chain: v.LiteralSchema<"bitcoin", undefined>;
|
|
2168
|
-
readonly type: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
2169
|
-
readonly name: v.StringSchema<undefined>;
|
|
2170
|
-
readonly rpcUrl: v.StringSchema<undefined>;
|
|
2171
|
-
readonly rpcFallbackUrl: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2172
|
-
readonly indexerUrl: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2173
|
-
readonly blockExplorerUrl: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2174
|
-
readonly switch: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
2175
|
-
}, undefined>, v.ObjectSchema<{
|
|
2176
|
-
readonly chain: v.LiteralSchema<"stacks", undefined>;
|
|
2177
|
-
readonly name: v.StringSchema<undefined>;
|
|
2178
|
-
readonly type: v.EnumSchema<typeof StacksNetworkType, undefined>;
|
|
2179
|
-
readonly rpcUrl: v.StringSchema<undefined>;
|
|
2180
|
-
readonly blockExplorerUrl: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2181
|
-
readonly switch: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
2115
|
+
}, undefined>, undefined>, undefined>;
|
|
2182
2116
|
}, undefined>, v.ObjectSchema<{
|
|
2183
|
-
readonly
|
|
2184
|
-
readonly name: v.StringSchema<undefined>;
|
|
2185
|
-
readonly type: v.EnumSchema<typeof StarknetNetworkType, undefined>;
|
|
2186
|
-
readonly rpcUrl: v.StringSchema<undefined>;
|
|
2187
|
-
readonly blockExplorerUrl: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2188
|
-
readonly switch: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
2117
|
+
readonly type: v.LiteralSchema<"disconnect", undefined>;
|
|
2189
2118
|
}, undefined>], undefined>;
|
|
2190
|
-
type
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
readonly chain: v.LiteralSchema<"stacks", undefined>;
|
|
2204
|
-
readonly name: v.StringSchema<undefined>;
|
|
2205
|
-
readonly type: v.EnumSchema<typeof StacksNetworkType, undefined>;
|
|
2206
|
-
readonly rpcUrl: v.StringSchema<undefined>;
|
|
2207
|
-
readonly blockExplorerUrl: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2208
|
-
readonly switch: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
2209
|
-
}, undefined>, v.ObjectSchema<{
|
|
2210
|
-
readonly chain: v.LiteralSchema<"starknet", undefined>;
|
|
2211
|
-
readonly name: v.StringSchema<undefined>;
|
|
2212
|
-
readonly type: v.EnumSchema<typeof StarknetNetworkType, undefined>;
|
|
2213
|
-
readonly rpcUrl: v.StringSchema<undefined>;
|
|
2214
|
-
readonly blockExplorerUrl: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2215
|
-
readonly switch: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
2216
|
-
}, undefined>], undefined>;
|
|
2217
|
-
readonly id: v.StringSchema<undefined>;
|
|
2218
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
2219
|
-
}, undefined>;
|
|
2220
|
-
type AddNetworkRequestMessage = v.InferOutput<typeof addNetworkRequestMessageSchema>;
|
|
2221
|
-
declare const addNetworkResultSchema: v.ObjectSchema<{
|
|
2222
|
-
readonly id: v.StringSchema<undefined>;
|
|
2223
|
-
}, undefined>;
|
|
2224
|
-
type AddNetworkResult = v.InferOutput<typeof addNetworkResultSchema>;
|
|
2225
|
-
type AddNetwork = MethodParamsAndResult<AddNetworkParams, AddNetworkResult>;
|
|
2226
|
-
|
|
2227
|
-
declare const walletTypes: readonly ["software", "ledger", "keystone"];
|
|
2228
|
-
declare const walletTypeSchema: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
2229
|
-
type WalletType = v.InferOutput<typeof walletTypeSchema>;
|
|
2230
|
-
|
|
2231
|
-
type StxRequests = {
|
|
2232
|
-
stx_callContract: StxCallContract;
|
|
2233
|
-
stx_deployContract: StxDeployContract;
|
|
2234
|
-
stx_getAccounts: StxGetAccounts;
|
|
2235
|
-
stx_getAddresses: StxGetAddresses;
|
|
2236
|
-
stx_signMessage: StxSignMessage;
|
|
2237
|
-
stx_signStructuredMessage: StxSignStructuredMessage;
|
|
2238
|
-
stx_signTransaction: StxSignTransaction;
|
|
2239
|
-
stx_transferStx: StxTransferStx;
|
|
2240
|
-
stx_signTransactions: StxSignTransactions;
|
|
2241
|
-
};
|
|
2242
|
-
type StxRequestMethod = keyof StxRequests;
|
|
2243
|
-
type SparkRequests = {
|
|
2244
|
-
[sparkGetAddressesMethodName]: SparkGetAddresses;
|
|
2245
|
-
[sparkGetBalanceMethodName]: SparkGetBalance;
|
|
2246
|
-
[sparkTransferMethodName]: SparkTransfer;
|
|
2247
|
-
[sparkTransferTokenMethodName]: SparkTransferToken;
|
|
2248
|
-
[sparkFlashnetGetJwtMethodName]: SparkFlashnetGetJwt;
|
|
2249
|
-
[sparkFlashnetSignIntentMethodName]: SparkFlashnetSignIntent;
|
|
2250
|
-
};
|
|
2251
|
-
type SparkRequestMethod = keyof SparkRequests;
|
|
2252
|
-
type BtcRequests = {
|
|
2253
|
-
getInfo: GetInfo;
|
|
2254
|
-
getAddresses: GetAddresses;
|
|
2255
|
-
getAccounts: GetAccounts;
|
|
2256
|
-
getBalance: GetBalance;
|
|
2257
|
-
signMessage: SignMessage;
|
|
2258
|
-
sendTransfer: SendTransfer;
|
|
2259
|
-
signPsbt: SignPsbt;
|
|
2260
|
-
};
|
|
2261
|
-
type BtcRequestMethod = keyof BtcRequests;
|
|
2262
|
-
type RunesRequests = {
|
|
2263
|
-
runes_estimateEtch: RunesEstimateEtch;
|
|
2264
|
-
runes_estimateMint: RunesEstimateMint;
|
|
2265
|
-
runes_estimateRbfOrder: RunesEstimateRbfOrder;
|
|
2266
|
-
runes_etch: RunesEtch;
|
|
2267
|
-
runes_getBalance: RunesGetBalance;
|
|
2268
|
-
runes_getOrder: RunesGetOrder;
|
|
2269
|
-
runes_mint: RunesMint;
|
|
2270
|
-
runes_rbfOrder: RunesRbfOrder;
|
|
2271
|
-
runes_transfer: RunesTransfer;
|
|
2272
|
-
};
|
|
2273
|
-
type RunesRequestMethod = keyof RunesRequests;
|
|
2274
|
-
type OrdinalsRequests = {
|
|
2275
|
-
ord_getInscriptions: GetInscriptions;
|
|
2276
|
-
ord_sendInscriptions: SendInscriptions;
|
|
2277
|
-
};
|
|
2278
|
-
type OrdinalsRequestMethod = keyof OrdinalsRequests;
|
|
2279
|
-
type WalletRequests = {
|
|
2280
|
-
wallet_addNetwork: AddNetwork;
|
|
2281
|
-
wallet_changeNetwork: ChangeNetwork;
|
|
2282
|
-
wallet_changeNetworkById: ChangeNetworkById;
|
|
2283
|
-
wallet_connect: Connect;
|
|
2284
|
-
wallet_disconnect: Disconnect;
|
|
2285
|
-
wallet_getAccount: GetAccount;
|
|
2286
|
-
wallet_getCurrentPermissions: GetCurrentPermissions;
|
|
2287
|
-
wallet_getNetwork: GetNetwork;
|
|
2288
|
-
wallet_getWalletType: GetWalletType;
|
|
2289
|
-
wallet_renouncePermissions: RenouncePermissions;
|
|
2290
|
-
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;
|
|
2291
2132
|
};
|
|
2292
|
-
type
|
|
2293
|
-
|
|
2294
|
-
|
|
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
|
+
}
|
|
2295
2173
|
|
|
2296
|
-
declare
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
* Adds an event listener.
|
|
2305
|
-
*
|
|
2306
|
-
* Currently expects 2 arguments, although is also capable of handling legacy
|
|
2307
|
-
* calls with 3 arguments consisting of:
|
|
2308
|
-
*
|
|
2309
|
-
* - event name (string)
|
|
2310
|
-
* - callback (function)
|
|
2311
|
-
* - provider ID (optional string)
|
|
2312
|
-
*/
|
|
2313
|
-
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[];
|
|
2314
2182
|
|
|
2315
2183
|
declare abstract class SatsConnectAdapter {
|
|
2316
2184
|
abstract readonly id: string;
|
|
@@ -2336,4 +2204,4 @@ declare class BaseAdapter extends SatsConnectAdapter {
|
|
|
2336
2204
|
declare const DefaultAdaptersInfo: Record<string, Provider>;
|
|
2337
2205
|
declare const defaultAdapters: Record<string, new () => SatsConnectAdapter>;
|
|
2338
2206
|
|
|
2339
|
-
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, FlashnetIntentType, 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 SparkFlashnetGetJwt, type SparkFlashnetGetJwtParams, type SparkFlashnetGetJwtRequestMessage, type SparkFlashnetGetJwtResult, type SparkFlashnetSignIntent, type SparkFlashnetSignIntentParams, type SparkFlashnetSignIntentRequestMessage, type SparkFlashnetSignIntentResult, 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, sparkFlashnetGetJwtMethodName, sparkFlashnetGetJwtParamsSchema, sparkFlashnetGetJwtRequestMessageSchema, sparkFlashnetGetJwtResultSchema, sparkFlashnetRouteSwapIntentSchema, sparkFlashnetSignIntentMethodName, sparkFlashnetSignIntentParamsSchema, sparkFlashnetSignIntentRequestMessageSchema, sparkFlashnetSignIntentResultSchema, sparkFlashnetSwapIntentSchema, 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 };
|