@sats-connect/core 0.4.0-6c651d4 → 0.4.0-6eb2eb5

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.mjs CHANGED
@@ -27,8 +27,7 @@ async function getProviderOrThrow(getProvider) {
27
27
  return provider;
28
28
  }
29
29
  function getProviders() {
30
- if (!window.btc_providers)
31
- window.btc_providers = [];
30
+ if (!window.btc_providers) window.btc_providers = [];
32
31
  return window.btc_providers;
33
32
  }
34
33
  function getProviderById(providerId) {
@@ -47,10 +46,7 @@ function removeDefaultProvider() {
47
46
  localStorage.removeItem("sats-connect_defaultProvider");
48
47
  }
49
48
  function getSupportedWallets() {
50
- const ambientProviders = getProviders();
51
- const { xverse, ...defaultProviders } = DefaultAdaptersInfo;
52
- const allProviders = [...ambientProviders, ...Object.values(defaultProviders)];
53
- const wallets = allProviders.map((provider) => {
49
+ const wallets = Object.values(DefaultAdaptersInfo).map((provider) => {
54
50
  {
55
51
  return {
56
52
  ...provider,
@@ -63,11 +59,11 @@ function getSupportedWallets() {
63
59
 
64
60
  // src/types.ts
65
61
  import * as v2 from "valibot";
66
- var BitcoinNetworkType = /* @__PURE__ */ ((BitcoinNetworkType3) => {
67
- BitcoinNetworkType3["Mainnet"] = "Mainnet";
68
- BitcoinNetworkType3["Testnet"] = "Testnet";
69
- BitcoinNetworkType3["Signet"] = "Signet";
70
- return BitcoinNetworkType3;
62
+ var BitcoinNetworkType = /* @__PURE__ */ ((BitcoinNetworkType2) => {
63
+ BitcoinNetworkType2["Mainnet"] = "Mainnet";
64
+ BitcoinNetworkType2["Testnet"] = "Testnet";
65
+ BitcoinNetworkType2["Signet"] = "Signet";
66
+ return BitcoinNetworkType2;
71
67
  })(BitcoinNetworkType || {});
72
68
  var RpcIdSchema = v2.optional(v2.union([v2.string(), v2.number(), v2.null()]));
73
69
  var rpcRequestMessageSchema = v2.object({
@@ -84,7 +80,7 @@ var rpcRequestMessageSchema = v2.object({
84
80
  v2.null()
85
81
  ])
86
82
  ),
87
- id: RpcIdSchema
83
+ id: v2.unwrap(RpcIdSchema)
88
84
  });
89
85
  var RpcErrorCode = /* @__PURE__ */ ((RpcErrorCode2) => {
90
86
  RpcErrorCode2[RpcErrorCode2["PARSE_ERROR"] = -32700] = "PARSE_ERROR";
@@ -113,16 +109,127 @@ var rpcResponseMessageSchema = v2.union([
113
109
  ]);
114
110
 
115
111
  // src/request/index.ts
116
- import * as v10 from "valibot";
112
+ import * as v20 from "valibot";
113
+
114
+ // src/request/types/stxMethods/callContract.ts
115
+ import * as v3 from "valibot";
116
+ var stxCallContractMethodName = "stx_callContract";
117
+ var stxCallContractParamsSchema = v3.object({
118
+ /**
119
+ * The contract principal.
120
+ *
121
+ * E.g. `"SPKE...GD5C.my-contract"`
122
+ */
123
+ contract: v3.string(),
124
+ /**
125
+ * The name of the function to call.
126
+ *
127
+ * Note: spec changes ongoing,
128
+ * https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
129
+ */
130
+ functionName: v3.string(),
131
+ /**
132
+ * The function's arguments. The arguments are expected to be hex-encoded
133
+ * strings of Clarity values.
134
+ *
135
+ * To convert Clarity values to their hex representation, the `cvToString`
136
+ * helper from the `@stacks/transactions` package may be helpful.
137
+ *
138
+ * ```js
139
+ * import { cvToString } from '@stacks/transactions';
140
+ *
141
+ * const functionArgs = [someClarityValue1, someClarityValue2];
142
+ * const hexArgs = functionArgs.map(cvToString);
143
+ * ```
144
+ */
145
+ arguments: v3.optional(v3.array(v3.string()))
146
+ });
147
+ var stxCallContractResultSchema = v3.object({
148
+ /**
149
+ * The ID of the transaction.
150
+ */
151
+ txid: v3.string(),
152
+ /**
153
+ * A Stacks transaction as a hex-encoded string.
154
+ */
155
+ transaction: v3.string()
156
+ });
157
+ var stxCallContractRequestMessageSchema = v3.object({
158
+ ...rpcRequestMessageSchema.entries,
159
+ ...v3.object({
160
+ method: v3.literal(stxCallContractMethodName),
161
+ params: stxCallContractParamsSchema,
162
+ id: v3.string()
163
+ }).entries
164
+ });
117
165
 
118
- // src/request/types/stxMethods.ts
166
+ // src/request/types/stxMethods/deployContract.ts
119
167
  import * as v4 from "valibot";
168
+ var stxDeployContractMethodName = "stx_deployContract";
169
+ var stxDeployContractParamsSchema = v4.object({
170
+ /**
171
+ * Name of the contract.
172
+ */
173
+ name: v4.string(),
174
+ /**
175
+ * The source code of the Clarity contract.
176
+ */
177
+ clarityCode: v4.string(),
178
+ /**
179
+ * The version of the Clarity contract.
180
+ */
181
+ clarityVersion: v4.optional(v4.string())
182
+ });
183
+ var stxDeployContractResultSchema = v4.object({
184
+ /**
185
+ * The ID of the transaction.
186
+ */
187
+ txid: v4.string(),
188
+ /**
189
+ * A Stacks transaction as a hex-encoded string.
190
+ */
191
+ transaction: v4.string()
192
+ });
193
+ var stxDeployContractRequestMessageSchema = v4.object({
194
+ ...rpcRequestMessageSchema.entries,
195
+ ...v4.object({
196
+ method: v4.literal(stxDeployContractMethodName),
197
+ params: stxDeployContractParamsSchema,
198
+ id: v4.string()
199
+ }).entries
200
+ });
201
+
202
+ // src/request/types/stxMethods/getAccounts.ts
203
+ import * as v5 from "valibot";
204
+ var stxGetAccountsMethodName = "stx_getAccounts";
205
+ var stxGetAccountsParamsSchema = v5.nullish(v5.null());
206
+ var stxGetAccountsResultSchema = v5.object({
207
+ /**
208
+ * The addresses generated for the given purposes.
209
+ */
210
+ addresses: v5.array(
211
+ v5.object({
212
+ address: v5.string(),
213
+ publicKey: v5.string(),
214
+ gaiaHubUrl: v5.string(),
215
+ gaiaAppKey: v5.string()
216
+ })
217
+ )
218
+ });
219
+ var stxGetAccountsRequestMessageSchema = v5.object({
220
+ ...rpcRequestMessageSchema.entries,
221
+ ...v5.object({
222
+ method: v5.literal(stxGetAccountsMethodName),
223
+ params: stxGetAccountsParamsSchema,
224
+ id: v5.string()
225
+ }).entries
226
+ });
120
227
 
121
228
  // src/addresses/index.ts
122
229
  import { createUnsecuredToken } from "jsontokens";
123
230
 
124
231
  // src/addresses/types.ts
125
- import * as v3 from "valibot";
232
+ import * as v6 from "valibot";
126
233
  var AddressPurpose = /* @__PURE__ */ ((AddressPurpose2) => {
127
234
  AddressPurpose2["Ordinals"] = "ordinals";
128
235
  AddressPurpose2["Payment"] = "payment";
@@ -138,11 +245,11 @@ var AddressType = /* @__PURE__ */ ((AddressType3) => {
138
245
  AddressType3["stacks"] = "stacks";
139
246
  return AddressType3;
140
247
  })(AddressType || {});
141
- var addressSchema = v3.object({
142
- address: v3.string(),
143
- publicKey: v3.string(),
144
- purpose: v3.enum(AddressPurpose),
145
- addressType: v3.enum(AddressType)
248
+ var addressSchema = v6.object({
249
+ address: v6.string(),
250
+ publicKey: v6.string(),
251
+ purpose: v6.enum(AddressPurpose),
252
+ addressType: v6.enum(AddressType)
146
253
  });
147
254
 
148
255
  // src/addresses/index.ts
@@ -162,167 +269,269 @@ var getAddress = async (options) => {
162
269
  }
163
270
  };
164
271
 
165
- // src/request/types/stxMethods.ts
166
- var stxCallContractMethodName = "stx_callContract";
167
- var stxCallContractParamsSchema = v4.object({
272
+ // src/request/types/stxMethods/getAddresses.ts
273
+ import * as v7 from "valibot";
274
+ var stxGetAddressesMethodName = "stx_getAddresses";
275
+ var stxGetAddressesParamsSchema = v7.nullish(
276
+ v7.object({
277
+ /**
278
+ * A message to be displayed to the user in the request prompt.
279
+ */
280
+ message: v7.optional(v7.string())
281
+ })
282
+ );
283
+ var stxGetAddressesResultSchema = v7.object({
168
284
  /**
169
- * The contract principal.
170
- *
171
- * E.g. `"SPKE...GD5C.my-contract"`
285
+ * The addresses generated for the given purposes.
286
+ */
287
+ addresses: v7.array(addressSchema)
288
+ });
289
+ var stxGetAddressesRequestMessageSchema = v7.object({
290
+ ...rpcRequestMessageSchema.entries,
291
+ ...v7.object({
292
+ method: v7.literal(stxGetAddressesMethodName),
293
+ params: stxGetAddressesParamsSchema,
294
+ id: v7.string()
295
+ }).entries
296
+ });
297
+
298
+ // src/request/types/stxMethods/signMessage.ts
299
+ import * as v8 from "valibot";
300
+ var stxSignMessageMethodName = "stx_signMessage";
301
+ var stxSignMessageParamsSchema = v8.object({
302
+ /**
303
+ * The message to sign.
172
304
  */
173
- contract: v4.string(),
305
+ message: v8.string(),
174
306
  /**
175
- * The name of the function to call.
176
- *
177
- * Note: spec changes ongoing,
178
- * https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
307
+ * The public key to sign the message with.
179
308
  */
180
- functionName: v4.string(),
309
+ publicKey: v8.string(),
181
310
  /**
182
- * The function's arguments. The arguments are expected to be hex-encoded
183
- * strings of Clarity values.
184
- *
185
- * To convert Clarity values to their hex representation, the `cvToString`
186
- * helper from the `@stacks/transactions` package may be helpful.
187
- *
188
- * ```js
189
- * import { cvToString } from '@stacks/transactions';
190
- *
191
- * const functionArgs = [someClarityValue1, someClarityValue2];
192
- * const hexArgs = functionArgs.map(cvToString);
193
- * ```
311
+ * The format version of the parameter.
194
312
  */
195
- arguments: v4.optional(v4.array(v4.string()))
313
+ parameterFormatVersion: v8.optional(v8.number())
196
314
  });
197
- var stxCallContractResultSchema = v4.object({
315
+ var stxSignMessageResultSchema = v8.object({
198
316
  /**
199
- * The ID of the transaction.
317
+ * The signature of the message.
200
318
  */
201
- txid: v4.string(),
319
+ signature: v8.string(),
202
320
  /**
203
- * A Stacks transaction as a hex-encoded string.
321
+ * The public key used to sign the message.
204
322
  */
205
- transaction: v4.string()
323
+ publicKey: v8.string()
206
324
  });
207
- var stxCallContractRequestMessageSchema = v4.object({
325
+ var stxSignMessageRequestMessageSchema = v8.object({
208
326
  ...rpcRequestMessageSchema.entries,
209
- ...v4.object({
210
- method: v4.literal(stxCallContractMethodName),
211
- params: stxCallContractParamsSchema,
212
- id: v4.string()
327
+ ...v8.object({
328
+ method: v8.literal(stxSignMessageMethodName),
329
+ params: stxSignMessageParamsSchema,
330
+ id: v8.string()
213
331
  }).entries
214
332
  });
215
- var stxGetAddressesMethodName = "stx_getAddresses";
216
- var stxGetAddressesParamsSchema = v4.nullish(
217
- v4.object({
218
- /**
219
- * A message to be displayed to the user in the request prompt.
220
- */
221
- message: v4.optional(v4.string())
222
- })
223
- );
224
- var stxGetAddressesResultSchema = v4.object({
333
+
334
+ // src/request/types/stxMethods/signStructuredMessage.ts
335
+ import * as v9 from "valibot";
336
+ var stxSignStructuredMessageMethodName = "stx_signStructuredMessage";
337
+ var stxSignStructuredMessageParamsSchema = v9.object({
225
338
  /**
226
- * The addresses generated for the given purposes.
339
+ * The domain to be signed.
340
+ */
341
+ domain: v9.string(),
342
+ /**
343
+ * Message payload to be signed.
227
344
  */
228
- addresses: v4.array(addressSchema)
345
+ message: v9.string(),
346
+ /**
347
+ * The format version of the parameter.
348
+ */
349
+ parameterFormatVersion: v9.optional(v9.number()),
350
+ /**
351
+ * The public key to sign the message with.
352
+ */
353
+ publicKey: v9.optional(v9.string())
354
+ });
355
+ var stxSignStructuredMessageResultSchema = v9.object({
356
+ /**
357
+ * Signature of the message.
358
+ */
359
+ signature: v9.string(),
360
+ /**
361
+ * Public key as hex-encoded string.
362
+ */
363
+ publicKey: v9.string()
229
364
  });
230
- var stxGetAddressesRequestMessageSchema = v4.object({
365
+ var stxSignStructuredMessageRequestMessageSchema = v9.object({
231
366
  ...rpcRequestMessageSchema.entries,
232
- ...v4.object({
233
- method: v4.literal(stxGetAddressesMethodName),
234
- params: stxGetAddressesParamsSchema,
235
- id: v4.string()
367
+ ...v9.object({
368
+ method: v9.literal(stxSignStructuredMessageMethodName),
369
+ params: stxSignStructuredMessageParamsSchema,
370
+ id: v9.string()
236
371
  }).entries
237
372
  });
373
+
374
+ // src/request/types/stxMethods/signTransaction.ts
375
+ import * as v10 from "valibot";
238
376
  var stxSignTransactionMethodName = "stx_signTransaction";
239
- var stxSignTransactionParamsSchema = v4.object({
377
+ var stxSignTransactionParamsSchema = v10.object({
240
378
  /**
241
379
  * The transaction to sign as a hex-encoded string.
242
380
  */
243
- transaction: v4.string(),
381
+ transaction: v10.string(),
244
382
  /**
245
383
  * The public key to sign the transaction with. The wallet may use any key
246
384
  * when not provided.
247
385
  */
248
- pubkey: v4.optional(v4.string()),
386
+ pubkey: v10.optional(v10.string()),
249
387
  /**
250
388
  * Whether to broadcast the transaction after signing. Defaults to `true`.
251
389
  */
252
- broadcast: v4.optional(v4.boolean())
390
+ broadcast: v10.optional(v10.boolean())
253
391
  });
254
- var stxSignTransactionResultSchema = v4.object({
392
+ var stxSignTransactionResultSchema = v10.object({
255
393
  /**
256
394
  * The signed transaction as a hex-encoded string.
257
395
  */
258
- transaction: v4.string()
396
+ transaction: v10.string()
259
397
  });
260
- var stxSignTransactionRequestMessageSchema = v4.object({
398
+ var stxSignTransactionRequestMessageSchema = v10.object({
261
399
  ...rpcRequestMessageSchema.entries,
262
- ...v4.object({
263
- method: v4.literal(stxSignTransactionMethodName),
400
+ ...v10.object({
401
+ method: v10.literal(stxSignTransactionMethodName),
264
402
  params: stxSignTransactionParamsSchema,
265
- id: v4.string()
403
+ id: v10.string()
404
+ }).entries
405
+ });
406
+
407
+ // src/request/types/stxMethods/transferStx.ts
408
+ import * as v11 from "valibot";
409
+ var stxTransferStxMethodName = "stx_transferStx";
410
+ var stxTransferStxParamsSchema = v11.object({
411
+ /**
412
+ * Amount of STX tokens to transfer in microstacks as a string. Anything
413
+ * parseable by `BigInt` is acceptable.
414
+ *
415
+ * Example,
416
+ *
417
+ * ```js
418
+ * const amount1 = 1234;
419
+ * const amount2 = 1234n;
420
+ * const amount3 = '1234';
421
+ * ```
422
+ */
423
+ amount: v11.union([v11.number(), v11.string()]),
424
+ /**
425
+ * The recipeint's principal.
426
+ */
427
+ recipient: v11.string(),
428
+ /**
429
+ * A string representing the memo.
430
+ */
431
+ memo: v11.optional(v11.string()),
432
+ /**
433
+ * Version of parameter format.
434
+ */
435
+ version: v11.optional(v11.string()),
436
+ /**
437
+ * The mode of the post conditions.
438
+ */
439
+ postConditionMode: v11.optional(v11.number()),
440
+ /**
441
+ * A hex-encoded string representing the post conditions.
442
+ *
443
+ * A post condition may be converted to it's hex representation using the `serializePostCondition` helper from the `@stacks/transactions` package,
444
+ *
445
+ * ```js
446
+ * import { serializePostCondition } from '@stacks/transactions';
447
+ *
448
+ * const postCondition = somePostCondition;
449
+ * const hexPostCondition = serializePostCondition(postCondition).toString('hex');
450
+ * ```
451
+ */
452
+ postConditions: v11.optional(v11.array(v11.string())),
453
+ /**
454
+ * The public key to sign the transaction with. The wallet may use any key
455
+ * when not provided.
456
+ */
457
+ pubkey: v11.optional(v11.string())
458
+ });
459
+ var stxTransferStxResultSchema = v11.object({
460
+ /**
461
+ * The ID of the transaction.
462
+ */
463
+ txid: v11.string(),
464
+ /**
465
+ * A Stacks transaction as a hex-encoded string.
466
+ */
467
+ transaction: v11.string()
468
+ });
469
+ var stxTransferStxRequestMessageSchema = v11.object({
470
+ ...rpcRequestMessageSchema.entries,
471
+ ...v11.object({
472
+ method: v11.literal(stxTransferStxMethodName),
473
+ params: stxTransferStxParamsSchema,
474
+ id: v11.string()
266
475
  }).entries
267
476
  });
268
477
 
269
478
  // src/request/types/btcMethods.ts
270
- import * as v6 from "valibot";
479
+ import * as v13 from "valibot";
271
480
 
272
481
  // src/request/types/common.ts
273
- import * as v5 from "valibot";
482
+ import * as v12 from "valibot";
274
483
  var walletTypes = ["software", "ledger"];
275
- var walletTypeSchema = v5.picklist(walletTypes);
484
+ var walletTypeSchema = v12.picklist(walletTypes);
276
485
 
277
486
  // src/request/types/btcMethods.ts
278
487
  var getInfoMethodName = "getInfo";
279
- var getInfoParamsSchema = v6.nullish(v6.null());
280
- var getInfoResultSchema = v6.object({
488
+ var getInfoParamsSchema = v13.nullish(v13.null());
489
+ var getInfoResultSchema = v13.object({
281
490
  /**
282
491
  * Version of the wallet.
283
492
  */
284
- version: v6.string(),
493
+ version: v13.string(),
285
494
  /**
286
495
  * [WBIP](https://wbips.netlify.app/wbips/WBIP002) methods supported by the wallet.
287
496
  */
288
- methods: v6.optional(v6.array(v6.string())),
497
+ methods: v13.optional(v13.array(v13.string())),
289
498
  /**
290
499
  * List of WBIP standards supported by the wallet. Not currently used.
291
500
  */
292
- supports: v6.array(v6.string())
501
+ supports: v13.array(v13.string())
293
502
  });
294
- var getInfoRequestMessageSchema = v6.object({
503
+ var getInfoRequestMessageSchema = v13.object({
295
504
  ...rpcRequestMessageSchema.entries,
296
- ...v6.object({
297
- method: v6.literal(getInfoMethodName),
505
+ ...v13.object({
506
+ method: v13.literal(getInfoMethodName),
298
507
  params: getInfoParamsSchema,
299
- id: v6.string()
508
+ id: v13.string()
300
509
  }).entries
301
510
  });
302
511
  var getAddressesMethodName = "getAddresses";
303
- var getAddressesParamsSchema = v6.object({
512
+ var getAddressesParamsSchema = v13.object({
304
513
  /**
305
514
  * The purposes for which to generate addresses. See
306
515
  * {@linkcode AddressPurpose} for available purposes.
307
516
  */
308
- purposes: v6.array(v6.enum(AddressPurpose)),
517
+ purposes: v13.array(v13.enum(AddressPurpose)),
309
518
  /**
310
519
  * A message to be displayed to the user in the request prompt.
311
520
  */
312
- message: v6.optional(v6.string())
521
+ message: v13.optional(v13.string())
313
522
  });
314
- var getAddressesResultSchema = v6.object({
523
+ var getAddressesResultSchema = v13.object({
315
524
  /**
316
525
  * The addresses generated for the given purposes.
317
526
  */
318
- addresses: v6.array(addressSchema)
527
+ addresses: v13.array(addressSchema)
319
528
  });
320
- var getAddressesRequestMessageSchema = v6.object({
529
+ var getAddressesRequestMessageSchema = v13.object({
321
530
  ...rpcRequestMessageSchema.entries,
322
- ...v6.object({
323
- method: v6.literal(getAddressesMethodName),
531
+ ...v13.object({
532
+ method: v13.literal(getAddressesMethodName),
324
533
  params: getAddressesParamsSchema,
325
- id: v6.string()
534
+ id: v13.string()
326
535
  }).entries
327
536
  });
328
537
  var signMessageMethodName = "signMessage";
@@ -331,364 +540,456 @@ var MessageSigningProtocols = /* @__PURE__ */ ((MessageSigningProtocols2) => {
331
540
  MessageSigningProtocols2["BIP322"] = "BIP322";
332
541
  return MessageSigningProtocols2;
333
542
  })(MessageSigningProtocols || {});
334
- var signMessageParamsSchema = v6.object({
543
+ var signMessageParamsSchema = v13.object({
335
544
  /**
336
545
  * The address used for signing.
337
546
  **/
338
- address: v6.string(),
547
+ address: v13.string(),
339
548
  /**
340
549
  * The message to sign.
341
550
  **/
342
- message: v6.string(),
551
+ message: v13.string(),
343
552
  /**
344
553
  * The protocol to use for signing the message.
345
554
  */
346
- protocol: v6.optional(v6.enum(MessageSigningProtocols))
555
+ protocol: v13.optional(v13.enum(MessageSigningProtocols))
347
556
  });
348
- var signMessageResultSchema = v6.object({
557
+ var signMessageResultSchema = v13.object({
349
558
  /**
350
559
  * The signature of the message.
351
560
  */
352
- signature: v6.string(),
561
+ signature: v13.string(),
353
562
  /**
354
563
  * hash of the message.
355
564
  */
356
- messageHash: v6.string(),
565
+ messageHash: v13.string(),
357
566
  /**
358
567
  * The address used for signing.
359
568
  */
360
- address: v6.string(),
569
+ address: v13.string(),
361
570
  /**
362
571
  * The protocol to use for signing the message.
363
572
  */
364
- protocol: v6.enum(MessageSigningProtocols)
573
+ protocol: v13.enum(MessageSigningProtocols)
365
574
  });
366
- var signMessageRequestMessageSchema = v6.object({
575
+ var signMessageRequestMessageSchema = v13.object({
367
576
  ...rpcRequestMessageSchema.entries,
368
- ...v6.object({
369
- method: v6.literal(signMessageMethodName),
577
+ ...v13.object({
578
+ method: v13.literal(signMessageMethodName),
370
579
  params: signMessageParamsSchema,
371
- id: v6.string()
580
+ id: v13.string()
372
581
  }).entries
373
582
  });
374
583
  var sendTransferMethodName = "sendTransfer";
375
- var sendTransferParamsSchema = v6.object({
584
+ var sendTransferParamsSchema = v13.object({
376
585
  /**
377
586
  * Array of recipients to send to.
378
587
  * The amount to send to each recipient is in satoshis.
379
588
  */
380
- recipients: v6.array(
381
- v6.object({
382
- address: v6.string(),
383
- amount: v6.number()
589
+ recipients: v13.array(
590
+ v13.object({
591
+ address: v13.string(),
592
+ amount: v13.number()
384
593
  })
385
594
  )
386
595
  });
387
- var sendTransferResultSchema = v6.object({
596
+ var sendTransferResultSchema = v13.object({
388
597
  /**
389
598
  * The transaction id as a hex-encoded string.
390
599
  */
391
- txid: v6.string()
600
+ txid: v13.string()
392
601
  });
393
- var sendTransferRequestMessageSchema = v6.object({
602
+ var sendTransferRequestMessageSchema = v13.object({
394
603
  ...rpcRequestMessageSchema.entries,
395
- ...v6.object({
396
- method: v6.literal(sendTransferMethodName),
604
+ ...v13.object({
605
+ method: v13.literal(sendTransferMethodName),
397
606
  params: sendTransferParamsSchema,
398
- id: v6.string()
607
+ id: v13.string()
399
608
  }).entries
400
609
  });
401
610
  var signPsbtMethodName = "signPsbt";
402
- var signPsbtParamsSchema = v6.object({
611
+ var signPsbtParamsSchema = v13.object({
403
612
  /**
404
613
  * The base64 encoded PSBT to sign.
405
614
  */
406
- psbt: v6.string(),
615
+ psbt: v13.string(),
407
616
  /**
408
617
  * The inputs to sign.
409
618
  * The key is the address and the value is an array of indexes of the inputs to sign.
410
619
  */
411
- signInputs: v6.record(v6.string(), v6.array(v6.number())),
412
- allowedSignHash: v6.optional(v6.number()),
620
+ signInputs: v13.record(v13.string(), v13.array(v13.number())),
413
621
  /**
414
622
  * Whether to broadcast the transaction after signing.
415
623
  **/
416
- broadcast: v6.optional(v6.boolean())
624
+ broadcast: v13.optional(v13.boolean())
417
625
  });
418
- var signPsbtResultSchema = v6.object({
626
+ var signPsbtResultSchema = v13.object({
419
627
  /**
420
628
  * The base64 encoded PSBT after signing.
421
629
  */
422
- psbt: v6.string(),
630
+ psbt: v13.string(),
423
631
  /**
424
632
  * The transaction id as a hex-encoded string.
425
633
  * This is only returned if the transaction was broadcast.
426
634
  **/
427
- txid: v6.optional(v6.string())
635
+ txid: v13.optional(v13.string())
428
636
  });
429
- var signPsbtRequestMessageSchema = v6.object({
637
+ var signPsbtRequestMessageSchema = v13.object({
430
638
  ...rpcRequestMessageSchema.entries,
431
- ...v6.object({
432
- method: v6.literal(signPsbtMethodName),
639
+ ...v13.object({
640
+ method: v13.literal(signPsbtMethodName),
433
641
  params: signPsbtParamsSchema,
434
- id: v6.string()
642
+ id: v13.string()
435
643
  }).entries
436
644
  });
437
645
  var getAccountsMethodName = "getAccounts";
438
- var getAccountsParamsSchema = v6.object({
646
+ var getAccountsParamsSchema = v13.object({
439
647
  /**
440
648
  * The purposes for which to generate addresses. See
441
649
  * {@linkcode AddressPurpose} for available purposes.
442
650
  */
443
- purposes: v6.array(v6.enum(AddressPurpose)),
651
+ purposes: v13.array(v13.enum(AddressPurpose)),
444
652
  /**
445
653
  * A message to be displayed to the user in the request prompt.
446
654
  */
447
- message: v6.optional(v6.string())
655
+ message: v13.optional(v13.string())
448
656
  });
449
- var getAccountsResultSchema = v6.array(
450
- v6.object({
657
+ var getAccountsResultSchema = v13.array(
658
+ v13.object({
451
659
  ...addressSchema.entries,
452
- ...v6.object({
660
+ ...v13.object({
453
661
  walletType: walletTypeSchema
454
662
  }).entries
455
663
  })
456
664
  );
457
- var getAccountsRequestMessageSchema = v6.object({
665
+ var getAccountsRequestMessageSchema = v13.object({
458
666
  ...rpcRequestMessageSchema.entries,
459
- ...v6.object({
460
- method: v6.literal(getAccountsMethodName),
667
+ ...v13.object({
668
+ method: v13.literal(getAccountsMethodName),
461
669
  params: getAccountsParamsSchema,
462
- id: v6.string()
670
+ id: v13.string()
463
671
  }).entries
464
672
  });
465
673
  var getBalanceMethodName = "getBalance";
466
- var getBalanceParamsSchema = v6.nullish(v6.null());
467
- var getBalanceResultSchema = v6.object({
674
+ var getBalanceParamsSchema = v13.nullish(v13.null());
675
+ var getBalanceResultSchema = v13.object({
468
676
  /**
469
677
  * The confirmed balance of the wallet in sats. Using a string due to chrome
470
678
  * messages not supporting bigint
471
679
  * (https://issues.chromium.org/issues/40116184).
472
680
  */
473
- confirmed: v6.string(),
681
+ confirmed: v13.string(),
474
682
  /**
475
683
  * The unconfirmed balance of the wallet in sats. Using a string due to chrome
476
684
  * messages not supporting bigint
477
685
  * (https://issues.chromium.org/issues/40116184).
478
686
  */
479
- unconfirmed: v6.string(),
687
+ unconfirmed: v13.string(),
480
688
  /**
481
689
  * The total balance (both confirmed and unconfrimed UTXOs) of the wallet in
482
690
  * sats. Using a string due to chrome messages not supporting bigint
483
691
  * (https://issues.chromium.org/issues/40116184).
484
692
  */
485
- total: v6.string()
693
+ total: v13.string()
486
694
  });
487
- var getBalanceRequestMessageSchema = v6.object({
695
+ var getBalanceRequestMessageSchema = v13.object({
488
696
  ...rpcRequestMessageSchema.entries,
489
- ...v6.object({
490
- method: v6.literal(getBalanceMethodName),
491
- id: v6.string()
697
+ ...v13.object({
698
+ method: v13.literal(getBalanceMethodName),
699
+ id: v13.string()
492
700
  }).entries
493
701
  });
494
702
 
495
703
  // src/request/types/walletMethods.ts
496
- import * as v7 from "valibot";
497
- import { permissions } from "@secretkeylabs/xverse-core";
498
- var permissionTemplate = v7.variant("type", [
499
- v7.object({
500
- ...v7.omit(permissions.resources.account.accountPermissionSchema, ["clientId", "actions"]).entries,
501
- actions: v7.partial(permissions.resources.account.accountActionsSchema)
704
+ import * as v14 from "valibot";
705
+ var accountActionsSchema = v14.object({
706
+ read: v14.optional(v14.boolean())
707
+ });
708
+ var walletActionsSchema = v14.object({});
709
+ var accountPermissionSchema = v14.object({
710
+ type: v14.literal("account"),
711
+ resourceId: v14.string(),
712
+ clientId: v14.string(),
713
+ actions: accountActionsSchema
714
+ });
715
+ var walletPermissionSchema = v14.object({
716
+ type: v14.literal("wallet"),
717
+ resourceId: v14.string(),
718
+ clientId: v14.string(),
719
+ actions: walletActionsSchema
720
+ });
721
+ var PermissionRequestParams = v14.variant("type", [
722
+ v14.object({
723
+ ...v14.omit(accountPermissionSchema, ["clientId"]).entries
502
724
  }),
503
- v7.object({
504
- ...v7.omit(permissions.resources.wallet.walletPermissionSchema, ["clientId"]).entries,
505
- actions: v7.partial(permissions.resources.wallet.walletActionsSchema)
725
+ v14.object({
726
+ ...v14.omit(walletPermissionSchema, ["clientId"]).entries
506
727
  })
507
728
  ]);
729
+ var permission = v14.variant("type", [accountPermissionSchema, walletPermissionSchema]);
508
730
  var requestPermissionsMethodName = "wallet_requestPermissions";
509
- var requestPermissionsParamsSchema = v7.nullish(v7.array(permissionTemplate));
510
- var requestPermissionsResultSchema = v7.literal(true);
511
- var requestPermissionsRequestMessageSchema = v7.object({
731
+ var requestPermissionsParamsSchema = v14.nullish(v14.array(PermissionRequestParams));
732
+ var requestPermissionsResultSchema = v14.literal(true);
733
+ var requestPermissionsRequestMessageSchema = v14.object({
512
734
  ...rpcRequestMessageSchema.entries,
513
- ...v7.object({
514
- method: v7.literal(requestPermissionsMethodName),
735
+ ...v14.object({
736
+ method: v14.literal(requestPermissionsMethodName),
515
737
  params: requestPermissionsParamsSchema,
516
- id: v7.string()
738
+ id: v14.string()
517
739
  }).entries
518
740
  });
519
741
  var renouncePermissionsMethodName = "wallet_renouncePermissions";
520
- var renouncePermissionsParamsSchema = v7.nullish(v7.null());
521
- var renouncePermissionsResultSchema = v7.nullish(v7.null());
522
- var renouncePermissionsRequestMessageSchema = v7.object({
742
+ var renouncePermissionsParamsSchema = v14.nullish(v14.null());
743
+ var renouncePermissionsResultSchema = v14.nullish(v14.null());
744
+ var renouncePermissionsRequestMessageSchema = v14.object({
523
745
  ...rpcRequestMessageSchema.entries,
524
- ...v7.object({
525
- method: v7.literal(renouncePermissionsMethodName),
746
+ ...v14.object({
747
+ method: v14.literal(renouncePermissionsMethodName),
526
748
  params: renouncePermissionsParamsSchema,
527
- id: v7.string()
749
+ id: v14.string()
528
750
  }).entries
529
751
  });
530
752
  var disconnectMethodName = "wallet_disconnect";
531
- var disconnectParamsSchema = v7.nullish(v7.null());
532
- var disconnectResultSchema = v7.nullish(v7.null());
533
- var disconnectRequestMessageSchema = v7.object({
753
+ var disconnectParamsSchema = v14.nullish(v14.null());
754
+ var disconnectResultSchema = v14.nullish(v14.null());
755
+ var disconnectRequestMessageSchema = v14.object({
534
756
  ...rpcRequestMessageSchema.entries,
535
- ...v7.object({
536
- method: v7.literal(disconnectMethodName),
757
+ ...v14.object({
758
+ method: v14.literal(disconnectMethodName),
537
759
  params: disconnectParamsSchema,
538
- id: v7.string()
760
+ id: v14.string()
539
761
  }).entries
540
762
  });
541
763
  var getWalletTypeMethodName = "wallet_getWalletType";
542
- var getWalletTypeParamsSchema = v7.nullish(v7.null());
764
+ var getWalletTypeParamsSchema = v14.nullish(v14.null());
543
765
  var getWalletTypeResultSchema = walletTypeSchema;
544
- var getWalletTypeRequestMessageSchema = v7.object({
766
+ var getWalletTypeRequestMessageSchema = v14.object({
545
767
  ...rpcRequestMessageSchema.entries,
546
- ...v7.object({
547
- method: v7.literal(getWalletTypeMethodName),
768
+ ...v14.object({
769
+ method: v14.literal(getWalletTypeMethodName),
548
770
  params: getWalletTypeParamsSchema,
549
- id: v7.string()
771
+ id: v14.string()
550
772
  }).entries
551
773
  });
552
774
  var getCurrentPermissionsMethodName = "wallet_getCurrentPermissions";
553
- var getCurrentPermissionsParamsSchema = v7.nullish(v7.null());
554
- var getCurrentPermissionsResultSchema = v7.array(permissions.store.permission);
555
- var getCurrentPermissionsRequestMessageSchema = v7.object({
775
+ var getCurrentPermissionsParamsSchema = v14.nullish(v14.null());
776
+ var getCurrentPermissionsResultSchema = v14.array(permission);
777
+ var getCurrentPermissionsRequestMessageSchema = v14.object({
556
778
  ...rpcRequestMessageSchema.entries,
557
- ...v7.object({
558
- method: v7.literal(getCurrentPermissionsMethodName),
779
+ ...v14.object({
780
+ method: v14.literal(getCurrentPermissionsMethodName),
559
781
  params: getCurrentPermissionsParamsSchema,
560
- id: v7.string()
782
+ id: v14.string()
561
783
  }).entries
562
784
  });
563
785
  var getAccountMethodName = "wallet_getAccount";
564
- var getAccountParamsSchema = v7.nullish(v7.null());
565
- var getAccountResultSchema = v7.object({
566
- id: permissions.utils.account.accountIdSchema,
567
- addresses: v7.array(addressSchema),
786
+ var getAccountParamsSchema = v14.nullish(v14.null());
787
+ var getAccountResultSchema = v14.object({
788
+ id: v14.string(),
789
+ addresses: v14.array(addressSchema),
568
790
  walletType: walletTypeSchema
569
791
  });
570
- var getAccountRequestMessageSchema = v7.object({
792
+ var getAccountRequestMessageSchema = v14.object({
571
793
  ...rpcRequestMessageSchema.entries,
572
- ...v7.object({
573
- method: v7.literal(getAccountMethodName),
794
+ ...v14.object({
795
+ method: v14.literal(getAccountMethodName),
574
796
  params: getAccountParamsSchema,
575
- id: v7.string()
797
+ id: v14.string()
576
798
  }).entries
577
799
  });
578
800
  var connectMethodName = "wallet_connect";
579
- var connectParamsSchema = v7.nullish(
580
- v7.object({
581
- permissions: v7.optional(v7.array(permissionTemplate))
801
+ var connectParamsSchema = v14.nullish(
802
+ v14.object({
803
+ permissions: v14.optional(v14.array(PermissionRequestParams)),
804
+ addresses: v14.optional(v14.array(v14.enum(AddressPurpose))),
805
+ message: v14.optional(
806
+ v14.pipe(v14.string(), v14.maxLength(80, "The message must not exceed 80 characters."))
807
+ )
582
808
  })
583
809
  );
584
810
  var connectResultSchema = getAccountResultSchema;
585
- var connectRequestMessageSchema = v7.object({
811
+ var connectRequestMessageSchema = v14.object({
586
812
  ...rpcRequestMessageSchema.entries,
587
- ...v7.object({
588
- method: v7.literal(connectMethodName),
813
+ ...v14.object({
814
+ method: v14.literal(connectMethodName),
589
815
  params: connectParamsSchema,
590
- id: v7.string()
816
+ id: v14.string()
591
817
  }).entries
592
818
  });
593
819
 
594
- // src/request/types/runesMethods.ts
595
- import * as v8 from "valibot";
596
- var getRunesBalanceMethodName = "runes_getBalance";
597
- var getRunesBalanceParamsSchema = v8.nullish(v8.null());
598
- var getRunesBalanceResultSchema = v8.object({
599
- balances: v8.array(
600
- v8.object({
601
- runeName: v8.string(),
602
- amount: v8.string(),
603
- divisibility: v8.number(),
604
- symbol: v8.string(),
605
- inscriptionId: v8.nullish(v8.string())
820
+ // src/request/types/runesMethods/etch.ts
821
+ import * as v15 from "valibot";
822
+ var runesEtchMethodName = "runes_etch";
823
+ var etchTermsSchema = v15.object({
824
+ amount: v15.string(),
825
+ cap: v15.string(),
826
+ heightStart: v15.optional(v15.string()),
827
+ heightEnd: v15.optional(v15.string()),
828
+ offsetStart: v15.optional(v15.string()),
829
+ offsetEnd: v15.optional(v15.string())
830
+ });
831
+ var inscriptionDetailsSchema = v15.object({
832
+ contentType: v15.string(),
833
+ contentBase64: v15.string()
834
+ });
835
+ var runesEtchParamsSchema = v15.object({
836
+ runeName: v15.string(),
837
+ divisibility: v15.optional(v15.number()),
838
+ symbol: v15.optional(v15.string()),
839
+ premine: v15.optional(v15.string()),
840
+ isMintable: v15.boolean(),
841
+ delegateInscriptionId: v15.optional(v15.string()),
842
+ destinationAddress: v15.string(),
843
+ refundAddress: v15.string(),
844
+ feeRate: v15.number(),
845
+ appServiceFee: v15.optional(v15.number()),
846
+ appServiceFeeAddress: v15.optional(v15.string()),
847
+ terms: v15.optional(etchTermsSchema),
848
+ inscriptionDetails: v15.optional(inscriptionDetailsSchema),
849
+ network: v15.optional(v15.enum(BitcoinNetworkType))
850
+ });
851
+ var runesEtchResultSchema = v15.object({
852
+ orderId: v15.string(),
853
+ fundTransactionId: v15.string(),
854
+ fundingAddress: v15.string()
855
+ });
856
+ var runesEtchRequestMessageSchema = v15.object({
857
+ ...rpcRequestMessageSchema.entries,
858
+ ...v15.object({
859
+ method: v15.literal(runesEtchMethodName),
860
+ params: runesEtchParamsSchema,
861
+ id: v15.string()
862
+ }).entries
863
+ });
864
+
865
+ // src/request/types/runesMethods/getBalance.ts
866
+ import * as v16 from "valibot";
867
+ var runesGetBalanceMethodName = "runes_getBalance";
868
+ var runesGetBalanceParamsSchema = v16.nullish(v16.null());
869
+ var runesGetBalanceResultSchema = v16.object({
870
+ balances: v16.array(
871
+ v16.object({
872
+ runeName: v16.string(),
873
+ amount: v16.string(),
874
+ divisibility: v16.number(),
875
+ symbol: v16.string(),
876
+ inscriptionId: v16.nullish(v16.string())
606
877
  })
607
878
  )
608
879
  });
609
- var getRunesBalanceRequestMessageSchema = v8.object({
880
+ var runesGetBalanceRequestMessageSchema = v16.object({
610
881
  ...rpcRequestMessageSchema.entries,
611
- ...v8.object({
612
- method: v8.literal(getRunesBalanceMethodName),
613
- params: getRunesBalanceParamsSchema,
614
- id: v8.string()
882
+ ...v16.object({
883
+ method: v16.literal(runesGetBalanceMethodName),
884
+ params: runesGetBalanceParamsSchema,
885
+ id: v16.string()
615
886
  }).entries
616
887
  });
617
- var transferRunesMethodName = "runes_transfer";
618
- var transferRunesParamsSchema = v8.object({
619
- recipients: v8.array(
620
- v8.object({
621
- runeName: v8.string(),
622
- amount: v8.string(),
623
- address: v8.string()
888
+
889
+ // src/request/types/runesMethods/mint.ts
890
+ import * as v17 from "valibot";
891
+ var runesMintMethodName = "runes_mint";
892
+ var runesMintParamsSchema = v17.object({
893
+ appServiceFee: v17.optional(v17.number()),
894
+ appServiceFeeAddress: v17.optional(v17.string()),
895
+ destinationAddress: v17.string(),
896
+ feeRate: v17.number(),
897
+ refundAddress: v17.string(),
898
+ repeats: v17.number(),
899
+ runeName: v17.string(),
900
+ network: v17.optional(v17.enum(BitcoinNetworkType))
901
+ });
902
+ var runesMintResultSchema = v17.object({
903
+ orderId: v17.string(),
904
+ fundTransactionId: v17.string(),
905
+ fundingAddress: v17.string()
906
+ });
907
+ var runesMintRequestMessageSchema = v17.object({
908
+ ...rpcRequestMessageSchema.entries,
909
+ ...v17.object({
910
+ method: v17.literal(runesMintMethodName),
911
+ params: runesMintParamsSchema,
912
+ id: v17.string()
913
+ }).entries
914
+ });
915
+
916
+ // src/request/types/runesMethods/transfer.ts
917
+ import * as v18 from "valibot";
918
+ var runesTransferMethodName = "runes_transfer";
919
+ var runesTransferParamsSchema = v18.object({
920
+ recipients: v18.array(
921
+ v18.object({
922
+ runeName: v18.string(),
923
+ amount: v18.string(),
924
+ address: v18.string()
624
925
  })
625
926
  )
626
927
  });
627
- var transferRunesRequestSchema = v8.object({
928
+ var runesTransferResultSchema = v18.object({
929
+ txid: v18.string()
930
+ });
931
+ var runesTransferRequestMessageSchema = v18.object({
628
932
  ...rpcRequestMessageSchema.entries,
629
- ...v8.object({
630
- method: v8.literal(transferRunesMethodName),
631
- params: transferRunesParamsSchema,
632
- id: v8.string()
933
+ ...v18.object({
934
+ method: v18.literal(runesTransferMethodName),
935
+ params: runesTransferParamsSchema,
936
+ id: v18.string()
633
937
  }).entries
634
938
  });
635
- var TransferRunesResultSchema = v8.object({
636
- txid: v8.string()
637
- });
638
939
 
639
940
  // src/request/types/ordinalsMethods.ts
640
- import * as v9 from "valibot";
941
+ import * as v19 from "valibot";
641
942
  var getInscriptionsMethodName = "ord_getInscriptions";
642
- var getInscriptionsParamsSchema = v9.object({
643
- offset: v9.number(),
644
- limit: v9.number()
645
- });
646
- var getInscriptionsResultSchema = v9.object({
647
- total: v9.number(),
648
- limit: v9.number(),
649
- offset: v9.number(),
650
- inscriptions: v9.array(
651
- v9.object({
652
- inscriptionId: v9.string(),
653
- inscriptionNumber: v9.string(),
654
- address: v9.string(),
655
- collectionName: v9.optional(v9.string()),
656
- postage: v9.string(),
657
- contentLength: v9.string(),
658
- contentType: v9.string(),
659
- timestamp: v9.number(),
660
- offset: v9.number(),
661
- genesisTransaction: v9.string(),
662
- output: v9.string()
943
+ var getInscriptionsParamsSchema = v19.object({
944
+ offset: v19.number(),
945
+ limit: v19.number()
946
+ });
947
+ var getInscriptionsResultSchema = v19.object({
948
+ total: v19.number(),
949
+ limit: v19.number(),
950
+ offset: v19.number(),
951
+ inscriptions: v19.array(
952
+ v19.object({
953
+ inscriptionId: v19.string(),
954
+ inscriptionNumber: v19.string(),
955
+ address: v19.string(),
956
+ collectionName: v19.optional(v19.string()),
957
+ postage: v19.string(),
958
+ contentLength: v19.string(),
959
+ contentType: v19.string(),
960
+ timestamp: v19.number(),
961
+ offset: v19.number(),
962
+ genesisTransaction: v19.string(),
963
+ output: v19.string()
663
964
  })
664
965
  )
665
966
  });
666
- var getInscriptionsSchema = v9.object({
967
+ var getInscriptionsRequestMessageSchema = v19.object({
667
968
  ...rpcRequestMessageSchema.entries,
668
- ...v9.object({
669
- method: v9.literal(getInscriptionsMethodName),
969
+ ...v19.object({
970
+ method: v19.literal(getInscriptionsMethodName),
670
971
  params: getInscriptionsParamsSchema,
671
- id: v9.string()
972
+ id: v19.string()
672
973
  }).entries
673
974
  });
674
975
  var sendInscriptionsMethodName = "ord_sendInscriptions";
675
- var sendInscriptionsParamsSchema = v9.object({
676
- transfers: v9.array(
677
- v9.object({
678
- address: v9.string(),
679
- inscriptionId: v9.string()
976
+ var sendInscriptionsParamsSchema = v19.object({
977
+ transfers: v19.array(
978
+ v19.object({
979
+ address: v19.string(),
980
+ inscriptionId: v19.string()
680
981
  })
681
982
  )
682
983
  });
683
- var sendInscriptionsResultSchema = v9.object({
684
- txid: v9.string()
984
+ var sendInscriptionsResultSchema = v19.object({
985
+ txid: v19.string()
685
986
  });
686
- var sendInscriptionsSchema = v9.object({
987
+ var sendInscriptionsRequestMessageSchema = v19.object({
687
988
  ...rpcRequestMessageSchema.entries,
688
- ...v9.object({
689
- method: v9.literal(sendInscriptionsMethodName),
989
+ ...v19.object({
990
+ method: v19.literal(sendInscriptionsMethodName),
690
991
  params: sendInscriptionsParamsSchema,
691
- id: v9.string()
992
+ id: v19.string()
692
993
  }).entries
693
994
  });
694
995
 
@@ -705,13 +1006,13 @@ var request = async (method, params, providerId) => {
705
1006
  throw new Error("A wallet method is required");
706
1007
  }
707
1008
  const response = await provider.request(method, params);
708
- if (v10.is(rpcErrorResponseMessageSchema, response)) {
1009
+ if (v20.is(rpcErrorResponseMessageSchema, response)) {
709
1010
  return {
710
1011
  status: "error",
711
1012
  error: response.error
712
1013
  };
713
1014
  }
714
- if (v10.is(rpcSuccessResponseMessageSchema, response)) {
1015
+ if (v20.is(rpcSuccessResponseMessageSchema, response)) {
715
1016
  return {
716
1017
  status: "success",
717
1018
  result: response.result
@@ -1467,8 +1768,7 @@ var extractOrValidateCapabilities = (provider, reportedCapabilities) => {
1467
1768
  addListener: validateCapability("addListener")
1468
1769
  };
1469
1770
  return Object.entries(capabilityMap).reduce((acc, [capability, value]) => {
1470
- if (value)
1471
- return [...acc, capability];
1771
+ if (value) return [...acc, capability];
1472
1772
  return acc;
1473
1773
  }, []);
1474
1774
  };
@@ -1659,12 +1959,14 @@ export {
1659
1959
  BitcoinNetworkType,
1660
1960
  DefaultAdaptersInfo,
1661
1961
  MessageSigningProtocols,
1962
+ PermissionRequestParams,
1662
1963
  RpcErrorCode,
1663
1964
  RpcIdSchema,
1664
1965
  SatsConnectAdapter,
1665
- TransferRunesResultSchema,
1966
+ accountActionsSchema,
1666
1967
  accountChangeEventName,
1667
1968
  accountChangeSchema,
1969
+ accountPermissionSchema,
1668
1970
  addListener,
1669
1971
  addressSchema,
1670
1972
  connectMethodName,
@@ -1709,15 +2011,11 @@ export {
1709
2011
  getInfoResultSchema,
1710
2012
  getInscriptionsMethodName,
1711
2013
  getInscriptionsParamsSchema,
2014
+ getInscriptionsRequestMessageSchema,
1712
2015
  getInscriptionsResultSchema,
1713
- getInscriptionsSchema,
1714
2016
  getProviderById,
1715
2017
  getProviderOrThrow,
1716
2018
  getProviders,
1717
- getRunesBalanceMethodName,
1718
- getRunesBalanceParamsSchema,
1719
- getRunesBalanceRequestMessageSchema,
1720
- getRunesBalanceResultSchema,
1721
2019
  getSupportedWallets,
1722
2020
  getWalletTypeMethodName,
1723
2021
  getWalletTypeParamsSchema,
@@ -1726,7 +2024,7 @@ export {
1726
2024
  isProviderInstalled,
1727
2025
  networkChangeEventName,
1728
2026
  networkChangeSchema,
1729
- permissionTemplate,
2027
+ permission,
1730
2028
  removeDefaultProvider,
1731
2029
  renouncePermissionsMethodName,
1732
2030
  renouncePermissionsParamsSchema,
@@ -1741,11 +2039,27 @@ export {
1741
2039
  rpcRequestMessageSchema,
1742
2040
  rpcResponseMessageSchema,
1743
2041
  rpcSuccessResponseMessageSchema,
2042
+ runesEtchMethodName,
2043
+ runesEtchParamsSchema,
2044
+ runesEtchRequestMessageSchema,
2045
+ runesEtchResultSchema,
2046
+ runesGetBalanceMethodName,
2047
+ runesGetBalanceParamsSchema,
2048
+ runesGetBalanceRequestMessageSchema,
2049
+ runesGetBalanceResultSchema,
2050
+ runesMintMethodName,
2051
+ runesMintParamsSchema,
2052
+ runesMintRequestMessageSchema,
2053
+ runesMintResultSchema,
2054
+ runesTransferMethodName,
2055
+ runesTransferParamsSchema,
2056
+ runesTransferRequestMessageSchema,
2057
+ runesTransferResultSchema,
1744
2058
  sendBtcTransaction,
1745
2059
  sendInscriptionsMethodName,
1746
2060
  sendInscriptionsParamsSchema,
2061
+ sendInscriptionsRequestMessageSchema,
1747
2062
  sendInscriptionsResultSchema,
1748
- sendInscriptionsSchema,
1749
2063
  sendTransferMethodName,
1750
2064
  sendTransferParamsSchema,
1751
2065
  sendTransferRequestMessageSchema,
@@ -1766,18 +2080,37 @@ export {
1766
2080
  stxCallContractParamsSchema,
1767
2081
  stxCallContractRequestMessageSchema,
1768
2082
  stxCallContractResultSchema,
2083
+ stxDeployContractMethodName,
2084
+ stxDeployContractParamsSchema,
2085
+ stxDeployContractRequestMessageSchema,
2086
+ stxDeployContractResultSchema,
2087
+ stxGetAccountsMethodName,
2088
+ stxGetAccountsParamsSchema,
2089
+ stxGetAccountsRequestMessageSchema,
2090
+ stxGetAccountsResultSchema,
1769
2091
  stxGetAddressesMethodName,
1770
2092
  stxGetAddressesParamsSchema,
1771
2093
  stxGetAddressesRequestMessageSchema,
1772
2094
  stxGetAddressesResultSchema,
2095
+ stxSignMessageMethodName,
2096
+ stxSignMessageParamsSchema,
2097
+ stxSignMessageRequestMessageSchema,
2098
+ stxSignMessageResultSchema,
2099
+ stxSignStructuredMessageMethodName,
2100
+ stxSignStructuredMessageParamsSchema,
2101
+ stxSignStructuredMessageRequestMessageSchema,
2102
+ stxSignStructuredMessageResultSchema,
1773
2103
  stxSignTransactionMethodName,
1774
2104
  stxSignTransactionParamsSchema,
1775
2105
  stxSignTransactionRequestMessageSchema,
1776
2106
  stxSignTransactionResultSchema,
1777
- transferRunesMethodName,
1778
- transferRunesParamsSchema,
1779
- transferRunesRequestSchema,
2107
+ stxTransferStxMethodName,
2108
+ stxTransferStxParamsSchema,
2109
+ stxTransferStxRequestMessageSchema,
2110
+ stxTransferStxResultSchema,
2111
+ walletActionsSchema,
1780
2112
  walletEventSchema,
2113
+ walletPermissionSchema,
1781
2114
  walletTypeSchema,
1782
2115
  walletTypes
1783
2116
  };