@sats-connect/core 0.5.7 → 0.5.8-2731ce5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,25 +1,77 @@
1
- // src/provider/types.ts
1
+ // src/types.ts
2
2
  import * as v from "valibot";
3
+ var BitcoinNetworkType = /* @__PURE__ */ ((BitcoinNetworkType2) => {
4
+ BitcoinNetworkType2["Mainnet"] = "Mainnet";
5
+ BitcoinNetworkType2["Testnet"] = "Testnet";
6
+ BitcoinNetworkType2["Testnet4"] = "Testnet4";
7
+ BitcoinNetworkType2["Signet"] = "Signet";
8
+ BitcoinNetworkType2["Regtest"] = "Regtest";
9
+ return BitcoinNetworkType2;
10
+ })(BitcoinNetworkType || {});
11
+ var RpcIdSchema = v.optional(v.union([v.string(), v.number(), v.null()]));
12
+ var rpcRequestMessageSchema = v.object({
13
+ jsonrpc: v.literal("2.0"),
14
+ method: v.string(),
15
+ params: v.optional(
16
+ v.union([
17
+ v.array(v.unknown()),
18
+ v.looseObject({}),
19
+ // Note: This is to support current incorrect usage of RPC 2.0. Params need
20
+ // to be either an array or an object when provided. Changing this now would
21
+ // be a breaking change, so accepting null values for now. Tracking in
22
+ // https://linear.app/xverseapp/issue/ENG-4538.
23
+ v.null()
24
+ ])
25
+ ),
26
+ id: v.unwrap(RpcIdSchema)
27
+ });
28
+ var RpcErrorCode = /* @__PURE__ */ ((RpcErrorCode2) => {
29
+ RpcErrorCode2[RpcErrorCode2["PARSE_ERROR"] = -32700] = "PARSE_ERROR";
30
+ RpcErrorCode2[RpcErrorCode2["INVALID_REQUEST"] = -32600] = "INVALID_REQUEST";
31
+ RpcErrorCode2[RpcErrorCode2["METHOD_NOT_FOUND"] = -32601] = "METHOD_NOT_FOUND";
32
+ RpcErrorCode2[RpcErrorCode2["INVALID_PARAMS"] = -32602] = "INVALID_PARAMS";
33
+ RpcErrorCode2[RpcErrorCode2["INTERNAL_ERROR"] = -32603] = "INTERNAL_ERROR";
34
+ RpcErrorCode2[RpcErrorCode2["USER_REJECTION"] = -32e3] = "USER_REJECTION";
35
+ RpcErrorCode2[RpcErrorCode2["METHOD_NOT_SUPPORTED"] = -32001] = "METHOD_NOT_SUPPORTED";
36
+ RpcErrorCode2[RpcErrorCode2["ACCESS_DENIED"] = -32002] = "ACCESS_DENIED";
37
+ return RpcErrorCode2;
38
+ })(RpcErrorCode || {});
39
+ var rpcSuccessResponseMessageSchema = v.object({
40
+ jsonrpc: v.literal("2.0"),
41
+ result: v.nonOptional(v.unknown()),
42
+ id: RpcIdSchema
43
+ });
44
+ var rpcErrorResponseMessageSchema = v.object({
45
+ jsonrpc: v.literal("2.0"),
46
+ error: v.nonOptional(v.unknown()),
47
+ id: RpcIdSchema
48
+ });
49
+ var rpcResponseMessageSchema = v.union([
50
+ rpcSuccessResponseMessageSchema,
51
+ rpcErrorResponseMessageSchema
52
+ ]);
53
+
54
+ // src/provider/types.ts
55
+ import * as v2 from "valibot";
3
56
  var accountChangeEventName = "accountChange";
4
- var accountChangeSchema = v.object({
5
- type: v.literal(accountChangeEventName)
57
+ var accountChangeSchema = v2.object({
58
+ type: v2.literal(accountChangeEventName)
6
59
  });
7
60
  var networkChangeEventName = "networkChange";
8
- var networkType = ["Mainnet", "Testnet", "Testnet4", "Signet", "Regtest"];
9
- var networkChangeSchema = v.object({
10
- type: v.literal(networkChangeEventName),
11
- bitcoin: v.object({
12
- name: v.picklist(networkType)
61
+ var networkChangeSchema = v2.object({
62
+ type: v2.literal(networkChangeEventName),
63
+ bitcoin: v2.object({
64
+ name: v2.enum(BitcoinNetworkType)
13
65
  }),
14
- stacks: v.object({
15
- name: v.string()
66
+ stacks: v2.object({
67
+ name: v2.string()
16
68
  })
17
69
  });
18
70
  var disconnectEventName = "disconnect";
19
- var disconnectSchema = v.object({
20
- type: v.literal(disconnectEventName)
71
+ var disconnectSchema = v2.object({
72
+ type: v2.literal(disconnectEventName)
21
73
  });
22
- var walletEventSchema = v.variant("type", [
74
+ var walletEventSchema = v2.variant("type", [
23
75
  accountChangeSchema,
24
76
  networkChangeSchema,
25
77
  disconnectSchema
@@ -64,59 +116,6 @@ function getSupportedWallets() {
64
116
  return wallets;
65
117
  }
66
118
 
67
- // src/types.ts
68
- import * as v2 from "valibot";
69
- var BitcoinNetworkType = /* @__PURE__ */ ((BitcoinNetworkType2) => {
70
- BitcoinNetworkType2["Mainnet"] = "Mainnet";
71
- BitcoinNetworkType2["Testnet"] = "Testnet";
72
- BitcoinNetworkType2["Testnet4"] = "Testnet4";
73
- BitcoinNetworkType2["Signet"] = "Signet";
74
- BitcoinNetworkType2["Regtest"] = "Regtest";
75
- return BitcoinNetworkType2;
76
- })(BitcoinNetworkType || {});
77
- var RpcIdSchema = v2.optional(v2.union([v2.string(), v2.number(), v2.null()]));
78
- var rpcRequestMessageSchema = v2.object({
79
- jsonrpc: v2.literal("2.0"),
80
- method: v2.string(),
81
- params: v2.optional(
82
- v2.union([
83
- v2.array(v2.unknown()),
84
- v2.looseObject({}),
85
- // Note: This is to support current incorrect usage of RPC 2.0. Params need
86
- // to be either an array or an object when provided. Changing this now would
87
- // be a breaking change, so accepting null values for now. Tracking in
88
- // https://linear.app/xverseapp/issue/ENG-4538.
89
- v2.null()
90
- ])
91
- ),
92
- id: v2.unwrap(RpcIdSchema)
93
- });
94
- var RpcErrorCode = /* @__PURE__ */ ((RpcErrorCode2) => {
95
- RpcErrorCode2[RpcErrorCode2["PARSE_ERROR"] = -32700] = "PARSE_ERROR";
96
- RpcErrorCode2[RpcErrorCode2["INVALID_REQUEST"] = -32600] = "INVALID_REQUEST";
97
- RpcErrorCode2[RpcErrorCode2["METHOD_NOT_FOUND"] = -32601] = "METHOD_NOT_FOUND";
98
- RpcErrorCode2[RpcErrorCode2["INVALID_PARAMS"] = -32602] = "INVALID_PARAMS";
99
- RpcErrorCode2[RpcErrorCode2["INTERNAL_ERROR"] = -32603] = "INTERNAL_ERROR";
100
- RpcErrorCode2[RpcErrorCode2["USER_REJECTION"] = -32e3] = "USER_REJECTION";
101
- RpcErrorCode2[RpcErrorCode2["METHOD_NOT_SUPPORTED"] = -32001] = "METHOD_NOT_SUPPORTED";
102
- RpcErrorCode2[RpcErrorCode2["ACCESS_DENIED"] = -32002] = "ACCESS_DENIED";
103
- return RpcErrorCode2;
104
- })(RpcErrorCode || {});
105
- var rpcSuccessResponseMessageSchema = v2.object({
106
- jsonrpc: v2.literal("2.0"),
107
- result: v2.nonOptional(v2.unknown()),
108
- id: RpcIdSchema
109
- });
110
- var rpcErrorResponseMessageSchema = v2.object({
111
- jsonrpc: v2.literal("2.0"),
112
- error: v2.nonOptional(v2.unknown()),
113
- id: RpcIdSchema
114
- });
115
- var rpcResponseMessageSchema = v2.union([
116
- rpcSuccessResponseMessageSchema,
117
- rpcErrorResponseMessageSchema
118
- ]);
119
-
120
119
  // src/request/index.ts
121
120
  import * as v21 from "valibot";
122
121
 
@@ -137,6 +136,10 @@ var stxCallContractParamsSchema = v3.object({
137
136
  * https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
138
137
  */
139
138
  functionName: v3.string(),
139
+ /**
140
+ * @deprecated in favor of `functionArgs` for @stacks/connect compatibility
141
+ */
142
+ arguments: v3.optional(v3.array(v3.string())),
140
143
  /**
141
144
  * The function's arguments. The arguments are expected to be hex-encoded
142
145
  * strings of Clarity values.
@@ -151,7 +154,15 @@ var stxCallContractParamsSchema = v3.object({
151
154
  * const hexArgs = functionArgs.map(cvToHex);
152
155
  * ```
153
156
  */
154
- arguments: v3.optional(v3.array(v3.string()))
157
+ functionArgs: v3.optional(v3.array(v3.string())),
158
+ /**
159
+ * The post conditions to apply to the contract call.
160
+ */
161
+ postConditions: v3.optional(v3.array(v3.string())),
162
+ /**
163
+ * The mode to apply to the post conditions.
164
+ */
165
+ postConditionMode: v3.optional(v3.union([v3.literal("allow"), v3.literal("deny")]))
155
166
  });
156
167
  var stxCallContractResultSchema = v3.object({
157
168
  /**
@@ -187,7 +198,15 @@ var stxDeployContractParamsSchema = v4.object({
187
198
  /**
188
199
  * The version of the Clarity contract.
189
200
  */
190
- clarityVersion: v4.optional(v4.string())
201
+ clarityVersion: v4.optional(v4.string()),
202
+ /**
203
+ * The post conditions to apply to the contract call.
204
+ */
205
+ postConditions: v4.optional(v4.array(v4.string())),
206
+ /**
207
+ * The mode to apply to the post conditions.
208
+ */
209
+ postConditionMode: v4.optional(v4.union([v4.literal("allow"), v4.literal("deny")]))
191
210
  });
192
211
  var stxDeployContractResultSchema = v4.object({
193
212
  /**
@@ -209,30 +228,15 @@ var stxDeployContractRequestMessageSchema = v4.object({
209
228
  });
210
229
 
211
230
  // src/request/types/stxMethods/getAccounts.ts
231
+ import * as v8 from "valibot";
232
+
233
+ // src/request/types/walletMethods.ts
234
+ import * as v7 from "valibot";
235
+
236
+ // src/request/types/common.ts
212
237
  import * as v5 from "valibot";
213
- var stxGetAccountsMethodName = "stx_getAccounts";
214
- var stxGetAccountsParamsSchema = v5.nullish(v5.null());
215
- var stxGetAccountsResultSchema = v5.object({
216
- /**
217
- * The addresses generated for the given purposes.
218
- */
219
- addresses: v5.array(
220
- v5.object({
221
- address: v5.string(),
222
- publicKey: v5.string(),
223
- gaiaHubUrl: v5.string(),
224
- gaiaAppKey: v5.string()
225
- })
226
- )
227
- });
228
- var stxGetAccountsRequestMessageSchema = v5.object({
229
- ...rpcRequestMessageSchema.entries,
230
- ...v5.object({
231
- method: v5.literal(stxGetAccountsMethodName),
232
- params: stxGetAccountsParamsSchema,
233
- id: v5.string()
234
- }).entries
235
- });
238
+ var walletTypes = ["software", "ledger", "keystone"];
239
+ var walletTypeSchema = v5.picklist(walletTypes);
236
240
 
237
241
  // src/addresses/index.ts
238
242
  import { createUnsecuredToken } from "jsontokens";
@@ -279,185 +283,367 @@ var getAddress = async (options) => {
279
283
  }
280
284
  };
281
285
 
286
+ // src/request/types/walletMethods.ts
287
+ var accountActionsSchema = v7.object({
288
+ read: v7.optional(v7.boolean())
289
+ });
290
+ var walletActionsSchema = v7.object({
291
+ readNetwork: v7.optional(v7.boolean())
292
+ });
293
+ var accountPermissionSchema = v7.object({
294
+ type: v7.literal("account"),
295
+ resourceId: v7.string(),
296
+ clientId: v7.string(),
297
+ actions: accountActionsSchema
298
+ });
299
+ var walletPermissionSchema = v7.object({
300
+ type: v7.literal("wallet"),
301
+ resourceId: v7.string(),
302
+ clientId: v7.string(),
303
+ actions: walletActionsSchema
304
+ });
305
+ var PermissionRequestParams = v7.variant("type", [
306
+ v7.object({
307
+ ...v7.omit(accountPermissionSchema, ["clientId"]).entries
308
+ }),
309
+ v7.object({
310
+ ...v7.omit(walletPermissionSchema, ["clientId"]).entries
311
+ })
312
+ ]);
313
+ var permission = v7.variant("type", [accountPermissionSchema, walletPermissionSchema]);
314
+ var requestPermissionsMethodName = "wallet_requestPermissions";
315
+ var requestPermissionsParamsSchema = v7.nullish(v7.array(PermissionRequestParams));
316
+ var requestPermissionsResultSchema = v7.literal(true);
317
+ var requestPermissionsRequestMessageSchema = v7.object({
318
+ ...rpcRequestMessageSchema.entries,
319
+ ...v7.object({
320
+ method: v7.literal(requestPermissionsMethodName),
321
+ params: requestPermissionsParamsSchema,
322
+ id: v7.string()
323
+ }).entries
324
+ });
325
+ var renouncePermissionsMethodName = "wallet_renouncePermissions";
326
+ var renouncePermissionsParamsSchema = v7.nullish(v7.null());
327
+ var renouncePermissionsResultSchema = v7.nullish(v7.null());
328
+ var renouncePermissionsRequestMessageSchema = v7.object({
329
+ ...rpcRequestMessageSchema.entries,
330
+ ...v7.object({
331
+ method: v7.literal(renouncePermissionsMethodName),
332
+ params: renouncePermissionsParamsSchema,
333
+ id: v7.string()
334
+ }).entries
335
+ });
336
+ var disconnectMethodName = "wallet_disconnect";
337
+ var disconnectParamsSchema = v7.nullish(v7.null());
338
+ var disconnectResultSchema = v7.nullish(v7.null());
339
+ var disconnectRequestMessageSchema = v7.object({
340
+ ...rpcRequestMessageSchema.entries,
341
+ ...v7.object({
342
+ method: v7.literal(disconnectMethodName),
343
+ params: disconnectParamsSchema,
344
+ id: v7.string()
345
+ }).entries
346
+ });
347
+ var getWalletTypeMethodName = "wallet_getWalletType";
348
+ var getWalletTypeParamsSchema = v7.nullish(v7.null());
349
+ var getWalletTypeResultSchema = walletTypeSchema;
350
+ var getWalletTypeRequestMessageSchema = v7.object({
351
+ ...rpcRequestMessageSchema.entries,
352
+ ...v7.object({
353
+ method: v7.literal(getWalletTypeMethodName),
354
+ params: getWalletTypeParamsSchema,
355
+ id: v7.string()
356
+ }).entries
357
+ });
358
+ var getCurrentPermissionsMethodName = "wallet_getCurrentPermissions";
359
+ var getCurrentPermissionsParamsSchema = v7.nullish(v7.null());
360
+ var getCurrentPermissionsResultSchema = v7.array(permission);
361
+ var getCurrentPermissionsRequestMessageSchema = v7.object({
362
+ ...rpcRequestMessageSchema.entries,
363
+ ...v7.object({
364
+ method: v7.literal(getCurrentPermissionsMethodName),
365
+ params: getCurrentPermissionsParamsSchema,
366
+ id: v7.string()
367
+ }).entries
368
+ });
369
+ var getNetworkMethodName = "wallet_getNetwork";
370
+ var getNetworkParamsSchema = v7.nullish(v7.null());
371
+ var getNetworkResultSchema = v7.object({
372
+ bitcoin: v7.object({
373
+ name: v7.enum(BitcoinNetworkType)
374
+ }),
375
+ stacks: v7.object({
376
+ name: v7.string()
377
+ })
378
+ });
379
+ var getNetworkRequestMessageSchema = v7.object({
380
+ ...rpcRequestMessageSchema.entries,
381
+ ...v7.object({
382
+ method: v7.literal(getNetworkMethodName),
383
+ params: getNetworkParamsSchema,
384
+ id: v7.string()
385
+ }).entries
386
+ });
387
+ var changeNetworkMethodName = "wallet_changeNetwork";
388
+ var changeNetworkParamsSchema = v7.object({
389
+ name: v7.enum(BitcoinNetworkType)
390
+ });
391
+ var changeNetworkResultSchema = v7.nullish(v7.null());
392
+ var changeNetworkRequestMessageSchema = v7.object({
393
+ ...rpcRequestMessageSchema.entries,
394
+ ...v7.object({
395
+ method: v7.literal(changeNetworkMethodName),
396
+ params: changeNetworkParamsSchema,
397
+ id: v7.string()
398
+ }).entries
399
+ });
400
+ var getAccountMethodName = "wallet_getAccount";
401
+ var getAccountParamsSchema = v7.nullish(v7.null());
402
+ var getAccountResultSchema = v7.object({
403
+ id: v7.string(),
404
+ addresses: v7.array(addressSchema),
405
+ walletType: walletTypeSchema,
406
+ network: getNetworkResultSchema
407
+ });
408
+ var getAccountRequestMessageSchema = v7.object({
409
+ ...rpcRequestMessageSchema.entries,
410
+ ...v7.object({
411
+ method: v7.literal(getAccountMethodName),
412
+ params: getAccountParamsSchema,
413
+ id: v7.string()
414
+ }).entries
415
+ });
416
+ var connectMethodName = "wallet_connect";
417
+ var connectParamsSchema = v7.nullish(
418
+ v7.object({
419
+ permissions: v7.optional(v7.array(PermissionRequestParams)),
420
+ addresses: v7.optional(v7.array(v7.enum(AddressPurpose))),
421
+ message: v7.optional(
422
+ v7.pipe(v7.string(), v7.maxLength(80, "The message must not exceed 80 characters."))
423
+ )
424
+ })
425
+ );
426
+ var connectResultSchema = v7.object({
427
+ id: v7.string(),
428
+ addresses: v7.array(addressSchema),
429
+ walletType: walletTypeSchema,
430
+ network: getNetworkResultSchema
431
+ });
432
+ var connectRequestMessageSchema = v7.object({
433
+ ...rpcRequestMessageSchema.entries,
434
+ ...v7.object({
435
+ method: v7.literal(connectMethodName),
436
+ params: connectParamsSchema,
437
+ id: v7.string()
438
+ }).entries
439
+ });
440
+
441
+ // src/request/types/stxMethods/getAccounts.ts
442
+ var stxGetAccountsMethodName = "stx_getAccounts";
443
+ var stxGetAccountsParamsSchema = v8.nullish(v8.null());
444
+ var stxGetAccountsResultSchema = v8.object({
445
+ /**
446
+ * The addresses generated for the given purposes.
447
+ */
448
+ addresses: v8.array(
449
+ v8.object({
450
+ address: v8.string(),
451
+ publicKey: v8.string(),
452
+ gaiaHubUrl: v8.string(),
453
+ gaiaAppKey: v8.string()
454
+ })
455
+ ),
456
+ network: getNetworkResultSchema
457
+ });
458
+ var stxGetAccountsRequestMessageSchema = v8.object({
459
+ ...rpcRequestMessageSchema.entries,
460
+ ...v8.object({
461
+ method: v8.literal(stxGetAccountsMethodName),
462
+ params: stxGetAccountsParamsSchema,
463
+ id: v8.string()
464
+ }).entries
465
+ });
466
+
282
467
  // src/request/types/stxMethods/getAddresses.ts
283
- import * as v7 from "valibot";
468
+ import * as v9 from "valibot";
284
469
  var stxGetAddressesMethodName = "stx_getAddresses";
285
- var stxGetAddressesParamsSchema = v7.nullish(
286
- v7.object({
470
+ var stxGetAddressesParamsSchema = v9.nullish(
471
+ v9.object({
287
472
  /**
288
473
  * A message to be displayed to the user in the request prompt.
289
474
  */
290
- message: v7.optional(v7.string())
475
+ message: v9.optional(v9.string())
291
476
  })
292
477
  );
293
- var stxGetAddressesResultSchema = v7.object({
478
+ var stxGetAddressesResultSchema = v9.object({
294
479
  /**
295
480
  * The addresses generated for the given purposes.
296
481
  */
297
- addresses: v7.array(addressSchema)
482
+ addresses: v9.array(addressSchema),
483
+ network: getNetworkResultSchema
298
484
  });
299
- var stxGetAddressesRequestMessageSchema = v7.object({
485
+ var stxGetAddressesRequestMessageSchema = v9.object({
300
486
  ...rpcRequestMessageSchema.entries,
301
- ...v7.object({
302
- method: v7.literal(stxGetAddressesMethodName),
487
+ ...v9.object({
488
+ method: v9.literal(stxGetAddressesMethodName),
303
489
  params: stxGetAddressesParamsSchema,
304
- id: v7.string()
490
+ id: v9.string()
305
491
  }).entries
306
492
  });
307
493
 
308
494
  // src/request/types/stxMethods/signMessage.ts
309
- import * as v8 from "valibot";
495
+ import * as v10 from "valibot";
310
496
  var stxSignMessageMethodName = "stx_signMessage";
311
- var stxSignMessageParamsSchema = v8.object({
497
+ var stxSignMessageParamsSchema = v10.object({
312
498
  /**
313
499
  * The message to sign.
314
500
  */
315
- message: v8.string(),
501
+ message: v10.string(),
316
502
  /**
317
503
  * The public key to sign the message with.
318
504
  */
319
- publicKey: v8.string(),
505
+ publicKey: v10.string(),
320
506
  /**
321
507
  * The format version of the parameter.
322
508
  */
323
- parameterFormatVersion: v8.optional(v8.number())
509
+ parameterFormatVersion: v10.optional(v10.number())
324
510
  });
325
- var stxSignMessageResultSchema = v8.object({
511
+ var stxSignMessageResultSchema = v10.object({
326
512
  /**
327
513
  * The signature of the message.
328
514
  */
329
- signature: v8.string(),
515
+ signature: v10.string(),
330
516
  /**
331
517
  * The public key used to sign the message.
332
518
  */
333
- publicKey: v8.string()
519
+ publicKey: v10.string()
334
520
  });
335
- var stxSignMessageRequestMessageSchema = v8.object({
521
+ var stxSignMessageRequestMessageSchema = v10.object({
336
522
  ...rpcRequestMessageSchema.entries,
337
- ...v8.object({
338
- method: v8.literal(stxSignMessageMethodName),
523
+ ...v10.object({
524
+ method: v10.literal(stxSignMessageMethodName),
339
525
  params: stxSignMessageParamsSchema,
340
- id: v8.string()
526
+ id: v10.string()
341
527
  }).entries
342
528
  });
343
529
 
344
530
  // src/request/types/stxMethods/signStructuredMessage.ts
345
- import * as v9 from "valibot";
531
+ import * as v11 from "valibot";
346
532
  var stxSignStructuredMessageMethodName = "stx_signStructuredMessage";
347
- var stxSignStructuredMessageParamsSchema = v9.object({
533
+ var stxSignStructuredMessageParamsSchema = v11.object({
348
534
  /**
349
535
  * The domain to be signed.
350
536
  */
351
- domain: v9.string(),
537
+ domain: v11.string(),
352
538
  /**
353
539
  * Message payload to be signed.
354
540
  */
355
- message: v9.string(),
541
+ message: v11.string(),
356
542
  /**
357
543
  * The format version of the parameter.
358
544
  */
359
- parameterFormatVersion: v9.optional(v9.number()),
545
+ parameterFormatVersion: v11.optional(v11.number()),
360
546
  /**
361
547
  * The public key to sign the message with.
362
548
  */
363
- publicKey: v9.optional(v9.string())
549
+ publicKey: v11.optional(v11.string())
364
550
  });
365
- var stxSignStructuredMessageResultSchema = v9.object({
551
+ var stxSignStructuredMessageResultSchema = v11.object({
366
552
  /**
367
553
  * Signature of the message.
368
554
  */
369
- signature: v9.string(),
555
+ signature: v11.string(),
370
556
  /**
371
557
  * Public key as hex-encoded string.
372
558
  */
373
- publicKey: v9.string()
559
+ publicKey: v11.string()
374
560
  });
375
- var stxSignStructuredMessageRequestMessageSchema = v9.object({
561
+ var stxSignStructuredMessageRequestMessageSchema = v11.object({
376
562
  ...rpcRequestMessageSchema.entries,
377
- ...v9.object({
378
- method: v9.literal(stxSignStructuredMessageMethodName),
563
+ ...v11.object({
564
+ method: v11.literal(stxSignStructuredMessageMethodName),
379
565
  params: stxSignStructuredMessageParamsSchema,
380
- id: v9.string()
566
+ id: v11.string()
381
567
  }).entries
382
568
  });
383
569
 
384
570
  // src/request/types/stxMethods/signTransaction.ts
385
- import * as v10 from "valibot";
571
+ import * as v12 from "valibot";
386
572
  var stxSignTransactionMethodName = "stx_signTransaction";
387
- var stxSignTransactionParamsSchema = v10.object({
573
+ var stxSignTransactionParamsSchema = v12.object({
388
574
  /**
389
575
  * The transaction to sign as a hex-encoded string.
390
576
  */
391
- transaction: v10.string(),
577
+ transaction: v12.string(),
392
578
  /**
393
579
  * The public key to sign the transaction with. The wallet may use any key
394
580
  * when not provided.
395
581
  */
396
- pubkey: v10.optional(v10.string()),
582
+ pubkey: v12.optional(v12.string()),
397
583
  /**
398
584
  * Whether to broadcast the transaction after signing. Defaults to `true`.
399
585
  */
400
- broadcast: v10.optional(v10.boolean())
586
+ broadcast: v12.optional(v12.boolean())
401
587
  });
402
- var stxSignTransactionResultSchema = v10.object({
588
+ var stxSignTransactionResultSchema = v12.object({
403
589
  /**
404
590
  * The signed transaction as a hex-encoded string.
405
591
  */
406
- transaction: v10.string()
592
+ transaction: v12.string()
407
593
  });
408
- var stxSignTransactionRequestMessageSchema = v10.object({
594
+ var stxSignTransactionRequestMessageSchema = v12.object({
409
595
  ...rpcRequestMessageSchema.entries,
410
- ...v10.object({
411
- method: v10.literal(stxSignTransactionMethodName),
596
+ ...v12.object({
597
+ method: v12.literal(stxSignTransactionMethodName),
412
598
  params: stxSignTransactionParamsSchema,
413
- id: v10.string()
599
+ id: v12.string()
414
600
  }).entries
415
601
  });
416
602
 
417
603
  // src/request/types/stxMethods/signTransactions.ts
418
- import * as v11 from "valibot";
604
+ import * as v13 from "valibot";
419
605
  var stxSignTransactionsMethodName = "stx_signTransactions";
420
- var stxSignTransactionsParamsSchema = v11.object({
606
+ var stxSignTransactionsParamsSchema = v13.object({
421
607
  /**
422
608
  * The transactions to sign as hex-encoded strings.
423
609
  */
424
- transactions: v11.pipe(
425
- v11.array(
426
- v11.pipe(
427
- v11.string(),
428
- v11.check((hex) => {
610
+ transactions: v13.pipe(
611
+ v13.array(
612
+ v13.pipe(
613
+ v13.string(),
614
+ v13.check((hex) => {
429
615
  return true;
430
616
  }, "Invalid hex-encoded Stacks transaction.")
431
617
  )
432
618
  ),
433
- v11.minLength(1)
619
+ v13.minLength(1)
434
620
  ),
435
621
  /**
436
622
  * Whether the signed transactions should be broadcast after signing. Defaults
437
623
  * to `true`.
438
624
  */
439
- broadcast: v11.optional(v11.boolean())
625
+ broadcast: v13.optional(v13.boolean())
440
626
  });
441
- var stxSignTransactionsResultSchema = v11.object({
627
+ var stxSignTransactionsResultSchema = v13.object({
442
628
  /**
443
629
  * The signed transactions as hex-encoded strings, in the same order as in the
444
630
  * sign request.
445
631
  */
446
- transactions: v11.array(v11.string())
632
+ transactions: v13.array(v13.string())
447
633
  });
448
- var stxSignTransactionsRequestMessageSchema = v11.object({
634
+ var stxSignTransactionsRequestMessageSchema = v13.object({
449
635
  ...rpcRequestMessageSchema.entries,
450
- ...v11.object({
451
- method: v11.literal(stxSignTransactionsMethodName),
636
+ ...v13.object({
637
+ method: v13.literal(stxSignTransactionsMethodName),
452
638
  params: stxSignTransactionsParamsSchema,
453
- id: v11.string()
639
+ id: v13.string()
454
640
  }).entries
455
641
  });
456
642
 
457
643
  // src/request/types/stxMethods/transferStx.ts
458
- import * as v12 from "valibot";
644
+ import * as v14 from "valibot";
459
645
  var stxTransferStxMethodName = "stx_transferStx";
460
- var stxTransferStxParamsSchema = v12.object({
646
+ var stxTransferStxParamsSchema = v14.object({
461
647
  /**
462
648
  * Amount of STX tokens to transfer in microstacks as a string. Anything
463
649
  * parseable by `BigInt` is acceptable.
@@ -470,23 +656,23 @@ var stxTransferStxParamsSchema = v12.object({
470
656
  * const amount3 = '1234';
471
657
  * ```
472
658
  */
473
- amount: v12.union([v12.number(), v12.string()]),
659
+ amount: v14.union([v14.number(), v14.string()]),
474
660
  /**
475
661
  * The recipeint's principal.
476
662
  */
477
- recipient: v12.string(),
663
+ recipient: v14.string(),
478
664
  /**
479
665
  * A string representing the memo.
480
666
  */
481
- memo: v12.optional(v12.string()),
667
+ memo: v14.optional(v14.string()),
482
668
  /**
483
669
  * Version of parameter format.
484
670
  */
485
- version: v12.optional(v12.string()),
671
+ version: v14.optional(v14.string()),
486
672
  /**
487
673
  * The mode of the post conditions.
488
674
  */
489
- postConditionMode: v12.optional(v12.number()),
675
+ postConditionMode: v14.optional(v14.number()),
490
676
  /**
491
677
  * A hex-encoded string representing the post conditions.
492
678
  *
@@ -499,89 +685,83 @@ var stxTransferStxParamsSchema = v12.object({
499
685
  * const hexPostCondition = serializePostCondition(postCondition).toString('hex');
500
686
  * ```
501
687
  */
502
- postConditions: v12.optional(v12.array(v12.string())),
688
+ postConditions: v14.optional(v14.array(v14.string())),
503
689
  /**
504
690
  * The public key to sign the transaction with. The wallet may use any key
505
691
  * when not provided.
506
692
  */
507
- pubkey: v12.optional(v12.string())
693
+ pubkey: v14.optional(v14.string())
508
694
  });
509
- var stxTransferStxResultSchema = v12.object({
695
+ var stxTransferStxResultSchema = v14.object({
510
696
  /**
511
697
  * The ID of the transaction.
512
698
  */
513
- txid: v12.string(),
699
+ txid: v14.string(),
514
700
  /**
515
701
  * A Stacks transaction as a hex-encoded string.
516
702
  */
517
- transaction: v12.string()
703
+ transaction: v14.string()
518
704
  });
519
- var stxTransferStxRequestMessageSchema = v12.object({
705
+ var stxTransferStxRequestMessageSchema = v14.object({
520
706
  ...rpcRequestMessageSchema.entries,
521
- ...v12.object({
522
- method: v12.literal(stxTransferStxMethodName),
707
+ ...v14.object({
708
+ method: v14.literal(stxTransferStxMethodName),
523
709
  params: stxTransferStxParamsSchema,
524
- id: v12.string()
710
+ id: v14.string()
525
711
  }).entries
526
712
  });
527
713
 
528
714
  // src/request/types/btcMethods.ts
529
- import * as v14 from "valibot";
530
-
531
- // src/request/types/common.ts
532
- import * as v13 from "valibot";
533
- var walletTypes = ["software", "ledger", "keystone"];
534
- var walletTypeSchema = v13.picklist(walletTypes);
535
-
536
- // src/request/types/btcMethods.ts
715
+ import * as v15 from "valibot";
537
716
  var getInfoMethodName = "getInfo";
538
- var getInfoParamsSchema = v14.nullish(v14.null());
539
- var getInfoResultSchema = v14.object({
717
+ var getInfoParamsSchema = v15.nullish(v15.null());
718
+ var getInfoResultSchema = v15.object({
540
719
  /**
541
720
  * Version of the wallet.
542
721
  */
543
- version: v14.string(),
722
+ version: v15.string(),
544
723
  /**
545
724
  * [WBIP](https://wbips.netlify.app/wbips/WBIP002) methods supported by the wallet.
546
725
  */
547
- methods: v14.optional(v14.array(v14.string())),
726
+ methods: v15.optional(v15.array(v15.string())),
548
727
  /**
549
728
  * List of WBIP standards supported by the wallet. Not currently used.
550
729
  */
551
- supports: v14.array(v14.string())
730
+ supports: v15.array(v15.string())
552
731
  });
553
- var getInfoRequestMessageSchema = v14.object({
732
+ var getInfoRequestMessageSchema = v15.object({
554
733
  ...rpcRequestMessageSchema.entries,
555
- ...v14.object({
556
- method: v14.literal(getInfoMethodName),
734
+ ...v15.object({
735
+ method: v15.literal(getInfoMethodName),
557
736
  params: getInfoParamsSchema,
558
- id: v14.string()
737
+ id: v15.string()
559
738
  }).entries
560
739
  });
561
740
  var getAddressesMethodName = "getAddresses";
562
- var getAddressesParamsSchema = v14.object({
741
+ var getAddressesParamsSchema = v15.object({
563
742
  /**
564
743
  * The purposes for which to generate addresses. See
565
744
  * {@linkcode AddressPurpose} for available purposes.
566
745
  */
567
- purposes: v14.array(v14.enum(AddressPurpose)),
746
+ purposes: v15.array(v15.enum(AddressPurpose)),
568
747
  /**
569
748
  * A message to be displayed to the user in the request prompt.
570
749
  */
571
- message: v14.optional(v14.string())
750
+ message: v15.optional(v15.string())
572
751
  });
573
- var getAddressesResultSchema = v14.object({
752
+ var getAddressesResultSchema = v15.object({
574
753
  /**
575
754
  * The addresses generated for the given purposes.
576
755
  */
577
- addresses: v14.array(addressSchema)
756
+ addresses: v15.array(addressSchema),
757
+ network: getNetworkResultSchema
578
758
  });
579
- var getAddressesRequestMessageSchema = v14.object({
759
+ var getAddressesRequestMessageSchema = v15.object({
580
760
  ...rpcRequestMessageSchema.entries,
581
- ...v14.object({
582
- method: v14.literal(getAddressesMethodName),
761
+ ...v15.object({
762
+ method: v15.literal(getAddressesMethodName),
583
763
  params: getAddressesParamsSchema,
584
- id: v14.string()
764
+ id: v15.string()
585
765
  }).entries
586
766
  });
587
767
  var signMessageMethodName = "signMessage";
@@ -590,305 +770,162 @@ var MessageSigningProtocols = /* @__PURE__ */ ((MessageSigningProtocols2) => {
590
770
  MessageSigningProtocols2["BIP322"] = "BIP322";
591
771
  return MessageSigningProtocols2;
592
772
  })(MessageSigningProtocols || {});
593
- var signMessageParamsSchema = v14.object({
773
+ var signMessageParamsSchema = v15.object({
594
774
  /**
595
775
  * The address used for signing.
596
776
  **/
597
- address: v14.string(),
777
+ address: v15.string(),
598
778
  /**
599
779
  * The message to sign.
600
780
  **/
601
- message: v14.string(),
781
+ message: v15.string(),
602
782
  /**
603
783
  * The protocol to use for signing the message.
604
784
  */
605
- protocol: v14.optional(v14.enum(MessageSigningProtocols))
785
+ protocol: v15.optional(v15.enum(MessageSigningProtocols))
606
786
  });
607
- var signMessageResultSchema = v14.object({
787
+ var signMessageResultSchema = v15.object({
608
788
  /**
609
789
  * The signature of the message.
610
790
  */
611
- signature: v14.string(),
791
+ signature: v15.string(),
612
792
  /**
613
793
  * hash of the message.
614
794
  */
615
- messageHash: v14.string(),
795
+ messageHash: v15.string(),
616
796
  /**
617
797
  * The address used for signing.
618
798
  */
619
- address: v14.string(),
799
+ address: v15.string(),
620
800
  /**
621
801
  * The protocol to use for signing the message.
622
802
  */
623
- protocol: v14.enum(MessageSigningProtocols)
803
+ protocol: v15.enum(MessageSigningProtocols)
624
804
  });
625
- var signMessageRequestMessageSchema = v14.object({
805
+ var signMessageRequestMessageSchema = v15.object({
626
806
  ...rpcRequestMessageSchema.entries,
627
- ...v14.object({
628
- method: v14.literal(signMessageMethodName),
807
+ ...v15.object({
808
+ method: v15.literal(signMessageMethodName),
629
809
  params: signMessageParamsSchema,
630
- id: v14.string()
810
+ id: v15.string()
631
811
  }).entries
632
812
  });
633
813
  var sendTransferMethodName = "sendTransfer";
634
- var sendTransferParamsSchema = v14.object({
814
+ var sendTransferParamsSchema = v15.object({
635
815
  /**
636
816
  * Array of recipients to send to.
637
817
  * The amount to send to each recipient is in satoshis.
638
818
  */
639
- recipients: v14.array(
640
- v14.object({
641
- address: v14.string(),
642
- amount: v14.number()
819
+ recipients: v15.array(
820
+ v15.object({
821
+ address: v15.string(),
822
+ amount: v15.number()
643
823
  })
644
824
  )
645
825
  });
646
- var sendTransferResultSchema = v14.object({
826
+ var sendTransferResultSchema = v15.object({
647
827
  /**
648
828
  * The transaction id as a hex-encoded string.
649
829
  */
650
- txid: v14.string()
830
+ txid: v15.string()
651
831
  });
652
- var sendTransferRequestMessageSchema = v14.object({
832
+ var sendTransferRequestMessageSchema = v15.object({
653
833
  ...rpcRequestMessageSchema.entries,
654
- ...v14.object({
655
- method: v14.literal(sendTransferMethodName),
834
+ ...v15.object({
835
+ method: v15.literal(sendTransferMethodName),
656
836
  params: sendTransferParamsSchema,
657
- id: v14.string()
837
+ id: v15.string()
658
838
  }).entries
659
839
  });
660
840
  var signPsbtMethodName = "signPsbt";
661
- var signPsbtParamsSchema = v14.object({
841
+ var signPsbtParamsSchema = v15.object({
662
842
  /**
663
843
  * The base64 encoded PSBT to sign.
664
844
  */
665
- psbt: v14.string(),
845
+ psbt: v15.string(),
666
846
  /**
667
847
  * The inputs to sign.
668
848
  * The key is the address and the value is an array of indexes of the inputs to sign.
669
849
  */
670
- signInputs: v14.record(v14.string(), v14.array(v14.number())),
850
+ signInputs: v15.record(v15.string(), v15.array(v15.number())),
671
851
  /**
672
852
  * Whether to broadcast the transaction after signing.
673
853
  **/
674
- broadcast: v14.optional(v14.boolean())
854
+ broadcast: v15.optional(v15.boolean())
675
855
  });
676
- var signPsbtResultSchema = v14.object({
856
+ var signPsbtResultSchema = v15.object({
677
857
  /**
678
858
  * The base64 encoded PSBT after signing.
679
859
  */
680
- psbt: v14.string(),
860
+ psbt: v15.string(),
681
861
  /**
682
862
  * The transaction id as a hex-encoded string.
683
863
  * This is only returned if the transaction was broadcast.
684
864
  **/
685
- txid: v14.optional(v14.string())
865
+ txid: v15.optional(v15.string())
686
866
  });
687
- var signPsbtRequestMessageSchema = v14.object({
867
+ var signPsbtRequestMessageSchema = v15.object({
688
868
  ...rpcRequestMessageSchema.entries,
689
- ...v14.object({
690
- method: v14.literal(signPsbtMethodName),
869
+ ...v15.object({
870
+ method: v15.literal(signPsbtMethodName),
691
871
  params: signPsbtParamsSchema,
692
- id: v14.string()
872
+ id: v15.string()
693
873
  }).entries
694
874
  });
695
875
  var getAccountsMethodName = "getAccounts";
696
- var getAccountsParamsSchema = v14.object({
876
+ var getAccountsParamsSchema = v15.object({
697
877
  /**
698
878
  * The purposes for which to generate addresses. See
699
879
  * {@linkcode AddressPurpose} for available purposes.
700
880
  */
701
- purposes: v14.array(v14.enum(AddressPurpose)),
881
+ purposes: v15.array(v15.enum(AddressPurpose)),
702
882
  /**
703
883
  * A message to be displayed to the user in the request prompt.
704
884
  */
705
- message: v14.optional(v14.string())
885
+ message: v15.optional(v15.string())
706
886
  });
707
- var getAccountsResultSchema = v14.array(
708
- v14.object({
887
+ var getAccountsResultSchema = v15.array(
888
+ v15.object({
709
889
  ...addressSchema.entries,
710
- ...v14.object({
890
+ ...v15.object({
711
891
  walletType: walletTypeSchema
712
892
  }).entries
713
893
  })
714
894
  );
715
- var getAccountsRequestMessageSchema = v14.object({
895
+ var getAccountsRequestMessageSchema = v15.object({
716
896
  ...rpcRequestMessageSchema.entries,
717
- ...v14.object({
718
- method: v14.literal(getAccountsMethodName),
897
+ ...v15.object({
898
+ method: v15.literal(getAccountsMethodName),
719
899
  params: getAccountsParamsSchema,
720
- id: v14.string()
900
+ id: v15.string()
721
901
  }).entries
722
902
  });
723
903
  var getBalanceMethodName = "getBalance";
724
- var getBalanceParamsSchema = v14.nullish(v14.null());
725
- var getBalanceResultSchema = v14.object({
904
+ var getBalanceParamsSchema = v15.nullish(v15.null());
905
+ var getBalanceResultSchema = v15.object({
726
906
  /**
727
907
  * The confirmed balance of the wallet in sats. Using a string due to chrome
728
908
  * messages not supporting bigint
729
909
  * (https://issues.chromium.org/issues/40116184).
730
910
  */
731
- confirmed: v14.string(),
911
+ confirmed: v15.string(),
732
912
  /**
733
913
  * The unconfirmed balance of the wallet in sats. Using a string due to chrome
734
914
  * messages not supporting bigint
735
915
  * (https://issues.chromium.org/issues/40116184).
736
916
  */
737
- unconfirmed: v14.string(),
917
+ unconfirmed: v15.string(),
738
918
  /**
739
919
  * The total balance (both confirmed and unconfrimed UTXOs) of the wallet in
740
920
  * sats. Using a string due to chrome messages not supporting bigint
741
921
  * (https://issues.chromium.org/issues/40116184).
742
922
  */
743
- total: v14.string()
744
- });
745
- var getBalanceRequestMessageSchema = v14.object({
746
- ...rpcRequestMessageSchema.entries,
747
- ...v14.object({
748
- method: v14.literal(getBalanceMethodName),
749
- id: v14.string()
750
- }).entries
751
- });
752
-
753
- // src/request/types/walletMethods.ts
754
- import * as v15 from "valibot";
755
- var accountActionsSchema = v15.object({
756
- read: v15.optional(v15.boolean())
757
- });
758
- var walletActionsSchema = v15.object({
759
- readNetwork: v15.optional(v15.boolean())
760
- });
761
- var accountPermissionSchema = v15.object({
762
- type: v15.literal("account"),
763
- resourceId: v15.string(),
764
- clientId: v15.string(),
765
- actions: accountActionsSchema
766
- });
767
- var walletPermissionSchema = v15.object({
768
- type: v15.literal("wallet"),
769
- resourceId: v15.string(),
770
- clientId: v15.string(),
771
- actions: walletActionsSchema
772
- });
773
- var PermissionRequestParams = v15.variant("type", [
774
- v15.object({
775
- ...v15.omit(accountPermissionSchema, ["clientId"]).entries
776
- }),
777
- v15.object({
778
- ...v15.omit(walletPermissionSchema, ["clientId"]).entries
779
- })
780
- ]);
781
- var permission = v15.variant("type", [accountPermissionSchema, walletPermissionSchema]);
782
- var requestPermissionsMethodName = "wallet_requestPermissions";
783
- var requestPermissionsParamsSchema = v15.nullish(v15.array(PermissionRequestParams));
784
- var requestPermissionsResultSchema = v15.literal(true);
785
- var requestPermissionsRequestMessageSchema = v15.object({
786
- ...rpcRequestMessageSchema.entries,
787
- ...v15.object({
788
- method: v15.literal(requestPermissionsMethodName),
789
- params: requestPermissionsParamsSchema,
790
- id: v15.string()
791
- }).entries
923
+ total: v15.string()
792
924
  });
793
- var renouncePermissionsMethodName = "wallet_renouncePermissions";
794
- var renouncePermissionsParamsSchema = v15.nullish(v15.null());
795
- var renouncePermissionsResultSchema = v15.nullish(v15.null());
796
- var renouncePermissionsRequestMessageSchema = v15.object({
925
+ var getBalanceRequestMessageSchema = v15.object({
797
926
  ...rpcRequestMessageSchema.entries,
798
927
  ...v15.object({
799
- method: v15.literal(renouncePermissionsMethodName),
800
- params: renouncePermissionsParamsSchema,
801
- id: v15.string()
802
- }).entries
803
- });
804
- var disconnectMethodName = "wallet_disconnect";
805
- var disconnectParamsSchema = v15.nullish(v15.null());
806
- var disconnectResultSchema = v15.nullish(v15.null());
807
- var disconnectRequestMessageSchema = v15.object({
808
- ...rpcRequestMessageSchema.entries,
809
- ...v15.object({
810
- method: v15.literal(disconnectMethodName),
811
- params: disconnectParamsSchema,
812
- id: v15.string()
813
- }).entries
814
- });
815
- var getWalletTypeMethodName = "wallet_getWalletType";
816
- var getWalletTypeParamsSchema = v15.nullish(v15.null());
817
- var getWalletTypeResultSchema = walletTypeSchema;
818
- var getWalletTypeRequestMessageSchema = v15.object({
819
- ...rpcRequestMessageSchema.entries,
820
- ...v15.object({
821
- method: v15.literal(getWalletTypeMethodName),
822
- params: getWalletTypeParamsSchema,
823
- id: v15.string()
824
- }).entries
825
- });
826
- var getCurrentPermissionsMethodName = "wallet_getCurrentPermissions";
827
- var getCurrentPermissionsParamsSchema = v15.nullish(v15.null());
828
- var getCurrentPermissionsResultSchema = v15.array(permission);
829
- var getCurrentPermissionsRequestMessageSchema = v15.object({
830
- ...rpcRequestMessageSchema.entries,
831
- ...v15.object({
832
- method: v15.literal(getCurrentPermissionsMethodName),
833
- params: getCurrentPermissionsParamsSchema,
834
- id: v15.string()
835
- }).entries
836
- });
837
- var getAccountMethodName = "wallet_getAccount";
838
- var getAccountParamsSchema = v15.nullish(v15.null());
839
- var getAccountResultSchema = v15.object({
840
- id: v15.string(),
841
- addresses: v15.array(addressSchema),
842
- walletType: walletTypeSchema
843
- });
844
- var getAccountRequestMessageSchema = v15.object({
845
- ...rpcRequestMessageSchema.entries,
846
- ...v15.object({
847
- method: v15.literal(getAccountMethodName),
848
- params: getAccountParamsSchema,
849
- id: v15.string()
850
- }).entries
851
- });
852
- var getNetworkMethodName = "wallet_getNetwork";
853
- var getNetworkParamsSchema = v15.nullish(v15.null());
854
- var networkType2 = ["Mainnet", "Testnet", "Testnet4", "Signet", "Regtest"];
855
- var getNetworkResultSchema = v15.object({
856
- bitcoin: v15.object({
857
- name: v15.picklist(networkType2)
858
- }),
859
- stacks: v15.object({
860
- name: v15.string()
861
- })
862
- });
863
- var getNetworkRequestMessageSchema = v15.object({
864
- ...rpcRequestMessageSchema.entries,
865
- ...v15.object({
866
- method: v15.literal(getNetworkMethodName),
867
- params: getNetworkParamsSchema,
868
- id: v15.string()
869
- }).entries
870
- });
871
- var connectMethodName = "wallet_connect";
872
- var connectParamsSchema = v15.nullish(
873
- v15.object({
874
- permissions: v15.optional(v15.array(PermissionRequestParams)),
875
- addresses: v15.optional(v15.array(v15.enum(AddressPurpose))),
876
- message: v15.optional(
877
- v15.pipe(v15.string(), v15.maxLength(80, "The message must not exceed 80 characters."))
878
- )
879
- })
880
- );
881
- var connectResultSchema = v15.object({
882
- id: v15.string(),
883
- addresses: v15.array(addressSchema),
884
- walletType: walletTypeSchema,
885
- network: getNetworkResultSchema
886
- });
887
- var connectRequestMessageSchema = v15.object({
888
- ...rpcRequestMessageSchema.entries,
889
- ...v15.object({
890
- method: v15.literal(connectMethodName),
891
- params: connectParamsSchema,
928
+ method: v15.literal(getBalanceMethodName),
892
929
  id: v15.string()
893
930
  }).entries
894
931
  });
@@ -2092,6 +2129,10 @@ export {
2092
2129
  accountPermissionSchema,
2093
2130
  addListener,
2094
2131
  addressSchema,
2132
+ changeNetworkMethodName,
2133
+ changeNetworkParamsSchema,
2134
+ changeNetworkRequestMessageSchema,
2135
+ changeNetworkResultSchema,
2095
2136
  connectMethodName,
2096
2137
  connectParamsSchema,
2097
2138
  connectRequestMessageSchema,