@sats-connect/core 0.4.0-e8e6a66 → 0.4.0-f42fc9a

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.js CHANGED
@@ -39,7 +39,6 @@ __export(src_exports, {
39
39
  RpcErrorCode: () => RpcErrorCode,
40
40
  RpcIdSchema: () => RpcIdSchema,
41
41
  SatsConnectAdapter: () => SatsConnectAdapter,
42
- TransferRunesResultSchema: () => TransferRunesResultSchema,
43
42
  accountChangeEventName: () => accountChangeEventName,
44
43
  accountChangeSchema: () => accountChangeSchema,
45
44
  addListener: () => addListener,
@@ -86,15 +85,11 @@ __export(src_exports, {
86
85
  getInfoResultSchema: () => getInfoResultSchema,
87
86
  getInscriptionsMethodName: () => getInscriptionsMethodName,
88
87
  getInscriptionsParamsSchema: () => getInscriptionsParamsSchema,
88
+ getInscriptionsRequestMessageSchema: () => getInscriptionsRequestMessageSchema,
89
89
  getInscriptionsResultSchema: () => getInscriptionsResultSchema,
90
- getInscriptionsSchema: () => getInscriptionsSchema,
91
90
  getProviderById: () => getProviderById,
92
91
  getProviderOrThrow: () => getProviderOrThrow,
93
92
  getProviders: () => getProviders,
94
- getRunesBalanceMethodName: () => getRunesBalanceMethodName,
95
- getRunesBalanceParamsSchema: () => getRunesBalanceParamsSchema,
96
- getRunesBalanceRequestMessageSchema: () => getRunesBalanceRequestMessageSchema,
97
- getRunesBalanceResultSchema: () => getRunesBalanceResultSchema,
98
93
  getSupportedWallets: () => getSupportedWallets,
99
94
  getWalletTypeMethodName: () => getWalletTypeMethodName,
100
95
  getWalletTypeParamsSchema: () => getWalletTypeParamsSchema,
@@ -118,11 +113,27 @@ __export(src_exports, {
118
113
  rpcRequestMessageSchema: () => rpcRequestMessageSchema,
119
114
  rpcResponseMessageSchema: () => rpcResponseMessageSchema,
120
115
  rpcSuccessResponseMessageSchema: () => rpcSuccessResponseMessageSchema,
116
+ runesEtchMethodName: () => runesEtchMethodName,
117
+ runesEtchParamsSchema: () => runesEtchParamsSchema,
118
+ runesEtchRequestMessageSchema: () => runesEtchRequestMessageSchema,
119
+ runesEtchResultSchema: () => runesEtchResultSchema,
120
+ runesGetBalanceMethodName: () => runesGetBalanceMethodName,
121
+ runesGetBalanceParamsSchema: () => runesGetBalanceParamsSchema,
122
+ runesGetBalanceRequestMessageSchema: () => runesGetBalanceRequestMessageSchema,
123
+ runesGetBalanceResultSchema: () => runesGetBalanceResultSchema,
124
+ runesMintMethodName: () => runesMintMethodName,
125
+ runesMintParamsSchema: () => runesMintParamsSchema,
126
+ runesMintRequestMessageSchema: () => runesMintRequestMessageSchema,
127
+ runesMintResultSchema: () => runesMintResultSchema,
128
+ runesTransferMethodName: () => runesTransferMethodName,
129
+ runesTransferParamsSchema: () => runesTransferParamsSchema,
130
+ runesTransferRequestMessageSchema: () => runesTransferRequestMessageSchema,
131
+ runesTransferResultSchema: () => runesTransferResultSchema,
121
132
  sendBtcTransaction: () => sendBtcTransaction,
122
133
  sendInscriptionsMethodName: () => sendInscriptionsMethodName,
123
134
  sendInscriptionsParamsSchema: () => sendInscriptionsParamsSchema,
135
+ sendInscriptionsRequestMessageSchema: () => sendInscriptionsRequestMessageSchema,
124
136
  sendInscriptionsResultSchema: () => sendInscriptionsResultSchema,
125
- sendInscriptionsSchema: () => sendInscriptionsSchema,
126
137
  sendTransferMethodName: () => sendTransferMethodName,
127
138
  sendTransferParamsSchema: () => sendTransferParamsSchema,
128
139
  sendTransferRequestMessageSchema: () => sendTransferRequestMessageSchema,
@@ -139,17 +150,38 @@ __export(src_exports, {
139
150
  signPsbtRequestMessageSchema: () => signPsbtRequestMessageSchema,
140
151
  signPsbtResultSchema: () => signPsbtResultSchema,
141
152
  signTransaction: () => signTransaction,
153
+ stxCallContractMethodName: () => stxCallContractMethodName,
154
+ stxCallContractParamsSchema: () => stxCallContractParamsSchema,
155
+ stxCallContractRequestMessageSchema: () => stxCallContractRequestMessageSchema,
156
+ stxCallContractResultSchema: () => stxCallContractResultSchema,
157
+ stxDeployContractMethodName: () => stxDeployContractMethodName,
158
+ stxDeployContractParamsSchema: () => stxDeployContractParamsSchema,
159
+ stxDeployContractRequestMessageSchema: () => stxDeployContractRequestMessageSchema,
160
+ stxDeployContractResultSchema: () => stxDeployContractResultSchema,
161
+ stxGetAccountsMethodName: () => stxGetAccountsMethodName,
162
+ stxGetAccountsParamsSchema: () => stxGetAccountsParamsSchema,
163
+ stxGetAccountsRequestMessageSchema: () => stxGetAccountsRequestMessageSchema,
164
+ stxGetAccountsResultSchema: () => stxGetAccountsResultSchema,
142
165
  stxGetAddressesMethodName: () => stxGetAddressesMethodName,
143
166
  stxGetAddressesParamsSchema: () => stxGetAddressesParamsSchema,
144
167
  stxGetAddressesRequestMessageSchema: () => stxGetAddressesRequestMessageSchema,
145
168
  stxGetAddressesResultSchema: () => stxGetAddressesResultSchema,
169
+ stxSignMessageMethodName: () => stxSignMessageMethodName,
170
+ stxSignMessageParamsSchema: () => stxSignMessageParamsSchema,
171
+ stxSignMessageRequestMessageSchema: () => stxSignMessageRequestMessageSchema,
172
+ stxSignMessageResultSchema: () => stxSignMessageResultSchema,
173
+ stxSignStructuredMessageMethodName: () => stxSignStructuredMessageMethodName,
174
+ stxSignStructuredMessageParamsSchema: () => stxSignStructuredMessageParamsSchema,
175
+ stxSignStructuredMessageRequestMessageSchema: () => stxSignStructuredMessageRequestMessageSchema,
176
+ stxSignStructuredMessageResultSchema: () => stxSignStructuredMessageResultSchema,
146
177
  stxSignTransactionMethodName: () => stxSignTransactionMethodName,
147
178
  stxSignTransactionParamsSchema: () => stxSignTransactionParamsSchema,
148
179
  stxSignTransactionRequestMessageSchema: () => stxSignTransactionRequestMessageSchema,
149
180
  stxSignTransactionResultSchema: () => stxSignTransactionResultSchema,
150
- transferRunesMethodName: () => transferRunesMethodName,
151
- transferRunesParamsSchema: () => transferRunesParamsSchema,
152
- transferRunesRequestSchema: () => transferRunesRequestSchema,
181
+ stxTransferStxMethodName: () => stxTransferStxMethodName,
182
+ stxTransferStxParamsSchema: () => stxTransferStxParamsSchema,
183
+ stxTransferStxRequestMessageSchema: () => stxTransferStxRequestMessageSchema,
184
+ stxTransferStxResultSchema: () => stxTransferStxResultSchema,
153
185
  walletEventSchema: () => walletEventSchema,
154
186
  walletTypeSchema: () => walletTypeSchema,
155
187
  walletTypes: () => walletTypes
@@ -205,10 +237,7 @@ function removeDefaultProvider() {
205
237
  localStorage.removeItem("sats-connect_defaultProvider");
206
238
  }
207
239
  function getSupportedWallets() {
208
- const ambientProviders = getProviders();
209
- const { xverse, ...defaultProviders } = DefaultAdaptersInfo;
210
- const allProviders = [...ambientProviders, ...Object.values(defaultProviders)];
211
- const wallets = allProviders.map((provider) => {
240
+ const wallets = Object.values(DefaultAdaptersInfo).map((provider) => {
212
241
  {
213
242
  return {
214
243
  ...provider,
@@ -221,11 +250,11 @@ function getSupportedWallets() {
221
250
 
222
251
  // src/types.ts
223
252
  var v2 = __toESM(require("valibot"));
224
- var BitcoinNetworkType = /* @__PURE__ */ ((BitcoinNetworkType3) => {
225
- BitcoinNetworkType3["Mainnet"] = "Mainnet";
226
- BitcoinNetworkType3["Testnet"] = "Testnet";
227
- BitcoinNetworkType3["Signet"] = "Signet";
228
- return BitcoinNetworkType3;
253
+ var BitcoinNetworkType = /* @__PURE__ */ ((BitcoinNetworkType2) => {
254
+ BitcoinNetworkType2["Mainnet"] = "Mainnet";
255
+ BitcoinNetworkType2["Testnet"] = "Testnet";
256
+ BitcoinNetworkType2["Signet"] = "Signet";
257
+ return BitcoinNetworkType2;
229
258
  })(BitcoinNetworkType || {});
230
259
  var RpcIdSchema = v2.optional(v2.union([v2.string(), v2.number(), v2.null()]));
231
260
  var rpcRequestMessageSchema = v2.object({
@@ -271,16 +300,127 @@ var rpcResponseMessageSchema = v2.union([
271
300
  ]);
272
301
 
273
302
  // src/request/index.ts
274
- var v10 = __toESM(require("valibot"));
303
+ var v20 = __toESM(require("valibot"));
275
304
 
276
- // src/request/types/stxMethods.ts
305
+ // src/request/types/stxMethods/callContract.ts
306
+ var v3 = __toESM(require("valibot"));
307
+ var stxCallContractMethodName = "stx_callContract";
308
+ var stxCallContractParamsSchema = v3.object({
309
+ /**
310
+ * The contract principal.
311
+ *
312
+ * E.g. `"SPKE...GD5C.my-contract"`
313
+ */
314
+ contract: v3.string(),
315
+ /**
316
+ * The name of the function to call.
317
+ *
318
+ * Note: spec changes ongoing,
319
+ * https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
320
+ */
321
+ functionName: v3.string(),
322
+ /**
323
+ * The function's arguments. The arguments are expected to be hex-encoded
324
+ * strings of Clarity values.
325
+ *
326
+ * To convert Clarity values to their hex representation, the `cvToString`
327
+ * helper from the `@stacks/transactions` package may be helpful.
328
+ *
329
+ * ```js
330
+ * import { cvToString } from '@stacks/transactions';
331
+ *
332
+ * const functionArgs = [someClarityValue1, someClarityValue2];
333
+ * const hexArgs = functionArgs.map(cvToString);
334
+ * ```
335
+ */
336
+ arguments: v3.optional(v3.array(v3.string()))
337
+ });
338
+ var stxCallContractResultSchema = v3.object({
339
+ /**
340
+ * The ID of the transaction.
341
+ */
342
+ txid: v3.string(),
343
+ /**
344
+ * A Stacks transaction as a hex-encoded string.
345
+ */
346
+ transaction: v3.string()
347
+ });
348
+ var stxCallContractRequestMessageSchema = v3.object({
349
+ ...rpcRequestMessageSchema.entries,
350
+ ...v3.object({
351
+ method: v3.literal(stxCallContractMethodName),
352
+ params: stxCallContractParamsSchema,
353
+ id: v3.string()
354
+ }).entries
355
+ });
356
+
357
+ // src/request/types/stxMethods/deployContract.ts
277
358
  var v4 = __toESM(require("valibot"));
359
+ var stxDeployContractMethodName = "stx_deployContract";
360
+ var stxDeployContractParamsSchema = v4.object({
361
+ /**
362
+ * Name of the contract.
363
+ */
364
+ name: v4.string(),
365
+ /**
366
+ * The source code of the Clarity contract.
367
+ */
368
+ clarityCode: v4.string(),
369
+ /**
370
+ * The version of the Clarity contract.
371
+ */
372
+ clarityVersion: v4.optional(v4.string())
373
+ });
374
+ var stxDeployContractResultSchema = v4.object({
375
+ /**
376
+ * The ID of the transaction.
377
+ */
378
+ txid: v4.string(),
379
+ /**
380
+ * A Stacks transaction as a hex-encoded string.
381
+ */
382
+ transaction: v4.string()
383
+ });
384
+ var stxDeployContractRequestMessageSchema = v4.object({
385
+ ...rpcRequestMessageSchema.entries,
386
+ ...v4.object({
387
+ method: v4.literal(stxDeployContractMethodName),
388
+ params: stxDeployContractParamsSchema,
389
+ id: v4.string()
390
+ }).entries
391
+ });
392
+
393
+ // src/request/types/stxMethods/getAccounts.ts
394
+ var v5 = __toESM(require("valibot"));
395
+ var stxGetAccountsMethodName = "stx_getAccounts";
396
+ var stxGetAccountsParamsSchema = v5.nullish(v5.null());
397
+ var stxGetAccountsResultSchema = v5.object({
398
+ /**
399
+ * The addresses generated for the given purposes.
400
+ */
401
+ addresses: v5.array(
402
+ v5.object({
403
+ address: v5.string(),
404
+ publicKey: v5.string(),
405
+ gaiaHubUrl: v5.string(),
406
+ gaiaAppKey: v5.string()
407
+ })
408
+ )
409
+ });
410
+ var stxGetAccountsRequestMessageSchema = v5.object({
411
+ ...rpcRequestMessageSchema.entries,
412
+ ...v5.object({
413
+ method: v5.literal(stxGetAccountsMethodName),
414
+ params: stxGetAccountsParamsSchema,
415
+ id: v5.string()
416
+ }).entries
417
+ });
278
418
 
279
419
  // src/addresses/index.ts
280
420
  var import_jsontokens = require("jsontokens");
281
421
 
282
422
  // src/addresses/types.ts
283
- var v3 = __toESM(require("valibot"));
423
+ var v6 = __toESM(require("valibot"));
284
424
  var AddressPurpose = /* @__PURE__ */ ((AddressPurpose2) => {
285
425
  AddressPurpose2["Ordinals"] = "ordinals";
286
426
  AddressPurpose2["Payment"] = "payment";
@@ -296,11 +436,11 @@ var AddressType = /* @__PURE__ */ ((AddressType3) => {
296
436
  AddressType3["stacks"] = "stacks";
297
437
  return AddressType3;
298
438
  })(AddressType || {});
299
- var addressSchema = v3.object({
300
- address: v3.string(),
301
- publicKey: v3.string(),
302
- purpose: v3.enum(AddressPurpose),
303
- addressType: v3.enum(AddressType)
439
+ var addressSchema = v6.object({
440
+ address: v6.string(),
441
+ publicKey: v6.string(),
442
+ purpose: v6.enum(AddressPurpose),
443
+ addressType: v6.enum(AddressType)
304
444
  });
305
445
 
306
446
  // src/addresses/index.ts
@@ -320,118 +460,269 @@ var getAddress = async (options) => {
320
460
  }
321
461
  };
322
462
 
323
- // src/request/types/stxMethods.ts
463
+ // src/request/types/stxMethods/getAddresses.ts
464
+ var v7 = __toESM(require("valibot"));
324
465
  var stxGetAddressesMethodName = "stx_getAddresses";
325
- var stxGetAddressesParamsSchema = v4.nullish(
326
- v4.object({
466
+ var stxGetAddressesParamsSchema = v7.nullish(
467
+ v7.object({
327
468
  /**
328
469
  * A message to be displayed to the user in the request prompt.
329
470
  */
330
- message: v4.optional(v4.string())
471
+ message: v7.optional(v7.string())
331
472
  })
332
473
  );
333
- var stxGetAddressesResultSchema = v4.object({
474
+ var stxGetAddressesResultSchema = v7.object({
334
475
  /**
335
476
  * The addresses generated for the given purposes.
336
477
  */
337
- addresses: v4.array(addressSchema)
478
+ addresses: v7.array(addressSchema)
338
479
  });
339
- var stxGetAddressesRequestMessageSchema = v4.object({
480
+ var stxGetAddressesRequestMessageSchema = v7.object({
340
481
  ...rpcRequestMessageSchema.entries,
341
- ...v4.object({
342
- method: v4.literal(stxGetAddressesMethodName),
482
+ ...v7.object({
483
+ method: v7.literal(stxGetAddressesMethodName),
343
484
  params: stxGetAddressesParamsSchema,
344
- id: v4.string()
485
+ id: v7.string()
345
486
  }).entries
346
487
  });
488
+
489
+ // src/request/types/stxMethods/signMessage.ts
490
+ var v8 = __toESM(require("valibot"));
491
+ var stxSignMessageMethodName = "stx_signMessage";
492
+ var stxSignMessageParamsSchema = v8.object({
493
+ /**
494
+ * The message to sign.
495
+ */
496
+ message: v8.string(),
497
+ /**
498
+ * The public key to sign the message with.
499
+ */
500
+ publicKey: v8.string(),
501
+ /**
502
+ * The format version of the parameter.
503
+ */
504
+ parameterFormatVersion: v8.optional(v8.number())
505
+ });
506
+ var stxSignMessageResultSchema = v8.object({
507
+ /**
508
+ * The signature of the message.
509
+ */
510
+ signature: v8.string(),
511
+ /**
512
+ * The public key used to sign the message.
513
+ */
514
+ publicKey: v8.string()
515
+ });
516
+ var stxSignMessageRequestMessageSchema = v8.object({
517
+ ...rpcRequestMessageSchema.entries,
518
+ ...v8.object({
519
+ method: v8.literal(stxSignMessageMethodName),
520
+ params: stxSignMessageParamsSchema,
521
+ id: v8.string()
522
+ }).entries
523
+ });
524
+
525
+ // src/request/types/stxMethods/signStructuredMessage.ts
526
+ var v9 = __toESM(require("valibot"));
527
+ var stxSignStructuredMessageMethodName = "stx_signStructuredMessage";
528
+ var stxSignStructuredMessageParamsSchema = v9.object({
529
+ /**
530
+ * The domain to be signed.
531
+ */
532
+ domain: v9.string(),
533
+ /**
534
+ * Message payload to be signed.
535
+ */
536
+ message: v9.string(),
537
+ /**
538
+ * The format version of the parameter.
539
+ */
540
+ parameterFormatVersion: v9.optional(v9.number()),
541
+ /**
542
+ * The public key to sign the message with.
543
+ */
544
+ publicKey: v9.optional(v9.string())
545
+ });
546
+ var stxSignStructuredMessageResultSchema = v9.object({
547
+ /**
548
+ * Signature of the message.
549
+ */
550
+ signature: v9.string(),
551
+ /**
552
+ * Public key as hex-encoded string.
553
+ */
554
+ publicKey: v9.string()
555
+ });
556
+ var stxSignStructuredMessageRequestMessageSchema = v9.object({
557
+ ...rpcRequestMessageSchema.entries,
558
+ ...v9.object({
559
+ method: v9.literal(stxSignStructuredMessageMethodName),
560
+ params: stxSignStructuredMessageParamsSchema,
561
+ id: v9.string()
562
+ }).entries
563
+ });
564
+
565
+ // src/request/types/stxMethods/signTransaction.ts
566
+ var v10 = __toESM(require("valibot"));
347
567
  var stxSignTransactionMethodName = "stx_signTransaction";
348
- var stxSignTransactionParamsSchema = v4.object({
568
+ var stxSignTransactionParamsSchema = v10.object({
349
569
  /**
350
570
  * The transaction to sign as a hex-encoded string.
351
571
  */
352
- transaction: v4.string(),
572
+ transaction: v10.string(),
353
573
  /**
354
574
  * The public key to sign the transaction with. The wallet may use any key
355
575
  * when not provided.
356
576
  */
357
- pubkey: v4.optional(v4.string()),
577
+ pubkey: v10.optional(v10.string()),
358
578
  /**
359
579
  * Whether to broadcast the transaction after signing. Defaults to `true`.
360
580
  */
361
- broadcast: v4.optional(v4.boolean())
581
+ broadcast: v10.optional(v10.boolean())
362
582
  });
363
- var stxSignTransactionResultSchema = v4.object({
583
+ var stxSignTransactionResultSchema = v10.object({
364
584
  /**
365
585
  * The signed transaction as a hex-encoded string.
366
586
  */
367
- transaction: v4.string()
587
+ transaction: v10.string()
368
588
  });
369
- var stxSignTransactionRequestMessageSchema = v4.object({
589
+ var stxSignTransactionRequestMessageSchema = v10.object({
370
590
  ...rpcRequestMessageSchema.entries,
371
- ...v4.object({
372
- method: v4.literal(stxSignTransactionMethodName),
591
+ ...v10.object({
592
+ method: v10.literal(stxSignTransactionMethodName),
373
593
  params: stxSignTransactionParamsSchema,
374
- id: v4.string()
594
+ id: v10.string()
595
+ }).entries
596
+ });
597
+
598
+ // src/request/types/stxMethods/transferStx.ts
599
+ var v11 = __toESM(require("valibot"));
600
+ var stxTransferStxMethodName = "stx_transferStx";
601
+ var stxTransferStxParamsSchema = v11.object({
602
+ /**
603
+ * Amount of STX tokens to transfer in microstacks as a string. Anything
604
+ * parseable by `BigInt` is acceptable.
605
+ *
606
+ * Example,
607
+ *
608
+ * ```js
609
+ * const amount1 = 1234;
610
+ * const amount2 = 1234n;
611
+ * const amount3 = '1234';
612
+ * ```
613
+ */
614
+ amount: v11.union([v11.number(), v11.string()]),
615
+ /**
616
+ * The recipeint's principal.
617
+ */
618
+ recipient: v11.string(),
619
+ /**
620
+ * A string representing the memo.
621
+ */
622
+ memo: v11.optional(v11.string()),
623
+ /**
624
+ * Version of parameter format.
625
+ */
626
+ version: v11.optional(v11.string()),
627
+ /**
628
+ * The mode of the post conditions.
629
+ */
630
+ postConditionMode: v11.optional(v11.number()),
631
+ /**
632
+ * A hex-encoded string representing the post conditions.
633
+ *
634
+ * A post condition may be converted to it's hex representation using the `serializePostCondition` helper from the `@stacks/transactions` package,
635
+ *
636
+ * ```js
637
+ * import { serializePostCondition } from '@stacks/transactions';
638
+ *
639
+ * const postCondition = somePostCondition;
640
+ * const hexPostCondition = serializePostCondition(postCondition).toString('hex');
641
+ * ```
642
+ */
643
+ postConditions: v11.optional(v11.array(v11.string())),
644
+ /**
645
+ * The public key to sign the transaction with. The wallet may use any key
646
+ * when not provided.
647
+ */
648
+ pubkey: v11.optional(v11.string())
649
+ });
650
+ var stxTransferStxResultSchema = v11.object({
651
+ /**
652
+ * The ID of the transaction.
653
+ */
654
+ txid: v11.string(),
655
+ /**
656
+ * A Stacks transaction as a hex-encoded string.
657
+ */
658
+ transaction: v11.string()
659
+ });
660
+ var stxTransferStxRequestMessageSchema = v11.object({
661
+ ...rpcRequestMessageSchema.entries,
662
+ ...v11.object({
663
+ method: v11.literal(stxTransferStxMethodName),
664
+ params: stxTransferStxParamsSchema,
665
+ id: v11.string()
375
666
  }).entries
376
667
  });
377
668
 
378
669
  // src/request/types/btcMethods.ts
379
- var v6 = __toESM(require("valibot"));
670
+ var v13 = __toESM(require("valibot"));
380
671
 
381
672
  // src/request/types/common.ts
382
- var v5 = __toESM(require("valibot"));
673
+ var v12 = __toESM(require("valibot"));
383
674
  var walletTypes = ["software", "ledger"];
384
- var walletTypeSchema = v5.picklist(walletTypes);
675
+ var walletTypeSchema = v12.picklist(walletTypes);
385
676
 
386
677
  // src/request/types/btcMethods.ts
387
678
  var getInfoMethodName = "getInfo";
388
- var getInfoParamsSchema = v6.nullish(v6.null());
389
- var getInfoResultSchema = v6.object({
679
+ var getInfoParamsSchema = v13.nullish(v13.null());
680
+ var getInfoResultSchema = v13.object({
390
681
  /**
391
682
  * Version of the wallet.
392
683
  */
393
- version: v6.string(),
684
+ version: v13.string(),
394
685
  /**
395
686
  * [WBIP](https://wbips.netlify.app/wbips/WBIP002) methods supported by the wallet.
396
687
  */
397
- methods: v6.optional(v6.array(v6.string())),
688
+ methods: v13.optional(v13.array(v13.string())),
398
689
  /**
399
690
  * List of WBIP standards supported by the wallet. Not currently used.
400
691
  */
401
- supports: v6.array(v6.string())
692
+ supports: v13.array(v13.string())
402
693
  });
403
- var getInfoRequestMessageSchema = v6.object({
694
+ var getInfoRequestMessageSchema = v13.object({
404
695
  ...rpcRequestMessageSchema.entries,
405
- ...v6.object({
406
- method: v6.literal(getInfoMethodName),
696
+ ...v13.object({
697
+ method: v13.literal(getInfoMethodName),
407
698
  params: getInfoParamsSchema,
408
- id: v6.string()
699
+ id: v13.string()
409
700
  }).entries
410
701
  });
411
702
  var getAddressesMethodName = "getAddresses";
412
- var getAddressesParamsSchema = v6.object({
703
+ var getAddressesParamsSchema = v13.object({
413
704
  /**
414
705
  * The purposes for which to generate addresses. See
415
706
  * {@linkcode AddressPurpose} for available purposes.
416
707
  */
417
- purposes: v6.array(v6.enum(AddressPurpose)),
708
+ purposes: v13.array(v13.enum(AddressPurpose)),
418
709
  /**
419
710
  * A message to be displayed to the user in the request prompt.
420
711
  */
421
- message: v6.optional(v6.string())
712
+ message: v13.optional(v13.string())
422
713
  });
423
- var getAddressesResultSchema = v6.object({
714
+ var getAddressesResultSchema = v13.object({
424
715
  /**
425
716
  * The addresses generated for the given purposes.
426
717
  */
427
- addresses: v6.array(addressSchema)
718
+ addresses: v13.array(addressSchema)
428
719
  });
429
- var getAddressesRequestMessageSchema = v6.object({
720
+ var getAddressesRequestMessageSchema = v13.object({
430
721
  ...rpcRequestMessageSchema.entries,
431
- ...v6.object({
432
- method: v6.literal(getAddressesMethodName),
722
+ ...v13.object({
723
+ method: v13.literal(getAddressesMethodName),
433
724
  params: getAddressesParamsSchema,
434
- id: v6.string()
725
+ id: v13.string()
435
726
  }).entries
436
727
  });
437
728
  var signMessageMethodName = "signMessage";
@@ -440,363 +731,439 @@ var MessageSigningProtocols = /* @__PURE__ */ ((MessageSigningProtocols2) => {
440
731
  MessageSigningProtocols2["BIP322"] = "BIP322";
441
732
  return MessageSigningProtocols2;
442
733
  })(MessageSigningProtocols || {});
443
- var signMessageParamsSchema = v6.object({
734
+ var signMessageParamsSchema = v13.object({
444
735
  /**
445
736
  * The address used for signing.
446
737
  **/
447
- address: v6.string(),
738
+ address: v13.string(),
448
739
  /**
449
740
  * The message to sign.
450
741
  **/
451
- message: v6.string(),
742
+ message: v13.string(),
452
743
  /**
453
744
  * The protocol to use for signing the message.
454
745
  */
455
- protocol: v6.optional(v6.enum(MessageSigningProtocols))
746
+ protocol: v13.optional(v13.enum(MessageSigningProtocols))
456
747
  });
457
- var signMessageResultSchema = v6.object({
748
+ var signMessageResultSchema = v13.object({
458
749
  /**
459
750
  * The signature of the message.
460
751
  */
461
- signature: v6.string(),
752
+ signature: v13.string(),
462
753
  /**
463
754
  * hash of the message.
464
755
  */
465
- messageHash: v6.string(),
756
+ messageHash: v13.string(),
466
757
  /**
467
758
  * The address used for signing.
468
759
  */
469
- address: v6.string(),
760
+ address: v13.string(),
470
761
  /**
471
762
  * The protocol to use for signing the message.
472
763
  */
473
- protocol: v6.enum(MessageSigningProtocols)
764
+ protocol: v13.enum(MessageSigningProtocols)
474
765
  });
475
- var signMessageRequestMessageSchema = v6.object({
766
+ var signMessageRequestMessageSchema = v13.object({
476
767
  ...rpcRequestMessageSchema.entries,
477
- ...v6.object({
478
- method: v6.literal(signMessageMethodName),
768
+ ...v13.object({
769
+ method: v13.literal(signMessageMethodName),
479
770
  params: signMessageParamsSchema,
480
- id: v6.string()
771
+ id: v13.string()
481
772
  }).entries
482
773
  });
483
774
  var sendTransferMethodName = "sendTransfer";
484
- var sendTransferParamsSchema = v6.object({
775
+ var sendTransferParamsSchema = v13.object({
485
776
  /**
486
777
  * Array of recipients to send to.
487
778
  * The amount to send to each recipient is in satoshis.
488
779
  */
489
- recipients: v6.array(
490
- v6.object({
491
- address: v6.string(),
492
- amount: v6.number()
780
+ recipients: v13.array(
781
+ v13.object({
782
+ address: v13.string(),
783
+ amount: v13.number()
493
784
  })
494
785
  )
495
786
  });
496
- var sendTransferResultSchema = v6.object({
787
+ var sendTransferResultSchema = v13.object({
497
788
  /**
498
789
  * The transaction id as a hex-encoded string.
499
790
  */
500
- txid: v6.string()
791
+ txid: v13.string()
501
792
  });
502
- var sendTransferRequestMessageSchema = v6.object({
793
+ var sendTransferRequestMessageSchema = v13.object({
503
794
  ...rpcRequestMessageSchema.entries,
504
- ...v6.object({
505
- method: v6.literal(sendTransferMethodName),
795
+ ...v13.object({
796
+ method: v13.literal(sendTransferMethodName),
506
797
  params: sendTransferParamsSchema,
507
- id: v6.string()
798
+ id: v13.string()
508
799
  }).entries
509
800
  });
510
801
  var signPsbtMethodName = "signPsbt";
511
- var signPsbtParamsSchema = v6.object({
802
+ var signPsbtParamsSchema = v13.object({
512
803
  /**
513
804
  * The base64 encoded PSBT to sign.
514
805
  */
515
- psbt: v6.string(),
806
+ psbt: v13.string(),
516
807
  /**
517
808
  * The inputs to sign.
518
809
  * The key is the address and the value is an array of indexes of the inputs to sign.
519
810
  */
520
- signInputs: v6.record(v6.string(), v6.array(v6.number())),
811
+ signInputs: v13.record(v13.string(), v13.array(v13.number())),
812
+ allowedSignHash: v13.optional(v13.number()),
521
813
  /**
522
814
  * Whether to broadcast the transaction after signing.
523
815
  **/
524
- broadcast: v6.optional(v6.boolean())
816
+ broadcast: v13.optional(v13.boolean())
525
817
  });
526
- var signPsbtResultSchema = v6.object({
818
+ var signPsbtResultSchema = v13.object({
527
819
  /**
528
820
  * The base64 encoded PSBT after signing.
529
821
  */
530
- psbt: v6.string(),
822
+ psbt: v13.string(),
531
823
  /**
532
824
  * The transaction id as a hex-encoded string.
533
825
  * This is only returned if the transaction was broadcast.
534
826
  **/
535
- txid: v6.optional(v6.string())
827
+ txid: v13.optional(v13.string())
536
828
  });
537
- var signPsbtRequestMessageSchema = v6.object({
829
+ var signPsbtRequestMessageSchema = v13.object({
538
830
  ...rpcRequestMessageSchema.entries,
539
- ...v6.object({
540
- method: v6.literal(signPsbtMethodName),
831
+ ...v13.object({
832
+ method: v13.literal(signPsbtMethodName),
541
833
  params: signPsbtParamsSchema,
542
- id: v6.string()
834
+ id: v13.string()
543
835
  }).entries
544
836
  });
545
837
  var getAccountsMethodName = "getAccounts";
546
- var getAccountsParamsSchema = v6.object({
838
+ var getAccountsParamsSchema = v13.object({
547
839
  /**
548
840
  * The purposes for which to generate addresses. See
549
841
  * {@linkcode AddressPurpose} for available purposes.
550
842
  */
551
- purposes: v6.array(v6.enum(AddressPurpose)),
843
+ purposes: v13.array(v13.enum(AddressPurpose)),
552
844
  /**
553
845
  * A message to be displayed to the user in the request prompt.
554
846
  */
555
- message: v6.optional(v6.string())
847
+ message: v13.optional(v13.string())
556
848
  });
557
- var getAccountsResultSchema = v6.array(
558
- v6.object({
849
+ var getAccountsResultSchema = v13.array(
850
+ v13.object({
559
851
  ...addressSchema.entries,
560
- ...v6.object({
852
+ ...v13.object({
561
853
  walletType: walletTypeSchema
562
854
  }).entries
563
855
  })
564
856
  );
565
- var getAccountsRequestMessageSchema = v6.object({
857
+ var getAccountsRequestMessageSchema = v13.object({
566
858
  ...rpcRequestMessageSchema.entries,
567
- ...v6.object({
568
- method: v6.literal(getAccountsMethodName),
859
+ ...v13.object({
860
+ method: v13.literal(getAccountsMethodName),
569
861
  params: getAccountsParamsSchema,
570
- id: v6.string()
862
+ id: v13.string()
571
863
  }).entries
572
864
  });
573
865
  var getBalanceMethodName = "getBalance";
574
- var getBalanceParamsSchema = v6.nullish(v6.null());
575
- var getBalanceResultSchema = v6.object({
866
+ var getBalanceParamsSchema = v13.nullish(v13.null());
867
+ var getBalanceResultSchema = v13.object({
576
868
  /**
577
869
  * The confirmed balance of the wallet in sats. Using a string due to chrome
578
870
  * messages not supporting bigint
579
871
  * (https://issues.chromium.org/issues/40116184).
580
872
  */
581
- confirmed: v6.string(),
873
+ confirmed: v13.string(),
582
874
  /**
583
875
  * The unconfirmed balance of the wallet in sats. Using a string due to chrome
584
876
  * messages not supporting bigint
585
877
  * (https://issues.chromium.org/issues/40116184).
586
878
  */
587
- unconfirmed: v6.string(),
879
+ unconfirmed: v13.string(),
588
880
  /**
589
881
  * The total balance (both confirmed and unconfrimed UTXOs) of the wallet in
590
882
  * sats. Using a string due to chrome messages not supporting bigint
591
883
  * (https://issues.chromium.org/issues/40116184).
592
884
  */
593
- total: v6.string()
885
+ total: v13.string()
594
886
  });
595
- var getBalanceRequestMessageSchema = v6.object({
887
+ var getBalanceRequestMessageSchema = v13.object({
596
888
  ...rpcRequestMessageSchema.entries,
597
- ...v6.object({
598
- method: v6.literal(getBalanceMethodName),
599
- id: v6.string()
889
+ ...v13.object({
890
+ method: v13.literal(getBalanceMethodName),
891
+ id: v13.string()
600
892
  }).entries
601
893
  });
602
894
 
603
895
  // src/request/types/walletMethods.ts
604
- var v7 = __toESM(require("valibot"));
896
+ var v14 = __toESM(require("valibot"));
605
897
  var import_xverse_core = require("@secretkeylabs/xverse-core");
606
- var permissionTemplate = v7.variant("type", [
607
- v7.object({
608
- ...v7.omit(import_xverse_core.permissions.resources.account.accountPermissionSchema, ["clientId", "actions"]).entries,
609
- actions: v7.partial(import_xverse_core.permissions.resources.account.accountActionsSchema)
898
+ var permissionTemplate = v14.variant("type", [
899
+ v14.object({
900
+ ...v14.omit(import_xverse_core.permissions.resources.account.accountPermissionSchema, ["clientId", "actions"]).entries,
901
+ actions: v14.partial(import_xverse_core.permissions.resources.account.accountActionsSchema)
610
902
  }),
611
- v7.object({
612
- ...v7.omit(import_xverse_core.permissions.resources.wallet.walletPermissionSchema, ["clientId"]).entries,
613
- actions: v7.partial(import_xverse_core.permissions.resources.wallet.walletActionsSchema)
903
+ v14.object({
904
+ ...v14.omit(import_xverse_core.permissions.resources.wallet.walletPermissionSchema, ["clientId"]).entries,
905
+ actions: v14.partial(import_xverse_core.permissions.resources.wallet.walletActionsSchema)
614
906
  })
615
907
  ]);
616
908
  var requestPermissionsMethodName = "wallet_requestPermissions";
617
- var requestPermissionsParamsSchema = v7.nullish(v7.array(permissionTemplate));
618
- var requestPermissionsResultSchema = v7.literal(true);
619
- var requestPermissionsRequestMessageSchema = v7.object({
909
+ var requestPermissionsParamsSchema = v14.nullish(v14.array(permissionTemplate));
910
+ var requestPermissionsResultSchema = v14.literal(true);
911
+ var requestPermissionsRequestMessageSchema = v14.object({
620
912
  ...rpcRequestMessageSchema.entries,
621
- ...v7.object({
622
- method: v7.literal(requestPermissionsMethodName),
913
+ ...v14.object({
914
+ method: v14.literal(requestPermissionsMethodName),
623
915
  params: requestPermissionsParamsSchema,
624
- id: v7.string()
916
+ id: v14.string()
625
917
  }).entries
626
918
  });
627
919
  var renouncePermissionsMethodName = "wallet_renouncePermissions";
628
- var renouncePermissionsParamsSchema = v7.nullish(v7.null());
629
- var renouncePermissionsResultSchema = v7.nullish(v7.null());
630
- var renouncePermissionsRequestMessageSchema = v7.object({
920
+ var renouncePermissionsParamsSchema = v14.nullish(v14.null());
921
+ var renouncePermissionsResultSchema = v14.nullish(v14.null());
922
+ var renouncePermissionsRequestMessageSchema = v14.object({
631
923
  ...rpcRequestMessageSchema.entries,
632
- ...v7.object({
633
- method: v7.literal(renouncePermissionsMethodName),
924
+ ...v14.object({
925
+ method: v14.literal(renouncePermissionsMethodName),
634
926
  params: renouncePermissionsParamsSchema,
635
- id: v7.string()
927
+ id: v14.string()
636
928
  }).entries
637
929
  });
638
930
  var disconnectMethodName = "wallet_disconnect";
639
- var disconnectParamsSchema = v7.nullish(v7.null());
640
- var disconnectResultSchema = v7.nullish(v7.null());
641
- var disconnectRequestMessageSchema = v7.object({
931
+ var disconnectParamsSchema = v14.nullish(v14.null());
932
+ var disconnectResultSchema = v14.nullish(v14.null());
933
+ var disconnectRequestMessageSchema = v14.object({
642
934
  ...rpcRequestMessageSchema.entries,
643
- ...v7.object({
644
- method: v7.literal(disconnectMethodName),
935
+ ...v14.object({
936
+ method: v14.literal(disconnectMethodName),
645
937
  params: disconnectParamsSchema,
646
- id: v7.string()
938
+ id: v14.string()
647
939
  }).entries
648
940
  });
649
941
  var getWalletTypeMethodName = "wallet_getWalletType";
650
- var getWalletTypeParamsSchema = v7.nullish(v7.null());
942
+ var getWalletTypeParamsSchema = v14.nullish(v14.null());
651
943
  var getWalletTypeResultSchema = walletTypeSchema;
652
- var getWalletTypeRequestMessageSchema = v7.object({
944
+ var getWalletTypeRequestMessageSchema = v14.object({
653
945
  ...rpcRequestMessageSchema.entries,
654
- ...v7.object({
655
- method: v7.literal(getWalletTypeMethodName),
946
+ ...v14.object({
947
+ method: v14.literal(getWalletTypeMethodName),
656
948
  params: getWalletTypeParamsSchema,
657
- id: v7.string()
949
+ id: v14.string()
658
950
  }).entries
659
951
  });
660
952
  var getCurrentPermissionsMethodName = "wallet_getCurrentPermissions";
661
- var getCurrentPermissionsParamsSchema = v7.nullish(v7.null());
662
- var getCurrentPermissionsResultSchema = v7.array(import_xverse_core.permissions.store.permission);
663
- var getCurrentPermissionsRequestMessageSchema = v7.object({
953
+ var getCurrentPermissionsParamsSchema = v14.nullish(v14.null());
954
+ var getCurrentPermissionsResultSchema = v14.array(import_xverse_core.permissions.store.permission);
955
+ var getCurrentPermissionsRequestMessageSchema = v14.object({
664
956
  ...rpcRequestMessageSchema.entries,
665
- ...v7.object({
666
- method: v7.literal(getCurrentPermissionsMethodName),
957
+ ...v14.object({
958
+ method: v14.literal(getCurrentPermissionsMethodName),
667
959
  params: getCurrentPermissionsParamsSchema,
668
- id: v7.string()
960
+ id: v14.string()
669
961
  }).entries
670
962
  });
671
963
  var getAccountMethodName = "wallet_getAccount";
672
- var getAccountParamsSchema = v7.nullish(v7.null());
673
- var getAccountResultSchema = v7.object({
964
+ var getAccountParamsSchema = v14.nullish(v14.null());
965
+ var getAccountResultSchema = v14.object({
674
966
  id: import_xverse_core.permissions.utils.account.accountIdSchema,
675
- addresses: v7.array(addressSchema),
967
+ addresses: v14.array(addressSchema),
676
968
  walletType: walletTypeSchema
677
969
  });
678
- var getAccountRequestMessageSchema = v7.object({
970
+ var getAccountRequestMessageSchema = v14.object({
679
971
  ...rpcRequestMessageSchema.entries,
680
- ...v7.object({
681
- method: v7.literal(getAccountMethodName),
972
+ ...v14.object({
973
+ method: v14.literal(getAccountMethodName),
682
974
  params: getAccountParamsSchema,
683
- id: v7.string()
975
+ id: v14.string()
684
976
  }).entries
685
977
  });
686
978
  var connectMethodName = "wallet_connect";
687
- var connectParamsSchema = v7.nullish(
688
- v7.object({
689
- permissions: v7.optional(v7.array(permissionTemplate))
979
+ var connectParamsSchema = v14.nullish(
980
+ v14.object({
981
+ permissions: v14.optional(v14.array(permissionTemplate))
690
982
  })
691
983
  );
692
984
  var connectResultSchema = getAccountResultSchema;
693
- var connectRequestMessageSchema = v7.object({
985
+ var connectRequestMessageSchema = v14.object({
694
986
  ...rpcRequestMessageSchema.entries,
695
- ...v7.object({
696
- method: v7.literal(connectMethodName),
987
+ ...v14.object({
988
+ method: v14.literal(connectMethodName),
697
989
  params: connectParamsSchema,
698
- id: v7.string()
990
+ id: v14.string()
699
991
  }).entries
700
992
  });
701
993
 
702
- // src/request/types/runesMethods.ts
703
- var v8 = __toESM(require("valibot"));
704
- var getRunesBalanceMethodName = "runes_getBalance";
705
- var getRunesBalanceParamsSchema = v8.nullish(v8.null());
706
- var getRunesBalanceResultSchema = v8.object({
707
- balances: v8.array(
708
- v8.object({
709
- runeName: v8.string(),
710
- amount: v8.string(),
711
- divisibility: v8.number(),
712
- symbol: v8.string(),
713
- inscriptionId: v8.nullish(v8.string())
994
+ // src/request/types/runesMethods/etch.ts
995
+ var v15 = __toESM(require("valibot"));
996
+ var runesEtchMethodName = "runes_etch";
997
+ var etchTermsSchema = v15.object({
998
+ amount: v15.string(),
999
+ cap: v15.string(),
1000
+ heightStart: v15.optional(v15.string()),
1001
+ heightEnd: v15.optional(v15.string()),
1002
+ offsetStart: v15.optional(v15.string()),
1003
+ offsetEnd: v15.optional(v15.string())
1004
+ });
1005
+ var inscriptionDetailsSchema = v15.object({
1006
+ contentType: v15.string(),
1007
+ contentBase64: v15.string()
1008
+ });
1009
+ var runesEtchParamsSchema = v15.object({
1010
+ runeName: v15.string(),
1011
+ divisibility: v15.optional(v15.number()),
1012
+ symbol: v15.optional(v15.string()),
1013
+ premine: v15.optional(v15.string()),
1014
+ isMintable: v15.boolean(),
1015
+ delegateInscriptionId: v15.optional(v15.string()),
1016
+ destinationAddress: v15.string(),
1017
+ refundAddress: v15.string(),
1018
+ feeRate: v15.number(),
1019
+ appServiceFee: v15.optional(v15.number()),
1020
+ appServiceFeeAddress: v15.optional(v15.string()),
1021
+ terms: v15.optional(etchTermsSchema),
1022
+ inscriptionDetails: v15.optional(inscriptionDetailsSchema),
1023
+ network: v15.optional(v15.enum(BitcoinNetworkType))
1024
+ });
1025
+ var runesEtchResultSchema = v15.object({
1026
+ orderId: v15.string(),
1027
+ fundTransactionId: v15.string(),
1028
+ fundingAddress: v15.string()
1029
+ });
1030
+ var runesEtchRequestMessageSchema = v15.object({
1031
+ ...rpcRequestMessageSchema.entries,
1032
+ ...v15.object({
1033
+ method: v15.literal(runesEtchMethodName),
1034
+ params: runesEtchParamsSchema,
1035
+ id: v15.string()
1036
+ }).entries
1037
+ });
1038
+
1039
+ // src/request/types/runesMethods/getBalance.ts
1040
+ var v16 = __toESM(require("valibot"));
1041
+ var runesGetBalanceMethodName = "runes_getBalance";
1042
+ var runesGetBalanceParamsSchema = v16.nullish(v16.null());
1043
+ var runesGetBalanceResultSchema = v16.object({
1044
+ balances: v16.array(
1045
+ v16.object({
1046
+ runeName: v16.string(),
1047
+ amount: v16.string(),
1048
+ divisibility: v16.number(),
1049
+ symbol: v16.string(),
1050
+ inscriptionId: v16.nullish(v16.string())
714
1051
  })
715
1052
  )
716
1053
  });
717
- var getRunesBalanceRequestMessageSchema = v8.object({
1054
+ var runesGetBalanceRequestMessageSchema = v16.object({
718
1055
  ...rpcRequestMessageSchema.entries,
719
- ...v8.object({
720
- method: v8.literal(getRunesBalanceMethodName),
721
- params: getRunesBalanceParamsSchema,
722
- id: v8.string()
1056
+ ...v16.object({
1057
+ method: v16.literal(runesGetBalanceMethodName),
1058
+ params: runesGetBalanceParamsSchema,
1059
+ id: v16.string()
1060
+ }).entries
1061
+ });
1062
+
1063
+ // src/request/types/runesMethods/mint.ts
1064
+ var v17 = __toESM(require("valibot"));
1065
+ var runesMintMethodName = "runes_mint";
1066
+ var runesMintParamsSchema = v17.object({
1067
+ appServiceFee: v17.optional(v17.number()),
1068
+ appServiceFeeAddress: v17.optional(v17.string()),
1069
+ destinationAddress: v17.string(),
1070
+ feeRate: v17.number(),
1071
+ refundAddress: v17.string(),
1072
+ repeats: v17.number(),
1073
+ runeName: v17.string(),
1074
+ network: v17.optional(v17.enum(BitcoinNetworkType))
1075
+ });
1076
+ var runesMintResultSchema = v17.object({
1077
+ orderId: v17.string(),
1078
+ fundTransactionId: v17.string(),
1079
+ fundingAddress: v17.string()
1080
+ });
1081
+ var runesMintRequestMessageSchema = v17.object({
1082
+ ...rpcRequestMessageSchema.entries,
1083
+ ...v17.object({
1084
+ method: v17.literal(runesMintMethodName),
1085
+ params: runesMintParamsSchema,
1086
+ id: v17.string()
723
1087
  }).entries
724
1088
  });
725
- var transferRunesMethodName = "runes_transfer";
726
- var transferRunesParamsSchema = v8.object({
727
- recipients: v8.array(
728
- v8.object({
729
- runeName: v8.string(),
730
- amount: v8.string(),
731
- address: v8.string()
1089
+
1090
+ // src/request/types/runesMethods/transfer.ts
1091
+ var v18 = __toESM(require("valibot"));
1092
+ var runesTransferMethodName = "runes_transfer";
1093
+ var runesTransferParamsSchema = v18.object({
1094
+ recipients: v18.array(
1095
+ v18.object({
1096
+ runeName: v18.string(),
1097
+ amount: v18.string(),
1098
+ address: v18.string()
732
1099
  })
733
1100
  )
734
1101
  });
735
- var transferRunesRequestSchema = v8.object({
1102
+ var runesTransferResultSchema = v18.object({
1103
+ txid: v18.string()
1104
+ });
1105
+ var runesTransferRequestMessageSchema = v18.object({
736
1106
  ...rpcRequestMessageSchema.entries,
737
- ...v8.object({
738
- method: v8.literal(transferRunesMethodName),
739
- params: transferRunesParamsSchema,
740
- id: v8.string()
1107
+ ...v18.object({
1108
+ method: v18.literal(runesTransferMethodName),
1109
+ params: runesTransferParamsSchema,
1110
+ id: v18.string()
741
1111
  }).entries
742
1112
  });
743
- var TransferRunesResultSchema = v8.object({
744
- txid: v8.string()
745
- });
746
1113
 
747
1114
  // src/request/types/ordinalsMethods.ts
748
- var v9 = __toESM(require("valibot"));
1115
+ var v19 = __toESM(require("valibot"));
749
1116
  var getInscriptionsMethodName = "ord_getInscriptions";
750
- var getInscriptionsParamsSchema = v9.object({
751
- offset: v9.number(),
752
- limit: v9.number()
753
- });
754
- var getInscriptionsResultSchema = v9.object({
755
- total: v9.number(),
756
- limit: v9.number(),
757
- offset: v9.number(),
758
- inscriptions: v9.array(
759
- v9.object({
760
- inscriptionId: v9.string(),
761
- inscriptionNumber: v9.string(),
762
- address: v9.string(),
763
- collectionName: v9.optional(v9.string()),
764
- postage: v9.string(),
765
- contentLength: v9.string(),
766
- contentType: v9.string(),
767
- timestamp: v9.number(),
768
- offset: v9.number(),
769
- genesisTransaction: v9.string(),
770
- output: v9.string()
1117
+ var getInscriptionsParamsSchema = v19.object({
1118
+ offset: v19.number(),
1119
+ limit: v19.number()
1120
+ });
1121
+ var getInscriptionsResultSchema = v19.object({
1122
+ total: v19.number(),
1123
+ limit: v19.number(),
1124
+ offset: v19.number(),
1125
+ inscriptions: v19.array(
1126
+ v19.object({
1127
+ inscriptionId: v19.string(),
1128
+ inscriptionNumber: v19.string(),
1129
+ address: v19.string(),
1130
+ collectionName: v19.optional(v19.string()),
1131
+ postage: v19.string(),
1132
+ contentLength: v19.string(),
1133
+ contentType: v19.string(),
1134
+ timestamp: v19.number(),
1135
+ offset: v19.number(),
1136
+ genesisTransaction: v19.string(),
1137
+ output: v19.string()
771
1138
  })
772
1139
  )
773
1140
  });
774
- var getInscriptionsSchema = v9.object({
1141
+ var getInscriptionsRequestMessageSchema = v19.object({
775
1142
  ...rpcRequestMessageSchema.entries,
776
- ...v9.object({
777
- method: v9.literal(getInscriptionsMethodName),
1143
+ ...v19.object({
1144
+ method: v19.literal(getInscriptionsMethodName),
778
1145
  params: getInscriptionsParamsSchema,
779
- id: v9.string()
1146
+ id: v19.string()
780
1147
  }).entries
781
1148
  });
782
1149
  var sendInscriptionsMethodName = "ord_sendInscriptions";
783
- var sendInscriptionsParamsSchema = v9.object({
784
- transfers: v9.array(
785
- v9.object({
786
- address: v9.string(),
787
- inscriptionId: v9.string()
1150
+ var sendInscriptionsParamsSchema = v19.object({
1151
+ transfers: v19.array(
1152
+ v19.object({
1153
+ address: v19.string(),
1154
+ inscriptionId: v19.string()
788
1155
  })
789
1156
  )
790
1157
  });
791
- var sendInscriptionsResultSchema = v9.object({
792
- txid: v9.string()
1158
+ var sendInscriptionsResultSchema = v19.object({
1159
+ txid: v19.string()
793
1160
  });
794
- var sendInscriptionsSchema = v9.object({
1161
+ var sendInscriptionsRequestMessageSchema = v19.object({
795
1162
  ...rpcRequestMessageSchema.entries,
796
- ...v9.object({
797
- method: v9.literal(sendInscriptionsMethodName),
1163
+ ...v19.object({
1164
+ method: v19.literal(sendInscriptionsMethodName),
798
1165
  params: sendInscriptionsParamsSchema,
799
- id: v9.string()
1166
+ id: v19.string()
800
1167
  }).entries
801
1168
  });
802
1169
 
@@ -813,13 +1180,13 @@ var request = async (method, params, providerId) => {
813
1180
  throw new Error("A wallet method is required");
814
1181
  }
815
1182
  const response = await provider.request(method, params);
816
- if (v10.is(rpcErrorResponseMessageSchema, response)) {
1183
+ if (v20.is(rpcErrorResponseMessageSchema, response)) {
817
1184
  return {
818
1185
  status: "error",
819
1186
  error: response.error
820
1187
  };
821
1188
  }
822
- if (v10.is(rpcSuccessResponseMessageSchema, response)) {
1189
+ if (v20.is(rpcSuccessResponseMessageSchema, response)) {
823
1190
  return {
824
1191
  status: "success",
825
1192
  result: response.result
@@ -1771,7 +2138,6 @@ var signMultipleTransactions = async (options) => {
1771
2138
  RpcErrorCode,
1772
2139
  RpcIdSchema,
1773
2140
  SatsConnectAdapter,
1774
- TransferRunesResultSchema,
1775
2141
  accountChangeEventName,
1776
2142
  accountChangeSchema,
1777
2143
  addListener,
@@ -1818,15 +2184,11 @@ var signMultipleTransactions = async (options) => {
1818
2184
  getInfoResultSchema,
1819
2185
  getInscriptionsMethodName,
1820
2186
  getInscriptionsParamsSchema,
2187
+ getInscriptionsRequestMessageSchema,
1821
2188
  getInscriptionsResultSchema,
1822
- getInscriptionsSchema,
1823
2189
  getProviderById,
1824
2190
  getProviderOrThrow,
1825
2191
  getProviders,
1826
- getRunesBalanceMethodName,
1827
- getRunesBalanceParamsSchema,
1828
- getRunesBalanceRequestMessageSchema,
1829
- getRunesBalanceResultSchema,
1830
2192
  getSupportedWallets,
1831
2193
  getWalletTypeMethodName,
1832
2194
  getWalletTypeParamsSchema,
@@ -1850,11 +2212,27 @@ var signMultipleTransactions = async (options) => {
1850
2212
  rpcRequestMessageSchema,
1851
2213
  rpcResponseMessageSchema,
1852
2214
  rpcSuccessResponseMessageSchema,
2215
+ runesEtchMethodName,
2216
+ runesEtchParamsSchema,
2217
+ runesEtchRequestMessageSchema,
2218
+ runesEtchResultSchema,
2219
+ runesGetBalanceMethodName,
2220
+ runesGetBalanceParamsSchema,
2221
+ runesGetBalanceRequestMessageSchema,
2222
+ runesGetBalanceResultSchema,
2223
+ runesMintMethodName,
2224
+ runesMintParamsSchema,
2225
+ runesMintRequestMessageSchema,
2226
+ runesMintResultSchema,
2227
+ runesTransferMethodName,
2228
+ runesTransferParamsSchema,
2229
+ runesTransferRequestMessageSchema,
2230
+ runesTransferResultSchema,
1853
2231
  sendBtcTransaction,
1854
2232
  sendInscriptionsMethodName,
1855
2233
  sendInscriptionsParamsSchema,
2234
+ sendInscriptionsRequestMessageSchema,
1856
2235
  sendInscriptionsResultSchema,
1857
- sendInscriptionsSchema,
1858
2236
  sendTransferMethodName,
1859
2237
  sendTransferParamsSchema,
1860
2238
  sendTransferRequestMessageSchema,
@@ -1871,17 +2249,38 @@ var signMultipleTransactions = async (options) => {
1871
2249
  signPsbtRequestMessageSchema,
1872
2250
  signPsbtResultSchema,
1873
2251
  signTransaction,
2252
+ stxCallContractMethodName,
2253
+ stxCallContractParamsSchema,
2254
+ stxCallContractRequestMessageSchema,
2255
+ stxCallContractResultSchema,
2256
+ stxDeployContractMethodName,
2257
+ stxDeployContractParamsSchema,
2258
+ stxDeployContractRequestMessageSchema,
2259
+ stxDeployContractResultSchema,
2260
+ stxGetAccountsMethodName,
2261
+ stxGetAccountsParamsSchema,
2262
+ stxGetAccountsRequestMessageSchema,
2263
+ stxGetAccountsResultSchema,
1874
2264
  stxGetAddressesMethodName,
1875
2265
  stxGetAddressesParamsSchema,
1876
2266
  stxGetAddressesRequestMessageSchema,
1877
2267
  stxGetAddressesResultSchema,
2268
+ stxSignMessageMethodName,
2269
+ stxSignMessageParamsSchema,
2270
+ stxSignMessageRequestMessageSchema,
2271
+ stxSignMessageResultSchema,
2272
+ stxSignStructuredMessageMethodName,
2273
+ stxSignStructuredMessageParamsSchema,
2274
+ stxSignStructuredMessageRequestMessageSchema,
2275
+ stxSignStructuredMessageResultSchema,
1878
2276
  stxSignTransactionMethodName,
1879
2277
  stxSignTransactionParamsSchema,
1880
2278
  stxSignTransactionRequestMessageSchema,
1881
2279
  stxSignTransactionResultSchema,
1882
- transferRunesMethodName,
1883
- transferRunesParamsSchema,
1884
- transferRunesRequestSchema,
2280
+ stxTransferStxMethodName,
2281
+ stxTransferStxParamsSchema,
2282
+ stxTransferStxRequestMessageSchema,
2283
+ stxTransferStxResultSchema,
1885
2284
  walletEventSchema,
1886
2285
  walletTypeSchema,
1887
2286
  walletTypes