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