@sats-connect/core 0.16.0-4c59967 → 0.16.0-51b6afa

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.
Files changed (5) hide show
  1. package/dist/index.cjs +3094 -583
  2. package/dist/index.d.cts +12728 -2954
  3. package/dist/index.d.mts +12728 -2954
  4. package/dist/index.mjs +2737 -578
  5. package/package.json +4 -2
package/dist/index.cjs CHANGED
@@ -32,8 +32,105 @@ let axios = require("axios");
32
32
  axios = __toESM(axios);
33
33
  let bitcoin_address_validation = require("bitcoin-address-validation");
34
34
  let buffer = require("buffer");
35
+ let ts_pattern = require("ts-pattern");
35
36
 
36
- //#region src/request/types/common.ts
37
+ //#region src/request/rpc/objects/namespaces/wallet/shared/networks.ts
38
+ const commonNetworkConfigurationSchema = valibot.object({
39
+ id: valibot.string(),
40
+ name: valibot.string(),
41
+ mode: valibot.picklist([]),
42
+ blockExplorerUrl: valibot.optional(valibot.union([valibot.pipe(valibot.literal(""), valibot.transform(() => void 0)), valibot.pipe(valibot.string(), valibot.url())]))
43
+ });
44
+ const bitcoinChainModeSchema = valibot.enum({
45
+ mainnet: "mainnet",
46
+ testnet: "testnet",
47
+ testnet4: "testnet4",
48
+ signet: "signet",
49
+ regtest: "regtest"
50
+ });
51
+ const bitcoinNetworkConfigurationSchema = valibot.object({
52
+ chain: valibot.literal("bitcoin"),
53
+ ...commonNetworkConfigurationSchema.entries,
54
+ mode: valibot.pipe(valibot.string(), bitcoinChainModeSchema),
55
+ xverseApiUrl: valibot.pipe(valibot.string(), valibot.url()),
56
+ electrsApiUrl: valibot.pipe(valibot.string(), valibot.url())
57
+ });
58
+ const sparkChainMode = {
59
+ mainnet: "mainnet",
60
+ regtest: "regtest"
61
+ };
62
+ const sparkChainModeSchema = valibot.enum(sparkChainMode);
63
+ const sparkNetworkConfigurationSchema = valibot.object({
64
+ chain: valibot.literal("spark"),
65
+ ...commonNetworkConfigurationSchema.entries,
66
+ mode: valibot.pipe(valibot.string(), sparkChainModeSchema),
67
+ electrsApiUrl: valibot.pipe(valibot.string(), valibot.url())
68
+ });
69
+ const stacksChainMode = {
70
+ mainnet: "mainnet",
71
+ testnet: "testnet",
72
+ devnet: "devnet",
73
+ mocknet: "mocknet"
74
+ };
75
+ const stacksChainModeSchema = valibot.enum(stacksChainMode);
76
+ const stacksNetworkConfigurationSchema = valibot.object({
77
+ chain: valibot.literal("stacks"),
78
+ ...commonNetworkConfigurationSchema.entries,
79
+ mode: valibot.pipe(valibot.string(), stacksChainModeSchema),
80
+ stacksApiUrl: valibot.pipe(valibot.string(), valibot.url()),
81
+ xverseApiUrl: valibot.pipe(valibot.string(), valibot.url())
82
+ });
83
+ const starknetChainMode = {
84
+ mainnet: "mainnet",
85
+ sepolia: "sepolia"
86
+ };
87
+ const starknetChainModeSchema = valibot.enum(starknetChainMode);
88
+ const starknetNetworkConfigurationSchema = valibot.object({
89
+ chain: valibot.literal("starknet"),
90
+ ...commonNetworkConfigurationSchema.entries,
91
+ mode: valibot.pipe(valibot.string(), starknetChainModeSchema),
92
+ rpcApiUrl: valibot.pipe(valibot.string(), valibot.url()),
93
+ xverseApiUrl: valibot.pipe(valibot.string(), valibot.url())
94
+ });
95
+ const networkConfigurationSchema = valibot.variant("chain", [
96
+ bitcoinNetworkConfigurationSchema,
97
+ sparkNetworkConfigurationSchema,
98
+ stacksNetworkConfigurationSchema,
99
+ starknetNetworkConfigurationSchema
100
+ ]);
101
+ const bitcoinNetworkConfigurationOptionsSchema = valibot.omit(bitcoinNetworkConfigurationSchema, ["id"]);
102
+ const sparkNetworkConfigurationOptionsSchema = valibot.omit(sparkNetworkConfigurationSchema, ["id"]);
103
+ const stacksNetworkConfigurationOptionsSchema = valibot.omit(stacksNetworkConfigurationSchema, ["id"]);
104
+ const starknetNetworkConfigurationOptionsSchema = valibot.omit(starknetNetworkConfigurationSchema, ["id"]);
105
+ const networkConfigurationOptionsSchema = valibot.variant("chain", [
106
+ bitcoinNetworkConfigurationOptionsSchema,
107
+ sparkNetworkConfigurationOptionsSchema,
108
+ stacksNetworkConfigurationOptionsSchema,
109
+ starknetNetworkConfigurationOptionsSchema
110
+ ]);
111
+ const allResolvedNetworksSchema = valibot.object({
112
+ active: valibot.object({
113
+ bitcoin: bitcoinNetworkConfigurationSchema,
114
+ spark: sparkNetworkConfigurationSchema,
115
+ stacks: stacksNetworkConfigurationSchema,
116
+ starknet: starknetNetworkConfigurationSchema
117
+ }),
118
+ builtin: valibot.object({
119
+ bitcoin: valibot.array(bitcoinNetworkConfigurationSchema),
120
+ spark: valibot.array(sparkNetworkConfigurationSchema),
121
+ stacks: valibot.array(stacksNetworkConfigurationSchema),
122
+ starknet: valibot.array(starknetNetworkConfigurationSchema)
123
+ }),
124
+ custom: valibot.object({
125
+ bitcoin: valibot.array(bitcoinNetworkConfigurationSchema),
126
+ spark: valibot.array(sparkNetworkConfigurationSchema),
127
+ stacks: valibot.array(stacksNetworkConfigurationSchema),
128
+ starknet: valibot.array(starknetNetworkConfigurationSchema)
129
+ })
130
+ });
131
+
132
+ //#endregion
133
+ //#region src/request/rpc/objects/shared/index.ts
37
134
  const walletTypes = [
38
135
  "software",
39
136
  "ledger",
@@ -114,21 +211,6 @@ let SparkNetworkType = /* @__PURE__ */ function(SparkNetworkType$1) {
114
211
  SparkNetworkType$1["Regtest"] = "regtest";
115
212
  return SparkNetworkType$1;
116
213
  }({});
117
- const RpcIdSchema = valibot.optional(valibot.union([
118
- valibot.string(),
119
- valibot.number(),
120
- valibot.null()
121
- ]));
122
- const rpcRequestMessageSchema = valibot.object({
123
- jsonrpc: valibot.literal("2.0"),
124
- method: valibot.string(),
125
- params: valibot.optional(valibot.union([
126
- valibot.array(valibot.unknown()),
127
- valibot.looseObject({}),
128
- valibot.null()
129
- ])),
130
- id: valibot.unwrap(RpcIdSchema)
131
- });
132
214
  /**
133
215
  * @enum {number} RpcErrorCode
134
216
  * @description JSON-RPC error codes
@@ -170,83 +252,6 @@ let RpcErrorCode = /* @__PURE__ */ function(RpcErrorCode$1) {
170
252
  RpcErrorCode$1[RpcErrorCode$1["ACCESS_DENIED"] = -32002] = "ACCESS_DENIED";
171
253
  return RpcErrorCode$1;
172
254
  }({});
173
- const rpcSuccessResponseMessageSchema = valibot.object({
174
- jsonrpc: valibot.literal("2.0"),
175
- result: valibot.nonOptional(valibot.unknown()),
176
- id: RpcIdSchema
177
- });
178
- const rpcErrorResponseMessageSchema = valibot.object({
179
- jsonrpc: valibot.literal("2.0"),
180
- error: valibot.nonOptional(valibot.unknown()),
181
- id: RpcIdSchema
182
- });
183
- const rpcResponseMessageSchema = valibot.union([rpcSuccessResponseMessageSchema, rpcErrorResponseMessageSchema]);
184
-
185
- //#endregion
186
- //#region src/request/types/walletMethods/utils.ts
187
- const commonNetworkConfigurationSchema = valibot.object({
188
- id: valibot.string(),
189
- name: valibot.string(),
190
- mode: valibot.picklist([]),
191
- blockExplorerUrl: valibot.optional(valibot.union([valibot.pipe(valibot.literal(""), valibot.transform(() => void 0)), valibot.pipe(valibot.string(), valibot.url())]))
192
- });
193
- const bitcoinChainModeSchema = valibot.enum({
194
- mainnet: "mainnet",
195
- testnet: "testnet",
196
- testnet4: "testnet4",
197
- signet: "signet",
198
- regtest: "regtest"
199
- });
200
- const bitcoinNetworkConfigurationSchema = valibot.object({
201
- chain: valibot.literal("bitcoin"),
202
- ...commonNetworkConfigurationSchema.entries,
203
- mode: valibot.pipe(valibot.string(), bitcoinChainModeSchema),
204
- xverseApiUrl: valibot.pipe(valibot.string(), valibot.url()),
205
- electrsApiUrl: valibot.pipe(valibot.string(), valibot.url())
206
- });
207
- const sparkChainMode = {
208
- mainnet: "mainnet",
209
- regtest: "regtest"
210
- };
211
- const sparkChainModeSchema = valibot.enum(sparkChainMode);
212
- const sparkNetworkConfigurationSchema = valibot.object({
213
- chain: valibot.literal("spark"),
214
- ...commonNetworkConfigurationSchema.entries,
215
- mode: valibot.pipe(valibot.string(), sparkChainModeSchema),
216
- electrsApiUrl: valibot.pipe(valibot.string(), valibot.url())
217
- });
218
- const stacksChainMode = {
219
- mainnet: "mainnet",
220
- testnet: "testnet",
221
- devnet: "devnet",
222
- mocknet: "mocknet"
223
- };
224
- const stacksChainModeSchema = valibot.enum(stacksChainMode);
225
- const stacksNetworkConfigurationSchema = valibot.object({
226
- chain: valibot.literal("stacks"),
227
- ...commonNetworkConfigurationSchema.entries,
228
- mode: valibot.pipe(valibot.string(), stacksChainModeSchema),
229
- stacksApiUrl: valibot.pipe(valibot.string(), valibot.url()),
230
- xverseApiUrl: valibot.pipe(valibot.string(), valibot.url())
231
- });
232
- const starknetChainMode = {
233
- mainnet: "mainnet",
234
- sepolia: "sepolia"
235
- };
236
- const starknetChainModeSchema = valibot.enum(starknetChainMode);
237
- const starknetNetworkConfigurationSchema = valibot.object({
238
- chain: valibot.literal("starknet"),
239
- ...commonNetworkConfigurationSchema.entries,
240
- mode: valibot.pipe(valibot.string(), starknetChainModeSchema),
241
- rpcApiUrl: valibot.pipe(valibot.string(), valibot.url()),
242
- xverseApiUrl: valibot.pipe(valibot.string(), valibot.url())
243
- });
244
- const networkConfigurationSchema = valibot.variant("chain", [
245
- bitcoinNetworkConfigurationSchema,
246
- sparkNetworkConfigurationSchema,
247
- stacksNetworkConfigurationSchema,
248
- starknetNetworkConfigurationSchema
249
- ]);
250
255
 
251
256
  //#endregion
252
257
  //#region src/provider/types.ts
@@ -317,292 +322,26 @@ function getSupportedWallets() {
317
322
  }
318
323
 
319
324
  //#endregion
320
- //#region src/request/sanitizeRequest.ts
321
- const sanitizeRequest = (method, params, providerInfo) => {
322
- try {
323
- const [major, minor, patch] = providerInfo.version.split(".").map((part) => parseInt(part, 10));
324
- const platform = providerInfo.platform;
325
- if (!platform || platform === ProviderPlatform.Web && major <= 1 && minor <= 4 || platform === ProviderPlatform.Mobile && major <= 1 && minor <= 54) {
326
- const v1Sanitized = sanitizeAddressPurposeRequest(method, params);
327
- method = v1Sanitized.method;
328
- params = v1Sanitized.params;
329
- }
330
- } catch {}
331
- return {
332
- method,
333
- params
334
- };
325
+ //#region src/runes/api.ts
326
+ const urlNetworkSuffix = {
327
+ [BitcoinNetworkType.Mainnet]: "",
328
+ [BitcoinNetworkType.Testnet]: "-testnet",
329
+ [BitcoinNetworkType.Testnet4]: "-testnet4",
330
+ [BitcoinNetworkType.Signet]: "-signet"
335
331
  };
336
- const sanitizeAddressPurposeRequest = (method, params) => {
337
- const filterPurposes = (purposes) => purposes?.filter((purpose) => purpose !== AddressPurpose.Spark && purpose !== AddressPurpose.Starknet);
338
- if (method === "wallet_connect") {
339
- const typedParams = params;
340
- if (!typedParams) return {
341
- method,
342
- params
343
- };
344
- const { addresses, ...rest } = typedParams;
345
- return {
346
- method,
347
- params: {
348
- ...rest,
349
- addresses: filterPurposes(addresses)
350
- }
351
- };
352
- }
353
- if (method === "getAccounts") {
354
- const { purposes, ...rest } = params;
355
- return {
356
- method,
357
- params: {
358
- ...rest,
359
- purposes: filterPurposes(purposes)
360
- }
361
- };
332
+ const ORDINALS_API_BASE_URL = (network = BitcoinNetworkType.Mainnet) => {
333
+ if (network === BitcoinNetworkType.Regtest) throw new Error(`Ordinals API does not support ${network} network`);
334
+ return `https://ordinals${urlNetworkSuffix[network]}.xverse.app/v1`;
335
+ };
336
+ var RunesApi = class {
337
+ client;
338
+ constructor(network) {
339
+ this.client = axios.default.create({ baseURL: ORDINALS_API_BASE_URL(network) });
362
340
  }
363
- if (method === "getAddresses") {
364
- const { purposes, ...rest } = params;
341
+ parseError = (error) => {
365
342
  return {
366
- method,
367
- params: {
368
- ...rest,
369
- purposes: filterPurposes(purposes)
370
- }
371
- };
372
- }
373
- return {
374
- method,
375
- params
376
- };
377
- };
378
-
379
- //#endregion
380
- //#region src/request/rpc.ts
381
- const rpcIdSchema = valibot.union([
382
- valibot.string(),
383
- valibot.number(),
384
- valibot.null()
385
- ]);
386
- const rpcRequestSchema = valibot.object({
387
- jsonrpc: valibot.literal("2.0"),
388
- method: valibot.string(),
389
- params: valibot.optional(valibot.union([
390
- valibot.array(valibot.unknown()),
391
- valibot.looseObject({}),
392
- valibot.null()
393
- ])),
394
- id: valibot.optional(rpcIdSchema)
395
- });
396
- const rpcSuccessResponseSchema = valibot.object({
397
- jsonrpc: valibot.literal("2.0"),
398
- result: valibot.unknown(),
399
- id: rpcIdSchema
400
- });
401
- const warningSchema = valibot.variant("code", [valibot.object({
402
- code: valibot.literal("DEPRECATION_NOTICE"),
403
- message: valibot.string(),
404
- sunsetDate: valibot.pipe(valibot.string(), valibot.isoDate())
405
- })]);
406
- /**
407
- * Extends the standard JSON RPC 2.0 with an additional field as a means of
408
- * providing clients with extra data, such as deprecation warnings, without
409
- * altering the main payloads.
410
- *
411
- * A JSON-RPC response must either be a result (success) or an error (failure).
412
- * To provide additional data, conventions must be layered atop these two types.
413
- * Having an additional property is the least disruptive approach, and is
414
- * acceptable when clients are known to be able to handle such a structure,
415
- * which they can since they're all part of Sats Connect.
416
- */
417
- const rpcSuccessWithExtensionsResponseSchema = valibot.object({
418
- ...rpcSuccessResponseSchema.entries,
419
- extensions: valibot.optional(valibot.object({ warnings: valibot.array(warningSchema) }))
420
- });
421
- const rpcErrorObject = valibot.object({
422
- code: valibot.number(),
423
- message: valibot.string(),
424
- data: valibot.optional(valibot.unknown())
425
- });
426
- const rpcErrorResponseSchema = valibot.object({
427
- jsonrpc: valibot.literal("2.0"),
428
- error: rpcErrorObject,
429
- id: rpcIdSchema
430
- });
431
-
432
- //#endregion
433
- //#region src/request/createSuccessResponseSchema.ts
434
- function createSuccessResponseSchema({ method, resultSchema }) {
435
- return valibot.object({
436
- ...rpcSuccessWithExtensionsResponseSchema.entries,
437
- id: valibot.string(),
438
- result: resultSchema,
439
- "~sats-connect-method": valibot.literal(method)
440
- });
441
- }
442
-
443
- //#endregion
444
- //#region src/request/methods.ts
445
- const bitcoinMethods = {
446
- getAccounts: "getAccounts",
447
- bitcoin_getAccountsV2: "bitcoin_getAccountsV2",
448
- getAddresses: "getAddresses",
449
- bitcoin_getAddressesV2: "bitcoin_getAddressesV2",
450
- getBalance: "getBalance",
451
- bitcoin_getBalanceV2: "bitcoin_getBalanceV2",
452
- getInfo: "getInfo",
453
- bitcoin_getInfoV2: "bitcoin_getInfoV2",
454
- sendTransfer: "sendTransfer",
455
- bitcoin_sendTransferV2: "bitcoin_sendTransferV2",
456
- signMessage: "signMessage",
457
- bitcoin_signMessageV2: "bitcoin_signMessageV2",
458
- signMultipleMessages: "signMultipleMessages",
459
- bitcoin_signMultipleMessagesV2: "bitcoin_signMultipleMessagesV2",
460
- signPsbt: "signPsbt",
461
- bitcoin_signPsbtV2: "bitcoin_signPsbtV2"
462
- };
463
-
464
- //#endregion
465
- //#region src/request/rpc/methodSchemas/bitcoin/getInfo/response.ts
466
- let ProviderPlatform = /* @__PURE__ */ function(ProviderPlatform$1) {
467
- ProviderPlatform$1["Web"] = "web";
468
- ProviderPlatform$1["Mobile"] = "mobile";
469
- return ProviderPlatform$1;
470
- }({});
471
- const bitcoinGetInfoSuccessResponseSchema = createSuccessResponseSchema({
472
- resultSchema: valibot.object({
473
- version: valibot.string(),
474
- platform: valibot.optional(valibot.enum(ProviderPlatform)),
475
- methods: valibot.optional(valibot.array(valibot.string())),
476
- supports: valibot.array(valibot.string())
477
- }),
478
- method: bitcoinMethods.getInfo
479
- });
480
-
481
- //#endregion
482
- //#region src/request/createRequestSchema.ts
483
- function createRequestSchema({ paramsSchema, method }) {
484
- return valibot.object({
485
- ...rpcRequestSchema.entries,
486
- id: valibot.string(),
487
- method: valibot.literal(method),
488
- params: paramsSchema
489
- });
490
- }
491
-
492
- //#endregion
493
- //#region src/request/rpc/methodSchemas/bitcoin/signMessage/request.ts
494
- let MessageSigningProtocols = /* @__PURE__ */ function(MessageSigningProtocols$1) {
495
- MessageSigningProtocols$1["ECDSA"] = "ECDSA";
496
- MessageSigningProtocols$1["BIP322"] = "BIP322";
497
- return MessageSigningProtocols$1;
498
- }({});
499
- const bitcoinSignMessageRequestSchema = createRequestSchema({
500
- paramsSchema: valibot.object({
501
- address: valibot.string(),
502
- message: valibot.string(),
503
- protocol: valibot.optional(valibot.enum(MessageSigningProtocols))
504
- }),
505
- method: bitcoinMethods.signMessage
506
- });
507
-
508
- //#endregion
509
- //#region src/request/index.ts
510
- const cache = {};
511
- const requestInternal = async (provider, method, params) => {
512
- const response = await provider.request(method, params);
513
- if (valibot.is(rpcErrorResponseMessageSchema, response)) return {
514
- status: "error",
515
- error: response.error
516
- };
517
- if (valibot.is(rpcSuccessResponseMessageSchema, response)) return {
518
- status: "success",
519
- result: response.result
520
- };
521
- return {
522
- status: "error",
523
- error: {
524
- code: RpcErrorCode.INTERNAL_ERROR,
525
- message: "Received unknown response from provider.",
526
- data: response
527
- }
528
- };
529
- };
530
- const request = async (method, params, providerId) => {
531
- let provider = window.XverseProviders?.BitcoinProvider || window.BitcoinProvider;
532
- if (providerId) provider = await getProviderById(providerId);
533
- if (!provider) throw new Error("no wallet provider was found");
534
- if (!method) throw new Error("A wallet method is required");
535
- if (!cache.providerInfo) {
536
- const infoResult = await requestInternal(provider, "getInfo", null);
537
- if (infoResult.status === "success") cache.providerInfo = infoResult.result;
538
- }
539
- if (cache.providerInfo) {
540
- if (method === "getInfo") return {
541
- status: "success",
542
- result: cache.providerInfo
543
- };
544
- const sanitized = sanitizeRequest(method, params, cache.providerInfo);
545
- if (sanitized.overrideResponse) return sanitized.overrideResponse;
546
- method = sanitized.method;
547
- params = sanitized.params;
548
- }
549
- return requestInternal(provider, method, params);
550
- };
551
- /**
552
- * Adds an event listener.
553
- *
554
- * Currently expects 2 arguments, although is also capable of handling legacy
555
- * calls with 3 arguments consisting of:
556
- *
557
- * - event name (string)
558
- * - callback (function)
559
- * - provider ID (optional string)
560
- */
561
- const addListener = (...rawArgs) => {
562
- const [listenerInfo, providerId] = (() => {
563
- if (rawArgs.length === 1) return [rawArgs[0], void 0];
564
- if (rawArgs.length === 2) if (typeof rawArgs[1] === "function") return [{
565
- eventName: rawArgs[0],
566
- cb: rawArgs[1]
567
- }, void 0];
568
- else return rawArgs;
569
- if (rawArgs.length === 3) return [{
570
- eventName: rawArgs[0],
571
- cb: rawArgs[1]
572
- }, rawArgs[2]];
573
- throw new Error("Unexpected number of arguments. Expecting 2 (or 3 for legacy requests).", { cause: rawArgs });
574
- })();
575
- let provider = window.XverseProviders?.BitcoinProvider || window.BitcoinProvider;
576
- if (providerId) provider = getProviderById(providerId);
577
- if (!provider) throw new Error("no wallet provider was found");
578
- if (!provider.addListener) {
579
- console.error(`The wallet provider you are using does not support the addListener method. Please update your wallet provider.`);
580
- return () => {};
581
- }
582
- return provider.addListener(listenerInfo);
583
- };
584
-
585
- //#endregion
586
- //#region src/runes/api.ts
587
- const urlNetworkSuffix = {
588
- [BitcoinNetworkType.Mainnet]: "",
589
- [BitcoinNetworkType.Testnet]: "-testnet",
590
- [BitcoinNetworkType.Testnet4]: "-testnet4",
591
- [BitcoinNetworkType.Signet]: "-signet"
592
- };
593
- const ORDINALS_API_BASE_URL = (network = BitcoinNetworkType.Mainnet) => {
594
- if (network === BitcoinNetworkType.Regtest) throw new Error(`Ordinals API does not support ${network} network`);
595
- return `https://ordinals${urlNetworkSuffix[network]}.xverse.app/v1`;
596
- };
597
- var RunesApi = class {
598
- client;
599
- constructor(network) {
600
- this.client = axios.default.create({ baseURL: ORDINALS_API_BASE_URL(network) });
601
- }
602
- parseError = (error) => {
603
- return {
604
- code: error.response?.status,
605
- message: JSON.stringify(error.response?.data)
343
+ code: error.response?.status,
344
+ message: JSON.stringify(error.response?.data)
606
345
  };
607
346
  };
608
347
  estimateMintCost = async (mintParams) => {
@@ -914,18 +653,2614 @@ var SatsConnectAdapter = class {
914
653
  };
915
654
  }
916
655
  }
917
- async request(method, params) {
918
- switch (method) {
919
- case "runes_mint": return this.mintRunes(params);
920
- case "runes_etch": return this.etchRunes(params);
921
- case "runes_estimateMint": return this.estimateMint(params);
922
- case "runes_estimateEtch": return this.estimateEtch(params);
923
- case "runes_getOrder": return this.getOrder(params);
924
- case "runes_estimateRbfOrder": return this.estimateRbfOrder(params);
925
- case "runes_rbfOrder": return this.rbfOrder(params);
926
- default: return this.requestInternal(method, params);
927
- }
656
+ async request(method, params) {
657
+ switch (method) {
658
+ case "runes_mint": return this.mintRunes(params);
659
+ case "runes_etch": return this.etchRunes(params);
660
+ case "runes_estimateMint": return this.estimateMint(params);
661
+ case "runes_estimateEtch": return this.estimateEtch(params);
662
+ case "runes_getOrder": return this.getOrder(params);
663
+ case "runes_estimateRbfOrder": return this.estimateRbfOrder(params);
664
+ case "runes_rbfOrder": return this.rbfOrder(params);
665
+ default: return this.requestInternal(method, params);
666
+ }
667
+ }
668
+ };
669
+
670
+ //#endregion
671
+ //#region src/adapters/fordefi.ts
672
+ var FordefiAdapter = class extends SatsConnectAdapter {
673
+ id = DefaultAdaptersInfo.fordefi.id;
674
+ requestInternal = async (method, params) => {
675
+ const provider = getProviderById(this.id);
676
+ if (!provider) throw new Error("no wallet provider was found");
677
+ if (!method) throw new Error("A wallet method is required");
678
+ return await provider.request(method, params);
679
+ };
680
+ addListener = ({ eventName, cb }) => {
681
+ const provider = getProviderById(this.id);
682
+ if (!provider) throw new Error("no wallet provider was found");
683
+ if (!provider.addListener) {
684
+ console.error(`The wallet provider you are using does not support the addListener method. Please update your wallet provider.`);
685
+ return () => {};
686
+ }
687
+ return provider.addListener(eventName, cb);
688
+ };
689
+ };
690
+
691
+ //#endregion
692
+ //#region src/request/rpc/objects/namespaces/bitcoin/shared/index.ts
693
+ let MessageSigningProtocols = /* @__PURE__ */ function(MessageSigningProtocols$1) {
694
+ MessageSigningProtocols$1["ECDSA"] = "ECDSA";
695
+ MessageSigningProtocols$1["BIP322"] = "BIP322";
696
+ return MessageSigningProtocols$1;
697
+ }({});
698
+ let ProviderPlatform = /* @__PURE__ */ function(ProviderPlatform$1) {
699
+ ProviderPlatform$1["Web"] = "web";
700
+ ProviderPlatform$1["Mobile"] = "mobile";
701
+ return ProviderPlatform$1;
702
+ }({});
703
+
704
+ //#endregion
705
+ //#region src/adapters/unisat.ts
706
+ function convertSignInputsToInputType(signInputs) {
707
+ let result = [];
708
+ if (!signInputs) return result;
709
+ for (let address in signInputs) {
710
+ let indexes = signInputs[address];
711
+ for (let index of indexes) result.push({
712
+ index,
713
+ address
714
+ });
715
+ }
716
+ return result;
717
+ }
718
+ var UnisatAdapter = class extends SatsConnectAdapter {
719
+ id = DefaultAdaptersInfo.unisat.id;
720
+ async getAccounts(params) {
721
+ const { purposes } = params;
722
+ if (purposes.includes(AddressPurpose.Stacks) || purposes.includes(AddressPurpose.Starknet) || purposes.includes(AddressPurpose.Spark)) throw new Error("Only bitcoin addresses are supported");
723
+ const accounts = await window.unisat.requestAccounts();
724
+ const publicKey = await window.unisat.getPublicKey();
725
+ const address = accounts[0];
726
+ const addressType = (0, bitcoin_address_validation.getAddressInfo)(accounts[0]).type;
727
+ const pk = addressType === bitcoin_address_validation.AddressType.p2tr ? publicKey.slice(2) : publicKey;
728
+ const paymentAddress = {
729
+ address,
730
+ publicKey: pk,
731
+ addressType,
732
+ purpose: AddressPurpose.Payment,
733
+ walletType: "software"
734
+ };
735
+ const ordinalsAddress = {
736
+ address,
737
+ publicKey: pk,
738
+ addressType,
739
+ purpose: AddressPurpose.Ordinals,
740
+ walletType: "software"
741
+ };
742
+ const response = [];
743
+ if (purposes.includes(AddressPurpose.Payment)) response.push({
744
+ ...paymentAddress,
745
+ walletType: "software"
746
+ });
747
+ if (purposes.includes(AddressPurpose.Ordinals)) response.push({
748
+ ...ordinalsAddress,
749
+ walletType: "software"
750
+ });
751
+ return response;
752
+ }
753
+ async signMessage(params) {
754
+ const { message, address } = params;
755
+ const addressType = (0, bitcoin_address_validation.getAddressInfo)(address).type;
756
+ if ([bitcoin_address_validation.AddressType.p2wpkh, bitcoin_address_validation.AddressType.p2tr].includes(addressType)) return {
757
+ address,
758
+ messageHash: "",
759
+ signature: await window.unisat.signMessage(message, "bip322-simple"),
760
+ protocol: MessageSigningProtocols.BIP322
761
+ };
762
+ return {
763
+ address,
764
+ messageHash: "",
765
+ signature: await window.unisat.signMessage(message, "ecdsa"),
766
+ protocol: MessageSigningProtocols.ECDSA
767
+ };
768
+ }
769
+ async sendTransfer(params) {
770
+ const { recipients } = params;
771
+ if (recipients.length > 1) throw new Error("Only one recipient is supported by this wallet provider");
772
+ return { txid: await window.unisat.sendBitcoin(recipients[0].address, recipients[0].amount) };
773
+ }
774
+ async signPsbt(params) {
775
+ const { psbt, signInputs, broadcast } = params;
776
+ const psbtHex = buffer.Buffer.from(psbt, "base64").toString("hex");
777
+ const signedPsbt = await window.unisat.signPsbt(psbtHex, {
778
+ autoFinalized: broadcast,
779
+ toSignInputs: convertSignInputsToInputType(signInputs)
780
+ });
781
+ const signedPsbtBase64 = buffer.Buffer.from(signedPsbt, "hex").toString("base64");
782
+ let txid;
783
+ if (broadcast) txid = await window.unisat.pushPsbt(signedPsbt);
784
+ return {
785
+ psbt: signedPsbtBase64,
786
+ txid
787
+ };
788
+ }
789
+ requestInternal = async (method, params) => {
790
+ try {
791
+ switch (method) {
792
+ case "getAccounts": return {
793
+ status: "success",
794
+ result: await this.getAccounts(params)
795
+ };
796
+ case "sendTransfer": return {
797
+ status: "success",
798
+ result: await this.sendTransfer(params)
799
+ };
800
+ case "signMessage": return {
801
+ status: "success",
802
+ result: await this.signMessage(params)
803
+ };
804
+ case "signPsbt": return {
805
+ status: "success",
806
+ result: await this.signPsbt(params)
807
+ };
808
+ default: {
809
+ const error = {
810
+ code: RpcErrorCode.METHOD_NOT_SUPPORTED,
811
+ message: "Method not supported by the selected wallet"
812
+ };
813
+ console.error("Error calling the method", error);
814
+ return {
815
+ status: "error",
816
+ error
817
+ };
818
+ }
819
+ }
820
+ } catch (error) {
821
+ console.error("Error calling the method", error);
822
+ return {
823
+ status: "error",
824
+ error: {
825
+ code: error.code === 4001 ? RpcErrorCode.USER_REJECTION : RpcErrorCode.INTERNAL_ERROR,
826
+ message: error.message ? error.message : "Wallet method call error",
827
+ data: error
828
+ }
829
+ };
830
+ }
831
+ };
832
+ addListener = ({ eventName, cb }) => {
833
+ switch (eventName) {
834
+ case "accountChange": {
835
+ const handler = () => {
836
+ cb({ type: "accountChange" });
837
+ };
838
+ window.unisat.on("accountsChanged", handler);
839
+ return () => {
840
+ window.unisat.removeListener("accountsChanged", handler);
841
+ };
842
+ }
843
+ case "networkChange": {
844
+ const handler = () => {
845
+ cb({ type: "networkChange" });
846
+ };
847
+ window.unisat.on("networkChanged", handler);
848
+ return () => {
849
+ window.unisat.removeListener("networkChanged", handler);
850
+ };
851
+ }
852
+ default:
853
+ console.error("Event not supported by the selected wallet");
854
+ return () => {};
855
+ }
856
+ };
857
+ };
858
+
859
+ //#endregion
860
+ //#region src/request/rpcSpec.ts
861
+ const specIdSchema = valibot.union([
862
+ valibot.string(),
863
+ valibot.number(),
864
+ valibot.null()
865
+ ]);
866
+ const specRequestSchema = valibot.object({
867
+ jsonrpc: valibot.literal("2.0"),
868
+ method: valibot.string(),
869
+ params: valibot.optional(valibot.union([
870
+ valibot.array(valibot.unknown()),
871
+ valibot.looseObject({}),
872
+ valibot.null()
873
+ ])),
874
+ id: valibot.optional(specIdSchema)
875
+ });
876
+ const specSuccessResponseSchema = valibot.object({
877
+ jsonrpc: valibot.literal("2.0"),
878
+ result: valibot.unknown(),
879
+ id: specIdSchema
880
+ });
881
+ const warningSchema = valibot.variant("code", [valibot.object({
882
+ code: valibot.literal("DEPRECATION_NOTICE"),
883
+ message: valibot.string(),
884
+ sunsetDate: valibot.pipe(valibot.string(), valibot.isoDate())
885
+ })]);
886
+ /**
887
+ * Extends the standard JSON RPC 2.0 with an additional field as a means of
888
+ * providing clients with extra data, such as deprecation warnings, without
889
+ * altering the main payloads.
890
+ *
891
+ * A JSON-RPC response must either be a result (success) or an error (failure).
892
+ * To provide additional data, conventions must be layered atop these two types.
893
+ * Having an additional property is the least disruptive approach, and is
894
+ * acceptable when clients are known to be able to handle such a structure,
895
+ * which they can since they're all part of Sats Connect.
896
+ */
897
+ const specSuccessWithExtensionsResponseSchema = valibot.object({
898
+ ...specSuccessResponseSchema.entries,
899
+ extensions: valibot.optional(valibot.object({ warnings: valibot.array(warningSchema) }))
900
+ });
901
+ const specErrorObjectSchema = valibot.object({
902
+ code: valibot.number(),
903
+ message: valibot.string(),
904
+ data: valibot.optional(valibot.unknown())
905
+ });
906
+ const specErrorResponseSchema = valibot.object({
907
+ jsonrpc: valibot.literal("2.0"),
908
+ error: specErrorObjectSchema,
909
+ id: specIdSchema
910
+ });
911
+ const specResponseSchema = valibot.union([specSuccessWithExtensionsResponseSchema, specErrorResponseSchema]);
912
+
913
+ //#endregion
914
+ //#region src/request/sanitizeRequest.ts
915
+ const sanitizeRequest = (method, params, providerInfo) => {
916
+ try {
917
+ const [major, minor, patch] = providerInfo.version.split(".").map((part) => parseInt(part, 10));
918
+ const platform = providerInfo.platform;
919
+ if (!platform || platform === ProviderPlatform.Web && major <= 1 && minor <= 4 || platform === ProviderPlatform.Mobile && major <= 1 && minor <= 54) {
920
+ const v1Sanitized = sanitizeAddressPurposeRequest(method, params);
921
+ method = v1Sanitized.method;
922
+ params = v1Sanitized.params;
923
+ }
924
+ } catch {}
925
+ return {
926
+ method,
927
+ params
928
+ };
929
+ };
930
+ const sanitizeAddressPurposeRequest = (method, params) => {
931
+ const filterPurposes = (purposes) => purposes?.filter((purpose) => purpose !== AddressPurpose.Spark && purpose !== AddressPurpose.Starknet);
932
+ if (method === "wallet_connect") {
933
+ const typedParams = params;
934
+ if (!typedParams) return {
935
+ method,
936
+ params
937
+ };
938
+ const { addresses, ...rest } = typedParams;
939
+ return {
940
+ method,
941
+ params: {
942
+ ...rest,
943
+ addresses: filterPurposes(addresses)
944
+ }
945
+ };
946
+ }
947
+ if (method === "getAccounts") {
948
+ const { purposes, ...rest } = params;
949
+ return {
950
+ method,
951
+ params: {
952
+ ...rest,
953
+ purposes: filterPurposes(purposes)
954
+ }
955
+ };
956
+ }
957
+ if (method === "getAddresses") {
958
+ const { purposes, ...rest } = params;
959
+ return {
960
+ method,
961
+ params: {
962
+ ...rest,
963
+ purposes: filterPurposes(purposes)
964
+ }
965
+ };
966
+ }
967
+ return {
968
+ method,
969
+ params
970
+ };
971
+ };
972
+
973
+ //#endregion
974
+ //#region src/request/methods.ts
975
+ const bitcoinMethods = {
976
+ getAccounts: "getAccounts",
977
+ bitcoin_getAccountsV2: "bitcoin_getAccountsV2",
978
+ getAddresses: "getAddresses",
979
+ bitcoin_getAddressesV2: "bitcoin_getAddressesV2",
980
+ getBalance: "getBalance",
981
+ bitcoin_getBalanceV2: "bitcoin_getBalanceV2",
982
+ getInfo: "getInfo",
983
+ bitcoin_getInfoV2: "bitcoin_getInfoV2",
984
+ sendTransfer: "sendTransfer",
985
+ bitcoin_sendTransferV2: "bitcoin_sendTransferV2",
986
+ signMessage: "signMessage",
987
+ bitcoin_signMessageV2: "bitcoin_signMessageV2",
988
+ signMultipleMessages: "signMultipleMessages",
989
+ bitcoin_signMultipleMessagesV2: "bitcoin_signMultipleMessagesV2",
990
+ signPsbt: "signPsbt",
991
+ bitcoin_signPsbtV2: "bitcoin_signPsbtV2"
992
+ };
993
+ const stacksMethods = {
994
+ stx_callContract: "stx_callContract",
995
+ stx_deployContract: "stx_deployContract",
996
+ stx_getAccounts: "stx_getAccounts",
997
+ stx_getAddresses: "stx_getAddresses",
998
+ stacks_getAddressesV2: "stacks_getAddressesV2",
999
+ stx_signMessage: "stx_signMessage",
1000
+ stx_signStructuredMessage: "stx_signStructuredMessage",
1001
+ stx_signTransaction: "stx_signTransaction",
1002
+ stx_signTransactions: "stx_signTransactions",
1003
+ stx_transferStx: "stx_transferStx"
1004
+ };
1005
+ const sparkMethods = {
1006
+ spark_getAddresses: "spark_getAddresses",
1007
+ spark_getAddressesV2: "spark_getAddressesV2",
1008
+ spark_getBalance: "spark_getBalance",
1009
+ spark_transfer: "spark_transfer",
1010
+ spark_transferToken: "spark_transferToken",
1011
+ spark_signMessage: "spark_signMessage",
1012
+ spark_flashnet_getJwt: "spark_flashnet_getJwt",
1013
+ spark_flashnet_signIntent: "spark_flashnet_signIntent",
1014
+ spark_flashnet_signStructuredMessage: "spark_flashnet_signStructuredMessage",
1015
+ spark_flashnet_executeSwap: "spark_flashnet_executeSwap",
1016
+ spark_flashnet_executeRouteSwap: "spark_flashnet_executeRouteSwap",
1017
+ spark_flashnet_clawbackFunds: "spark_flashnet_clawbackFunds",
1018
+ spark_flashnet_getClawbackEligibleTransfers: "spark_flashnet_getClawbackEligibleTransfers"
1019
+ };
1020
+ const runesMethods = {
1021
+ runes_estimateEtch: "runes_estimateEtch",
1022
+ runes_estimateMint: "runes_estimateMint",
1023
+ runes_estimateRbfOrder: "runes_estimateRbfOrder",
1024
+ runes_etch: "runes_etch",
1025
+ runes_getBalance: "runes_getBalance",
1026
+ runes_getOrder: "runes_getOrder",
1027
+ runes_mint: "runes_mint",
1028
+ runes_rbfOrder: "runes_rbfOrder",
1029
+ runes_transfer: "runes_transfer"
1030
+ };
1031
+ const ordinalsMethods = {
1032
+ ord_getInscriptions: "ord_getInscriptions",
1033
+ ord_sendInscriptions: "ord_sendInscriptions"
1034
+ };
1035
+ const walletMethods = {
1036
+ wallet_addNetwork: "wallet_addNetwork",
1037
+ wallet_addNetworkV2: "wallet_addNetworkV2",
1038
+ wallet_changeNetworkById: "wallet_changeNetworkById",
1039
+ wallet_changeNetwork: "wallet_changeNetwork",
1040
+ wallet_connect: "wallet_connect",
1041
+ wallet_connectV2: "wallet_connectV2",
1042
+ wallet_disconnect: "wallet_disconnect",
1043
+ wallet_getAccount: "wallet_getAccount",
1044
+ wallet_getAccountV2: "wallet_getAccountV2",
1045
+ wallet_getCurrentPermissions: "wallet_getCurrentPermissions",
1046
+ wallet_getNetwork: "wallet_getNetwork",
1047
+ wallet_getNetworks: "wallet_getNetworks",
1048
+ wallet_getWalletType: "wallet_getWalletType",
1049
+ wallet_openBridge: "wallet_openBridge",
1050
+ wallet_openBuy: "wallet_openBuy",
1051
+ wallet_openReceive: "wallet_openReceive",
1052
+ wallet_renouncePermissions: "wallet_renouncePermissions",
1053
+ wallet_requestPermissions: "wallet_requestPermissions"
1054
+ };
1055
+
1056
+ //#endregion
1057
+ //#region src/request/rpc/compat.ts
1058
+ function bitcoinModeToLegacyBitcoinNetworkType(mode) {
1059
+ return (0, ts_pattern.match)(mode).with("mainnet", () => BitcoinNetworkType.Mainnet).with("testnet", () => BitcoinNetworkType.Testnet).with("regtest", () => BitcoinNetworkType.Regtest).with("signet", () => BitcoinNetworkType.Signet).with("testnet4", () => BitcoinNetworkType.Testnet4).exhaustive();
1060
+ }
1061
+ function stacksModeToLegacyStacksNetworkType(mode) {
1062
+ return (0, ts_pattern.match)(mode).with("mainnet", () => StacksNetworkType.Mainnet).with("testnet", () => StacksNetworkType.Testnet).otherwise(() => StacksNetworkType.Testnet);
1063
+ }
1064
+ function sparkModeToLegacySparkNetworkType(mode) {
1065
+ return (0, ts_pattern.match)(mode).with("mainnet", () => SparkNetworkType.Mainnet).with("regtest", () => SparkNetworkType.Regtest).exhaustive();
1066
+ }
1067
+
1068
+ //#endregion
1069
+ //#region src/request/rpc/methodSupport.ts
1070
+ const { active } = {
1071
+ active: "active",
1072
+ deprecated: "deprecated",
1073
+ removed: "removed"
1074
+ };
1075
+ const methodSupport = {
1076
+ [bitcoinMethods.getAccounts]: active,
1077
+ [bitcoinMethods.bitcoin_getAccountsV2]: active,
1078
+ [bitcoinMethods.getAddresses]: active,
1079
+ [bitcoinMethods.bitcoin_getAddressesV2]: active,
1080
+ [bitcoinMethods.getBalance]: active,
1081
+ [bitcoinMethods.bitcoin_getBalanceV2]: active,
1082
+ [bitcoinMethods.getInfo]: active,
1083
+ [bitcoinMethods.bitcoin_getInfoV2]: active,
1084
+ [bitcoinMethods.sendTransfer]: active,
1085
+ [bitcoinMethods.bitcoin_sendTransferV2]: active,
1086
+ [bitcoinMethods.signMessage]: active,
1087
+ [bitcoinMethods.bitcoin_signMessageV2]: active,
1088
+ [bitcoinMethods.signMultipleMessages]: active,
1089
+ [bitcoinMethods.bitcoin_signMultipleMessagesV2]: active,
1090
+ [bitcoinMethods.signPsbt]: active,
1091
+ [bitcoinMethods.bitcoin_signPsbtV2]: active,
1092
+ [stacksMethods.stx_callContract]: active,
1093
+ [stacksMethods.stx_deployContract]: active,
1094
+ [stacksMethods.stx_getAccounts]: active,
1095
+ [stacksMethods.stx_getAddresses]: active,
1096
+ [stacksMethods.stacks_getAddressesV2]: active,
1097
+ [stacksMethods.stx_signMessage]: active,
1098
+ [stacksMethods.stx_signStructuredMessage]: active,
1099
+ [stacksMethods.stx_signTransaction]: active,
1100
+ [stacksMethods.stx_signTransactions]: active,
1101
+ [stacksMethods.stx_transferStx]: active,
1102
+ [sparkMethods.spark_getAddresses]: active,
1103
+ [sparkMethods.spark_getAddressesV2]: active,
1104
+ [sparkMethods.spark_getBalance]: active,
1105
+ [sparkMethods.spark_transfer]: active,
1106
+ [sparkMethods.spark_transferToken]: active,
1107
+ [sparkMethods.spark_signMessage]: active,
1108
+ [sparkMethods.spark_flashnet_getJwt]: active,
1109
+ [sparkMethods.spark_flashnet_signIntent]: active,
1110
+ [sparkMethods.spark_flashnet_signStructuredMessage]: active,
1111
+ [sparkMethods.spark_flashnet_executeSwap]: active,
1112
+ [sparkMethods.spark_flashnet_executeRouteSwap]: active,
1113
+ [sparkMethods.spark_flashnet_clawbackFunds]: active,
1114
+ [sparkMethods.spark_flashnet_getClawbackEligibleTransfers]: active,
1115
+ [runesMethods.runes_estimateEtch]: active,
1116
+ [runesMethods.runes_estimateMint]: active,
1117
+ [runesMethods.runes_estimateRbfOrder]: active,
1118
+ [runesMethods.runes_etch]: active,
1119
+ [runesMethods.runes_getBalance]: active,
1120
+ [runesMethods.runes_getOrder]: active,
1121
+ [runesMethods.runes_mint]: active,
1122
+ [runesMethods.runes_rbfOrder]: active,
1123
+ [runesMethods.runes_transfer]: active,
1124
+ [ordinalsMethods.ord_getInscriptions]: active,
1125
+ [ordinalsMethods.ord_sendInscriptions]: active,
1126
+ [walletMethods.wallet_addNetwork]: active,
1127
+ [walletMethods.wallet_addNetworkV2]: active,
1128
+ [walletMethods.wallet_changeNetworkById]: active,
1129
+ [walletMethods.wallet_changeNetwork]: active,
1130
+ [walletMethods.wallet_connect]: active,
1131
+ [walletMethods.wallet_connectV2]: active,
1132
+ [walletMethods.wallet_disconnect]: active,
1133
+ [walletMethods.wallet_getAccount]: active,
1134
+ [walletMethods.wallet_getAccountV2]: active,
1135
+ [walletMethods.wallet_getCurrentPermissions]: active,
1136
+ [walletMethods.wallet_getNetwork]: active,
1137
+ [walletMethods.wallet_getNetworks]: active,
1138
+ [walletMethods.wallet_getWalletType]: active,
1139
+ [walletMethods.wallet_openBridge]: active,
1140
+ [walletMethods.wallet_openBuy]: active,
1141
+ [walletMethods.wallet_openReceive]: active,
1142
+ [walletMethods.wallet_renouncePermissions]: active,
1143
+ [walletMethods.wallet_requestPermissions]: active
1144
+ };
1145
+
1146
+ //#endregion
1147
+ //#region src/request/shared.ts
1148
+ const rpcIdSchema = valibot.string();
1149
+
1150
+ //#endregion
1151
+ //#region src/request/createRequestSchema.ts
1152
+ function createRequestSchema({ paramsSchema, method }) {
1153
+ return valibot.object({
1154
+ ...specRequestSchema.entries,
1155
+ id: rpcIdSchema,
1156
+ method: valibot.literal(method),
1157
+ params: paramsSchema
1158
+ });
1159
+ }
1160
+
1161
+ //#endregion
1162
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/getAccounts/request.ts
1163
+ const bitcoinGetAccountsParamsSchema = valibot.object({
1164
+ purposes: valibot.array(valibot.enum(AddressPurpose)),
1165
+ message: valibot.optional(valibot.string())
1166
+ });
1167
+ const bitcoinGetAccountsRequestSchema = createRequestSchema({
1168
+ paramsSchema: bitcoinGetAccountsParamsSchema,
1169
+ method: bitcoinMethods.getAccounts
1170
+ });
1171
+
1172
+ //#endregion
1173
+ //#region src/request/createSuccessResponseSchema.ts
1174
+ function createSuccessResponseSchema({ method, resultSchema }) {
1175
+ return valibot.object({
1176
+ ...specSuccessWithExtensionsResponseSchema.entries,
1177
+ id: rpcIdSchema,
1178
+ result: resultSchema,
1179
+ "~sats-connect-method": valibot.literal(method)
1180
+ });
1181
+ }
1182
+
1183
+ //#endregion
1184
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/getAccounts/response.ts
1185
+ const bitcoinGetAccountsResultSchema = valibot.array(valibot.object({
1186
+ ...addressSchema.entries,
1187
+ ...valibot.object({ walletType: walletTypeSchema }).entries
1188
+ }));
1189
+ const bitcoinGetAccountsSuccessResponseSchema = createSuccessResponseSchema({
1190
+ resultSchema: bitcoinGetAccountsResultSchema,
1191
+ method: bitcoinMethods.getAccounts
1192
+ });
1193
+
1194
+ //#endregion
1195
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/getAccountsV2/request.ts
1196
+ const bitcoinGetAccountsV2ParamsSchema = valibot.object({
1197
+ purposes: valibot.array(valibot.enum(AddressPurpose)),
1198
+ message: valibot.optional(valibot.string())
1199
+ });
1200
+ const bitcoinGetAccountsV2RequestSchema = createRequestSchema({
1201
+ paramsSchema: bitcoinGetAccountsV2ParamsSchema,
1202
+ method: bitcoinMethods.bitcoin_getAccountsV2
1203
+ });
1204
+
1205
+ //#endregion
1206
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/getAccountsV2/response.ts
1207
+ const bitcoinGetAccountsV2ResultSchema = valibot.array(valibot.object({
1208
+ ...addressSchema.entries,
1209
+ ...valibot.object({ walletType: walletTypeSchema }).entries
1210
+ }));
1211
+ const bitcoinGetAccountsV2SuccessResponseSchema = createSuccessResponseSchema({
1212
+ resultSchema: bitcoinGetAccountsV2ResultSchema,
1213
+ method: bitcoinMethods.bitcoin_getAccountsV2
1214
+ });
1215
+
1216
+ //#endregion
1217
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/getAddresses/request.ts
1218
+ const bitcoinGetAddressesParamsSchema = valibot.object({
1219
+ purposes: valibot.array(valibot.enum(AddressPurpose)),
1220
+ message: valibot.optional(valibot.string())
1221
+ });
1222
+ const bitcoinGetAddressesRequestSchema = createRequestSchema({
1223
+ paramsSchema: bitcoinGetAddressesParamsSchema,
1224
+ method: bitcoinMethods.getAddresses
1225
+ });
1226
+
1227
+ //#endregion
1228
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/getAddresses/response.ts
1229
+ const getNetworkResultSchema = valibot.object({
1230
+ bitcoin: valibot.object({ name: valibot.string() }),
1231
+ stacks: valibot.object({ name: valibot.string() }),
1232
+ spark: valibot.object({ name: valibot.string() })
1233
+ });
1234
+ const bitcoinGetAddressesResultSchema = valibot.object({
1235
+ addresses: valibot.array(addressSchema),
1236
+ network: getNetworkResultSchema
1237
+ });
1238
+ const bitcoinGetAddressesSuccessResponseSchema = createSuccessResponseSchema({
1239
+ resultSchema: bitcoinGetAddressesResultSchema,
1240
+ method: bitcoinMethods.getAddresses
1241
+ });
1242
+
1243
+ //#endregion
1244
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/getAddressesV2/request.ts
1245
+ const bitcoinGetAddressesV2ParamsSchema = valibot.object({
1246
+ purposes: valibot.array(valibot.enum(AddressPurpose)),
1247
+ message: valibot.optional(valibot.string())
1248
+ });
1249
+ const bitcoinGetAddressesV2RequestSchema = createRequestSchema({
1250
+ paramsSchema: bitcoinGetAddressesV2ParamsSchema,
1251
+ method: bitcoinMethods.bitcoin_getAddressesV2
1252
+ });
1253
+
1254
+ //#endregion
1255
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/getAddressesV2/response.ts
1256
+ const getNetworksResultSchema = valibot.object({
1257
+ active: valibot.object({
1258
+ bitcoin: valibot.object({
1259
+ id: valibot.string(),
1260
+ type: valibot.string(),
1261
+ name: valibot.string()
1262
+ }),
1263
+ stacks: valibot.object({
1264
+ id: valibot.string(),
1265
+ type: valibot.string(),
1266
+ name: valibot.string()
1267
+ }),
1268
+ spark: valibot.object({
1269
+ id: valibot.string(),
1270
+ type: valibot.string(),
1271
+ name: valibot.string()
1272
+ }),
1273
+ starknet: valibot.object({
1274
+ id: valibot.string(),
1275
+ type: valibot.string(),
1276
+ name: valibot.string()
1277
+ })
1278
+ }),
1279
+ builtin: valibot.object({
1280
+ bitcoin: valibot.array(valibot.any()),
1281
+ stacks: valibot.array(valibot.any()),
1282
+ spark: valibot.array(valibot.any()),
1283
+ starknet: valibot.array(valibot.any())
1284
+ }),
1285
+ custom: valibot.object({
1286
+ bitcoin: valibot.array(valibot.any()),
1287
+ stacks: valibot.array(valibot.any()),
1288
+ spark: valibot.array(valibot.any()),
1289
+ starknet: valibot.array(valibot.any())
1290
+ })
1291
+ });
1292
+ const bitcoinGetAddressesV2ResultSchema = valibot.object({
1293
+ addresses: valibot.array(addressSchema),
1294
+ networks: getNetworksResultSchema
1295
+ });
1296
+ const bitcoinGetAddressesV2SuccessResponseSchema = createSuccessResponseSchema({
1297
+ resultSchema: bitcoinGetAddressesV2ResultSchema,
1298
+ method: bitcoinMethods.bitcoin_getAddressesV2
1299
+ });
1300
+
1301
+ //#endregion
1302
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/getBalance/request.ts
1303
+ const bitcoinGetBalanceParamsSchema = valibot.nullish(valibot.null());
1304
+ const bitcoinGetBalanceRequestSchema = createRequestSchema({
1305
+ paramsSchema: bitcoinGetBalanceParamsSchema,
1306
+ method: bitcoinMethods.getBalance
1307
+ });
1308
+
1309
+ //#endregion
1310
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/getBalance/response.ts
1311
+ const bitcoinGetBalanceResultSchema = valibot.object({
1312
+ confirmed: valibot.string(),
1313
+ unconfirmed: valibot.string(),
1314
+ total: valibot.string()
1315
+ });
1316
+ const bitcoinGetBalanceSuccessResponseSchema = createSuccessResponseSchema({
1317
+ resultSchema: bitcoinGetBalanceResultSchema,
1318
+ method: bitcoinMethods.getBalance
1319
+ });
1320
+
1321
+ //#endregion
1322
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/getBalanceV2/request.ts
1323
+ const bitcoinGetBalanceV2ParamsSchema = valibot.nullish(valibot.null());
1324
+ const bitcoinGetBalanceV2RequestSchema = createRequestSchema({
1325
+ paramsSchema: bitcoinGetBalanceV2ParamsSchema,
1326
+ method: bitcoinMethods.bitcoin_getBalanceV2
1327
+ });
1328
+
1329
+ //#endregion
1330
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/getBalanceV2/response.ts
1331
+ const bitcoinGetBalanceV2ResultSchema = valibot.object({
1332
+ confirmed: valibot.string(),
1333
+ unconfirmed: valibot.string(),
1334
+ total: valibot.string()
1335
+ });
1336
+ const bitcoinGetBalanceV2SuccessResponseSchema = createSuccessResponseSchema({
1337
+ resultSchema: bitcoinGetBalanceV2ResultSchema,
1338
+ method: bitcoinMethods.bitcoin_getBalanceV2
1339
+ });
1340
+
1341
+ //#endregion
1342
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/getInfo/request.ts
1343
+ const bitcoinGetInfoParamsSchema = valibot.nullish(valibot.null());
1344
+ const bitcoinGetInfoRequestSchema = createRequestSchema({
1345
+ paramsSchema: bitcoinGetInfoParamsSchema,
1346
+ method: bitcoinMethods.getInfo
1347
+ });
1348
+
1349
+ //#endregion
1350
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/getInfo/response.ts
1351
+ const bitcoinGetInfoResultSchema = valibot.object({
1352
+ version: valibot.string(),
1353
+ platform: valibot.optional(valibot.enum(ProviderPlatform)),
1354
+ methods: valibot.optional(valibot.array(valibot.string())),
1355
+ supports: valibot.array(valibot.string())
1356
+ });
1357
+ const bitcoinGetInfoSuccessResponseSchema = createSuccessResponseSchema({
1358
+ resultSchema: bitcoinGetInfoResultSchema,
1359
+ method: bitcoinMethods.getInfo
1360
+ });
1361
+
1362
+ //#endregion
1363
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/getInfoV2/request.ts
1364
+ const bitcoinGetInfoV2ParamsSchema = valibot.nullish(valibot.null());
1365
+ const bitcoinGetInfoV2RequestSchema = createRequestSchema({
1366
+ paramsSchema: bitcoinGetInfoV2ParamsSchema,
1367
+ method: bitcoinMethods.bitcoin_getInfoV2
1368
+ });
1369
+
1370
+ //#endregion
1371
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/getInfoV2/response.ts
1372
+ const bitcoinGetInfoV2ResultSchema = valibot.object({
1373
+ version: valibot.string(),
1374
+ platform: valibot.optional(valibot.enum(ProviderPlatform)),
1375
+ methods: valibot.optional(valibot.array(valibot.string())),
1376
+ supports: valibot.array(valibot.string())
1377
+ });
1378
+ const bitcoinGetInfoV2SuccessResponseSchema = createSuccessResponseSchema({
1379
+ resultSchema: bitcoinGetInfoV2ResultSchema,
1380
+ method: bitcoinMethods.bitcoin_getInfoV2
1381
+ });
1382
+
1383
+ //#endregion
1384
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/sendTransfer/request.ts
1385
+ const bitcoinSendTransferParamsSchema = valibot.object({ recipients: valibot.array(valibot.object({
1386
+ address: valibot.string(),
1387
+ amount: valibot.number()
1388
+ })) });
1389
+ const bitcoinSendTransferRequestSchema = createRequestSchema({
1390
+ paramsSchema: bitcoinSendTransferParamsSchema,
1391
+ method: bitcoinMethods.sendTransfer
1392
+ });
1393
+
1394
+ //#endregion
1395
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/sendTransfer/response.ts
1396
+ const bitcoinSendTransferResultSchema = valibot.object({ txid: valibot.string() });
1397
+ const bitcoinSendTransferSuccessResponseSchema = createSuccessResponseSchema({
1398
+ resultSchema: bitcoinSendTransferResultSchema,
1399
+ method: bitcoinMethods.sendTransfer
1400
+ });
1401
+
1402
+ //#endregion
1403
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/sendTransferV2/request.ts
1404
+ const bitcoinSendTransferV2ParamsSchema = valibot.object({ recipients: valibot.array(valibot.object({
1405
+ address: valibot.string(),
1406
+ amount: valibot.number()
1407
+ })) });
1408
+ const bitcoinSendTransferV2RequestSchema = createRequestSchema({
1409
+ paramsSchema: bitcoinSendTransferV2ParamsSchema,
1410
+ method: bitcoinMethods.bitcoin_sendTransferV2
1411
+ });
1412
+
1413
+ //#endregion
1414
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/sendTransferV2/response.ts
1415
+ const bitcoinSendTransferV2ResultSchema = valibot.object({ txid: valibot.string() });
1416
+ const bitcoinSendTransferV2SuccessResponseSchema = createSuccessResponseSchema({
1417
+ resultSchema: bitcoinSendTransferV2ResultSchema,
1418
+ method: bitcoinMethods.bitcoin_sendTransferV2
1419
+ });
1420
+
1421
+ //#endregion
1422
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/signMessage/request.ts
1423
+ const bitcoinSignMessageParamsSchema = valibot.object({
1424
+ address: valibot.string(),
1425
+ message: valibot.string(),
1426
+ protocol: valibot.optional(valibot.enum(MessageSigningProtocols))
1427
+ });
1428
+ const bitcoinSignMessageRequestSchema = createRequestSchema({
1429
+ paramsSchema: bitcoinSignMessageParamsSchema,
1430
+ method: bitcoinMethods.signMessage
1431
+ });
1432
+
1433
+ //#endregion
1434
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/signMessage/response.ts
1435
+ const bitcoinSignMessageResultSchema = valibot.object({
1436
+ signature: valibot.string(),
1437
+ messageHash: valibot.string(),
1438
+ address: valibot.string(),
1439
+ protocol: valibot.enum(MessageSigningProtocols)
1440
+ });
1441
+ const bitcoinSignMessageSuccessResponseSchema = createSuccessResponseSchema({
1442
+ resultSchema: bitcoinSignMessageResultSchema,
1443
+ method: bitcoinMethods.signMessage
1444
+ });
1445
+
1446
+ //#endregion
1447
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/signMessageV2/request.ts
1448
+ const bitcoinSignMessageV2ParamsSchema = valibot.object({
1449
+ address: valibot.string(),
1450
+ message: valibot.string(),
1451
+ protocol: valibot.optional(valibot.enum(MessageSigningProtocols))
1452
+ });
1453
+ const bitcoinSignMessageV2RequestSchema = createRequestSchema({
1454
+ paramsSchema: bitcoinSignMessageV2ParamsSchema,
1455
+ method: bitcoinMethods.bitcoin_signMessageV2
1456
+ });
1457
+
1458
+ //#endregion
1459
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/signMessageV2/response.ts
1460
+ const bitcoinSignMessageV2ResultSchema = valibot.object({
1461
+ signature: valibot.string(),
1462
+ messageHash: valibot.string(),
1463
+ address: valibot.string(),
1464
+ protocol: valibot.enum(MessageSigningProtocols)
1465
+ });
1466
+ const bitcoinSignMessageV2SuccessResponseSchema = createSuccessResponseSchema({
1467
+ resultSchema: bitcoinSignMessageV2ResultSchema,
1468
+ method: bitcoinMethods.bitcoin_signMessageV2
1469
+ });
1470
+
1471
+ //#endregion
1472
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/signMultipleMessages/request.ts
1473
+ const bitcoinSignMultipleMessagesParamsSchema = valibot.array(valibot.object({
1474
+ address: valibot.string(),
1475
+ message: valibot.string(),
1476
+ protocol: valibot.optional(valibot.enum(MessageSigningProtocols))
1477
+ }));
1478
+ const bitcoinSignMultipleMessagesRequestSchema = createRequestSchema({
1479
+ paramsSchema: bitcoinSignMultipleMessagesParamsSchema,
1480
+ method: bitcoinMethods.signMultipleMessages
1481
+ });
1482
+
1483
+ //#endregion
1484
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/signMultipleMessages/response.ts
1485
+ const bitcoinSignMultipleMessagesResultSchema = valibot.array(valibot.object({
1486
+ signature: valibot.string(),
1487
+ message: valibot.string(),
1488
+ messageHash: valibot.string(),
1489
+ address: valibot.string(),
1490
+ protocol: valibot.enum(MessageSigningProtocols)
1491
+ }));
1492
+ const bitcoinSignMultipleMessagesSuccessResponseSchema = createSuccessResponseSchema({
1493
+ resultSchema: bitcoinSignMultipleMessagesResultSchema,
1494
+ method: bitcoinMethods.signMultipleMessages
1495
+ });
1496
+
1497
+ //#endregion
1498
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/signMultipleMessagesV2/request.ts
1499
+ const bitcoinSignMultipleMessagesV2ParamsSchema = valibot.array(valibot.object({
1500
+ address: valibot.string(),
1501
+ message: valibot.string(),
1502
+ protocol: valibot.optional(valibot.enum(MessageSigningProtocols))
1503
+ }));
1504
+ const bitcoinSignMultipleMessagesV2RequestSchema = createRequestSchema({
1505
+ paramsSchema: bitcoinSignMultipleMessagesV2ParamsSchema,
1506
+ method: bitcoinMethods.bitcoin_signMultipleMessagesV2
1507
+ });
1508
+
1509
+ //#endregion
1510
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/signMultipleMessagesV2/response.ts
1511
+ const bitcoinSignMultipleMessagesV2ResultSchema = valibot.array(valibot.object({
1512
+ signature: valibot.string(),
1513
+ message: valibot.string(),
1514
+ messageHash: valibot.string(),
1515
+ address: valibot.string(),
1516
+ protocol: valibot.enum(MessageSigningProtocols)
1517
+ }));
1518
+ const bitcoinSignMultipleMessagesV2SuccessResponseSchema = createSuccessResponseSchema({
1519
+ resultSchema: bitcoinSignMultipleMessagesV2ResultSchema,
1520
+ method: bitcoinMethods.bitcoin_signMultipleMessagesV2
1521
+ });
1522
+
1523
+ //#endregion
1524
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/signPsbt/request.ts
1525
+ const bitcoinSignPsbtParamsSchema = valibot.object({
1526
+ psbt: valibot.string(),
1527
+ signInputs: valibot.optional(valibot.record(valibot.string(), valibot.array(valibot.number()))),
1528
+ broadcast: valibot.optional(valibot.boolean())
1529
+ });
1530
+ const bitcoinSignPsbtRequestSchema = createRequestSchema({
1531
+ paramsSchema: bitcoinSignPsbtParamsSchema,
1532
+ method: bitcoinMethods.signPsbt
1533
+ });
1534
+
1535
+ //#endregion
1536
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/signPsbt/response.ts
1537
+ const bitcoinSignPsbtResultSchema = valibot.object({
1538
+ psbt: valibot.string(),
1539
+ txid: valibot.optional(valibot.string())
1540
+ });
1541
+ const bitcoinSignPsbtSuccessResponseSchema = createSuccessResponseSchema({
1542
+ resultSchema: bitcoinSignPsbtResultSchema,
1543
+ method: bitcoinMethods.signPsbt
1544
+ });
1545
+
1546
+ //#endregion
1547
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/signPsbtV2/request.ts
1548
+ const bitcoinSignPsbtV2ParamsSchema = valibot.object({
1549
+ psbt: valibot.string(),
1550
+ signInputs: valibot.optional(valibot.record(valibot.string(), valibot.array(valibot.number()))),
1551
+ broadcast: valibot.optional(valibot.boolean())
1552
+ });
1553
+ const bitcoinSignPsbtV2RequestSchema = createRequestSchema({
1554
+ paramsSchema: bitcoinSignPsbtV2ParamsSchema,
1555
+ method: bitcoinMethods.bitcoin_signPsbtV2
1556
+ });
1557
+
1558
+ //#endregion
1559
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/signPsbtV2/response.ts
1560
+ const bitcoinSignPsbtV2ResultSchema = valibot.object({
1561
+ psbt: valibot.string(),
1562
+ txid: valibot.optional(valibot.string())
1563
+ });
1564
+ const bitcoinSignPsbtV2SuccessResponseSchema = createSuccessResponseSchema({
1565
+ resultSchema: bitcoinSignPsbtV2ResultSchema,
1566
+ method: bitcoinMethods.bitcoin_signPsbtV2
1567
+ });
1568
+
1569
+ //#endregion
1570
+ //#region src/request/rpc/objects/namespaces/bitcoin/index.ts
1571
+ const bitcoinRequestSchema = valibot.variant("method", [
1572
+ bitcoinGetAccountsRequestSchema,
1573
+ bitcoinGetAccountsV2RequestSchema,
1574
+ bitcoinGetAddressesRequestSchema,
1575
+ bitcoinGetAddressesV2RequestSchema,
1576
+ bitcoinGetBalanceRequestSchema,
1577
+ bitcoinGetBalanceV2RequestSchema,
1578
+ bitcoinGetInfoRequestSchema,
1579
+ bitcoinGetInfoV2RequestSchema,
1580
+ bitcoinSendTransferRequestSchema,
1581
+ bitcoinSendTransferV2RequestSchema,
1582
+ bitcoinSignMessageRequestSchema,
1583
+ bitcoinSignMessageV2RequestSchema,
1584
+ bitcoinSignMultipleMessagesRequestSchema,
1585
+ bitcoinSignMultipleMessagesV2RequestSchema,
1586
+ bitcoinSignPsbtRequestSchema,
1587
+ bitcoinSignPsbtV2RequestSchema
1588
+ ]);
1589
+ const bitcoinSuccessResponseSchema = valibot.variant("~sats-connect-method", [
1590
+ bitcoinGetAccountsSuccessResponseSchema,
1591
+ bitcoinGetAccountsV2SuccessResponseSchema,
1592
+ bitcoinGetAddressesSuccessResponseSchema,
1593
+ bitcoinGetAddressesV2SuccessResponseSchema,
1594
+ bitcoinGetBalanceSuccessResponseSchema,
1595
+ bitcoinGetBalanceV2SuccessResponseSchema,
1596
+ bitcoinGetInfoSuccessResponseSchema,
1597
+ bitcoinGetInfoV2SuccessResponseSchema,
1598
+ bitcoinSendTransferSuccessResponseSchema,
1599
+ bitcoinSendTransferV2SuccessResponseSchema,
1600
+ bitcoinSignMessageSuccessResponseSchema,
1601
+ bitcoinSignMessageV2SuccessResponseSchema,
1602
+ bitcoinSignMultipleMessagesSuccessResponseSchema,
1603
+ bitcoinSignMultipleMessagesV2SuccessResponseSchema,
1604
+ bitcoinSignPsbtSuccessResponseSchema,
1605
+ bitcoinSignPsbtV2SuccessResponseSchema
1606
+ ]);
1607
+
1608
+ //#endregion
1609
+ //#region src/request/rpc/objects/namespaces/ordinals/methods/getInscriptions/request.ts
1610
+ const ordinalsGetInscriptionsParamsSchema = valibot.object({
1611
+ offset: valibot.number(),
1612
+ limit: valibot.number()
1613
+ });
1614
+ const ordinalsGetInscriptionsRequestSchema = createRequestSchema({
1615
+ paramsSchema: ordinalsGetInscriptionsParamsSchema,
1616
+ method: ordinalsMethods.ord_getInscriptions
1617
+ });
1618
+
1619
+ //#endregion
1620
+ //#region src/request/rpc/objects/namespaces/ordinals/methods/getInscriptions/response.ts
1621
+ const ordinalsGetInscriptionsResultSchema = valibot.object({
1622
+ total: valibot.number(),
1623
+ limit: valibot.number(),
1624
+ offset: valibot.number(),
1625
+ inscriptions: valibot.array(valibot.object({
1626
+ inscriptionId: valibot.string(),
1627
+ inscriptionNumber: valibot.string(),
1628
+ address: valibot.string(),
1629
+ collectionName: valibot.optional(valibot.string()),
1630
+ postage: valibot.string(),
1631
+ contentLength: valibot.string(),
1632
+ contentType: valibot.string(),
1633
+ timestamp: valibot.number(),
1634
+ offset: valibot.number(),
1635
+ genesisTransaction: valibot.string(),
1636
+ output: valibot.string()
1637
+ }))
1638
+ });
1639
+ const ordinalsGetInscriptionsSuccessResponseSchema = createSuccessResponseSchema({
1640
+ resultSchema: ordinalsGetInscriptionsResultSchema,
1641
+ method: ordinalsMethods.ord_getInscriptions
1642
+ });
1643
+
1644
+ //#endregion
1645
+ //#region src/request/rpc/objects/namespaces/ordinals/methods/sendInscriptions/request.ts
1646
+ const ordinalsSendInscriptionsParamsSchema = valibot.object({ transfers: valibot.array(valibot.object({
1647
+ address: valibot.string(),
1648
+ inscriptionId: valibot.string()
1649
+ })) });
1650
+ const ordinalsSendInscriptionsRequestSchema = createRequestSchema({
1651
+ paramsSchema: ordinalsSendInscriptionsParamsSchema,
1652
+ method: ordinalsMethods.ord_sendInscriptions
1653
+ });
1654
+
1655
+ //#endregion
1656
+ //#region src/request/rpc/objects/namespaces/ordinals/methods/sendInscriptions/response.ts
1657
+ const ordinalsSendInscriptionsResultSchema = valibot.object({ txid: valibot.string() });
1658
+ const ordinalsSendInscriptionsSuccessResponseSchema = createSuccessResponseSchema({
1659
+ resultSchema: ordinalsSendInscriptionsResultSchema,
1660
+ method: ordinalsMethods.ord_sendInscriptions
1661
+ });
1662
+
1663
+ //#endregion
1664
+ //#region src/request/rpc/objects/namespaces/ordinals/index.ts
1665
+ const ordinalsRequestSchema = valibot.variant("method", [ordinalsGetInscriptionsRequestSchema, ordinalsSendInscriptionsRequestSchema]);
1666
+ const ordinalsSuccessResponseSchema = valibot.variant("~sats-connect-method", [ordinalsGetInscriptionsSuccessResponseSchema, ordinalsSendInscriptionsSuccessResponseSchema]);
1667
+
1668
+ //#endregion
1669
+ //#region src/request/rpc/objects/namespaces/runes/methods/estimateEtch/request.ts
1670
+ const etchTermsSchema$1 = valibot.object({
1671
+ amount: valibot.optional(valibot.string()),
1672
+ cap: valibot.optional(valibot.string()),
1673
+ heightStart: valibot.optional(valibot.string()),
1674
+ heightEnd: valibot.optional(valibot.string()),
1675
+ offsetStart: valibot.optional(valibot.string()),
1676
+ offsetEnd: valibot.optional(valibot.string())
1677
+ });
1678
+ const inscriptionDetailsSchema$1 = valibot.object({
1679
+ contentType: valibot.string(),
1680
+ contentBase64: valibot.string()
1681
+ });
1682
+ const runesEstimateEtchParamsSchema = valibot.object({
1683
+ runeName: valibot.string(),
1684
+ divisibility: valibot.optional(valibot.number()),
1685
+ symbol: valibot.optional(valibot.string()),
1686
+ premine: valibot.optional(valibot.string()),
1687
+ isMintable: valibot.boolean(),
1688
+ terms: valibot.optional(etchTermsSchema$1),
1689
+ inscriptionDetails: valibot.optional(inscriptionDetailsSchema$1),
1690
+ delegateInscriptionId: valibot.optional(valibot.string()),
1691
+ destinationAddress: valibot.string(),
1692
+ feeRate: valibot.number(),
1693
+ appServiceFee: valibot.optional(valibot.number()),
1694
+ appServiceFeeAddress: valibot.optional(valibot.string()),
1695
+ network: valibot.optional(valibot.enum(BitcoinNetworkType))
1696
+ });
1697
+ const runesEstimateEtchRequestSchema = createRequestSchema({
1698
+ paramsSchema: runesEstimateEtchParamsSchema,
1699
+ method: runesMethods.runes_estimateEtch
1700
+ });
1701
+
1702
+ //#endregion
1703
+ //#region src/request/rpc/objects/namespaces/runes/methods/estimateEtch/response.ts
1704
+ const runesEstimateEtchResultSchema = valibot.object({
1705
+ totalSize: valibot.number(),
1706
+ totalCost: valibot.number(),
1707
+ costBreakdown: valibot.object({
1708
+ postage: valibot.number(),
1709
+ networkFee: valibot.number(),
1710
+ serviceFee: valibot.number(),
1711
+ appServiceFee: valibot.number()
1712
+ })
1713
+ });
1714
+ const runesEstimateEtchSuccessResponseSchema = createSuccessResponseSchema({
1715
+ resultSchema: runesEstimateEtchResultSchema,
1716
+ method: runesMethods.runes_estimateEtch
1717
+ });
1718
+
1719
+ //#endregion
1720
+ //#region src/request/rpc/objects/namespaces/runes/methods/estimateMint/request.ts
1721
+ const runesEstimateMintParamsSchema = valibot.object({
1722
+ runeName: valibot.string(),
1723
+ repeats: valibot.number(),
1724
+ destinationAddress: valibot.string(),
1725
+ feeRate: valibot.number(),
1726
+ appServiceFee: valibot.optional(valibot.number()),
1727
+ appServiceFeeAddress: valibot.optional(valibot.string()),
1728
+ network: valibot.optional(valibot.enum(BitcoinNetworkType))
1729
+ });
1730
+ const runesEstimateMintRequestSchema = createRequestSchema({
1731
+ paramsSchema: runesEstimateMintParamsSchema,
1732
+ method: runesMethods.runes_estimateMint
1733
+ });
1734
+
1735
+ //#endregion
1736
+ //#region src/request/rpc/objects/namespaces/runes/methods/estimateMint/response.ts
1737
+ const runesEstimateMintResultSchema = valibot.object({
1738
+ totalSize: valibot.number(),
1739
+ totalCost: valibot.number(),
1740
+ costBreakdown: valibot.object({
1741
+ postage: valibot.number(),
1742
+ networkFee: valibot.number(),
1743
+ serviceFee: valibot.number(),
1744
+ appServiceFee: valibot.number()
1745
+ })
1746
+ });
1747
+ const runesEstimateMintSuccessResponseSchema = createSuccessResponseSchema({
1748
+ resultSchema: runesEstimateMintResultSchema,
1749
+ method: runesMethods.runes_estimateMint
1750
+ });
1751
+
1752
+ //#endregion
1753
+ //#region src/request/rpc/objects/namespaces/runes/methods/estimateRbfOrder/request.ts
1754
+ const runesEstimateRbfOrderParamsSchema = valibot.object({
1755
+ orderId: valibot.string(),
1756
+ newFeeRate: valibot.number(),
1757
+ network: valibot.optional(valibot.enum(BitcoinNetworkType))
1758
+ });
1759
+ const runesEstimateRbfOrderRequestSchema = createRequestSchema({
1760
+ paramsSchema: runesEstimateRbfOrderParamsSchema,
1761
+ method: runesMethods.runes_estimateRbfOrder
1762
+ });
1763
+
1764
+ //#endregion
1765
+ //#region src/request/rpc/objects/namespaces/runes/methods/estimateRbfOrder/response.ts
1766
+ const runesEstimateRbfOrderResultSchema = valibot.object({
1767
+ rbfCost: valibot.number(),
1768
+ fundingAddress: valibot.string()
1769
+ });
1770
+ const runesEstimateRbfOrderSuccessResponseSchema = createSuccessResponseSchema({
1771
+ resultSchema: runesEstimateRbfOrderResultSchema,
1772
+ method: runesMethods.runes_estimateRbfOrder
1773
+ });
1774
+
1775
+ //#endregion
1776
+ //#region src/request/rpc/objects/namespaces/runes/methods/etch/request.ts
1777
+ const etchTermsSchema = valibot.object({
1778
+ amount: valibot.optional(valibot.string()),
1779
+ cap: valibot.optional(valibot.string()),
1780
+ heightStart: valibot.optional(valibot.string()),
1781
+ heightEnd: valibot.optional(valibot.string()),
1782
+ offsetStart: valibot.optional(valibot.string()),
1783
+ offsetEnd: valibot.optional(valibot.string())
1784
+ });
1785
+ const inscriptionDetailsSchema = valibot.object({
1786
+ contentType: valibot.string(),
1787
+ contentBase64: valibot.string()
1788
+ });
1789
+ const runesEtchParamsSchema = valibot.object({
1790
+ runeName: valibot.string(),
1791
+ divisibility: valibot.optional(valibot.number()),
1792
+ symbol: valibot.optional(valibot.string()),
1793
+ premine: valibot.optional(valibot.string()),
1794
+ isMintable: valibot.boolean(),
1795
+ terms: valibot.optional(etchTermsSchema),
1796
+ inscriptionDetails: valibot.optional(inscriptionDetailsSchema),
1797
+ delegateInscriptionId: valibot.optional(valibot.string()),
1798
+ destinationAddress: valibot.string(),
1799
+ refundAddress: valibot.string(),
1800
+ feeRate: valibot.number(),
1801
+ appServiceFee: valibot.optional(valibot.number()),
1802
+ appServiceFeeAddress: valibot.optional(valibot.string()),
1803
+ network: valibot.optional(valibot.enum(BitcoinNetworkType))
1804
+ });
1805
+ const runesEtchRequestSchema = createRequestSchema({
1806
+ paramsSchema: runesEtchParamsSchema,
1807
+ method: runesMethods.runes_etch
1808
+ });
1809
+
1810
+ //#endregion
1811
+ //#region src/request/rpc/objects/namespaces/runes/methods/etch/response.ts
1812
+ const runesEtchResultSchema = valibot.object({
1813
+ orderId: valibot.string(),
1814
+ fundTransactionId: valibot.string(),
1815
+ fundingAddress: valibot.string()
1816
+ });
1817
+ const runesEtchSuccessResponseSchema = createSuccessResponseSchema({
1818
+ resultSchema: runesEtchResultSchema,
1819
+ method: runesMethods.runes_etch
1820
+ });
1821
+
1822
+ //#endregion
1823
+ //#region src/request/rpc/objects/namespaces/runes/methods/getBalance/request.ts
1824
+ const runesGetBalanceParamsSchema = valibot.nullish(valibot.null());
1825
+ const runesGetBalanceRequestSchema = createRequestSchema({
1826
+ paramsSchema: runesGetBalanceParamsSchema,
1827
+ method: runesMethods.runes_getBalance
1828
+ });
1829
+
1830
+ //#endregion
1831
+ //#region src/request/rpc/objects/namespaces/runes/methods/getBalance/response.ts
1832
+ const runesGetBalanceResultSchema = valibot.object({ balances: valibot.array(valibot.object({
1833
+ runeName: valibot.string(),
1834
+ amount: valibot.string(),
1835
+ divisibility: valibot.number(),
1836
+ symbol: valibot.string(),
1837
+ inscriptionId: valibot.nullish(valibot.string()),
1838
+ spendableBalance: valibot.string()
1839
+ })) });
1840
+ const runesGetBalanceSuccessResponseSchema = createSuccessResponseSchema({
1841
+ resultSchema: runesGetBalanceResultSchema,
1842
+ method: runesMethods.runes_getBalance
1843
+ });
1844
+
1845
+ //#endregion
1846
+ //#region src/request/rpc/objects/namespaces/runes/methods/getOrder/request.ts
1847
+ const runesGetOrderParamsSchema = valibot.object({
1848
+ id: valibot.string(),
1849
+ network: valibot.optional(valibot.enum(BitcoinNetworkType))
1850
+ });
1851
+ const runesGetOrderRequestSchema = createRequestSchema({
1852
+ paramsSchema: runesGetOrderParamsSchema,
1853
+ method: runesMethods.runes_getOrder
1854
+ });
1855
+
1856
+ //#endregion
1857
+ //#region src/request/rpc/objects/namespaces/runes/methods/getOrder/response.ts
1858
+ const runesGetOrderResultSchema = valibot.object({
1859
+ id: valibot.string(),
1860
+ orderType: valibot.union([valibot.literal("rune_mint"), valibot.literal("rune_etch")]),
1861
+ state: valibot.union([
1862
+ valibot.literal("new"),
1863
+ valibot.literal("pending"),
1864
+ valibot.literal("executing"),
1865
+ valibot.literal("complete"),
1866
+ valibot.literal("failed"),
1867
+ valibot.literal("refunded"),
1868
+ valibot.literal("stale")
1869
+ ]),
1870
+ fundingAddress: valibot.string(),
1871
+ reason: valibot.optional(valibot.string()),
1872
+ createdAt: valibot.string()
1873
+ });
1874
+ const runesGetOrderSuccessResponseSchema = createSuccessResponseSchema({
1875
+ resultSchema: runesGetOrderResultSchema,
1876
+ method: runesMethods.runes_getOrder
1877
+ });
1878
+
1879
+ //#endregion
1880
+ //#region src/request/rpc/objects/namespaces/runes/methods/mint/request.ts
1881
+ const runesMintParamsSchema = valibot.object({
1882
+ appServiceFee: valibot.optional(valibot.number()),
1883
+ appServiceFeeAddress: valibot.optional(valibot.string()),
1884
+ destinationAddress: valibot.string(),
1885
+ feeRate: valibot.number(),
1886
+ refundAddress: valibot.string(),
1887
+ repeats: valibot.number(),
1888
+ runeName: valibot.string(),
1889
+ network: valibot.optional(valibot.enum(BitcoinNetworkType))
1890
+ });
1891
+ const runesMintRequestSchema = createRequestSchema({
1892
+ paramsSchema: runesMintParamsSchema,
1893
+ method: runesMethods.runes_mint
1894
+ });
1895
+
1896
+ //#endregion
1897
+ //#region src/request/rpc/objects/namespaces/runes/methods/mint/response.ts
1898
+ const runesMintResultSchema = valibot.object({
1899
+ orderId: valibot.string(),
1900
+ fundTransactionId: valibot.string(),
1901
+ fundingAddress: valibot.string()
1902
+ });
1903
+ const runesMintSuccessResponseSchema = createSuccessResponseSchema({
1904
+ resultSchema: runesMintResultSchema,
1905
+ method: runesMethods.runes_mint
1906
+ });
1907
+
1908
+ //#endregion
1909
+ //#region src/request/rpc/objects/namespaces/runes/methods/rbfOrder/request.ts
1910
+ const runesRbfOrderParamsSchema = valibot.object({
1911
+ orderId: valibot.string(),
1912
+ newFeeRate: valibot.number(),
1913
+ network: valibot.optional(valibot.enum(BitcoinNetworkType))
1914
+ });
1915
+ const runesRbfOrderRequestSchema = createRequestSchema({
1916
+ paramsSchema: runesRbfOrderParamsSchema,
1917
+ method: runesMethods.runes_rbfOrder
1918
+ });
1919
+
1920
+ //#endregion
1921
+ //#region src/request/rpc/objects/namespaces/runes/methods/rbfOrder/response.ts
1922
+ const runesRbfOrderResultSchema = valibot.object({
1923
+ orderId: valibot.string(),
1924
+ fundRBFTransactionId: valibot.string(),
1925
+ fundingAddress: valibot.string()
1926
+ });
1927
+ const runesRbfOrderSuccessResponseSchema = createSuccessResponseSchema({
1928
+ resultSchema: runesRbfOrderResultSchema,
1929
+ method: runesMethods.runes_rbfOrder
1930
+ });
1931
+
1932
+ //#endregion
1933
+ //#region src/request/rpc/objects/namespaces/runes/methods/transfer/request.ts
1934
+ const runesTransferParamsSchema = valibot.object({
1935
+ recipients: valibot.array(valibot.object({
1936
+ runeName: valibot.string(),
1937
+ amount: valibot.string(),
1938
+ address: valibot.string()
1939
+ })),
1940
+ network: valibot.optional(valibot.enum(BitcoinNetworkType))
1941
+ });
1942
+ const runesTransferRequestSchema = createRequestSchema({
1943
+ paramsSchema: runesTransferParamsSchema,
1944
+ method: runesMethods.runes_transfer
1945
+ });
1946
+
1947
+ //#endregion
1948
+ //#region src/request/rpc/objects/namespaces/runes/methods/transfer/response.ts
1949
+ const runesTransferResultSchema = valibot.object({ txid: valibot.string() });
1950
+ const runesTransferSuccessResponseSchema = createSuccessResponseSchema({
1951
+ resultSchema: runesTransferResultSchema,
1952
+ method: runesMethods.runes_transfer
1953
+ });
1954
+
1955
+ //#endregion
1956
+ //#region src/request/rpc/objects/namespaces/runes/index.ts
1957
+ const runesRequestSchema = valibot.variant("method", [
1958
+ runesEstimateEtchRequestSchema,
1959
+ runesEstimateMintRequestSchema,
1960
+ runesEstimateRbfOrderRequestSchema,
1961
+ runesEtchRequestSchema,
1962
+ runesGetBalanceRequestSchema,
1963
+ runesGetOrderRequestSchema,
1964
+ runesMintRequestSchema,
1965
+ runesRbfOrderRequestSchema,
1966
+ runesTransferRequestSchema
1967
+ ]);
1968
+ const runesSuccessResponseSchema = valibot.variant("~sats-connect-method", [
1969
+ runesEstimateEtchSuccessResponseSchema,
1970
+ runesEstimateMintSuccessResponseSchema,
1971
+ runesEstimateRbfOrderSuccessResponseSchema,
1972
+ runesEtchSuccessResponseSchema,
1973
+ runesGetBalanceSuccessResponseSchema,
1974
+ runesGetOrderSuccessResponseSchema,
1975
+ runesMintSuccessResponseSchema,
1976
+ runesRbfOrderSuccessResponseSchema,
1977
+ runesTransferSuccessResponseSchema
1978
+ ]);
1979
+
1980
+ //#endregion
1981
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetClawbackFunds/request.ts
1982
+ const sparkFlashnetClawbackFundsParamsSchema = valibot.object({
1983
+ sparkTransferId: valibot.string(),
1984
+ lpIdentityPublicKey: valibot.string()
1985
+ });
1986
+ const sparkFlashnetClawbackFundsRequestSchema = createRequestSchema({
1987
+ paramsSchema: sparkFlashnetClawbackFundsParamsSchema,
1988
+ method: sparkMethods.spark_flashnet_clawbackFunds
1989
+ });
1990
+
1991
+ //#endregion
1992
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetClawbackFunds/response.ts
1993
+ const sparkFlashnetClawbackFundsResultSchema = valibot.object({
1994
+ requestId: valibot.string(),
1995
+ accepted: valibot.boolean(),
1996
+ internalRequestId: valibot.optional(valibot.string()),
1997
+ sparkStatusTrackingId: valibot.optional(valibot.string()),
1998
+ error: valibot.optional(valibot.string())
1999
+ });
2000
+ const sparkFlashnetClawbackFundsSuccessResponseSchema = createSuccessResponseSchema({
2001
+ resultSchema: sparkFlashnetClawbackFundsResultSchema,
2002
+ method: sparkMethods.spark_flashnet_clawbackFunds
2003
+ });
2004
+
2005
+ //#endregion
2006
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetExecuteRouteSwap/request.ts
2007
+ const sparkFlashnetExecuteRouteSwapParamsSchema = valibot.object({
2008
+ hops: valibot.array(valibot.object({
2009
+ poolId: valibot.string(),
2010
+ assetInAddress: valibot.string(),
2011
+ assetOutAddress: valibot.string(),
2012
+ hopIntegratorFeeRateBps: valibot.optional(valibot.number())
2013
+ })),
2014
+ initialAssetAddress: valibot.string(),
2015
+ inputAmount: valibot.string(),
2016
+ maxRouteSlippageBps: valibot.string(),
2017
+ minAmountOut: valibot.optional(valibot.string()),
2018
+ integratorFeeRateBps: valibot.optional(valibot.number()),
2019
+ integratorPublicKey: valibot.optional(valibot.string())
2020
+ });
2021
+ const sparkFlashnetExecuteRouteSwapRequestSchema = createRequestSchema({
2022
+ paramsSchema: sparkFlashnetExecuteRouteSwapParamsSchema,
2023
+ method: sparkMethods.spark_flashnet_executeRouteSwap
2024
+ });
2025
+
2026
+ //#endregion
2027
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetExecuteRouteSwap/response.ts
2028
+ const sparkFlashnetExecuteRouteSwapResultSchema = valibot.object({
2029
+ requestId: valibot.string(),
2030
+ accepted: valibot.boolean(),
2031
+ outputAmount: valibot.string(),
2032
+ executionPrice: valibot.string(),
2033
+ finalOutboundTransferId: valibot.string(),
2034
+ error: valibot.optional(valibot.string())
2035
+ });
2036
+ const sparkFlashnetExecuteRouteSwapSuccessResponseSchema = createSuccessResponseSchema({
2037
+ resultSchema: sparkFlashnetExecuteRouteSwapResultSchema,
2038
+ method: sparkMethods.spark_flashnet_executeRouteSwap
2039
+ });
2040
+
2041
+ //#endregion
2042
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetExecuteSwap/request.ts
2043
+ const sparkFlashnetExecuteSwapParamsSchema = valibot.object({
2044
+ poolId: valibot.string(),
2045
+ assetInAddress: valibot.string(),
2046
+ assetOutAddress: valibot.string(),
2047
+ amountIn: valibot.string(),
2048
+ maxSlippageBps: valibot.number(),
2049
+ minAmountOut: valibot.optional(valibot.string()),
2050
+ integratorFeeRateBps: valibot.optional(valibot.number()),
2051
+ integratorPublicKey: valibot.optional(valibot.string())
2052
+ });
2053
+ const sparkFlashnetExecuteSwapRequestSchema = createRequestSchema({
2054
+ paramsSchema: sparkFlashnetExecuteSwapParamsSchema,
2055
+ method: sparkMethods.spark_flashnet_executeSwap
2056
+ });
2057
+
2058
+ //#endregion
2059
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetExecuteSwap/response.ts
2060
+ const sparkFlashnetExecuteSwapResultSchema = valibot.object({
2061
+ requestId: valibot.string(),
2062
+ accepted: valibot.boolean(),
2063
+ amountOut: valibot.optional(valibot.string()),
2064
+ feeAmount: valibot.optional(valibot.string()),
2065
+ executionPrice: valibot.optional(valibot.string()),
2066
+ assetOutAddress: valibot.optional(valibot.string()),
2067
+ assetInAddress: valibot.optional(valibot.string()),
2068
+ outboundTransferId: valibot.optional(valibot.string()),
2069
+ error: valibot.optional(valibot.string())
2070
+ });
2071
+ const sparkFlashnetExecuteSwapSuccessResponseSchema = createSuccessResponseSchema({
2072
+ resultSchema: sparkFlashnetExecuteSwapResultSchema,
2073
+ method: sparkMethods.spark_flashnet_executeSwap
2074
+ });
2075
+
2076
+ //#endregion
2077
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetGetClawbackEligibleTransfers/request.ts
2078
+ const sparkGetClawbackEligibleTransfersParamsSchema = valibot.nullish(valibot.null());
2079
+ const sparkGetClawbackEligibleTransfersRequestSchema = createRequestSchema({
2080
+ paramsSchema: sparkGetClawbackEligibleTransfersParamsSchema,
2081
+ method: sparkMethods.spark_flashnet_getClawbackEligibleTransfers
2082
+ });
2083
+
2084
+ //#endregion
2085
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetGetClawbackEligibleTransfers/response.ts
2086
+ const sparkGetClawbackEligibleTransfersResultSchema = valibot.object({ eligibleTransfers: valibot.array(valibot.object({
2087
+ txId: valibot.string(),
2088
+ createdAt: valibot.string(),
2089
+ lpIdentityPublicKey: valibot.string()
2090
+ })) });
2091
+ const sparkGetClawbackEligibleTransfersSuccessResponseSchema = createSuccessResponseSchema({
2092
+ resultSchema: sparkGetClawbackEligibleTransfersResultSchema,
2093
+ method: sparkMethods.spark_flashnet_getClawbackEligibleTransfers
2094
+ });
2095
+
2096
+ //#endregion
2097
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetGetJwt/request.ts
2098
+ const sparkFlashnetGetJwtParamsSchema = valibot.null();
2099
+ const sparkFlashnetGetJwtRequestSchema = createRequestSchema({
2100
+ paramsSchema: sparkFlashnetGetJwtParamsSchema,
2101
+ method: sparkMethods.spark_flashnet_getJwt
2102
+ });
2103
+
2104
+ //#endregion
2105
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetGetJwt/response.ts
2106
+ const sparkFlashnetGetJwtResultSchema = valibot.object({ jwt: valibot.string() });
2107
+ const sparkFlashnetGetJwtSuccessResponseSchema = createSuccessResponseSchema({
2108
+ resultSchema: sparkFlashnetGetJwtResultSchema,
2109
+ method: sparkMethods.spark_flashnet_getJwt
2110
+ });
2111
+
2112
+ //#endregion
2113
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignIntent/intents/addLiquidity.ts
2114
+ const sparkFlashnetAddLiquidityIntentSchema = valibot.object({
2115
+ type: valibot.literal("addLiquidity"),
2116
+ data: valibot.object({
2117
+ userPublicKey: valibot.string(),
2118
+ poolId: valibot.string(),
2119
+ assetAAmount: valibot.string(),
2120
+ assetBAmount: valibot.string(),
2121
+ assetAMinAmountIn: valibot.string(),
2122
+ assetBMinAmountIn: valibot.string(),
2123
+ assetATransferId: valibot.string(),
2124
+ assetBTransferId: valibot.string(),
2125
+ nonce: valibot.string()
2126
+ })
2127
+ });
2128
+
2129
+ //#endregion
2130
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignIntent/intents/clawback.ts
2131
+ const sparkFlashnetClawbackIntentSchema = valibot.object({
2132
+ type: valibot.literal("clawback"),
2133
+ data: valibot.object({
2134
+ senderPublicKey: valibot.string(),
2135
+ sparkTransferId: valibot.string(),
2136
+ lpIdentityPublicKey: valibot.string(),
2137
+ nonce: valibot.string()
2138
+ })
2139
+ });
2140
+
2141
+ //#endregion
2142
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignIntent/intents/confirmInitialDeposit.ts
2143
+ const sparkFlashnetConfirmInitialDepositIntentSchema = valibot.object({
2144
+ type: valibot.literal("confirmInitialDeposit"),
2145
+ data: valibot.object({
2146
+ poolId: valibot.string(),
2147
+ assetASparkTransferId: valibot.string(),
2148
+ poolOwnerPublicKey: valibot.string(),
2149
+ nonce: valibot.string()
2150
+ })
2151
+ });
2152
+
2153
+ //#endregion
2154
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignIntent/intents/createConstantProductPool.ts
2155
+ const sparkFlashnetCreateConstantProductPoolIntentSchema = valibot.object({
2156
+ type: valibot.literal("createConstantProductPool"),
2157
+ data: valibot.object({
2158
+ poolOwnerPublicKey: valibot.string(),
2159
+ assetAAddress: valibot.string(),
2160
+ assetBAddress: valibot.string(),
2161
+ lpFeeRateBps: valibot.union([valibot.number(), valibot.string()]),
2162
+ totalHostFeeRateBps: valibot.union([valibot.number(), valibot.string()]),
2163
+ nonce: valibot.string()
2164
+ })
2165
+ });
2166
+
2167
+ //#endregion
2168
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignIntent/intents/createSingleSidedPool.ts
2169
+ const sparkFlashnetCreateSingleSidedPoolIntentSchema = valibot.object({
2170
+ type: valibot.literal("createSingleSidedPool"),
2171
+ data: valibot.object({
2172
+ assetAAddress: valibot.string(),
2173
+ assetBAddress: valibot.string(),
2174
+ assetAInitialReserve: valibot.string(),
2175
+ virtualReserveA: valibot.union([valibot.number(), valibot.string()]),
2176
+ virtualReserveB: valibot.union([valibot.number(), valibot.string()]),
2177
+ threshold: valibot.union([valibot.number(), valibot.string()]),
2178
+ lpFeeRateBps: valibot.union([valibot.number(), valibot.string()]),
2179
+ totalHostFeeRateBps: valibot.union([valibot.number(), valibot.string()]),
2180
+ poolOwnerPublicKey: valibot.string(),
2181
+ nonce: valibot.string()
2182
+ })
2183
+ });
2184
+
2185
+ //#endregion
2186
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignIntent/intents/removeLiquidity.ts
2187
+ const sparkFlashnetRemoveLiquidityIntentSchema = valibot.object({
2188
+ type: valibot.literal("removeLiquidity"),
2189
+ data: valibot.object({
2190
+ userPublicKey: valibot.string(),
2191
+ poolId: valibot.string(),
2192
+ lpTokensToRemove: valibot.string(),
2193
+ nonce: valibot.string()
2194
+ })
2195
+ });
2196
+
2197
+ //#endregion
2198
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignIntent/intents/routeSwap.ts
2199
+ const sparkFlashnetRouteSwapIntentSchema = valibot.object({
2200
+ type: valibot.literal("executeRouteSwap"),
2201
+ data: valibot.object({
2202
+ userPublicKey: valibot.string(),
2203
+ initialSparkTransferId: valibot.string(),
2204
+ hops: valibot.array(valibot.object({
2205
+ poolId: valibot.string(),
2206
+ inputAssetAddress: valibot.string(),
2207
+ outputAssetAddress: valibot.string(),
2208
+ hopIntegratorFeeRateBps: valibot.optional(valibot.union([valibot.number(), valibot.string()]))
2209
+ })),
2210
+ inputAmount: valibot.string(),
2211
+ maxRouteSlippageBps: valibot.union([valibot.number(), valibot.string()]),
2212
+ minAmountOut: valibot.string(),
2213
+ defaultIntegratorFeeRateBps: valibot.optional(valibot.union([valibot.number(), valibot.string()])),
2214
+ nonce: valibot.string()
2215
+ })
2216
+ });
2217
+
2218
+ //#endregion
2219
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignIntent/intents/swap.ts
2220
+ const sparkFlashnetSwapIntentSchema = valibot.object({
2221
+ type: valibot.literal("executeSwap"),
2222
+ data: valibot.object({
2223
+ userPublicKey: valibot.string(),
2224
+ poolId: valibot.string(),
2225
+ transferId: valibot.string(),
2226
+ assetInAddress: valibot.string(),
2227
+ assetOutAddress: valibot.string(),
2228
+ amountIn: valibot.string(),
2229
+ maxSlippageBps: valibot.union([valibot.number(), valibot.string()]),
2230
+ minAmountOut: valibot.string(),
2231
+ totalIntegratorFeeRateBps: valibot.optional(valibot.union([valibot.number(), valibot.string()])),
2232
+ nonce: valibot.string()
2233
+ })
2234
+ });
2235
+
2236
+ //#endregion
2237
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignIntent/request.ts
2238
+ const sparkFlashnetSignIntentParamsSchema = valibot.union([
2239
+ sparkFlashnetSwapIntentSchema,
2240
+ sparkFlashnetRouteSwapIntentSchema,
2241
+ sparkFlashnetAddLiquidityIntentSchema,
2242
+ sparkFlashnetClawbackIntentSchema,
2243
+ sparkFlashnetConfirmInitialDepositIntentSchema,
2244
+ sparkFlashnetCreateConstantProductPoolIntentSchema,
2245
+ sparkFlashnetCreateSingleSidedPoolIntentSchema,
2246
+ sparkFlashnetRemoveLiquidityIntentSchema
2247
+ ]);
2248
+ const sparkFlashnetSignIntentRequestSchema = createRequestSchema({
2249
+ paramsSchema: sparkFlashnetSignIntentParamsSchema,
2250
+ method: sparkMethods.spark_flashnet_signIntent
2251
+ });
2252
+
2253
+ //#endregion
2254
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignIntent/response.ts
2255
+ const sparkFlashnetSignIntentResultSchema = valibot.object({ signature: valibot.string() });
2256
+ const sparkFlashnetSignIntentSuccessResponseSchema = createSuccessResponseSchema({
2257
+ resultSchema: sparkFlashnetSignIntentResultSchema,
2258
+ method: sparkMethods.spark_flashnet_signIntent
2259
+ });
2260
+
2261
+ //#endregion
2262
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignStructuredMessage/request.ts
2263
+ const sparkFlashnetSignStructuredMessageParamsSchema = valibot.object({ message: valibot.string() });
2264
+ const sparkFlashnetSignStructuredMessageRequestSchema = createRequestSchema({
2265
+ paramsSchema: sparkFlashnetSignStructuredMessageParamsSchema,
2266
+ method: sparkMethods.spark_flashnet_signStructuredMessage
2267
+ });
2268
+
2269
+ //#endregion
2270
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignStructuredMessage/response.ts
2271
+ const sparkFlashnetSignStructuredMessageResultSchema = valibot.object({
2272
+ message: valibot.string(),
2273
+ signature: valibot.string()
2274
+ });
2275
+ const sparkFlashnetSignStructuredMessageSuccessResponseSchema = createSuccessResponseSchema({
2276
+ resultSchema: sparkFlashnetSignStructuredMessageResultSchema,
2277
+ method: sparkMethods.spark_flashnet_signStructuredMessage
2278
+ });
2279
+
2280
+ //#endregion
2281
+ //#region src/request/rpc/objects/namespaces/spark/methods/getAddresses/request.ts
2282
+ const sparkGetAddressesParamsSchema = valibot.nullish(valibot.object({ message: valibot.optional(valibot.string()) }));
2283
+ const sparkGetAddressesRequestSchema = createRequestSchema({
2284
+ paramsSchema: sparkGetAddressesParamsSchema,
2285
+ method: sparkMethods.spark_getAddresses
2286
+ });
2287
+
2288
+ //#endregion
2289
+ //#region src/request/rpc/objects/namespaces/wallet/methods/addNetwork/request.ts
2290
+ const walletAddNetworkParamsSchema = valibot.variant("chain", [
2291
+ valibot.object({
2292
+ chain: valibot.literal("bitcoin"),
2293
+ type: valibot.enum(BitcoinNetworkType),
2294
+ name: valibot.string(),
2295
+ rpcUrl: valibot.string(),
2296
+ rpcFallbackUrl: valibot.optional(valibot.string()),
2297
+ indexerUrl: valibot.optional(valibot.string()),
2298
+ blockExplorerUrl: valibot.optional(valibot.string()),
2299
+ switch: valibot.optional(valibot.boolean())
2300
+ }),
2301
+ valibot.object({
2302
+ chain: valibot.literal("stacks"),
2303
+ name: valibot.string(),
2304
+ type: valibot.enum(StacksNetworkType),
2305
+ rpcUrl: valibot.string(),
2306
+ blockExplorerUrl: valibot.optional(valibot.string()),
2307
+ switch: valibot.optional(valibot.boolean())
2308
+ }),
2309
+ valibot.object({
2310
+ chain: valibot.literal("starknet"),
2311
+ name: valibot.string(),
2312
+ type: valibot.enum(StarknetNetworkType),
2313
+ rpcUrl: valibot.string(),
2314
+ blockExplorerUrl: valibot.optional(valibot.string()),
2315
+ switch: valibot.optional(valibot.boolean())
2316
+ })
2317
+ ]);
2318
+ const walletAddNetworkRequestSchema = createRequestSchema({
2319
+ paramsSchema: walletAddNetworkParamsSchema,
2320
+ method: walletMethods.wallet_addNetwork
2321
+ });
2322
+
2323
+ //#endregion
2324
+ //#region src/request/rpc/objects/namespaces/wallet/methods/addNetwork/response.ts
2325
+ const walletAddNetworkResultSchema = valibot.object({ id: valibot.string() });
2326
+ const walletAddNetworkSuccessResponseSchema = createSuccessResponseSchema({
2327
+ resultSchema: walletAddNetworkResultSchema,
2328
+ method: walletMethods.wallet_addNetwork
2329
+ });
2330
+
2331
+ //#endregion
2332
+ //#region src/request/rpc/objects/namespaces/wallet/shared/permissions.ts
2333
+ const accountActionsSchema$2 = valibot.object({ read: valibot.optional(valibot.boolean()) });
2334
+ const walletActionsSchema$2 = valibot.object({ readNetwork: valibot.optional(valibot.boolean()) });
2335
+ const accountPermissionSchema$1 = valibot.object({
2336
+ type: valibot.literal("account"),
2337
+ resourceId: valibot.string(),
2338
+ clientId: valibot.string(),
2339
+ actions: accountActionsSchema$2
2340
+ });
2341
+ const walletPermissionSchema$1 = valibot.object({
2342
+ type: valibot.literal("wallet"),
2343
+ resourceId: valibot.string(),
2344
+ clientId: valibot.string(),
2345
+ actions: walletActionsSchema$2
2346
+ });
2347
+ const permissionSchema$1 = valibot.variant("type", [accountPermissionSchema$1, walletPermissionSchema$1]);
2348
+ /**
2349
+ * Permissions with the clientId field omitted and optional actions. Used for
2350
+ * permission requests, since the wallet performs authentication based on the
2351
+ * client's tab origin and should not rely on the client authenticating
2352
+ * themselves.
2353
+ */
2354
+ const permissionRequestParamsSchema = valibot.variant("type", [valibot.object({ ...valibot.omit(accountPermissionSchema$1, ["clientId"]).entries }), valibot.object({ ...valibot.omit(walletPermissionSchema$1, ["clientId"]).entries })]);
2355
+
2356
+ //#endregion
2357
+ //#region src/request/rpc/objects/namespaces/wallet/methods/addNetworkV2/request.ts
2358
+ const walletAddNetworkV2ParamsSchema = valibot.object({
2359
+ network: networkConfigurationOptionsSchema,
2360
+ isActive: valibot.optional(valibot.boolean())
2361
+ });
2362
+ const walletAddNetworkV2RequestSchema = createRequestSchema({
2363
+ paramsSchema: walletAddNetworkV2ParamsSchema,
2364
+ method: walletMethods.wallet_addNetworkV2
2365
+ });
2366
+
2367
+ //#endregion
2368
+ //#region src/request/rpc/objects/namespaces/wallet/methods/addNetworkV2/response.ts
2369
+ const walletAddNetworkV2ResultSchema = valibot.object({ id: valibot.string() });
2370
+ const walletAddNetworkV2SuccessResponseSchema = createSuccessResponseSchema({
2371
+ resultSchema: walletAddNetworkV2ResultSchema,
2372
+ method: walletMethods.wallet_addNetworkV2
2373
+ });
2374
+
2375
+ //#endregion
2376
+ //#region src/request/rpc/objects/namespaces/wallet/methods/changeNetwork/request.ts
2377
+ const walletChangeNetworkParamsSchema = valibot.object({ name: valibot.picklist([
2378
+ "Mainnet",
2379
+ "Testnet",
2380
+ "Signet"
2381
+ ]) });
2382
+ const walletChangeNetworkRequestSchema = createRequestSchema({
2383
+ paramsSchema: walletChangeNetworkParamsSchema,
2384
+ method: walletMethods.wallet_changeNetwork
2385
+ });
2386
+
2387
+ //#endregion
2388
+ //#region src/request/rpc/objects/namespaces/wallet/methods/changeNetwork/response.ts
2389
+ const walletChangeNetworkResultSchema = valibot.nullish(valibot.null());
2390
+ const walletChangeNetworkSuccessResponseSchema = createSuccessResponseSchema({
2391
+ resultSchema: walletChangeNetworkResultSchema,
2392
+ method: walletMethods.wallet_changeNetwork
2393
+ });
2394
+
2395
+ //#endregion
2396
+ //#region src/request/rpc/objects/namespaces/wallet/methods/changeNetworkById/request.ts
2397
+ const walletChangeNetworkByIdParamsSchema = valibot.object({ id: valibot.string() });
2398
+ const walletChangeNetworkByIdRequestSchema = createRequestSchema({
2399
+ paramsSchema: walletChangeNetworkByIdParamsSchema,
2400
+ method: walletMethods.wallet_changeNetworkById
2401
+ });
2402
+
2403
+ //#endregion
2404
+ //#region src/request/rpc/objects/namespaces/wallet/methods/changeNetworkById/response.ts
2405
+ const walletChangeNetworkByIdResultSchema = valibot.nullish(valibot.null());
2406
+ const walletChangeNetworkByIdSuccessResponseSchema = createSuccessResponseSchema({
2407
+ resultSchema: walletChangeNetworkByIdResultSchema,
2408
+ method: walletMethods.wallet_changeNetworkById
2409
+ });
2410
+
2411
+ //#endregion
2412
+ //#region src/request/rpc/objects/namespaces/wallet/methods/connect/request.ts
2413
+ const walletConnectParamsSchema = valibot.nullish(valibot.object({
2414
+ permissions: valibot.optional(valibot.array(permissionRequestParamsSchema)),
2415
+ addresses: valibot.optional(valibot.array(valibot.enum(AddressPurpose))),
2416
+ message: valibot.optional(valibot.pipe(valibot.string(), valibot.maxLength(80, "The message must not exceed 80 characters."))),
2417
+ network: valibot.optional(valibot.picklist([
2418
+ "Mainnet",
2419
+ "Testnet",
2420
+ "Signet"
2421
+ ]))
2422
+ }));
2423
+ const walletConnectRequestSchema = createRequestSchema({
2424
+ paramsSchema: walletConnectParamsSchema,
2425
+ method: walletMethods.wallet_connect
2426
+ });
2427
+
2428
+ //#endregion
2429
+ //#region src/request/rpc/objects/namespaces/wallet/methods/getNetwork/request.ts
2430
+ const walletGetNetworkParamsSchema = valibot.nullish(valibot.null());
2431
+ const walletGetNetworkRequestSchema = createRequestSchema({
2432
+ paramsSchema: walletGetNetworkParamsSchema,
2433
+ method: walletMethods.wallet_getNetwork
2434
+ });
2435
+
2436
+ //#endregion
2437
+ //#region src/request/rpc/objects/namespaces/wallet/methods/getNetwork/response.ts
2438
+ const walletGetNetworkResultSchema = valibot.object({
2439
+ bitcoin: valibot.object({ name: valibot.enum(BitcoinNetworkType) }),
2440
+ stacks: valibot.object({ name: valibot.enum(StacksNetworkType) }),
2441
+ spark: valibot.object({ name: valibot.enum(SparkNetworkType) })
2442
+ });
2443
+ const walletGetNetworkSuccessResponseSchema = createSuccessResponseSchema({
2444
+ resultSchema: walletGetNetworkResultSchema,
2445
+ method: walletMethods.wallet_getNetwork
2446
+ });
2447
+
2448
+ //#endregion
2449
+ //#region src/request/rpc/objects/namespaces/wallet/methods/connect/response.ts
2450
+ const walletConnectResultSchema = valibot.object({
2451
+ id: valibot.string(),
2452
+ addresses: valibot.array(addressSchema),
2453
+ walletType: walletTypeSchema,
2454
+ network: walletGetNetworkResultSchema
2455
+ });
2456
+ const walletConnectSuccessResponseSchema = createSuccessResponseSchema({
2457
+ resultSchema: walletConnectResultSchema,
2458
+ method: walletMethods.wallet_connect
2459
+ });
2460
+
2461
+ //#endregion
2462
+ //#region src/request/rpc/objects/namespaces/wallet/methods/connectV2/request.ts
2463
+ const walletConnectV2ParamsSchema = valibot.nullish(valibot.object({
2464
+ permissions: permissionRequestParamsSchema,
2465
+ addresses: valibot.optional(valibot.array(valibot.enum(AddressPurpose))),
2466
+ message: valibot.optional(valibot.pipe(valibot.string(), valibot.maxLength(80, "The message must not exceed 80 characters."))),
2467
+ networkId: valibot.optional(valibot.string())
2468
+ }));
2469
+ const walletConnectV2RequestSchema = createRequestSchema({
2470
+ paramsSchema: walletConnectV2ParamsSchema,
2471
+ method: walletMethods.wallet_connectV2
2472
+ });
2473
+
2474
+ //#endregion
2475
+ //#region src/request/rpc/objects/namespaces/wallet/methods/getNetworks/request.ts
2476
+ const walletGetNetworksParamsSchema = valibot.nullish(valibot.null());
2477
+ const walletGetNetworksRequestSchema = createRequestSchema({
2478
+ paramsSchema: walletGetNetworksParamsSchema,
2479
+ method: walletMethods.wallet_getNetworks
2480
+ });
2481
+
2482
+ //#endregion
2483
+ //#region src/request/rpc/objects/namespaces/wallet/methods/getNetworks/response.ts
2484
+ const walletGetNetworksResultSchema = allResolvedNetworksSchema;
2485
+ const walletGetNetworksSuccessResponseSchema = createSuccessResponseSchema({
2486
+ resultSchema: walletGetNetworksResultSchema,
2487
+ method: walletMethods.wallet_getNetworks
2488
+ });
2489
+
2490
+ //#endregion
2491
+ //#region src/request/rpc/objects/namespaces/wallet/methods/connectV2/response.ts
2492
+ const walletConnectV2ResultSchema = valibot.object({
2493
+ accountId: valibot.string(),
2494
+ addresses: valibot.array(addressSchema),
2495
+ walletType: walletTypeSchema,
2496
+ networks: walletGetNetworksResultSchema
2497
+ });
2498
+ const walletConnectV2SuccessResponseSchema = createSuccessResponseSchema({
2499
+ resultSchema: walletConnectV2ResultSchema,
2500
+ method: walletMethods.wallet_connectV2
2501
+ });
2502
+
2503
+ //#endregion
2504
+ //#region src/request/rpc/objects/namespaces/wallet/methods/disconnect/request.ts
2505
+ const walletDisconnectParamsSchema = valibot.nullish(valibot.null());
2506
+ const walletDisconnectRequestSchema = createRequestSchema({
2507
+ paramsSchema: walletDisconnectParamsSchema,
2508
+ method: walletMethods.wallet_disconnect
2509
+ });
2510
+
2511
+ //#endregion
2512
+ //#region src/request/rpc/objects/namespaces/wallet/methods/disconnect/response.ts
2513
+ const walletDisconnectResultSchema = valibot.nullish(valibot.null());
2514
+ const walletDisconnectSuccessResponseSchema = createSuccessResponseSchema({
2515
+ resultSchema: walletDisconnectResultSchema,
2516
+ method: walletMethods.wallet_disconnect
2517
+ });
2518
+
2519
+ //#endregion
2520
+ //#region src/request/rpc/objects/namespaces/wallet/methods/getAccount/request.ts
2521
+ const walletGetAccountParamsSchema = valibot.nullish(valibot.null());
2522
+ const walletGetAccountRequestSchema = createRequestSchema({
2523
+ paramsSchema: walletGetAccountParamsSchema,
2524
+ method: walletMethods.wallet_getAccount
2525
+ });
2526
+
2527
+ //#endregion
2528
+ //#region src/request/rpc/objects/namespaces/wallet/methods/getAccount/response.ts
2529
+ const walletGetAccountResultSchema = valibot.object({
2530
+ id: valibot.string(),
2531
+ addresses: valibot.array(addressSchema),
2532
+ walletType: walletTypeSchema,
2533
+ network: walletGetNetworkResultSchema
2534
+ });
2535
+ const walletGetAccountSuccessResponseSchema = createSuccessResponseSchema({
2536
+ resultSchema: walletGetAccountResultSchema,
2537
+ method: walletMethods.wallet_getAccount
2538
+ });
2539
+
2540
+ //#endregion
2541
+ //#region src/request/rpc/objects/namespaces/wallet/methods/getAccountV2/request.ts
2542
+ const walletGetAccountV2ParamsSchema = valibot.nullish(valibot.null());
2543
+ const walletGetAccountV2RequestSchema = createRequestSchema({
2544
+ paramsSchema: walletGetAccountV2ParamsSchema,
2545
+ method: walletMethods.wallet_getAccountV2
2546
+ });
2547
+
2548
+ //#endregion
2549
+ //#region src/request/rpc/objects/namespaces/wallet/methods/getAccountV2/response.ts
2550
+ const walletGetAccountV2ResultSchema = valibot.object({
2551
+ id: valibot.string(),
2552
+ addresses: valibot.array(addressSchema),
2553
+ walletType: walletTypeSchema,
2554
+ networks: walletGetNetworksResultSchema
2555
+ });
2556
+ const walletGetAccountV2SuccessResponseSchema = createSuccessResponseSchema({
2557
+ resultSchema: walletGetAccountV2ResultSchema,
2558
+ method: walletMethods.wallet_getAccountV2
2559
+ });
2560
+
2561
+ //#endregion
2562
+ //#region src/request/rpc/objects/namespaces/wallet/methods/getCurrentPermissions/request.ts
2563
+ const walletGetCurrentPermissionsParamsSchema = valibot.nullish(valibot.null());
2564
+ const walletGetCurrentPermissionsRequestSchema = createRequestSchema({
2565
+ paramsSchema: walletGetCurrentPermissionsParamsSchema,
2566
+ method: walletMethods.wallet_getCurrentPermissions
2567
+ });
2568
+
2569
+ //#endregion
2570
+ //#region src/request/rpc/objects/namespaces/wallet/methods/getCurrentPermissions/response.ts
2571
+ const accountActionsSchema$1 = valibot.object({ read: valibot.optional(valibot.boolean()) });
2572
+ const walletActionsSchema$1 = valibot.object({ readNetwork: valibot.optional(valibot.boolean()) });
2573
+ const accountPermissionSchema = valibot.object({
2574
+ type: valibot.literal("account"),
2575
+ resourceId: valibot.string(),
2576
+ clientId: valibot.string(),
2577
+ actions: accountActionsSchema$1
2578
+ });
2579
+ const walletPermissionSchema = valibot.object({
2580
+ type: valibot.literal("wallet"),
2581
+ resourceId: valibot.string(),
2582
+ clientId: valibot.string(),
2583
+ actions: walletActionsSchema$1
2584
+ });
2585
+ const permissionSchema = valibot.variant("type", [accountPermissionSchema, walletPermissionSchema]);
2586
+ const walletGetCurrentPermissionsResultSchema = valibot.array(permissionSchema);
2587
+ const walletGetCurrentPermissionsSuccessResponseSchema = createSuccessResponseSchema({
2588
+ resultSchema: walletGetCurrentPermissionsResultSchema,
2589
+ method: walletMethods.wallet_getCurrentPermissions
2590
+ });
2591
+
2592
+ //#endregion
2593
+ //#region src/request/rpc/objects/namespaces/wallet/methods/getWalletType/request.ts
2594
+ const walletGetWalletTypeParamsSchema = valibot.nullish(valibot.null());
2595
+ const walletGetWalletTypeRequestSchema = createRequestSchema({
2596
+ paramsSchema: walletGetWalletTypeParamsSchema,
2597
+ method: walletMethods.wallet_getWalletType
2598
+ });
2599
+
2600
+ //#endregion
2601
+ //#region src/request/rpc/objects/namespaces/wallet/methods/getWalletType/response.ts
2602
+ const walletGetWalletTypeResultSchema = walletTypeSchema;
2603
+ const walletGetWalletTypeSuccessResponseSchema = createSuccessResponseSchema({
2604
+ resultSchema: walletGetWalletTypeResultSchema,
2605
+ method: walletMethods.wallet_getWalletType
2606
+ });
2607
+
2608
+ //#endregion
2609
+ //#region src/request/rpc/objects/namespaces/wallet/methods/openBridge/request.ts
2610
+ const walletOpenBridgeParamsSchema = valibot.object({
2611
+ fromAsset: valibot.string(),
2612
+ toAsset: valibot.string()
2613
+ });
2614
+ const walletOpenBridgeRequestSchema = createRequestSchema({
2615
+ paramsSchema: walletOpenBridgeParamsSchema,
2616
+ method: walletMethods.wallet_openBridge
2617
+ });
2618
+
2619
+ //#endregion
2620
+ //#region src/request/rpc/objects/namespaces/wallet/methods/openBridge/response.ts
2621
+ const walletOpenBridgeResultSchema = valibot.nullish(valibot.null());
2622
+ const walletOpenBridgeSuccessResponseSchema = createSuccessResponseSchema({
2623
+ resultSchema: walletOpenBridgeResultSchema,
2624
+ method: walletMethods.wallet_openBridge
2625
+ });
2626
+
2627
+ //#endregion
2628
+ //#region src/request/rpc/objects/namespaces/wallet/methods/openBuy/request.ts
2629
+ const walletOpenBuyParamsSchema = valibot.object({ asset: valibot.string() });
2630
+ const walletOpenBuyRequestSchema = createRequestSchema({
2631
+ paramsSchema: walletOpenBuyParamsSchema,
2632
+ method: walletMethods.wallet_openBuy
2633
+ });
2634
+
2635
+ //#endregion
2636
+ //#region src/request/rpc/objects/namespaces/wallet/methods/openBuy/response.ts
2637
+ const walletOpenBuyResultSchema = valibot.nullish(valibot.null());
2638
+ const walletOpenBuySuccessResponseSchema = createSuccessResponseSchema({
2639
+ resultSchema: walletOpenBuyResultSchema,
2640
+ method: walletMethods.wallet_openBuy
2641
+ });
2642
+
2643
+ //#endregion
2644
+ //#region src/request/rpc/objects/namespaces/wallet/methods/openReceive/request.ts
2645
+ const walletOpenReceiveParamsSchema = valibot.object({ address: valibot.string() });
2646
+ const walletOpenReceiveRequestSchema = createRequestSchema({
2647
+ paramsSchema: walletOpenReceiveParamsSchema,
2648
+ method: walletMethods.wallet_openReceive
2649
+ });
2650
+
2651
+ //#endregion
2652
+ //#region src/request/rpc/objects/namespaces/wallet/methods/openReceive/response.ts
2653
+ const walletOpenReceiveResultSchema = addressSchema;
2654
+ const walletOpenReceiveSuccessResponseSchema = createSuccessResponseSchema({
2655
+ resultSchema: walletOpenReceiveResultSchema,
2656
+ method: walletMethods.wallet_openReceive
2657
+ });
2658
+
2659
+ //#endregion
2660
+ //#region src/request/rpc/objects/namespaces/wallet/methods/renouncePermissions/request.ts
2661
+ const walletRenouncePermissionsParamsSchema = valibot.nullish(valibot.null());
2662
+ const walletRenouncePermissionsRequestSchema = createRequestSchema({
2663
+ paramsSchema: walletRenouncePermissionsParamsSchema,
2664
+ method: walletMethods.wallet_renouncePermissions
2665
+ });
2666
+
2667
+ //#endregion
2668
+ //#region src/request/rpc/objects/namespaces/wallet/methods/renouncePermissions/response.ts
2669
+ const walletRenouncePermissionsResultSchema = valibot.nullish(valibot.null());
2670
+ const walletRenouncePermissionsSuccessResponseSchema = createSuccessResponseSchema({
2671
+ resultSchema: walletRenouncePermissionsResultSchema,
2672
+ method: walletMethods.wallet_renouncePermissions
2673
+ });
2674
+
2675
+ //#endregion
2676
+ //#region src/request/rpc/objects/namespaces/wallet/methods/requestPermissions/request.ts
2677
+ const accountActionsSchema = valibot.object({ read: valibot.optional(valibot.boolean()) });
2678
+ const walletActionsSchema = valibot.object({ readNetwork: valibot.optional(valibot.boolean()) });
2679
+ const accountPermissionRequestSchema = valibot.object({
2680
+ type: valibot.literal("account"),
2681
+ resourceId: valibot.string(),
2682
+ actions: accountActionsSchema
2683
+ });
2684
+ const walletPermissionRequestSchema = valibot.object({
2685
+ type: valibot.literal("wallet"),
2686
+ resourceId: valibot.string(),
2687
+ actions: walletActionsSchema
2688
+ });
2689
+ const permissionRequestParamsSchema$1 = valibot.variant("type", [accountPermissionRequestSchema, walletPermissionRequestSchema]);
2690
+ const walletRequestPermissionsParamsSchema = valibot.nullish(valibot.array(permissionRequestParamsSchema$1));
2691
+ const walletRequestPermissionsRequestSchema = createRequestSchema({
2692
+ paramsSchema: walletRequestPermissionsParamsSchema,
2693
+ method: walletMethods.wallet_requestPermissions
2694
+ });
2695
+
2696
+ //#endregion
2697
+ //#region src/request/rpc/objects/namespaces/wallet/methods/requestPermissions/response.ts
2698
+ const walletRequestPermissionsResultSchema = valibot.literal(true);
2699
+ const walletRequestPermissionsSuccessResponseSchema = createSuccessResponseSchema({
2700
+ resultSchema: walletRequestPermissionsResultSchema,
2701
+ method: walletMethods.wallet_requestPermissions
2702
+ });
2703
+
2704
+ //#endregion
2705
+ //#region src/request/rpc/objects/namespaces/wallet/index.ts
2706
+ const walletRequestSchema = valibot.variant("method", [
2707
+ walletAddNetworkRequestSchema,
2708
+ walletAddNetworkV2RequestSchema,
2709
+ walletChangeNetworkByIdRequestSchema,
2710
+ walletChangeNetworkRequestSchema,
2711
+ walletConnectRequestSchema,
2712
+ walletConnectV2RequestSchema,
2713
+ walletDisconnectRequestSchema,
2714
+ walletGetAccountRequestSchema,
2715
+ walletGetAccountV2RequestSchema,
2716
+ walletGetCurrentPermissionsRequestSchema,
2717
+ walletGetNetworkRequestSchema,
2718
+ walletGetNetworksRequestSchema,
2719
+ walletGetWalletTypeRequestSchema,
2720
+ walletOpenBridgeRequestSchema,
2721
+ walletOpenBuyRequestSchema,
2722
+ walletOpenReceiveRequestSchema,
2723
+ walletRenouncePermissionsRequestSchema,
2724
+ walletRequestPermissionsRequestSchema
2725
+ ]);
2726
+ const walletSuccessResponseSchema = valibot.variant("~sats-connect-method", [
2727
+ walletAddNetworkSuccessResponseSchema,
2728
+ walletAddNetworkV2SuccessResponseSchema,
2729
+ walletChangeNetworkByIdSuccessResponseSchema,
2730
+ walletChangeNetworkSuccessResponseSchema,
2731
+ walletConnectSuccessResponseSchema,
2732
+ walletConnectV2SuccessResponseSchema,
2733
+ walletDisconnectSuccessResponseSchema,
2734
+ walletGetAccountSuccessResponseSchema,
2735
+ walletGetAccountV2SuccessResponseSchema,
2736
+ walletGetCurrentPermissionsSuccessResponseSchema,
2737
+ walletGetNetworkSuccessResponseSchema,
2738
+ walletGetNetworksSuccessResponseSchema,
2739
+ walletGetWalletTypeSuccessResponseSchema,
2740
+ walletOpenBridgeSuccessResponseSchema,
2741
+ walletOpenBuySuccessResponseSchema,
2742
+ walletOpenReceiveSuccessResponseSchema,
2743
+ walletRenouncePermissionsSuccessResponseSchema,
2744
+ walletRequestPermissionsSuccessResponseSchema
2745
+ ]);
2746
+
2747
+ //#endregion
2748
+ //#region src/request/rpc/objects/namespaces/spark/methods/getAddresses/response.ts
2749
+ const sparkGetAddressesResultSchema = valibot.object({
2750
+ addresses: valibot.array(addressSchema),
2751
+ network: walletGetNetworkResultSchema
2752
+ });
2753
+ const sparkGetAddressesSuccessResponseSchema = createSuccessResponseSchema({
2754
+ resultSchema: sparkGetAddressesResultSchema,
2755
+ method: sparkMethods.spark_getAddresses
2756
+ });
2757
+
2758
+ //#endregion
2759
+ //#region src/request/rpc/objects/namespaces/spark/methods/getAddressesV2/request.ts
2760
+ const sparkGetAddressesV2ParamsSchema = valibot.nullish(valibot.object({ message: valibot.optional(valibot.string()) }));
2761
+ const sparkGetAddressesV2RequestSchema = createRequestSchema({
2762
+ paramsSchema: sparkGetAddressesV2ParamsSchema,
2763
+ method: sparkMethods.spark_getAddressesV2
2764
+ });
2765
+
2766
+ //#endregion
2767
+ //#region src/request/rpc/objects/namespaces/spark/methods/getAddressesV2/response.ts
2768
+ const sparkGetAddressesV2ResultSchema = valibot.object({
2769
+ addresses: valibot.array(addressSchema),
2770
+ network: sparkNetworkConfigurationSchema
2771
+ });
2772
+ const sparkGetAddressesV2SuccessResponseSchema = createSuccessResponseSchema({
2773
+ resultSchema: sparkGetAddressesV2ResultSchema,
2774
+ method: sparkMethods.spark_getAddressesV2
2775
+ });
2776
+
2777
+ //#endregion
2778
+ //#region src/request/rpc/objects/namespaces/spark/methods/getBalance/request.ts
2779
+ const sparkGetBalanceParamsSchema = valibot.nullish(valibot.null());
2780
+ const sparkGetBalanceRequestSchema = createRequestSchema({
2781
+ paramsSchema: sparkGetBalanceParamsSchema,
2782
+ method: sparkMethods.spark_getBalance
2783
+ });
2784
+
2785
+ //#endregion
2786
+ //#region src/request/rpc/objects/namespaces/spark/methods/getBalance/response.ts
2787
+ const sparkGetBalanceResultSchema = valibot.object({
2788
+ balance: valibot.string(),
2789
+ tokenBalances: valibot.array(valibot.object({
2790
+ balance: valibot.string(),
2791
+ tokenMetadata: valibot.object({
2792
+ tokenIdentifier: valibot.string(),
2793
+ tokenName: valibot.string(),
2794
+ tokenTicker: valibot.string(),
2795
+ decimals: valibot.number(),
2796
+ maxSupply: valibot.string()
2797
+ })
2798
+ }))
2799
+ });
2800
+ const sparkGetBalanceSuccessResponseSchema = createSuccessResponseSchema({
2801
+ resultSchema: sparkGetBalanceResultSchema,
2802
+ method: sparkMethods.spark_getBalance
2803
+ });
2804
+
2805
+ //#endregion
2806
+ //#region src/request/rpc/objects/namespaces/spark/methods/signMessage/request.ts
2807
+ const sparkSignMessageParamsSchema = valibot.object({ message: valibot.string() });
2808
+ const sparkSignMessageRequestSchema = createRequestSchema({
2809
+ paramsSchema: sparkSignMessageParamsSchema,
2810
+ method: sparkMethods.spark_signMessage
2811
+ });
2812
+
2813
+ //#endregion
2814
+ //#region src/request/rpc/objects/namespaces/spark/methods/signMessage/response.ts
2815
+ const sparkSignMessageResultSchema = valibot.object({ signature: valibot.string() });
2816
+ const sparkSignMessageSuccessResponseSchema = createSuccessResponseSchema({
2817
+ resultSchema: sparkSignMessageResultSchema,
2818
+ method: sparkMethods.spark_signMessage
2819
+ });
2820
+
2821
+ //#endregion
2822
+ //#region src/request/rpc/objects/namespaces/spark/methods/transfer/request.ts
2823
+ const sparkTransferParamsSchema = valibot.object({
2824
+ amountSats: valibot.union([valibot.number(), valibot.string()]),
2825
+ receiverSparkAddress: valibot.string()
2826
+ });
2827
+ const sparkTransferRequestSchema = createRequestSchema({
2828
+ paramsSchema: sparkTransferParamsSchema,
2829
+ method: sparkMethods.spark_transfer
2830
+ });
2831
+
2832
+ //#endregion
2833
+ //#region src/request/rpc/objects/namespaces/spark/methods/transfer/response.ts
2834
+ const sparkTransferResultSchema = valibot.object({ id: valibot.string() });
2835
+ const sparkTransferSuccessResponseSchema = createSuccessResponseSchema({
2836
+ resultSchema: sparkTransferResultSchema,
2837
+ method: sparkMethods.spark_transfer
2838
+ });
2839
+
2840
+ //#endregion
2841
+ //#region src/request/rpc/objects/namespaces/spark/methods/transferToken/request.ts
2842
+ const sparkTransferTokenParamsSchema = valibot.object({
2843
+ tokenAmount: valibot.union([valibot.number(), valibot.string()]),
2844
+ tokenIdentifier: valibot.string(),
2845
+ receiverSparkAddress: valibot.string()
2846
+ });
2847
+ const sparkTransferTokenRequestSchema = createRequestSchema({
2848
+ paramsSchema: sparkTransferTokenParamsSchema,
2849
+ method: sparkMethods.spark_transferToken
2850
+ });
2851
+
2852
+ //#endregion
2853
+ //#region src/request/rpc/objects/namespaces/spark/methods/transferToken/response.ts
2854
+ const sparkTransferTokenResultSchema = valibot.object({ id: valibot.string() });
2855
+ const sparkTransferTokenSuccessResponseSchema = createSuccessResponseSchema({
2856
+ resultSchema: sparkTransferTokenResultSchema,
2857
+ method: sparkMethods.spark_transferToken
2858
+ });
2859
+
2860
+ //#endregion
2861
+ //#region src/request/rpc/objects/namespaces/spark/index.ts
2862
+ const sparkRequestSchema = valibot.variant("method", [
2863
+ sparkGetAddressesRequestSchema,
2864
+ sparkGetAddressesV2RequestSchema,
2865
+ sparkGetBalanceRequestSchema,
2866
+ sparkTransferRequestSchema,
2867
+ sparkTransferTokenRequestSchema,
2868
+ sparkSignMessageRequestSchema,
2869
+ sparkFlashnetGetJwtRequestSchema,
2870
+ sparkFlashnetSignIntentRequestSchema,
2871
+ sparkFlashnetSignStructuredMessageRequestSchema,
2872
+ sparkFlashnetExecuteSwapRequestSchema,
2873
+ sparkFlashnetExecuteRouteSwapRequestSchema,
2874
+ sparkFlashnetClawbackFundsRequestSchema,
2875
+ sparkGetClawbackEligibleTransfersRequestSchema
2876
+ ]);
2877
+ const sparkSuccessResponseSchema = valibot.variant("~sats-connect-method", [
2878
+ sparkGetAddressesSuccessResponseSchema,
2879
+ sparkGetAddressesV2SuccessResponseSchema,
2880
+ sparkGetBalanceSuccessResponseSchema,
2881
+ sparkTransferSuccessResponseSchema,
2882
+ sparkTransferTokenSuccessResponseSchema,
2883
+ sparkSignMessageSuccessResponseSchema,
2884
+ sparkFlashnetGetJwtSuccessResponseSchema,
2885
+ sparkFlashnetSignIntentSuccessResponseSchema,
2886
+ sparkFlashnetSignStructuredMessageSuccessResponseSchema,
2887
+ sparkFlashnetExecuteSwapSuccessResponseSchema,
2888
+ sparkFlashnetExecuteRouteSwapSuccessResponseSchema,
2889
+ sparkFlashnetClawbackFundsSuccessResponseSchema,
2890
+ sparkGetClawbackEligibleTransfersSuccessResponseSchema
2891
+ ]);
2892
+
2893
+ //#endregion
2894
+ //#region src/request/rpc/objects/namespaces/stacks/methods/callContract/request.ts
2895
+ const stacksCallContractParamsSchema = valibot.object({
2896
+ contract: valibot.string(),
2897
+ functionName: valibot.string(),
2898
+ arguments: valibot.optional(valibot.array(valibot.string())),
2899
+ functionArgs: valibot.optional(valibot.array(valibot.string())),
2900
+ postConditions: valibot.optional(valibot.array(valibot.string())),
2901
+ postConditionMode: valibot.optional(valibot.union([valibot.literal("allow"), valibot.literal("deny")]))
2902
+ });
2903
+ const stacksCallContractRequestSchema = createRequestSchema({
2904
+ paramsSchema: stacksCallContractParamsSchema,
2905
+ method: stacksMethods.stx_callContract
2906
+ });
2907
+
2908
+ //#endregion
2909
+ //#region src/request/rpc/objects/namespaces/stacks/methods/callContract/response.ts
2910
+ const stacksCallContractResultSchema = valibot.object({
2911
+ txid: valibot.string(),
2912
+ transaction: valibot.string()
2913
+ });
2914
+ const stacksCallContractSuccessResponseSchema = createSuccessResponseSchema({
2915
+ resultSchema: stacksCallContractResultSchema,
2916
+ method: stacksMethods.stx_callContract
2917
+ });
2918
+
2919
+ //#endregion
2920
+ //#region src/request/rpc/objects/namespaces/stacks/methods/deployContract/request.ts
2921
+ const stacksDeployContractParamsSchema = valibot.object({
2922
+ name: valibot.string(),
2923
+ clarityCode: valibot.string(),
2924
+ clarityVersion: valibot.optional(valibot.number()),
2925
+ postConditions: valibot.optional(valibot.array(valibot.string())),
2926
+ postConditionMode: valibot.optional(valibot.union([valibot.literal("allow"), valibot.literal("deny")]))
2927
+ });
2928
+ const stacksDeployContractRequestSchema = createRequestSchema({
2929
+ paramsSchema: stacksDeployContractParamsSchema,
2930
+ method: stacksMethods.stx_deployContract
2931
+ });
2932
+
2933
+ //#endregion
2934
+ //#region src/request/rpc/objects/namespaces/stacks/methods/deployContract/response.ts
2935
+ const stacksDeployContractResultSchema = valibot.object({
2936
+ txid: valibot.string(),
2937
+ transaction: valibot.string()
2938
+ });
2939
+ const stacksDeployContractSuccessResponseSchema = createSuccessResponseSchema({
2940
+ resultSchema: stacksDeployContractResultSchema,
2941
+ method: stacksMethods.stx_deployContract
2942
+ });
2943
+
2944
+ //#endregion
2945
+ //#region src/request/rpc/objects/namespaces/stacks/methods/getAccounts/request.ts
2946
+ const stacksGetAccountsParamsSchema = valibot.nullish(valibot.null());
2947
+ const stacksGetAccountsRequestSchema = createRequestSchema({
2948
+ paramsSchema: stacksGetAccountsParamsSchema,
2949
+ method: stacksMethods.stx_getAccounts
2950
+ });
2951
+
2952
+ //#endregion
2953
+ //#region src/request/rpc/objects/namespaces/stacks/methods/getAccounts/response.ts
2954
+ const stacksGetAccountsResultSchema = valibot.object({
2955
+ addresses: valibot.array(valibot.object({
2956
+ address: valibot.string(),
2957
+ publicKey: valibot.string(),
2958
+ gaiaHubUrl: valibot.string(),
2959
+ gaiaAppKey: valibot.string()
2960
+ })),
2961
+ network: walletGetNetworkResultSchema
2962
+ });
2963
+ const stacksGetAccountsSuccessResponseSchema = createSuccessResponseSchema({
2964
+ resultSchema: stacksGetAccountsResultSchema,
2965
+ method: stacksMethods.stx_getAccounts
2966
+ });
2967
+
2968
+ //#endregion
2969
+ //#region src/request/rpc/objects/namespaces/stacks/methods/getAddresses/request.ts
2970
+ const stacksGetAddressesParamsSchema = valibot.nullish(valibot.object({ message: valibot.optional(valibot.string()) }));
2971
+ const stacksGetAddressesRequestSchema = createRequestSchema({
2972
+ paramsSchema: stacksGetAddressesParamsSchema,
2973
+ method: stacksMethods.stx_getAddresses
2974
+ });
2975
+
2976
+ //#endregion
2977
+ //#region src/request/rpc/objects/namespaces/stacks/methods/getAddresses/response.ts
2978
+ const stacksGetAddressesResultSchema = valibot.object({
2979
+ addresses: valibot.array(addressSchema),
2980
+ network: walletGetNetworkResultSchema
2981
+ });
2982
+ const stacksGetAddressesSuccessResponseSchema = createSuccessResponseSchema({
2983
+ resultSchema: stacksGetAddressesResultSchema,
2984
+ method: stacksMethods.stx_getAddresses
2985
+ });
2986
+
2987
+ //#endregion
2988
+ //#region src/request/rpc/objects/namespaces/stacks/methods/getAddressesV2/request.ts
2989
+ const stacksGetAddressesV2ParamsSchema = valibot.nullish(valibot.object({ message: valibot.optional(valibot.string()) }));
2990
+ const stacksGetAddressesV2RequestSchema = createRequestSchema({
2991
+ paramsSchema: stacksGetAddressesV2ParamsSchema,
2992
+ method: stacksMethods.stacks_getAddressesV2
2993
+ });
2994
+
2995
+ //#endregion
2996
+ //#region src/request/rpc/objects/namespaces/stacks/methods/getAddressesV2/response.ts
2997
+ const stacksGetAddressesV2ResultSchema = valibot.object({
2998
+ addresses: valibot.array(addressSchema),
2999
+ network: valibot.object({
3000
+ type: valibot.union([
3001
+ valibot.literal("Mainnet"),
3002
+ valibot.literal("Testnet"),
3003
+ valibot.literal("Devnet"),
3004
+ valibot.literal("Signet")
3005
+ ]),
3006
+ chain: valibot.union([valibot.literal("bitcoin"), valibot.literal("stacks")])
3007
+ })
3008
+ });
3009
+ const stacksGetAddressesV2SuccessResponseSchema = createSuccessResponseSchema({
3010
+ resultSchema: stacksGetAddressesV2ResultSchema,
3011
+ method: stacksMethods.stacks_getAddressesV2
3012
+ });
3013
+
3014
+ //#endregion
3015
+ //#region src/request/rpc/objects/namespaces/stacks/methods/signMessage/request.ts
3016
+ const stacksSignMessageParamsSchema = valibot.object({ message: valibot.string() });
3017
+ const stacksSignMessageRequestSchema = createRequestSchema({
3018
+ paramsSchema: stacksSignMessageParamsSchema,
3019
+ method: stacksMethods.stx_signMessage
3020
+ });
3021
+
3022
+ //#endregion
3023
+ //#region src/request/rpc/objects/namespaces/stacks/methods/signMessage/response.ts
3024
+ const stacksSignMessageResultSchema = valibot.object({
3025
+ signature: valibot.string(),
3026
+ publicKey: valibot.string()
3027
+ });
3028
+ const stacksSignMessageSuccessResponseSchema = createSuccessResponseSchema({
3029
+ resultSchema: stacksSignMessageResultSchema,
3030
+ method: stacksMethods.stx_signMessage
3031
+ });
3032
+
3033
+ //#endregion
3034
+ //#region src/request/rpc/objects/namespaces/stacks/methods/signStructuredMessage/request.ts
3035
+ const stacksSignStructuredMessageParamsSchema = valibot.object({
3036
+ domain: valibot.string(),
3037
+ message: valibot.string(),
3038
+ publicKey: valibot.optional(valibot.string())
3039
+ });
3040
+ const stacksSignStructuredMessageRequestSchema = createRequestSchema({
3041
+ paramsSchema: stacksSignStructuredMessageParamsSchema,
3042
+ method: stacksMethods.stx_signStructuredMessage
3043
+ });
3044
+
3045
+ //#endregion
3046
+ //#region src/request/rpc/objects/namespaces/stacks/methods/signStructuredMessage/response.ts
3047
+ const stacksSignStructuredMessageResultSchema = valibot.object({
3048
+ signature: valibot.string(),
3049
+ publicKey: valibot.string()
3050
+ });
3051
+ const stacksSignStructuredMessageSuccessResponseSchema = createSuccessResponseSchema({
3052
+ resultSchema: stacksSignStructuredMessageResultSchema,
3053
+ method: stacksMethods.stx_signStructuredMessage
3054
+ });
3055
+
3056
+ //#endregion
3057
+ //#region src/request/rpc/objects/namespaces/stacks/methods/signTransaction/request.ts
3058
+ const stacksSignTransactionParamsSchema = valibot.object({
3059
+ transaction: valibot.string(),
3060
+ pubkey: valibot.optional(valibot.string()),
3061
+ broadcast: valibot.optional(valibot.boolean())
3062
+ });
3063
+ const stacksSignTransactionRequestSchema = createRequestSchema({
3064
+ paramsSchema: stacksSignTransactionParamsSchema,
3065
+ method: stacksMethods.stx_signTransaction
3066
+ });
3067
+
3068
+ //#endregion
3069
+ //#region src/request/rpc/objects/namespaces/stacks/methods/signTransaction/response.ts
3070
+ const stacksSignTransactionResultSchema = valibot.object({ transaction: valibot.string() });
3071
+ const stacksSignTransactionSuccessResponseSchema = createSuccessResponseSchema({
3072
+ resultSchema: stacksSignTransactionResultSchema,
3073
+ method: stacksMethods.stx_signTransaction
3074
+ });
3075
+
3076
+ //#endregion
3077
+ //#region src/request/rpc/objects/namespaces/stacks/methods/signTransactions/request.ts
3078
+ const stacksSignTransactionsParamsSchema = valibot.object({
3079
+ transactions: valibot.pipe(valibot.array(valibot.pipe(valibot.string(), valibot.check((hex) => {
3080
+ return true;
3081
+ }, "Invalid hex-encoded Stacks transaction."))), valibot.minLength(1)),
3082
+ broadcast: valibot.optional(valibot.boolean())
3083
+ });
3084
+ const stacksSignTransactionsRequestSchema = createRequestSchema({
3085
+ paramsSchema: stacksSignTransactionsParamsSchema,
3086
+ method: stacksMethods.stx_signTransactions
3087
+ });
3088
+
3089
+ //#endregion
3090
+ //#region src/request/rpc/objects/namespaces/stacks/methods/signTransactions/response.ts
3091
+ const stacksSignTransactionsResultSchema = valibot.object({ transactions: valibot.array(valibot.string()) });
3092
+ const stacksSignTransactionsSuccessResponseSchema = createSuccessResponseSchema({
3093
+ resultSchema: stacksSignTransactionsResultSchema,
3094
+ method: stacksMethods.stx_signTransactions
3095
+ });
3096
+
3097
+ //#endregion
3098
+ //#region src/request/rpc/objects/namespaces/stacks/methods/transferStx/request.ts
3099
+ const stacksTransferStxParamsSchema = valibot.object({
3100
+ amount: valibot.union([valibot.number(), valibot.string()]),
3101
+ recipient: valibot.string(),
3102
+ memo: valibot.optional(valibot.string()),
3103
+ version: valibot.optional(valibot.string()),
3104
+ postConditionMode: valibot.optional(valibot.number()),
3105
+ postConditions: valibot.optional(valibot.array(valibot.string())),
3106
+ pubkey: valibot.optional(valibot.string())
3107
+ });
3108
+ const stacksTransferStxRequestSchema = createRequestSchema({
3109
+ paramsSchema: stacksTransferStxParamsSchema,
3110
+ method: stacksMethods.stx_transferStx
3111
+ });
3112
+
3113
+ //#endregion
3114
+ //#region src/request/rpc/objects/namespaces/stacks/methods/transferStx/response.ts
3115
+ const stacksTransferStxResultSchema = valibot.object({
3116
+ txid: valibot.string(),
3117
+ transaction: valibot.string()
3118
+ });
3119
+ const stacksTransferStxSuccessResponseSchema = createSuccessResponseSchema({
3120
+ resultSchema: stacksTransferStxResultSchema,
3121
+ method: stacksMethods.stx_transferStx
3122
+ });
3123
+
3124
+ //#endregion
3125
+ //#region src/request/rpc/objects/namespaces/stacks/index.ts
3126
+ const stacksRequestSchema = valibot.variant("method", [
3127
+ stacksCallContractRequestSchema,
3128
+ stacksDeployContractRequestSchema,
3129
+ stacksGetAccountsRequestSchema,
3130
+ stacksGetAddressesRequestSchema,
3131
+ stacksGetAddressesV2RequestSchema,
3132
+ stacksSignMessageRequestSchema,
3133
+ stacksSignStructuredMessageRequestSchema,
3134
+ stacksSignTransactionRequestSchema,
3135
+ stacksSignTransactionsRequestSchema,
3136
+ stacksTransferStxRequestSchema
3137
+ ]);
3138
+ const stacksSuccessResponseSchema = valibot.variant("~sats-connect-method", [
3139
+ stacksCallContractSuccessResponseSchema,
3140
+ stacksDeployContractSuccessResponseSchema,
3141
+ stacksGetAccountsSuccessResponseSchema,
3142
+ stacksGetAddressesSuccessResponseSchema,
3143
+ stacksGetAddressesV2SuccessResponseSchema,
3144
+ stacksSignMessageSuccessResponseSchema,
3145
+ stacksSignStructuredMessageSuccessResponseSchema,
3146
+ stacksSignTransactionSuccessResponseSchema,
3147
+ stacksSignTransactionsSuccessResponseSchema,
3148
+ stacksTransferStxSuccessResponseSchema
3149
+ ]);
3150
+
3151
+ //#endregion
3152
+ //#region src/request/rpc/requests.ts
3153
+ const rpcRequestSchema = valibot.variant("method", [
3154
+ bitcoinRequestSchema,
3155
+ stacksRequestSchema,
3156
+ sparkRequestSchema,
3157
+ runesRequestSchema,
3158
+ ordinalsRequestSchema,
3159
+ walletRequestSchema
3160
+ ]);
3161
+ function createRpcRequest({ method, params, id }) {
3162
+ return {
3163
+ jsonrpc: "2.0",
3164
+ method,
3165
+ params,
3166
+ id
3167
+ };
3168
+ }
3169
+
3170
+ //#endregion
3171
+ //#region src/request/rpc/responses.ts
3172
+ const rpcSuccessResponseSchema = valibot.variant("~sats-connect-method", [
3173
+ bitcoinSuccessResponseSchema,
3174
+ stacksSuccessResponseSchema,
3175
+ sparkSuccessResponseSchema,
3176
+ runesSuccessResponseSchema,
3177
+ ordinalsSuccessResponseSchema,
3178
+ walletSuccessResponseSchema
3179
+ ]);
3180
+ function createRpcSuccessResponse({ method, result, id }) {
3181
+ return {
3182
+ jsonrpc: "2.0",
3183
+ id,
3184
+ result,
3185
+ "~sats-connect-method": method
3186
+ };
3187
+ }
3188
+
3189
+ //#endregion
3190
+ //#region src/request/index.ts
3191
+ const cache = {};
3192
+ const requestInternal = async (provider, method, params) => {
3193
+ const response = await provider.request(method, params);
3194
+ if (valibot.is(specErrorResponseSchema, response)) return {
3195
+ status: "error",
3196
+ error: response.error
3197
+ };
3198
+ if (valibot.is(specSuccessWithExtensionsResponseSchema, response)) return {
3199
+ status: "success",
3200
+ result: response.result
3201
+ };
3202
+ return {
3203
+ status: "error",
3204
+ error: {
3205
+ code: RpcErrorCode.INTERNAL_ERROR,
3206
+ message: "Received unknown response from provider.",
3207
+ data: response
3208
+ }
3209
+ };
3210
+ };
3211
+ const request = async (method, params, providerId) => {
3212
+ let provider = window.XverseProviders?.BitcoinProvider || window.BitcoinProvider;
3213
+ if (providerId) provider = await getProviderById(providerId);
3214
+ if (!provider) throw new Error("no wallet provider was found");
3215
+ if (!method) throw new Error("A wallet method is required");
3216
+ if (!cache.providerInfo) {
3217
+ const infoResult = await requestInternal(provider, "getInfo", null);
3218
+ if (infoResult.status === "success") cache.providerInfo = infoResult.result;
3219
+ }
3220
+ if (cache.providerInfo) {
3221
+ if (method === "getInfo") return {
3222
+ status: "success",
3223
+ result: cache.providerInfo
3224
+ };
3225
+ const sanitized = sanitizeRequest(method, params, cache.providerInfo);
3226
+ if (sanitized.overrideResponse) return sanitized.overrideResponse;
3227
+ method = sanitized.method;
3228
+ params = sanitized.params;
3229
+ }
3230
+ return requestInternal(provider, method, params);
3231
+ };
3232
+ /**
3233
+ * Adds an event listener.
3234
+ *
3235
+ * Currently expects 2 arguments, although is also capable of handling legacy
3236
+ * calls with 3 arguments consisting of:
3237
+ *
3238
+ * - event name (string)
3239
+ * - callback (function)
3240
+ * - provider ID (optional string)
3241
+ */
3242
+ const addListener = (...rawArgs) => {
3243
+ const [listenerInfo, providerId] = (() => {
3244
+ if (rawArgs.length === 1) return [rawArgs[0], void 0];
3245
+ if (rawArgs.length === 2) if (typeof rawArgs[1] === "function") return [{
3246
+ eventName: rawArgs[0],
3247
+ cb: rawArgs[1]
3248
+ }, void 0];
3249
+ else return rawArgs;
3250
+ if (rawArgs.length === 3) return [{
3251
+ eventName: rawArgs[0],
3252
+ cb: rawArgs[1]
3253
+ }, rawArgs[2]];
3254
+ throw new Error("Unexpected number of arguments. Expecting 2 (or 3 for legacy requests).", { cause: rawArgs });
3255
+ })();
3256
+ let provider = window.XverseProviders?.BitcoinProvider || window.BitcoinProvider;
3257
+ if (providerId) provider = getProviderById(providerId);
3258
+ if (!provider) throw new Error("no wallet provider was found");
3259
+ if (!provider.addListener) {
3260
+ console.error(`The wallet provider you are using does not support the addListener method. Please update your wallet provider.`);
3261
+ return () => {};
928
3262
  }
3263
+ return provider.addListener(listenerInfo);
929
3264
  };
930
3265
 
931
3266
  //#endregion
@@ -940,182 +3275,6 @@ var XverseAdapter = class extends SatsConnectAdapter {
940
3275
  };
941
3276
  };
942
3277
 
943
- //#endregion
944
- //#region src/adapters/unisat.ts
945
- function convertSignInputsToInputType(signInputs) {
946
- let result = [];
947
- if (!signInputs) return result;
948
- for (let address in signInputs) {
949
- let indexes = signInputs[address];
950
- for (let index of indexes) result.push({
951
- index,
952
- address
953
- });
954
- }
955
- return result;
956
- }
957
- var UnisatAdapter = class extends SatsConnectAdapter {
958
- id = DefaultAdaptersInfo.unisat.id;
959
- async getAccounts(params) {
960
- const { purposes } = params;
961
- if (purposes.includes(AddressPurpose.Stacks) || purposes.includes(AddressPurpose.Starknet) || purposes.includes(AddressPurpose.Spark)) throw new Error("Only bitcoin addresses are supported");
962
- const accounts = await window.unisat.requestAccounts();
963
- const publicKey = await window.unisat.getPublicKey();
964
- const address = accounts[0];
965
- const addressType = (0, bitcoin_address_validation.getAddressInfo)(accounts[0]).type;
966
- const pk = addressType === bitcoin_address_validation.AddressType.p2tr ? publicKey.slice(2) : publicKey;
967
- const paymentAddress = {
968
- address,
969
- publicKey: pk,
970
- addressType,
971
- purpose: AddressPurpose.Payment,
972
- walletType: "software"
973
- };
974
- const ordinalsAddress = {
975
- address,
976
- publicKey: pk,
977
- addressType,
978
- purpose: AddressPurpose.Ordinals,
979
- walletType: "software"
980
- };
981
- const response = [];
982
- if (purposes.includes(AddressPurpose.Payment)) response.push({
983
- ...paymentAddress,
984
- walletType: "software"
985
- });
986
- if (purposes.includes(AddressPurpose.Ordinals)) response.push({
987
- ...ordinalsAddress,
988
- walletType: "software"
989
- });
990
- return response;
991
- }
992
- async signMessage(params) {
993
- const { message, address } = params;
994
- const addressType = (0, bitcoin_address_validation.getAddressInfo)(address).type;
995
- if ([bitcoin_address_validation.AddressType.p2wpkh, bitcoin_address_validation.AddressType.p2tr].includes(addressType)) return {
996
- address,
997
- messageHash: "",
998
- signature: await window.unisat.signMessage(message, "bip322-simple"),
999
- protocol: MessageSigningProtocols.BIP322
1000
- };
1001
- return {
1002
- address,
1003
- messageHash: "",
1004
- signature: await window.unisat.signMessage(message, "ecdsa"),
1005
- protocol: MessageSigningProtocols.ECDSA
1006
- };
1007
- }
1008
- async sendTransfer(params) {
1009
- const { recipients } = params;
1010
- if (recipients.length > 1) throw new Error("Only one recipient is supported by this wallet provider");
1011
- return { txid: await window.unisat.sendBitcoin(recipients[0].address, recipients[0].amount) };
1012
- }
1013
- async signPsbt(params) {
1014
- const { psbt, signInputs, broadcast } = params;
1015
- const psbtHex = buffer.Buffer.from(psbt, "base64").toString("hex");
1016
- const signedPsbt = await window.unisat.signPsbt(psbtHex, {
1017
- autoFinalized: broadcast,
1018
- toSignInputs: convertSignInputsToInputType(signInputs)
1019
- });
1020
- const signedPsbtBase64 = buffer.Buffer.from(signedPsbt, "hex").toString("base64");
1021
- let txid;
1022
- if (broadcast) txid = await window.unisat.pushPsbt(signedPsbt);
1023
- return {
1024
- psbt: signedPsbtBase64,
1025
- txid
1026
- };
1027
- }
1028
- requestInternal = async (method, params) => {
1029
- try {
1030
- switch (method) {
1031
- case "getAccounts": return {
1032
- status: "success",
1033
- result: await this.getAccounts(params)
1034
- };
1035
- case "sendTransfer": return {
1036
- status: "success",
1037
- result: await this.sendTransfer(params)
1038
- };
1039
- case "signMessage": return {
1040
- status: "success",
1041
- result: await this.signMessage(params)
1042
- };
1043
- case "signPsbt": return {
1044
- status: "success",
1045
- result: await this.signPsbt(params)
1046
- };
1047
- default: {
1048
- const error = {
1049
- code: RpcErrorCode.METHOD_NOT_SUPPORTED,
1050
- message: "Method not supported by the selected wallet"
1051
- };
1052
- console.error("Error calling the method", error);
1053
- return {
1054
- status: "error",
1055
- error
1056
- };
1057
- }
1058
- }
1059
- } catch (error) {
1060
- console.error("Error calling the method", error);
1061
- return {
1062
- status: "error",
1063
- error: {
1064
- code: error.code === 4001 ? RpcErrorCode.USER_REJECTION : RpcErrorCode.INTERNAL_ERROR,
1065
- message: error.message ? error.message : "Wallet method call error",
1066
- data: error
1067
- }
1068
- };
1069
- }
1070
- };
1071
- addListener = ({ eventName, cb }) => {
1072
- switch (eventName) {
1073
- case "accountChange": {
1074
- const handler = () => {
1075
- cb({ type: "accountChange" });
1076
- };
1077
- window.unisat.on("accountsChanged", handler);
1078
- return () => {
1079
- window.unisat.removeListener("accountsChanged", handler);
1080
- };
1081
- }
1082
- case "networkChange": {
1083
- const handler = () => {
1084
- cb({ type: "networkChange" });
1085
- };
1086
- window.unisat.on("networkChanged", handler);
1087
- return () => {
1088
- window.unisat.removeListener("networkChanged", handler);
1089
- };
1090
- }
1091
- default:
1092
- console.error("Event not supported by the selected wallet");
1093
- return () => {};
1094
- }
1095
- };
1096
- };
1097
-
1098
- //#endregion
1099
- //#region src/adapters/fordefi.ts
1100
- var FordefiAdapter = class extends SatsConnectAdapter {
1101
- id = DefaultAdaptersInfo.fordefi.id;
1102
- requestInternal = async (method, params) => {
1103
- const provider = getProviderById(this.id);
1104
- if (!provider) throw new Error("no wallet provider was found");
1105
- if (!method) throw new Error("A wallet method is required");
1106
- return await provider.request(method, params);
1107
- };
1108
- addListener = ({ eventName, cb }) => {
1109
- const provider = getProviderById(this.id);
1110
- if (!provider) throw new Error("no wallet provider was found");
1111
- if (!provider.addListener) {
1112
- console.error(`The wallet provider you are using does not support the addListener method. Please update your wallet provider.`);
1113
- return () => {};
1114
- }
1115
- return provider.addListener(eventName, cb);
1116
- };
1117
- };
1118
-
1119
3278
  //#endregion
1120
3279
  //#region src/adapters/BaseAdapter.ts
1121
3280
  var BaseAdapter = class extends SatsConnectAdapter {
@@ -1301,35 +3460,35 @@ const sendBtcTransaction = async (options) => {
1301
3460
  };
1302
3461
 
1303
3462
  //#endregion
1304
- //#region src/transactions/signTransaction.ts
1305
- const signTransaction = async (options) => {
3463
+ //#region src/transactions/signMultipleTransactions.ts
3464
+ const signMultipleTransactions = async (options) => {
1306
3465
  const provider = await getProviderOrThrow(options.getProvider);
1307
- const { psbtBase64, inputsToSign } = options.payload;
1308
- if (!psbtBase64) throw new Error("A value for psbtBase64 representing the tx hash is required");
1309
- if (!inputsToSign) throw new Error("An array specifying the inputs to be signed by the wallet is required");
3466
+ const { psbts } = options.payload;
3467
+ if (!psbts || !psbts.length) throw new Error("psbts array is required");
3468
+ if (psbts.length > 100) throw new Error("psbts array must contain less than 100 psbts");
1310
3469
  try {
1311
3470
  const request$1 = (0, jsontokens.createUnsecuredToken)(options.payload);
1312
- const response = await provider.signTransaction(request$1);
3471
+ const response = await provider.signMultipleTransactions(request$1);
1313
3472
  options.onFinish?.(response);
1314
3473
  } catch (error) {
1315
- console.error("[Connect] Error during sign transaction request", error);
3474
+ console.error("[Connect] Error during sign Multiple transactions request", error);
1316
3475
  options.onCancel?.();
1317
3476
  }
1318
3477
  };
1319
3478
 
1320
3479
  //#endregion
1321
- //#region src/transactions/signMultipleTransactions.ts
1322
- const signMultipleTransactions = async (options) => {
3480
+ //#region src/transactions/signTransaction.ts
3481
+ const signTransaction = async (options) => {
1323
3482
  const provider = await getProviderOrThrow(options.getProvider);
1324
- const { psbts } = options.payload;
1325
- if (!psbts || !psbts.length) throw new Error("psbts array is required");
1326
- if (psbts.length > 100) throw new Error("psbts array must contain less than 100 psbts");
3483
+ const { psbtBase64, inputsToSign } = options.payload;
3484
+ if (!psbtBase64) throw new Error("A value for psbtBase64 representing the tx hash is required");
3485
+ if (!inputsToSign) throw new Error("An array specifying the inputs to be signed by the wallet is required");
1327
3486
  try {
1328
3487
  const request$1 = (0, jsontokens.createUnsecuredToken)(options.payload);
1329
- const response = await provider.signMultipleTransactions(request$1);
3488
+ const response = await provider.signTransaction(request$1);
1330
3489
  options.onFinish?.(response);
1331
3490
  } catch (error) {
1332
- console.error("[Connect] Error during sign Multiple transactions request", error);
3491
+ console.error("[Connect] Error during sign transaction request", error);
1333
3492
  options.onCancel?.();
1334
3493
  }
1335
3494
  };
@@ -1337,23 +3496,136 @@ const signMultipleTransactions = async (options) => {
1337
3496
  //#endregion
1338
3497
  exports.AddressPurpose = AddressPurpose;
1339
3498
  exports.AddressType = AddressType;
3499
+ Object.defineProperty(exports, 'AllResolvedNetworks', {
3500
+ enumerable: true,
3501
+ get: function () {
3502
+ return AllResolvedNetworks;
3503
+ }
3504
+ });
1340
3505
  exports.BaseAdapter = BaseAdapter;
3506
+ Object.defineProperty(exports, 'BitcoinNetworkConfigurationOptions', {
3507
+ enumerable: true,
3508
+ get: function () {
3509
+ return BitcoinNetworkConfigurationOptions;
3510
+ }
3511
+ });
1341
3512
  exports.BitcoinNetworkType = BitcoinNetworkType;
1342
3513
  exports.DefaultAdaptersInfo = DefaultAdaptersInfo;
1343
3514
  exports.MessageSigningProtocols = MessageSigningProtocols;
3515
+ Object.defineProperty(exports, 'NetworkConfigurationOptions', {
3516
+ enumerable: true,
3517
+ get: function () {
3518
+ return NetworkConfigurationOptions;
3519
+ }
3520
+ });
3521
+ Object.defineProperty(exports, 'PermissionWithoutClientId', {
3522
+ enumerable: true,
3523
+ get: function () {
3524
+ return PermissionWithoutClientId;
3525
+ }
3526
+ });
1344
3527
  exports.ProviderPlatform = ProviderPlatform;
1345
3528
  exports.RpcErrorCode = RpcErrorCode;
1346
- exports.RpcIdSchema = RpcIdSchema;
1347
3529
  exports.SatsConnectAdapter = SatsConnectAdapter;
3530
+ Object.defineProperty(exports, 'SparkNetworkConfigurationOptions', {
3531
+ enumerable: true,
3532
+ get: function () {
3533
+ return SparkNetworkConfigurationOptions;
3534
+ }
3535
+ });
1348
3536
  exports.SparkNetworkType = SparkNetworkType;
3537
+ Object.defineProperty(exports, 'StacksNetworkConfigurationOptions', {
3538
+ enumerable: true,
3539
+ get: function () {
3540
+ return StacksNetworkConfigurationOptions;
3541
+ }
3542
+ });
1349
3543
  exports.StacksNetworkType = StacksNetworkType;
3544
+ Object.defineProperty(exports, 'StarknetNetworkConfigurationOptions', {
3545
+ enumerable: true,
3546
+ get: function () {
3547
+ return StarknetNetworkConfigurationOptions;
3548
+ }
3549
+ });
1350
3550
  exports.StarknetNetworkType = StarknetNetworkType;
1351
3551
  exports.accountChangeEventName = accountChangeEventName;
1352
3552
  exports.accountChangeSchema = accountChangeSchema;
1353
3553
  exports.addListener = addListener;
1354
3554
  exports.addressSchema = addressSchema;
3555
+ exports.allResolvedNetworksSchema = allResolvedNetworksSchema;
3556
+ exports.bitcoinGetAccountsParamsSchema = bitcoinGetAccountsParamsSchema;
3557
+ exports.bitcoinGetAccountsRequestSchema = bitcoinGetAccountsRequestSchema;
3558
+ exports.bitcoinGetAccountsResultSchema = bitcoinGetAccountsResultSchema;
3559
+ exports.bitcoinGetAccountsSuccessResponseSchema = bitcoinGetAccountsSuccessResponseSchema;
3560
+ exports.bitcoinGetAccountsV2ParamsSchema = bitcoinGetAccountsV2ParamsSchema;
3561
+ exports.bitcoinGetAccountsV2RequestSchema = bitcoinGetAccountsV2RequestSchema;
3562
+ exports.bitcoinGetAccountsV2ResultSchema = bitcoinGetAccountsV2ResultSchema;
3563
+ exports.bitcoinGetAccountsV2SuccessResponseSchema = bitcoinGetAccountsV2SuccessResponseSchema;
3564
+ exports.bitcoinGetAddressesParamsSchema = bitcoinGetAddressesParamsSchema;
3565
+ exports.bitcoinGetAddressesRequestSchema = bitcoinGetAddressesRequestSchema;
3566
+ exports.bitcoinGetAddressesResultSchema = bitcoinGetAddressesResultSchema;
3567
+ exports.bitcoinGetAddressesSuccessResponseSchema = bitcoinGetAddressesSuccessResponseSchema;
3568
+ exports.bitcoinGetAddressesV2ParamsSchema = bitcoinGetAddressesV2ParamsSchema;
3569
+ exports.bitcoinGetAddressesV2RequestSchema = bitcoinGetAddressesV2RequestSchema;
3570
+ exports.bitcoinGetAddressesV2ResultSchema = bitcoinGetAddressesV2ResultSchema;
3571
+ exports.bitcoinGetAddressesV2SuccessResponseSchema = bitcoinGetAddressesV2SuccessResponseSchema;
3572
+ exports.bitcoinGetBalanceParamsSchema = bitcoinGetBalanceParamsSchema;
3573
+ exports.bitcoinGetBalanceRequestSchema = bitcoinGetBalanceRequestSchema;
3574
+ exports.bitcoinGetBalanceResultSchema = bitcoinGetBalanceResultSchema;
3575
+ exports.bitcoinGetBalanceSuccessResponseSchema = bitcoinGetBalanceSuccessResponseSchema;
3576
+ exports.bitcoinGetBalanceV2ParamsSchema = bitcoinGetBalanceV2ParamsSchema;
3577
+ exports.bitcoinGetBalanceV2RequestSchema = bitcoinGetBalanceV2RequestSchema;
3578
+ exports.bitcoinGetBalanceV2ResultSchema = bitcoinGetBalanceV2ResultSchema;
3579
+ exports.bitcoinGetBalanceV2SuccessResponseSchema = bitcoinGetBalanceV2SuccessResponseSchema;
3580
+ exports.bitcoinGetInfoParamsSchema = bitcoinGetInfoParamsSchema;
3581
+ exports.bitcoinGetInfoRequestSchema = bitcoinGetInfoRequestSchema;
3582
+ exports.bitcoinGetInfoResultSchema = bitcoinGetInfoResultSchema;
3583
+ exports.bitcoinGetInfoSuccessResponseSchema = bitcoinGetInfoSuccessResponseSchema;
3584
+ exports.bitcoinGetInfoV2ParamsSchema = bitcoinGetInfoV2ParamsSchema;
3585
+ exports.bitcoinGetInfoV2RequestSchema = bitcoinGetInfoV2RequestSchema;
3586
+ exports.bitcoinGetInfoV2ResultSchema = bitcoinGetInfoV2ResultSchema;
3587
+ exports.bitcoinGetInfoV2SuccessResponseSchema = bitcoinGetInfoV2SuccessResponseSchema;
3588
+ exports.bitcoinMethods = bitcoinMethods;
3589
+ exports.bitcoinModeToLegacyBitcoinNetworkType = bitcoinModeToLegacyBitcoinNetworkType;
3590
+ exports.bitcoinNetworkConfigurationOptionsSchema = bitcoinNetworkConfigurationOptionsSchema;
3591
+ exports.bitcoinRequestSchema = bitcoinRequestSchema;
3592
+ exports.bitcoinSendTransferParamsSchema = bitcoinSendTransferParamsSchema;
3593
+ exports.bitcoinSendTransferRequestSchema = bitcoinSendTransferRequestSchema;
3594
+ exports.bitcoinSendTransferResultSchema = bitcoinSendTransferResultSchema;
3595
+ exports.bitcoinSendTransferSuccessResponseSchema = bitcoinSendTransferSuccessResponseSchema;
3596
+ exports.bitcoinSendTransferV2ParamsSchema = bitcoinSendTransferV2ParamsSchema;
3597
+ exports.bitcoinSendTransferV2RequestSchema = bitcoinSendTransferV2RequestSchema;
3598
+ exports.bitcoinSendTransferV2ResultSchema = bitcoinSendTransferV2ResultSchema;
3599
+ exports.bitcoinSendTransferV2SuccessResponseSchema = bitcoinSendTransferV2SuccessResponseSchema;
3600
+ exports.bitcoinSignMessageParamsSchema = bitcoinSignMessageParamsSchema;
3601
+ exports.bitcoinSignMessageRequestSchema = bitcoinSignMessageRequestSchema;
3602
+ exports.bitcoinSignMessageResultSchema = bitcoinSignMessageResultSchema;
3603
+ exports.bitcoinSignMessageSuccessResponseSchema = bitcoinSignMessageSuccessResponseSchema;
3604
+ exports.bitcoinSignMessageV2ParamsSchema = bitcoinSignMessageV2ParamsSchema;
3605
+ exports.bitcoinSignMessageV2RequestSchema = bitcoinSignMessageV2RequestSchema;
3606
+ exports.bitcoinSignMessageV2ResultSchema = bitcoinSignMessageV2ResultSchema;
3607
+ exports.bitcoinSignMessageV2SuccessResponseSchema = bitcoinSignMessageV2SuccessResponseSchema;
3608
+ exports.bitcoinSignMultipleMessagesParamsSchema = bitcoinSignMultipleMessagesParamsSchema;
3609
+ exports.bitcoinSignMultipleMessagesRequestSchema = bitcoinSignMultipleMessagesRequestSchema;
3610
+ exports.bitcoinSignMultipleMessagesResultSchema = bitcoinSignMultipleMessagesResultSchema;
3611
+ exports.bitcoinSignMultipleMessagesSuccessResponseSchema = bitcoinSignMultipleMessagesSuccessResponseSchema;
3612
+ exports.bitcoinSignMultipleMessagesV2ParamsSchema = bitcoinSignMultipleMessagesV2ParamsSchema;
3613
+ exports.bitcoinSignMultipleMessagesV2RequestSchema = bitcoinSignMultipleMessagesV2RequestSchema;
3614
+ exports.bitcoinSignMultipleMessagesV2ResultSchema = bitcoinSignMultipleMessagesV2ResultSchema;
3615
+ exports.bitcoinSignMultipleMessagesV2SuccessResponseSchema = bitcoinSignMultipleMessagesV2SuccessResponseSchema;
3616
+ exports.bitcoinSignPsbtParamsSchema = bitcoinSignPsbtParamsSchema;
3617
+ exports.bitcoinSignPsbtRequestSchema = bitcoinSignPsbtRequestSchema;
3618
+ exports.bitcoinSignPsbtResultSchema = bitcoinSignPsbtResultSchema;
3619
+ exports.bitcoinSignPsbtSuccessResponseSchema = bitcoinSignPsbtSuccessResponseSchema;
3620
+ exports.bitcoinSignPsbtV2ParamsSchema = bitcoinSignPsbtV2ParamsSchema;
3621
+ exports.bitcoinSignPsbtV2RequestSchema = bitcoinSignPsbtV2RequestSchema;
3622
+ exports.bitcoinSignPsbtV2ResultSchema = bitcoinSignPsbtV2ResultSchema;
3623
+ exports.bitcoinSignPsbtV2SuccessResponseSchema = bitcoinSignPsbtV2SuccessResponseSchema;
3624
+ exports.bitcoinSuccessResponseSchema = bitcoinSuccessResponseSchema;
1355
3625
  exports.createInscription = createInscription;
1356
3626
  exports.createRepeatInscriptions = createRepeatInscriptions;
3627
+ exports.createRpcRequest = createRpcRequest;
3628
+ exports.createRpcSuccessResponse = createRpcSuccessResponse;
1357
3629
  exports.defaultAdapters = defaultAdapters;
1358
3630
  exports.disconnectEventName = disconnectEventName;
1359
3631
  exports.disconnectSchema = disconnectSchema;
@@ -1365,19 +3637,258 @@ exports.getProviderOrThrow = getProviderOrThrow;
1365
3637
  exports.getProviders = getProviders;
1366
3638
  exports.getSupportedWallets = getSupportedWallets;
1367
3639
  exports.isProviderInstalled = isProviderInstalled;
3640
+ exports.methodSupport = methodSupport;
1368
3641
  exports.networkChangeEventName = networkChangeEventName;
1369
3642
  exports.networkChangeEventNameV2 = networkChangeEventNameV2;
1370
3643
  exports.networkChangeSchema = networkChangeSchema;
1371
3644
  exports.networkChangeV2Schema = networkChangeV2Schema;
3645
+ exports.networkConfigurationOptionsSchema = networkConfigurationOptionsSchema;
3646
+ exports.ordinalsGetInscriptionsParamsSchema = ordinalsGetInscriptionsParamsSchema;
3647
+ exports.ordinalsGetInscriptionsRequestSchema = ordinalsGetInscriptionsRequestSchema;
3648
+ exports.ordinalsGetInscriptionsResultSchema = ordinalsGetInscriptionsResultSchema;
3649
+ exports.ordinalsGetInscriptionsSuccessResponseSchema = ordinalsGetInscriptionsSuccessResponseSchema;
3650
+ exports.ordinalsMethods = ordinalsMethods;
3651
+ exports.ordinalsRequestSchema = ordinalsRequestSchema;
3652
+ exports.ordinalsSendInscriptionsParamsSchema = ordinalsSendInscriptionsParamsSchema;
3653
+ exports.ordinalsSendInscriptionsRequestSchema = ordinalsSendInscriptionsRequestSchema;
3654
+ exports.ordinalsSendInscriptionsResultSchema = ordinalsSendInscriptionsResultSchema;
3655
+ exports.ordinalsSendInscriptionsSuccessResponseSchema = ordinalsSendInscriptionsSuccessResponseSchema;
3656
+ exports.ordinalsSuccessResponseSchema = ordinalsSuccessResponseSchema;
3657
+ exports.permissionRequestParamsSchema = permissionRequestParamsSchema;
1372
3658
  exports.removeDefaultProvider = removeDefaultProvider;
1373
3659
  exports.request = request;
1374
- exports.rpcErrorResponseMessageSchema = rpcErrorResponseMessageSchema;
1375
- exports.rpcRequestMessageSchema = rpcRequestMessageSchema;
1376
- exports.rpcResponseMessageSchema = rpcResponseMessageSchema;
1377
- exports.rpcSuccessResponseMessageSchema = rpcSuccessResponseMessageSchema;
3660
+ exports.rpcIdSchema = rpcIdSchema;
3661
+ exports.rpcRequestSchema = rpcRequestSchema;
3662
+ exports.rpcSuccessResponseSchema = rpcSuccessResponseSchema;
3663
+ exports.runesEstimateEtchParamsSchema = runesEstimateEtchParamsSchema;
3664
+ exports.runesEstimateEtchRequestSchema = runesEstimateEtchRequestSchema;
3665
+ exports.runesEstimateEtchResultSchema = runesEstimateEtchResultSchema;
3666
+ exports.runesEstimateEtchSuccessResponseSchema = runesEstimateEtchSuccessResponseSchema;
3667
+ exports.runesEstimateMintParamsSchema = runesEstimateMintParamsSchema;
3668
+ exports.runesEstimateMintRequestSchema = runesEstimateMintRequestSchema;
3669
+ exports.runesEstimateMintResultSchema = runesEstimateMintResultSchema;
3670
+ exports.runesEstimateMintSuccessResponseSchema = runesEstimateMintSuccessResponseSchema;
3671
+ exports.runesEstimateRbfOrderParamsSchema = runesEstimateRbfOrderParamsSchema;
3672
+ exports.runesEstimateRbfOrderRequestSchema = runesEstimateRbfOrderRequestSchema;
3673
+ exports.runesEstimateRbfOrderResultSchema = runesEstimateRbfOrderResultSchema;
3674
+ exports.runesEstimateRbfOrderSuccessResponseSchema = runesEstimateRbfOrderSuccessResponseSchema;
3675
+ exports.runesEtchParamsSchema = runesEtchParamsSchema;
3676
+ exports.runesEtchRequestSchema = runesEtchRequestSchema;
3677
+ exports.runesEtchResultSchema = runesEtchResultSchema;
3678
+ exports.runesEtchSuccessResponseSchema = runesEtchSuccessResponseSchema;
3679
+ exports.runesGetBalanceParamsSchema = runesGetBalanceParamsSchema;
3680
+ exports.runesGetBalanceRequestSchema = runesGetBalanceRequestSchema;
3681
+ exports.runesGetBalanceResultSchema = runesGetBalanceResultSchema;
3682
+ exports.runesGetBalanceSuccessResponseSchema = runesGetBalanceSuccessResponseSchema;
3683
+ exports.runesGetOrderParamsSchema = runesGetOrderParamsSchema;
3684
+ exports.runesGetOrderRequestSchema = runesGetOrderRequestSchema;
3685
+ exports.runesGetOrderResultSchema = runesGetOrderResultSchema;
3686
+ exports.runesGetOrderSuccessResponseSchema = runesGetOrderSuccessResponseSchema;
3687
+ exports.runesMethods = runesMethods;
3688
+ exports.runesMintParamsSchema = runesMintParamsSchema;
3689
+ exports.runesMintRequestSchema = runesMintRequestSchema;
3690
+ exports.runesMintResultSchema = runesMintResultSchema;
3691
+ exports.runesMintSuccessResponseSchema = runesMintSuccessResponseSchema;
3692
+ exports.runesRbfOrderParamsSchema = runesRbfOrderParamsSchema;
3693
+ exports.runesRbfOrderRequestSchema = runesRbfOrderRequestSchema;
3694
+ exports.runesRbfOrderResultSchema = runesRbfOrderResultSchema;
3695
+ exports.runesRbfOrderSuccessResponseSchema = runesRbfOrderSuccessResponseSchema;
3696
+ exports.runesRequestSchema = runesRequestSchema;
3697
+ exports.runesSuccessResponseSchema = runesSuccessResponseSchema;
3698
+ exports.runesTransferParamsSchema = runesTransferParamsSchema;
3699
+ exports.runesTransferRequestSchema = runesTransferRequestSchema;
3700
+ exports.runesTransferResultSchema = runesTransferResultSchema;
3701
+ exports.runesTransferSuccessResponseSchema = runesTransferSuccessResponseSchema;
1378
3702
  exports.sendBtcTransaction = sendBtcTransaction;
1379
3703
  exports.setDefaultProvider = setDefaultProvider;
1380
3704
  exports.signMessage = signMessage;
1381
3705
  exports.signMultipleTransactions = signMultipleTransactions;
1382
3706
  exports.signTransaction = signTransaction;
1383
- exports.walletEventSchema = walletEventSchema;
3707
+ exports.sparkFlashnetClawbackFundsParamsSchema = sparkFlashnetClawbackFundsParamsSchema;
3708
+ exports.sparkFlashnetClawbackFundsRequestSchema = sparkFlashnetClawbackFundsRequestSchema;
3709
+ exports.sparkFlashnetClawbackFundsResultSchema = sparkFlashnetClawbackFundsResultSchema;
3710
+ exports.sparkFlashnetClawbackFundsSuccessResponseSchema = sparkFlashnetClawbackFundsSuccessResponseSchema;
3711
+ exports.sparkFlashnetExecuteRouteSwapParamsSchema = sparkFlashnetExecuteRouteSwapParamsSchema;
3712
+ exports.sparkFlashnetExecuteRouteSwapRequestSchema = sparkFlashnetExecuteRouteSwapRequestSchema;
3713
+ exports.sparkFlashnetExecuteRouteSwapResultSchema = sparkFlashnetExecuteRouteSwapResultSchema;
3714
+ exports.sparkFlashnetExecuteRouteSwapSuccessResponseSchema = sparkFlashnetExecuteRouteSwapSuccessResponseSchema;
3715
+ exports.sparkFlashnetExecuteSwapParamsSchema = sparkFlashnetExecuteSwapParamsSchema;
3716
+ exports.sparkFlashnetExecuteSwapRequestSchema = sparkFlashnetExecuteSwapRequestSchema;
3717
+ exports.sparkFlashnetExecuteSwapResultSchema = sparkFlashnetExecuteSwapResultSchema;
3718
+ exports.sparkFlashnetExecuteSwapSuccessResponseSchema = sparkFlashnetExecuteSwapSuccessResponseSchema;
3719
+ exports.sparkFlashnetGetJwtParamsSchema = sparkFlashnetGetJwtParamsSchema;
3720
+ exports.sparkFlashnetGetJwtRequestSchema = sparkFlashnetGetJwtRequestSchema;
3721
+ exports.sparkFlashnetGetJwtResultSchema = sparkFlashnetGetJwtResultSchema;
3722
+ exports.sparkFlashnetGetJwtSuccessResponseSchema = sparkFlashnetGetJwtSuccessResponseSchema;
3723
+ exports.sparkFlashnetSignIntentParamsSchema = sparkFlashnetSignIntentParamsSchema;
3724
+ exports.sparkFlashnetSignIntentRequestSchema = sparkFlashnetSignIntentRequestSchema;
3725
+ exports.sparkFlashnetSignIntentResultSchema = sparkFlashnetSignIntentResultSchema;
3726
+ exports.sparkFlashnetSignIntentSuccessResponseSchema = sparkFlashnetSignIntentSuccessResponseSchema;
3727
+ exports.sparkFlashnetSignStructuredMessageParamsSchema = sparkFlashnetSignStructuredMessageParamsSchema;
3728
+ exports.sparkFlashnetSignStructuredMessageRequestSchema = sparkFlashnetSignStructuredMessageRequestSchema;
3729
+ exports.sparkFlashnetSignStructuredMessageResultSchema = sparkFlashnetSignStructuredMessageResultSchema;
3730
+ exports.sparkFlashnetSignStructuredMessageSuccessResponseSchema = sparkFlashnetSignStructuredMessageSuccessResponseSchema;
3731
+ exports.sparkGetAddressesParamsSchema = sparkGetAddressesParamsSchema;
3732
+ exports.sparkGetAddressesRequestSchema = sparkGetAddressesRequestSchema;
3733
+ exports.sparkGetAddressesResultSchema = sparkGetAddressesResultSchema;
3734
+ exports.sparkGetAddressesSuccessResponseSchema = sparkGetAddressesSuccessResponseSchema;
3735
+ exports.sparkGetAddressesV2ParamsSchema = sparkGetAddressesV2ParamsSchema;
3736
+ exports.sparkGetAddressesV2RequestSchema = sparkGetAddressesV2RequestSchema;
3737
+ exports.sparkGetAddressesV2ResultSchema = sparkGetAddressesV2ResultSchema;
3738
+ exports.sparkGetAddressesV2SuccessResponseSchema = sparkGetAddressesV2SuccessResponseSchema;
3739
+ exports.sparkGetBalanceParamsSchema = sparkGetBalanceParamsSchema;
3740
+ exports.sparkGetBalanceRequestSchema = sparkGetBalanceRequestSchema;
3741
+ exports.sparkGetBalanceResultSchema = sparkGetBalanceResultSchema;
3742
+ exports.sparkGetBalanceSuccessResponseSchema = sparkGetBalanceSuccessResponseSchema;
3743
+ exports.sparkGetClawbackEligibleTransfersParamsSchema = sparkGetClawbackEligibleTransfersParamsSchema;
3744
+ exports.sparkGetClawbackEligibleTransfersRequestSchema = sparkGetClawbackEligibleTransfersRequestSchema;
3745
+ exports.sparkGetClawbackEligibleTransfersResultSchema = sparkGetClawbackEligibleTransfersResultSchema;
3746
+ exports.sparkGetClawbackEligibleTransfersSuccessResponseSchema = sparkGetClawbackEligibleTransfersSuccessResponseSchema;
3747
+ exports.sparkMethods = sparkMethods;
3748
+ exports.sparkModeToLegacySparkNetworkType = sparkModeToLegacySparkNetworkType;
3749
+ exports.sparkNetworkConfigurationOptionsSchema = sparkNetworkConfigurationOptionsSchema;
3750
+ exports.sparkRequestSchema = sparkRequestSchema;
3751
+ exports.sparkSignMessageParamsSchema = sparkSignMessageParamsSchema;
3752
+ exports.sparkSignMessageRequestSchema = sparkSignMessageRequestSchema;
3753
+ exports.sparkSignMessageResultSchema = sparkSignMessageResultSchema;
3754
+ exports.sparkSignMessageSuccessResponseSchema = sparkSignMessageSuccessResponseSchema;
3755
+ exports.sparkSuccessResponseSchema = sparkSuccessResponseSchema;
3756
+ exports.sparkTransferParamsSchema = sparkTransferParamsSchema;
3757
+ exports.sparkTransferRequestSchema = sparkTransferRequestSchema;
3758
+ exports.sparkTransferResultSchema = sparkTransferResultSchema;
3759
+ exports.sparkTransferSuccessResponseSchema = sparkTransferSuccessResponseSchema;
3760
+ exports.sparkTransferTokenParamsSchema = sparkTransferTokenParamsSchema;
3761
+ exports.sparkTransferTokenRequestSchema = sparkTransferTokenRequestSchema;
3762
+ exports.sparkTransferTokenResultSchema = sparkTransferTokenResultSchema;
3763
+ exports.sparkTransferTokenSuccessResponseSchema = sparkTransferTokenSuccessResponseSchema;
3764
+ exports.specErrorObjectSchema = specErrorObjectSchema;
3765
+ exports.specErrorResponseSchema = specErrorResponseSchema;
3766
+ exports.specIdSchema = specIdSchema;
3767
+ exports.specRequestSchema = specRequestSchema;
3768
+ exports.specResponseSchema = specResponseSchema;
3769
+ exports.specSuccessResponseSchema = specSuccessResponseSchema;
3770
+ exports.specSuccessWithExtensionsResponseSchema = specSuccessWithExtensionsResponseSchema;
3771
+ exports.stacksCallContractParamsSchema = stacksCallContractParamsSchema;
3772
+ exports.stacksCallContractRequestSchema = stacksCallContractRequestSchema;
3773
+ exports.stacksCallContractResultSchema = stacksCallContractResultSchema;
3774
+ exports.stacksCallContractSuccessResponseSchema = stacksCallContractSuccessResponseSchema;
3775
+ exports.stacksDeployContractParamsSchema = stacksDeployContractParamsSchema;
3776
+ exports.stacksDeployContractRequestSchema = stacksDeployContractRequestSchema;
3777
+ exports.stacksDeployContractResultSchema = stacksDeployContractResultSchema;
3778
+ exports.stacksDeployContractSuccessResponseSchema = stacksDeployContractSuccessResponseSchema;
3779
+ exports.stacksGetAccountsParamsSchema = stacksGetAccountsParamsSchema;
3780
+ exports.stacksGetAccountsRequestSchema = stacksGetAccountsRequestSchema;
3781
+ exports.stacksGetAccountsResultSchema = stacksGetAccountsResultSchema;
3782
+ exports.stacksGetAccountsSuccessResponseSchema = stacksGetAccountsSuccessResponseSchema;
3783
+ exports.stacksGetAddressesParamsSchema = stacksGetAddressesParamsSchema;
3784
+ exports.stacksGetAddressesRequestSchema = stacksGetAddressesRequestSchema;
3785
+ exports.stacksGetAddressesResultSchema = stacksGetAddressesResultSchema;
3786
+ exports.stacksGetAddressesSuccessResponseSchema = stacksGetAddressesSuccessResponseSchema;
3787
+ exports.stacksGetAddressesV2ParamsSchema = stacksGetAddressesV2ParamsSchema;
3788
+ exports.stacksGetAddressesV2RequestSchema = stacksGetAddressesV2RequestSchema;
3789
+ exports.stacksGetAddressesV2ResultSchema = stacksGetAddressesV2ResultSchema;
3790
+ exports.stacksGetAddressesV2SuccessResponseSchema = stacksGetAddressesV2SuccessResponseSchema;
3791
+ exports.stacksMethods = stacksMethods;
3792
+ exports.stacksModeToLegacyStacksNetworkType = stacksModeToLegacyStacksNetworkType;
3793
+ exports.stacksNetworkConfigurationOptionsSchema = stacksNetworkConfigurationOptionsSchema;
3794
+ exports.stacksRequestSchema = stacksRequestSchema;
3795
+ exports.stacksSignMessageParamsSchema = stacksSignMessageParamsSchema;
3796
+ exports.stacksSignMessageRequestSchema = stacksSignMessageRequestSchema;
3797
+ exports.stacksSignMessageResultSchema = stacksSignMessageResultSchema;
3798
+ exports.stacksSignMessageSuccessResponseSchema = stacksSignMessageSuccessResponseSchema;
3799
+ exports.stacksSignStructuredMessageParamsSchema = stacksSignStructuredMessageParamsSchema;
3800
+ exports.stacksSignStructuredMessageRequestSchema = stacksSignStructuredMessageRequestSchema;
3801
+ exports.stacksSignStructuredMessageResultSchema = stacksSignStructuredMessageResultSchema;
3802
+ exports.stacksSignStructuredMessageSuccessResponseSchema = stacksSignStructuredMessageSuccessResponseSchema;
3803
+ exports.stacksSignTransactionParamsSchema = stacksSignTransactionParamsSchema;
3804
+ exports.stacksSignTransactionRequestSchema = stacksSignTransactionRequestSchema;
3805
+ exports.stacksSignTransactionResultSchema = stacksSignTransactionResultSchema;
3806
+ exports.stacksSignTransactionSuccessResponseSchema = stacksSignTransactionSuccessResponseSchema;
3807
+ exports.stacksSignTransactionsParamsSchema = stacksSignTransactionsParamsSchema;
3808
+ exports.stacksSignTransactionsRequestSchema = stacksSignTransactionsRequestSchema;
3809
+ exports.stacksSignTransactionsResultSchema = stacksSignTransactionsResultSchema;
3810
+ exports.stacksSignTransactionsSuccessResponseSchema = stacksSignTransactionsSuccessResponseSchema;
3811
+ exports.stacksSuccessResponseSchema = stacksSuccessResponseSchema;
3812
+ exports.stacksTransferStxParamsSchema = stacksTransferStxParamsSchema;
3813
+ exports.stacksTransferStxRequestSchema = stacksTransferStxRequestSchema;
3814
+ exports.stacksTransferStxResultSchema = stacksTransferStxResultSchema;
3815
+ exports.stacksTransferStxSuccessResponseSchema = stacksTransferStxSuccessResponseSchema;
3816
+ exports.starknetNetworkConfigurationOptionsSchema = starknetNetworkConfigurationOptionsSchema;
3817
+ exports.walletAddNetworkParamsSchema = walletAddNetworkParamsSchema;
3818
+ exports.walletAddNetworkRequestSchema = walletAddNetworkRequestSchema;
3819
+ exports.walletAddNetworkResultSchema = walletAddNetworkResultSchema;
3820
+ exports.walletAddNetworkSuccessResponseSchema = walletAddNetworkSuccessResponseSchema;
3821
+ exports.walletAddNetworkV2ParamsSchema = walletAddNetworkV2ParamsSchema;
3822
+ exports.walletAddNetworkV2RequestSchema = walletAddNetworkV2RequestSchema;
3823
+ exports.walletAddNetworkV2ResultSchema = walletAddNetworkV2ResultSchema;
3824
+ exports.walletAddNetworkV2SuccessResponseSchema = walletAddNetworkV2SuccessResponseSchema;
3825
+ exports.walletChangeNetworkByIdParamsSchema = walletChangeNetworkByIdParamsSchema;
3826
+ exports.walletChangeNetworkByIdRequestSchema = walletChangeNetworkByIdRequestSchema;
3827
+ exports.walletChangeNetworkByIdResultSchema = walletChangeNetworkByIdResultSchema;
3828
+ exports.walletChangeNetworkByIdSuccessResponseSchema = walletChangeNetworkByIdSuccessResponseSchema;
3829
+ exports.walletChangeNetworkParamsSchema = walletChangeNetworkParamsSchema;
3830
+ exports.walletChangeNetworkRequestSchema = walletChangeNetworkRequestSchema;
3831
+ exports.walletChangeNetworkResultSchema = walletChangeNetworkResultSchema;
3832
+ exports.walletChangeNetworkSuccessResponseSchema = walletChangeNetworkSuccessResponseSchema;
3833
+ exports.walletConnectParamsSchema = walletConnectParamsSchema;
3834
+ exports.walletConnectRequestSchema = walletConnectRequestSchema;
3835
+ exports.walletConnectResultSchema = walletConnectResultSchema;
3836
+ exports.walletConnectSuccessResponseSchema = walletConnectSuccessResponseSchema;
3837
+ exports.walletConnectV2ParamsSchema = walletConnectV2ParamsSchema;
3838
+ exports.walletConnectV2RequestSchema = walletConnectV2RequestSchema;
3839
+ exports.walletConnectV2ResultSchema = walletConnectV2ResultSchema;
3840
+ exports.walletConnectV2SuccessResponseSchema = walletConnectV2SuccessResponseSchema;
3841
+ exports.walletDisconnectParamsSchema = walletDisconnectParamsSchema;
3842
+ exports.walletDisconnectRequestSchema = walletDisconnectRequestSchema;
3843
+ exports.walletDisconnectResultSchema = walletDisconnectResultSchema;
3844
+ exports.walletDisconnectSuccessResponseSchema = walletDisconnectSuccessResponseSchema;
3845
+ exports.walletEventSchema = walletEventSchema;
3846
+ exports.walletGetAccountParamsSchema = walletGetAccountParamsSchema;
3847
+ exports.walletGetAccountRequestSchema = walletGetAccountRequestSchema;
3848
+ exports.walletGetAccountResultSchema = walletGetAccountResultSchema;
3849
+ exports.walletGetAccountSuccessResponseSchema = walletGetAccountSuccessResponseSchema;
3850
+ exports.walletGetAccountV2ParamsSchema = walletGetAccountV2ParamsSchema;
3851
+ exports.walletGetAccountV2RequestSchema = walletGetAccountV2RequestSchema;
3852
+ exports.walletGetAccountV2ResultSchema = walletGetAccountV2ResultSchema;
3853
+ exports.walletGetAccountV2SuccessResponseSchema = walletGetAccountV2SuccessResponseSchema;
3854
+ exports.walletGetCurrentPermissionsParamsSchema = walletGetCurrentPermissionsParamsSchema;
3855
+ exports.walletGetCurrentPermissionsRequestSchema = walletGetCurrentPermissionsRequestSchema;
3856
+ exports.walletGetCurrentPermissionsResultSchema = walletGetCurrentPermissionsResultSchema;
3857
+ exports.walletGetCurrentPermissionsSuccessResponseSchema = walletGetCurrentPermissionsSuccessResponseSchema;
3858
+ exports.walletGetNetworkParamsSchema = walletGetNetworkParamsSchema;
3859
+ exports.walletGetNetworkRequestSchema = walletGetNetworkRequestSchema;
3860
+ exports.walletGetNetworkResultSchema = walletGetNetworkResultSchema;
3861
+ exports.walletGetNetworkSuccessResponseSchema = walletGetNetworkSuccessResponseSchema;
3862
+ exports.walletGetNetworksParamsSchema = walletGetNetworksParamsSchema;
3863
+ exports.walletGetNetworksRequestSchema = walletGetNetworksRequestSchema;
3864
+ exports.walletGetNetworksResultSchema = walletGetNetworksResultSchema;
3865
+ exports.walletGetNetworksSuccessResponseSchema = walletGetNetworksSuccessResponseSchema;
3866
+ exports.walletGetWalletTypeParamsSchema = walletGetWalletTypeParamsSchema;
3867
+ exports.walletGetWalletTypeRequestSchema = walletGetWalletTypeRequestSchema;
3868
+ exports.walletGetWalletTypeResultSchema = walletGetWalletTypeResultSchema;
3869
+ exports.walletGetWalletTypeSuccessResponseSchema = walletGetWalletTypeSuccessResponseSchema;
3870
+ exports.walletMethods = walletMethods;
3871
+ exports.walletOpenBridgeParamsSchema = walletOpenBridgeParamsSchema;
3872
+ exports.walletOpenBridgeRequestSchema = walletOpenBridgeRequestSchema;
3873
+ exports.walletOpenBridgeResultSchema = walletOpenBridgeResultSchema;
3874
+ exports.walletOpenBridgeSuccessResponseSchema = walletOpenBridgeSuccessResponseSchema;
3875
+ exports.walletOpenBuyParamsSchema = walletOpenBuyParamsSchema;
3876
+ exports.walletOpenBuyRequestSchema = walletOpenBuyRequestSchema;
3877
+ exports.walletOpenBuyResultSchema = walletOpenBuyResultSchema;
3878
+ exports.walletOpenBuySuccessResponseSchema = walletOpenBuySuccessResponseSchema;
3879
+ exports.walletOpenReceiveParamsSchema = walletOpenReceiveParamsSchema;
3880
+ exports.walletOpenReceiveRequestSchema = walletOpenReceiveRequestSchema;
3881
+ exports.walletOpenReceiveResultSchema = walletOpenReceiveResultSchema;
3882
+ exports.walletOpenReceiveSuccessResponseSchema = walletOpenReceiveSuccessResponseSchema;
3883
+ exports.walletRenouncePermissionsParamsSchema = walletRenouncePermissionsParamsSchema;
3884
+ exports.walletRenouncePermissionsRequestSchema = walletRenouncePermissionsRequestSchema;
3885
+ exports.walletRenouncePermissionsResultSchema = walletRenouncePermissionsResultSchema;
3886
+ exports.walletRenouncePermissionsSuccessResponseSchema = walletRenouncePermissionsSuccessResponseSchema;
3887
+ exports.walletRequestPermissionsParamsSchema = walletRequestPermissionsParamsSchema;
3888
+ exports.walletRequestPermissionsRequestSchema = walletRequestPermissionsRequestSchema;
3889
+ exports.walletRequestPermissionsResultSchema = walletRequestPermissionsResultSchema;
3890
+ exports.walletRequestPermissionsSuccessResponseSchema = walletRequestPermissionsSuccessResponseSchema;
3891
+ exports.walletRequestSchema = walletRequestSchema;
3892
+ exports.walletSuccessResponseSchema = walletSuccessResponseSchema;
3893
+ exports.walletTypeSchema = walletTypeSchema;
3894
+ exports.walletTypes = walletTypes;