@sats-connect/core 0.18.2-263ae91 → 0.19.0-d1718be

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 (3) hide show
  1. package/dist/index.d.mts +428 -4086
  2. package/dist/index.mjs +248 -271
  3. package/package.json +7 -10
package/dist/index.mjs CHANGED
@@ -1,10 +1,184 @@
1
1
  import * as v from "valibot";
2
+ import { createUnsecuredToken } from "jsontokens";
2
3
  import axios from "axios";
3
4
  import { AddressType as AddressType$1, getAddressInfo } from "bitcoin-address-validation";
4
5
  import { Buffer } from "buffer";
5
- import { createUnsecuredToken } from "jsontokens";
6
6
  import { match } from "ts-pattern";
7
7
 
8
+ //#region src/request/rpcSpec.ts
9
+ const specIdSchema = v.union([
10
+ v.string(),
11
+ v.number(),
12
+ v.null()
13
+ ]);
14
+ const specRequestSchema = v.object({
15
+ jsonrpc: v.literal("2.0"),
16
+ method: v.string(),
17
+ params: v.optional(v.union([
18
+ v.array(v.unknown()),
19
+ v.looseObject({}),
20
+ v.null()
21
+ ])),
22
+ id: v.optional(specIdSchema)
23
+ });
24
+ const specSuccessResponseSchema = v.object({
25
+ jsonrpc: v.literal("2.0"),
26
+ result: v.unknown(),
27
+ id: specIdSchema
28
+ });
29
+ const warningSchema = v.variant("code", [v.object({
30
+ code: v.literal("DEPRECATION_NOTICE"),
31
+ message: v.string(),
32
+ sunsetDate: v.pipe(v.string(), v.isoDate())
33
+ })]);
34
+ /**
35
+ * Extends the standard JSON RPC 2.0 with an additional field as a means of
36
+ * providing clients with extra data, such as deprecation warnings, without
37
+ * altering the main payloads.
38
+ *
39
+ * A JSON-RPC response must either be a result (success) or an error (failure).
40
+ * To provide additional data, conventions must be layered atop these two types.
41
+ * Having an additional property is the least disruptive approach, and is
42
+ * acceptable when clients are known to be able to handle such a structure,
43
+ * which they can since they're all part of Sats Connect.
44
+ */
45
+ const specSuccessWithExtensionsResponseSchema = v.object({
46
+ ...specSuccessResponseSchema.entries,
47
+ extensions: v.optional(v.object({ warnings: v.array(warningSchema) }))
48
+ });
49
+ const specErrorObjectSchema = v.object({
50
+ code: v.number(),
51
+ message: v.string(),
52
+ data: v.optional(v.unknown())
53
+ });
54
+ const specErrorResponseSchema = v.object({
55
+ jsonrpc: v.literal("2.0"),
56
+ error: specErrorObjectSchema,
57
+ id: specIdSchema
58
+ });
59
+ const specResponseSchema = v.union([specSuccessWithExtensionsResponseSchema, specErrorResponseSchema]);
60
+
61
+ //#endregion
62
+ //#region src/request/shared.ts
63
+ const rpcIdSchema = v.string();
64
+
65
+ //#endregion
66
+ //#region src/request/createSuccessResponseSchema.ts
67
+ function createSuccessResponseSchema({ method, resultSchema }) {
68
+ return v.object({
69
+ ...specSuccessWithExtensionsResponseSchema.entries,
70
+ id: rpcIdSchema,
71
+ result: resultSchema,
72
+ "~sats-connect-method": v.literal(method)
73
+ });
74
+ }
75
+
76
+ //#endregion
77
+ //#region src/request/methods.ts
78
+ const bitcoinMethods = {
79
+ getAccounts: "getAccounts",
80
+ getAddresses: "getAddresses",
81
+ bitcoin_getAddressesV2: "bitcoin_getAddressesV2",
82
+ getBalance: "getBalance",
83
+ bitcoin_getBalanceV2: "bitcoin_getBalanceV2",
84
+ getInfo: "getInfo",
85
+ sendTransfer: "sendTransfer",
86
+ bitcoin_sendTransferV2: "bitcoin_sendTransferV2",
87
+ signMessage: "signMessage",
88
+ bitcoin_signMessageV2: "bitcoin_signMessageV2",
89
+ signMultipleMessages: "signMultipleMessages",
90
+ bitcoin_signMultipleMessagesV2: "bitcoin_signMultipleMessagesV2",
91
+ signPsbt: "signPsbt",
92
+ bitcoin_signPsbtV2: "bitcoin_signPsbtV2"
93
+ };
94
+ const stacksMethods = {
95
+ stx_callContract: "stx_callContract",
96
+ stx_deployContract: "stx_deployContract",
97
+ stx_getAccounts: "stx_getAccounts",
98
+ stx_getAddresses: "stx_getAddresses",
99
+ stx_getNetworks: "stx_getNetworks",
100
+ stx_signMessage: "stx_signMessage",
101
+ stx_signStructuredMessage: "stx_signStructuredMessage",
102
+ stx_signTransaction: "stx_signTransaction",
103
+ stx_signTransactions: "stx_signTransactions",
104
+ stx_transferStx: "stx_transferStx"
105
+ };
106
+ const sparkMethods = {
107
+ spark_getAddresses: "spark_getAddresses",
108
+ spark_getAddressesV2: "spark_getAddressesV2",
109
+ spark_getBalance: "spark_getBalance",
110
+ spark_transfer: "spark_transfer",
111
+ spark_transferToken: "spark_transferToken",
112
+ spark_signMessage: "spark_signMessage",
113
+ spark_flashnet_getJwt: "spark_flashnet_getJwt",
114
+ spark_flashnet_signIntent: "spark_flashnet_signIntent",
115
+ spark_flashnet_signStructuredMessage: "spark_flashnet_signStructuredMessage",
116
+ spark_flashnet_executeSwap: "spark_flashnet_executeSwap",
117
+ spark_flashnet_executeRouteSwap: "spark_flashnet_executeRouteSwap",
118
+ spark_flashnet_clawbackFunds: "spark_flashnet_clawbackFunds",
119
+ spark_flashnet_getClawbackEligibleTransfers: "spark_flashnet_getClawbackEligibleTransfers"
120
+ };
121
+ const runesMethods = {
122
+ runes_estimateEtch: "runes_estimateEtch",
123
+ runes_estimateMint: "runes_estimateMint",
124
+ runes_estimateRbfOrder: "runes_estimateRbfOrder",
125
+ runes_etch: "runes_etch",
126
+ runes_getBalance: "runes_getBalance",
127
+ runes_getOrder: "runes_getOrder",
128
+ runes_mint: "runes_mint",
129
+ runes_rbfOrder: "runes_rbfOrder",
130
+ runes_transfer: "runes_transfer"
131
+ };
132
+ const ordinalsMethods = {
133
+ ord_getInscriptions: "ord_getInscriptions",
134
+ ord_sendInscriptions: "ord_sendInscriptions"
135
+ };
136
+ const walletMethods = {
137
+ wallet_addNetwork: "wallet_addNetwork",
138
+ wallet_open: "wallet_open",
139
+ wallet_addNetworkV2: "wallet_addNetworkV2",
140
+ wallet_changeNetwork: "wallet_changeNetwork",
141
+ wallet_connect: "wallet_connect",
142
+ wallet_connectV2: "wallet_connectV2",
143
+ wallet_disconnect: "wallet_disconnect",
144
+ wallet_getAccount: "wallet_getAccount",
145
+ wallet_getAccountV2: "wallet_getAccountV2",
146
+ wallet_getCurrentPermissions: "wallet_getCurrentPermissions",
147
+ wallet_getNetwork: "wallet_getNetwork",
148
+ wallet_getNetworks: "wallet_getNetworks",
149
+ wallet_getWalletType: "wallet_getWalletType",
150
+ wallet_openBridge: "wallet_openBridge",
151
+ wallet_openBuy: "wallet_openBuy",
152
+ wallet_openReceive: "wallet_openReceive",
153
+ wallet_renouncePermissions: "wallet_renouncePermissions",
154
+ wallet_requestPermissions: "wallet_requestPermissions",
155
+ wallet_switchNetwork: "wallet_switchNetwork"
156
+ };
157
+ const methods = {
158
+ ...bitcoinMethods,
159
+ ...stacksMethods,
160
+ ...sparkMethods,
161
+ ...runesMethods,
162
+ ...ordinalsMethods,
163
+ ...walletMethods
164
+ };
165
+
166
+ //#endregion
167
+ //#region src/request/rpc/objects/namespaces/stacks/methods/getNetworks/response.ts
168
+ const stacksGetNetworksResultSchema = v.object({
169
+ active: v.string(),
170
+ networks: v.array(v.object({
171
+ id: v.string(),
172
+ chainId: v.pipe(v.number(), v.integer(), v.minValue(0), v.maxValue(4294967295)),
173
+ transactionVersion: v.picklist([0, 128])
174
+ }))
175
+ });
176
+ const stacksGetNetworksSuccessResponseSchema = createSuccessResponseSchema({
177
+ method: stacksMethods.stx_getNetworks,
178
+ resultSchema: stacksGetNetworksResultSchema
179
+ });
180
+
181
+ //#endregion
8
182
  //#region src/request/rpc/objects/namespaces/wallet/shared/networks.ts
9
183
  const networkConfigurationChains = {
10
184
  bitcoin: "bitcoin",
@@ -62,7 +236,8 @@ const stacksNetworkConfigurationSchema = v.object({
62
236
  chain: v.literal(networkConfigurationChains.stacks),
63
237
  mode: stacksChainModeSchema,
64
238
  stacksApiUrl: v.pipe(v.string(), v.url()),
65
- xverseApiUrl: v.pipe(v.string(), v.url())
239
+ xverseApiUrl: v.pipe(v.string(), v.url()),
240
+ chainId: v.optional(v.pipe(v.number(), v.integer(), v.minValue(0), v.maxValue(4294967295)))
66
241
  });
67
242
  const starknetChainMode = {
68
243
  mainnet: "mainnet",
@@ -108,8 +283,7 @@ const allResolvedNetworksSchema = v.object({
108
283
  const walletTypes = [
109
284
  "software",
110
285
  "ledger",
111
- "keystone",
112
- "multisig"
286
+ "keystone"
113
287
  ];
114
288
  const walletTypeSchema = v.picklist(walletTypes);
115
289
 
@@ -134,50 +308,32 @@ let AddressType = /* @__PURE__ */ function(AddressType$2) {
134
308
  AddressType$2["spark"] = "spark";
135
309
  return AddressType$2;
136
310
  }({});
137
- const hexSchema = v.pipe(v.string(), v.regex(/^(?:[0-9a-f]{2})+$/, "Expected lowercase, even-length hex without a 0x prefix"));
138
- const tapInternalKeySchema = v.pipe(hexSchema, v.length(64, "Expected a 32-byte x-only key"));
139
- const controlBlockSchema = v.pipe(hexSchema, v.check((controlBlock) => controlBlock.length >= 66 && controlBlock.length <= 8258 && (controlBlock.length - 66) % 64 === 0, "Expected a 33+32n byte BIP341 control block"));
140
- const tapLeafScriptSchema = v.pipe(v.object({
141
- script: hexSchema,
142
- controlBlock: controlBlockSchema
143
- }), v.check(({ script, controlBlock }) => Number.parseInt(script.slice(-2), 16) === (Number.parseInt(controlBlock.slice(0, 2), 16) & 254), "Tapleaf version does not match the control block"));
144
- const unlockDefinitionSchema = v.variant("type", [
145
- v.object({ type: v.literal("p2wpkh") }),
146
- v.object({
147
- type: v.literal("p2sh-p2wpkh"),
148
- redeemScript: hexSchema
149
- }),
150
- v.object({
151
- type: v.literal("p2tr-key-path"),
152
- tapInternalKey: tapInternalKeySchema
153
- }),
154
- v.object({
155
- type: v.literal("p2wsh"),
156
- witnessScript: hexSchema
157
- }),
158
- v.object({
159
- type: v.literal("p2tr-script-path"),
160
- tapLeafScript: v.pipe(v.array(tapLeafScriptSchema), v.minLength(1))
161
- })
162
- ]);
163
- const addressSchema = v.pipe(v.object({
311
+ const addressSchema = v.object({
164
312
  address: v.string(),
165
313
  publicKey: v.string(),
166
314
  purpose: v.enum(AddressPurpose),
167
315
  addressType: v.enum(AddressType),
168
- walletType: walletTypeSchema,
169
- scriptPubKey: v.optional(hexSchema),
170
- unlockDefinition: v.optional(unlockDefinitionSchema)
171
- }), v.check(({ scriptPubKey, unlockDefinition }) => scriptPubKey === void 0 === (unlockDefinition === void 0), "scriptPubKey and unlockDefinition must both be present or both be absent"), v.check(({ addressType, unlockDefinition }) => {
172
- if (!unlockDefinition) return true;
173
- switch (unlockDefinition.type) {
174
- case "p2wpkh": return addressType === AddressType.p2wpkh;
175
- case "p2sh-p2wpkh": return addressType === AddressType.p2sh;
176
- case "p2tr-key-path":
177
- case "p2tr-script-path": return addressType === AddressType.p2tr;
178
- case "p2wsh": return addressType === AddressType.p2wsh;
316
+ walletType: walletTypeSchema
317
+ });
318
+
319
+ //#endregion
320
+ //#region src/addresses/index.ts
321
+ /**
322
+ * @deprecated Use `request()` instead
323
+ */
324
+ const getAddress = async (options) => {
325
+ const provider = await getProviderOrThrow(options.getProvider);
326
+ const { purposes } = options.payload;
327
+ if (!purposes) throw new Error("Address purposes are required");
328
+ try {
329
+ const request$1 = createUnsecuredToken(options.payload);
330
+ const response = await provider.connect(request$1);
331
+ options.onFinish?.(response);
332
+ } catch (error) {
333
+ console.error("[Connect] Error during address request", error);
334
+ options.onCancel?.();
179
335
  }
180
- }, "unlockDefinition type does not match addressType"));
336
+ };
181
337
 
182
338
  //#endregion
183
339
  //#region src/types.ts
@@ -273,10 +429,27 @@ const networkChangeV2Schema = v.object({
273
429
  });
274
430
  const disconnectEventName = "disconnect";
275
431
  const disconnectSchema = v.object({ type: v.literal(disconnectEventName) });
432
+ const stacksNetworkChangeSchema = v.object({
433
+ type: v.literal("stx_networkChange"),
434
+ result: stacksGetNetworksResultSchema
435
+ });
436
+ /** SIP-030 accounts are a bare array, not the legacy multi-chain addresses envelope. */
437
+ const stacksAccountChangeResultSchema = v.array(v.object({
438
+ address: v.string(),
439
+ publicKey: v.string(),
440
+ gaiaHubUrl: v.string(),
441
+ gaiaAppKey: v.string()
442
+ }));
443
+ const stacksAccountChangeSchema = v.object({
444
+ type: v.literal("stx_accountChange"),
445
+ result: stacksAccountChangeResultSchema
446
+ });
276
447
  const walletEventSchema = v.variant("type", [
277
448
  accountChangeSchema,
278
449
  networkChangeSchema,
279
- disconnectSchema
450
+ disconnectSchema,
451
+ stacksNetworkChangeSchema,
452
+ stacksAccountChangeSchema
280
453
  ]);
281
454
 
282
455
  //#endregion
@@ -658,6 +831,8 @@ var SatsConnectAdapter = class {
658
831
  default: return this.requestInternal(method, params);
659
832
  }
660
833
  }
834
+ /** Optional: existing third-party adapters do not have to implement SIP events. */
835
+ listen;
661
836
  };
662
837
 
663
838
  //#endregion
@@ -694,25 +869,6 @@ let ProviderPlatform = /* @__PURE__ */ function(ProviderPlatform$1) {
694
869
  return ProviderPlatform$1;
695
870
  }({});
696
871
 
697
- //#endregion
698
- //#region src/addresses/index.ts
699
- /**
700
- * @deprecated Use `request()` instead
701
- */
702
- const getAddress = async (options) => {
703
- const provider = await getProviderOrThrow(options.getProvider);
704
- const { purposes } = options.payload;
705
- if (!purposes) throw new Error("Address purposes are required");
706
- try {
707
- const request$1 = createUnsecuredToken(options.payload);
708
- const response = await provider.connect(request$1);
709
- options.onFinish?.(response);
710
- } catch (error) {
711
- console.error("[Connect] Error during address request", error);
712
- options.onCancel?.();
713
- }
714
- };
715
-
716
872
  //#endregion
717
873
  //#region src/adapters/unisat.ts
718
874
  function convertSignInputsToInputType(signInputs) {
@@ -869,60 +1025,6 @@ var UnisatAdapter = class extends SatsConnectAdapter {
869
1025
  };
870
1026
  };
871
1027
 
872
- //#endregion
873
- //#region src/request/rpcSpec.ts
874
- const specIdSchema = v.union([
875
- v.string(),
876
- v.number(),
877
- v.null()
878
- ]);
879
- const specRequestSchema = v.object({
880
- jsonrpc: v.literal("2.0"),
881
- method: v.string(),
882
- params: v.optional(v.union([
883
- v.array(v.unknown()),
884
- v.looseObject({}),
885
- v.null()
886
- ])),
887
- id: v.optional(specIdSchema)
888
- });
889
- const specSuccessResponseSchema = v.object({
890
- jsonrpc: v.literal("2.0"),
891
- result: v.unknown(),
892
- id: specIdSchema
893
- });
894
- const warningSchema = v.variant("code", [v.object({
895
- code: v.literal("DEPRECATION_NOTICE"),
896
- message: v.string(),
897
- sunsetDate: v.pipe(v.string(), v.isoDate())
898
- })]);
899
- /**
900
- * Extends the standard JSON RPC 2.0 with an additional field as a means of
901
- * providing clients with extra data, such as deprecation warnings, without
902
- * altering the main payloads.
903
- *
904
- * A JSON-RPC response must either be a result (success) or an error (failure).
905
- * To provide additional data, conventions must be layered atop these two types.
906
- * Having an additional property is the least disruptive approach, and is
907
- * acceptable when clients are known to be able to handle such a structure,
908
- * which they can since they're all part of Sats Connect.
909
- */
910
- const specSuccessWithExtensionsResponseSchema = v.object({
911
- ...specSuccessResponseSchema.entries,
912
- extensions: v.optional(v.object({ warnings: v.array(warningSchema) }))
913
- });
914
- const specErrorObjectSchema = v.object({
915
- code: v.number(),
916
- message: v.string(),
917
- data: v.optional(v.unknown())
918
- });
919
- const specErrorResponseSchema = v.object({
920
- jsonrpc: v.literal("2.0"),
921
- error: specErrorObjectSchema,
922
- id: specIdSchema
923
- });
924
- const specResponseSchema = v.union([specSuccessWithExtensionsResponseSchema, specErrorResponseSchema]);
925
-
926
1028
  //#endregion
927
1029
  //#region src/request/sanitizeRequest.ts
928
1030
  const sanitizeRequest = (method, params, providerInfo) => {
@@ -983,95 +1085,6 @@ const sanitizeAddressPurposeRequest = (method, params) => {
983
1085
  };
984
1086
  };
985
1087
 
986
- //#endregion
987
- //#region src/request/methods.ts
988
- const bitcoinMethods = {
989
- getAccounts: "getAccounts",
990
- getAddresses: "getAddresses",
991
- bitcoin_getAddressesV2: "bitcoin_getAddressesV2",
992
- getBalance: "getBalance",
993
- bitcoin_getBalanceV2: "bitcoin_getBalanceV2",
994
- getInfo: "getInfo",
995
- sendTransfer: "sendTransfer",
996
- bitcoin_sendTransferV2: "bitcoin_sendTransferV2",
997
- signMessage: "signMessage",
998
- bitcoin_signMessageV2: "bitcoin_signMessageV2",
999
- signMultipleMessages: "signMultipleMessages",
1000
- bitcoin_signMultipleMessagesV2: "bitcoin_signMultipleMessagesV2",
1001
- signPsbt: "signPsbt",
1002
- bitcoin_signPsbtV2: "bitcoin_signPsbtV2"
1003
- };
1004
- const stacksMethods = {
1005
- stx_callContract: "stx_callContract",
1006
- stx_deployContract: "stx_deployContract",
1007
- stx_getAccounts: "stx_getAccounts",
1008
- stx_getAddresses: "stx_getAddresses",
1009
- stx_signMessage: "stx_signMessage",
1010
- stx_signStructuredMessage: "stx_signStructuredMessage",
1011
- stx_signTransaction: "stx_signTransaction",
1012
- stx_signTransactions: "stx_signTransactions",
1013
- stx_transferStx: "stx_transferStx"
1014
- };
1015
- const sparkMethods = {
1016
- spark_getAddresses: "spark_getAddresses",
1017
- spark_getAddressesV2: "spark_getAddressesV2",
1018
- spark_getBalance: "spark_getBalance",
1019
- spark_transfer: "spark_transfer",
1020
- spark_transferToken: "spark_transferToken",
1021
- spark_signMessage: "spark_signMessage",
1022
- spark_flashnet_getJwt: "spark_flashnet_getJwt",
1023
- spark_flashnet_signIntent: "spark_flashnet_signIntent",
1024
- spark_flashnet_signStructuredMessage: "spark_flashnet_signStructuredMessage",
1025
- spark_flashnet_executeSwap: "spark_flashnet_executeSwap",
1026
- spark_flashnet_executeRouteSwap: "spark_flashnet_executeRouteSwap",
1027
- spark_flashnet_clawbackFunds: "spark_flashnet_clawbackFunds",
1028
- spark_flashnet_getClawbackEligibleTransfers: "spark_flashnet_getClawbackEligibleTransfers"
1029
- };
1030
- const runesMethods = {
1031
- runes_estimateEtch: "runes_estimateEtch",
1032
- runes_estimateMint: "runes_estimateMint",
1033
- runes_estimateRbfOrder: "runes_estimateRbfOrder",
1034
- runes_etch: "runes_etch",
1035
- runes_getBalance: "runes_getBalance",
1036
- runes_getOrder: "runes_getOrder",
1037
- runes_mint: "runes_mint",
1038
- runes_rbfOrder: "runes_rbfOrder",
1039
- runes_transfer: "runes_transfer"
1040
- };
1041
- const ordinalsMethods = {
1042
- ord_getInscriptions: "ord_getInscriptions",
1043
- ord_sendInscriptions: "ord_sendInscriptions"
1044
- };
1045
- const walletMethods = {
1046
- wallet_addNetwork: "wallet_addNetwork",
1047
- wallet_open: "wallet_open",
1048
- wallet_addNetworkV2: "wallet_addNetworkV2",
1049
- wallet_changeNetwork: "wallet_changeNetwork",
1050
- wallet_connect: "wallet_connect",
1051
- wallet_connectV2: "wallet_connectV2",
1052
- wallet_disconnect: "wallet_disconnect",
1053
- wallet_getAccount: "wallet_getAccount",
1054
- wallet_getAccountV2: "wallet_getAccountV2",
1055
- wallet_getCurrentPermissions: "wallet_getCurrentPermissions",
1056
- wallet_getNetwork: "wallet_getNetwork",
1057
- wallet_getNetworks: "wallet_getNetworks",
1058
- wallet_getWalletType: "wallet_getWalletType",
1059
- wallet_openBridge: "wallet_openBridge",
1060
- wallet_openBuy: "wallet_openBuy",
1061
- wallet_openReceive: "wallet_openReceive",
1062
- wallet_renouncePermissions: "wallet_renouncePermissions",
1063
- wallet_requestPermissions: "wallet_requestPermissions",
1064
- wallet_switchNetwork: "wallet_switchNetwork"
1065
- };
1066
- const methods = {
1067
- ...bitcoinMethods,
1068
- ...stacksMethods,
1069
- ...sparkMethods,
1070
- ...runesMethods,
1071
- ...ordinalsMethods,
1072
- ...walletMethods
1073
- };
1074
-
1075
1088
  //#endregion
1076
1089
  //#region src/request/rpc/compat.ts
1077
1090
  function bitcoinModeToLegacyBitcoinNetworkType(mode) {
@@ -1095,10 +1108,6 @@ const defineMethodSupport = (supportDefinition) => {
1095
1108
  return supportDefinition;
1096
1109
  };
1097
1110
 
1098
- //#endregion
1099
- //#region src/request/shared.ts
1100
- const rpcIdSchema = v.string();
1101
-
1102
1111
  //#endregion
1103
1112
  //#region src/request/createRequestSchema.ts
1104
1113
  function createRequestSchema({ paramsSchema, method }) {
@@ -1121,20 +1130,12 @@ const bitcoinGetAccountsRequestSchema = createRequestSchema({
1121
1130
  method: bitcoinMethods.getAccounts
1122
1131
  });
1123
1132
 
1124
- //#endregion
1125
- //#region src/request/createSuccessResponseSchema.ts
1126
- function createSuccessResponseSchema({ method, resultSchema }) {
1127
- return v.object({
1128
- ...specSuccessWithExtensionsResponseSchema.entries,
1129
- id: rpcIdSchema,
1130
- result: resultSchema,
1131
- "~sats-connect-method": v.literal(method)
1132
- });
1133
- }
1134
-
1135
1133
  //#endregion
1136
1134
  //#region src/request/rpc/objects/namespaces/bitcoin/methods/getAccounts/response.ts
1137
- const bitcoinGetAccountsResultSchema = v.array(addressSchema);
1135
+ const bitcoinGetAccountsResultSchema = v.array(v.object({
1136
+ ...addressSchema.entries,
1137
+ ...v.object({ walletType: walletTypeSchema }).entries
1138
+ }));
1138
1139
  const bitcoinGetAccountsSuccessResponseSchema = createSuccessResponseSchema({
1139
1140
  resultSchema: bitcoinGetAccountsResultSchema,
1140
1141
  method: bitcoinMethods.getAccounts
@@ -2804,29 +2805,13 @@ const stacksGetAccountsRequestSchema = createRequestSchema({
2804
2805
 
2805
2806
  //#endregion
2806
2807
  //#region src/request/rpc/objects/namespaces/stacks/methods/getAccounts/response.ts
2807
- const stacksLegacyAccountSchema = v.object({
2808
- address: v.string(),
2809
- publicKey: v.string(),
2810
- gaiaHubUrl: v.string(),
2811
- gaiaAppKey: v.string(),
2812
- walletType: v.optional(v.picklist([
2813
- "software",
2814
- "ledger",
2815
- "keystone"
2816
- ]))
2817
- });
2818
- const stacksMultisigAccountSchema = v.strictObject({
2819
- address: v.string(),
2820
- walletType: v.literal("multisig"),
2821
- multisig: v.object({
2822
- hashMode: v.literal("P2SHNonSequential"),
2823
- threshold: v.pipe(v.number(), v.integer(), v.minValue(1)),
2824
- publicKeys: v.pipe(v.array(v.pipe(v.string(), v.regex(/^0[23][0-9a-f]{64}$/))), v.minLength(1))
2825
- })
2826
- });
2827
- const stacksAccountSchema = v.union([stacksLegacyAccountSchema, stacksMultisigAccountSchema]);
2828
2808
  const stacksGetAccountsResultSchema = v.object({
2829
- addresses: v.array(stacksAccountSchema),
2809
+ addresses: v.array(v.object({
2810
+ address: v.string(),
2811
+ publicKey: v.string(),
2812
+ gaiaHubUrl: v.string(),
2813
+ gaiaAppKey: v.string()
2814
+ })),
2830
2815
  network: walletGetNetworkResultSchema
2831
2816
  });
2832
2817
  const stacksGetAccountsSuccessResponseSchema = createSuccessResponseSchema({
@@ -2853,6 +2838,14 @@ const stacksGetAddressesSuccessResponseSchema = createSuccessResponseSchema({
2853
2838
  method: stacksMethods.stx_getAddresses
2854
2839
  });
2855
2840
 
2841
+ //#endregion
2842
+ //#region src/request/rpc/objects/namespaces/stacks/methods/getNetworks/request.ts
2843
+ const stacksGetNetworksParamsSchema = v.nullish(v.null());
2844
+ const stacksGetNetworksRequestSchema = createRequestSchema({
2845
+ method: stacksMethods.stx_getNetworks,
2846
+ paramsSchema: stacksGetNetworksParamsSchema
2847
+ });
2848
+
2856
2849
  //#endregion
2857
2850
  //#region src/request/rpc/objects/namespaces/stacks/methods/signMessage/request.ts
2858
2851
  const stacksSignMessageParamsSchema = v.object({ message: v.string() });
@@ -2915,24 +2908,6 @@ const stacksSignTransactionSuccessResponseSchema = createSuccessResponseSchema({
2915
2908
  method: stacksMethods.stx_signTransaction
2916
2909
  });
2917
2910
 
2918
- //#endregion
2919
- //#region src/request/rpc/objects/namespaces/stacks/methods/signTransactions/errorData.ts
2920
- /**
2921
- * The `data` of the error response when a wallet stops broadcasting a batch
2922
- * partway through. Lists every transaction of the request, in request order.
2923
- */
2924
- const stacksSignTransactionsBroadcastErrorDataSchema = v.object({ transactions: v.array(v.object({
2925
- index: v.number(),
2926
- transaction: v.string(),
2927
- status: v.picklist([
2928
- "broadcast",
2929
- "failed",
2930
- "not_broadcast"
2931
- ]),
2932
- txid: v.optional(v.string()),
2933
- error: v.optional(v.string())
2934
- })) });
2935
-
2936
2911
  //#endregion
2937
2912
  //#region src/request/rpc/objects/namespaces/stacks/methods/signTransactions/request.ts
2938
2913
  const stacksSignTransactionsParamsSchema = v.object({
@@ -2948,10 +2923,7 @@ const stacksSignTransactionsRequestSchema = createRequestSchema({
2948
2923
 
2949
2924
  //#endregion
2950
2925
  //#region src/request/rpc/objects/namespaces/stacks/methods/signTransactions/response.ts
2951
- const stacksSignTransactionsResultSchema = v.object({
2952
- transactions: v.array(v.string()),
2953
- txids: v.optional(v.array(v.string()))
2954
- });
2926
+ const stacksSignTransactionsResultSchema = v.object({ transactions: v.array(v.string()) });
2955
2927
  const stacksSignTransactionsSuccessResponseSchema = createSuccessResponseSchema({
2956
2928
  resultSchema: stacksSignTransactionsResultSchema,
2957
2929
  method: stacksMethods.stx_signTransactions
@@ -2991,6 +2963,7 @@ const stacksRequestSchema = v.variant("method", [
2991
2963
  stacksDeployContractRequestSchema,
2992
2964
  stacksGetAccountsRequestSchema,
2993
2965
  stacksGetAddressesRequestSchema,
2966
+ stacksGetNetworksRequestSchema,
2994
2967
  stacksSignMessageRequestSchema,
2995
2968
  stacksSignStructuredMessageRequestSchema,
2996
2969
  stacksSignTransactionRequestSchema,
@@ -3002,6 +2975,7 @@ const stacksSuccessResponseSchema = v.variant("~sats-connect-method", [
3002
2975
  stacksDeployContractSuccessResponseSchema,
3003
2976
  stacksGetAccountsSuccessResponseSchema,
3004
2977
  stacksGetAddressesSuccessResponseSchema,
2978
+ stacksGetNetworksSuccessResponseSchema,
3005
2979
  stacksSignMessageSuccessResponseSchema,
3006
2980
  stacksSignStructuredMessageSuccessResponseSchema,
3007
2981
  stacksSignTransactionSuccessResponseSchema,
@@ -3123,6 +3097,12 @@ const addListener = (...rawArgs) => {
3123
3097
  }
3124
3098
  return provider.addListener(listenerInfo);
3125
3099
  };
3100
+ /** SIP-030 listener; legacy addListener remains unchanged. */
3101
+ const listen = (event, cb, providerId) => {
3102
+ const provider = providerId ? getProviderById(providerId) : window.XverseProviders?.BitcoinProvider || window.BitcoinProvider;
3103
+ if (!provider?.listen) throw new Error("The wallet provider does not support SIP-030 listeners.");
3104
+ return provider.listen(event, cb);
3105
+ };
3126
3106
 
3127
3107
  //#endregion
3128
3108
  //#region src/adapters/xverse.ts
@@ -3131,6 +3111,7 @@ var XverseAdapter = class extends SatsConnectAdapter {
3131
3111
  requestInternal = async (method, params) => {
3132
3112
  return request(method, params, this.id);
3133
3113
  };
3114
+ listen = (event, cb) => listen(event, cb, this.id);
3134
3115
  addListener = (listenerInfo) => {
3135
3116
  return addListener(listenerInfo, this.id);
3136
3117
  };
@@ -3322,10 +3303,6 @@ const sendBtcTransaction = async (options) => {
3322
3303
 
3323
3304
  //#endregion
3324
3305
  //#region src/transactions/signMultipleTransactions.ts
3325
- /**
3326
- * For vault (multisig) accounts the wallet returns the finalized PSBTs without
3327
- * broadcasting them, so every `txId` in the response is empty.
3328
- */
3329
3306
  const signMultipleTransactions = async (options) => {
3330
3307
  const provider = await getProviderOrThrow(options.getProvider);
3331
3308
  const { psbts } = options.payload;
@@ -3359,4 +3336,4 @@ const signTransaction = async (options) => {
3359
3336
  };
3360
3337
 
3361
3338
  //#endregion
3362
- export { AddressPurpose, AddressType, BaseAdapter, BitcoinNetworkType, DefaultAdaptersInfo, MessageSigningProtocols, ProviderPlatform, RpcErrorCode, SatsConnectAdapter, SparkNetworkType, StacksNetworkType, StarknetNetworkType, accountChangeEventName, accountChangeSchema, addListener, addressSchema, allResolvedNetworksSchema, bitcoinGetAccountsParamsSchema, bitcoinGetAccountsRequestSchema, bitcoinGetAccountsResultSchema, bitcoinGetAccountsSuccessResponseSchema, bitcoinGetAddressesParamsSchema, bitcoinGetAddressesRequestSchema, bitcoinGetAddressesResultSchema, bitcoinGetAddressesSuccessResponseSchema, bitcoinGetAddressesV2ParamsSchema, bitcoinGetAddressesV2RequestSchema, bitcoinGetAddressesV2ResultSchema, bitcoinGetAddressesV2SuccessResponseSchema, bitcoinGetBalanceParamsSchema, bitcoinGetBalanceRequestSchema, bitcoinGetBalanceResultSchema, bitcoinGetBalanceSuccessResponseSchema, bitcoinGetBalanceV2ParamsSchema, bitcoinGetBalanceV2RequestSchema, bitcoinGetBalanceV2ResultSchema, bitcoinGetBalanceV2SuccessResponseSchema, bitcoinGetInfoParamsSchema, bitcoinGetInfoRequestSchema, bitcoinGetInfoResultSchema, bitcoinGetInfoSuccessResponseSchema, bitcoinMethods, bitcoinModeToLegacyBitcoinNetworkType, bitcoinNetworkConfigurationOptionsSchema, bitcoinRequestSchema, bitcoinSendTransferParamsSchema, bitcoinSendTransferRequestSchema, bitcoinSendTransferResultSchema, bitcoinSendTransferSuccessResponseSchema, bitcoinSendTransferV2ParamsSchema, bitcoinSendTransferV2RequestSchema, bitcoinSendTransferV2ResultSchema, bitcoinSendTransferV2SuccessResponseSchema, bitcoinSignMessageParamsSchema, bitcoinSignMessageRequestSchema, bitcoinSignMessageResultSchema, bitcoinSignMessageSuccessResponseSchema, bitcoinSignMessageV2ParamsSchema, bitcoinSignMessageV2RequestSchema, bitcoinSignMessageV2ResultSchema, bitcoinSignMessageV2SuccessResponseSchema, bitcoinSignMultipleMessagesParamsSchema, bitcoinSignMultipleMessagesRequestSchema, bitcoinSignMultipleMessagesResultSchema, bitcoinSignMultipleMessagesSuccessResponseSchema, bitcoinSignMultipleMessagesV2ParamsSchema, bitcoinSignMultipleMessagesV2RequestSchema, bitcoinSignMultipleMessagesV2ResultSchema, bitcoinSignMultipleMessagesV2SuccessResponseSchema, bitcoinSignPsbtParamsSchema, bitcoinSignPsbtRequestSchema, bitcoinSignPsbtResultSchema, bitcoinSignPsbtSuccessResponseSchema, bitcoinSignPsbtV2ParamsSchema, bitcoinSignPsbtV2RequestSchema, bitcoinSignPsbtV2ResultSchema, bitcoinSignPsbtV2SuccessResponseSchema, bitcoinSuccessResponseSchema, createInscription, createRepeatInscriptions, createRpcRequest, createRpcSuccessResponse, defaultAdapters, defineMethodSupport, disconnectEventName, disconnectSchema, getAddress, getCapabilities, getDefaultProvider, getProviderById, getProviderOrThrow, getProviders, getSupportedWallets, isProviderInstalled, methods, networkChangeEventName, networkChangeEventNameV2, networkChangeSchema, networkChangeV2Schema, networkConfigurationOptionsSchema, ordinalsGetInscriptionsParamsSchema, ordinalsGetInscriptionsRequestSchema, ordinalsGetInscriptionsResultSchema, ordinalsGetInscriptionsSuccessResponseSchema, ordinalsMethods, ordinalsRequestSchema, ordinalsSendInscriptionsParamsSchema, ordinalsSendInscriptionsRequestSchema, ordinalsSendInscriptionsResultSchema, ordinalsSendInscriptionsSuccessResponseSchema, ordinalsSuccessResponseSchema, permissionRequestParamsSchema, removeDefaultProvider, request, rpcIdSchema, rpcRequestSchema, rpcSuccessResponseSchema, runesEstimateEtchParamsSchema, runesEstimateEtchRequestSchema, runesEstimateEtchResultSchema, runesEstimateEtchSuccessResponseSchema, runesEstimateMintParamsSchema, runesEstimateMintRequestSchema, runesEstimateMintResultSchema, runesEstimateMintSuccessResponseSchema, runesEstimateRbfOrderParamsSchema, runesEstimateRbfOrderRequestSchema, runesEstimateRbfOrderResultSchema, runesEstimateRbfOrderSuccessResponseSchema, runesEtchParamsSchema, runesEtchRequestSchema, runesEtchResultSchema, runesEtchSuccessResponseSchema, runesGetBalanceParamsSchema, runesGetBalanceRequestSchema, runesGetBalanceResultSchema, runesGetBalanceSuccessResponseSchema, runesGetOrderParamsSchema, runesGetOrderRequestSchema, runesGetOrderResultSchema, runesGetOrderSuccessResponseSchema, runesMethods, runesMintParamsSchema, runesMintRequestSchema, runesMintResultSchema, runesMintSuccessResponseSchema, runesRbfOrderParamsSchema, runesRbfOrderRequestSchema, runesRbfOrderResultSchema, runesRbfOrderSuccessResponseSchema, runesRequestSchema, runesSuccessResponseSchema, runesTransferParamsSchema, runesTransferRequestSchema, runesTransferResultSchema, runesTransferSuccessResponseSchema, sendBtcTransaction, setDefaultProvider, signMessage, signMultipleTransactions, signTransaction, sparkFlashnetClawbackFundsParamsSchema, sparkFlashnetClawbackFundsRequestSchema, sparkFlashnetClawbackFundsResultSchema, sparkFlashnetClawbackFundsSuccessResponseSchema, sparkFlashnetExecuteRouteSwapParamsSchema, sparkFlashnetExecuteRouteSwapRequestSchema, sparkFlashnetExecuteRouteSwapResultSchema, sparkFlashnetExecuteRouteSwapSuccessResponseSchema, sparkFlashnetExecuteSwapParamsSchema, sparkFlashnetExecuteSwapRequestSchema, sparkFlashnetExecuteSwapResultSchema, sparkFlashnetExecuteSwapSuccessResponseSchema, sparkFlashnetGetJwtParamsSchema, sparkFlashnetGetJwtRequestSchema, sparkFlashnetGetJwtResultSchema, sparkFlashnetGetJwtSuccessResponseSchema, sparkFlashnetSignIntentParamsSchema, sparkFlashnetSignIntentRequestSchema, sparkFlashnetSignIntentResultSchema, sparkFlashnetSignIntentSuccessResponseSchema, sparkFlashnetSignStructuredMessageParamsSchema, sparkFlashnetSignStructuredMessageRequestSchema, sparkFlashnetSignStructuredMessageResultSchema, sparkFlashnetSignStructuredMessageSuccessResponseSchema, sparkGetAddressesParamsSchema, sparkGetAddressesRequestSchema, sparkGetAddressesResultSchema, sparkGetAddressesSuccessResponseSchema, sparkGetAddressesV2ParamsSchema, sparkGetAddressesV2RequestSchema, sparkGetAddressesV2ResultSchema, sparkGetAddressesV2SuccessResponseSchema, sparkGetBalanceParamsSchema, sparkGetBalanceRequestSchema, sparkGetBalanceResultSchema, sparkGetBalanceSuccessResponseSchema, sparkGetClawbackEligibleTransfersParamsSchema, sparkGetClawbackEligibleTransfersRequestSchema, sparkGetClawbackEligibleTransfersResultSchema, sparkGetClawbackEligibleTransfersSuccessResponseSchema, sparkMethods, sparkModeToLegacySparkNetworkType, sparkNetworkConfigurationOptionsSchema, sparkRequestSchema, sparkSignMessageParamsSchema, sparkSignMessageRequestSchema, sparkSignMessageResultSchema, sparkSignMessageSuccessResponseSchema, sparkSuccessResponseSchema, sparkTransferParamsSchema, sparkTransferRequestSchema, sparkTransferResultSchema, sparkTransferSuccessResponseSchema, sparkTransferTokenParamsSchema, sparkTransferTokenRequestSchema, sparkTransferTokenResultSchema, sparkTransferTokenSuccessResponseSchema, specErrorObjectSchema, specErrorResponseSchema, specIdSchema, specRequestSchema, specResponseSchema, specSuccessResponseSchema, specSuccessWithExtensionsResponseSchema, stacksAccountSchema, stacksCallContractParamsSchema, stacksCallContractRequestSchema, stacksCallContractResultSchema, stacksCallContractSuccessResponseSchema, stacksDeployContractParamsSchema, stacksDeployContractRequestSchema, stacksDeployContractResultSchema, stacksDeployContractSuccessResponseSchema, stacksGetAccountsParamsSchema, stacksGetAccountsRequestSchema, stacksGetAccountsResultSchema, stacksGetAccountsSuccessResponseSchema, stacksGetAddressesParamsSchema, stacksGetAddressesRequestSchema, stacksGetAddressesResultSchema, stacksGetAddressesSuccessResponseSchema, stacksLegacyAccountSchema, stacksMethods, stacksModeToLegacyStacksNetworkType, stacksMultisigAccountSchema, stacksNetworkConfigurationOptionsSchema, stacksRequestSchema, stacksSignMessageParamsSchema, stacksSignMessageRequestSchema, stacksSignMessageResultSchema, stacksSignMessageSuccessResponseSchema, stacksSignStructuredMessageParamsSchema, stacksSignStructuredMessageRequestSchema, stacksSignStructuredMessageResultSchema, stacksSignStructuredMessageSuccessResponseSchema, stacksSignTransactionParamsSchema, stacksSignTransactionRequestSchema, stacksSignTransactionResultSchema, stacksSignTransactionSuccessResponseSchema, stacksSignTransactionsBroadcastErrorDataSchema, stacksSignTransactionsParamsSchema, stacksSignTransactionsRequestSchema, stacksSignTransactionsResultSchema, stacksSignTransactionsSuccessResponseSchema, stacksSuccessResponseSchema, stacksTransferStxParamsSchema, stacksTransferStxRequestSchema, stacksTransferStxResultSchema, stacksTransferStxSuccessResponseSchema, starknetNetworkConfigurationOptionsSchema, supportStates, unlockDefinitionSchema, walletAddNetworkParamsSchema, walletAddNetworkRequestSchema, walletAddNetworkResultSchema, walletAddNetworkSuccessResponseSchema, walletAddNetworkV2ParamsSchema, walletAddNetworkV2RequestSchema, walletAddNetworkV2ResultSchema, walletAddNetworkV2SuccessResponseSchema, walletChangeNetworkParamsSchema, walletChangeNetworkRequestSchema, walletChangeNetworkResultSchema, walletChangeNetworkSuccessResponseSchema, walletConnectParamsSchema, walletConnectRequestSchema, walletConnectResultSchema, walletConnectSuccessResponseSchema, walletConnectV2ParamsSchema, walletConnectV2RequestSchema, walletConnectV2ResultSchema, walletConnectV2SuccessResponseSchema, walletDisconnectParamsSchema, walletDisconnectRequestSchema, walletDisconnectResultSchema, walletDisconnectSuccessResponseSchema, walletEventSchema, walletGetAccountParamsSchema, walletGetAccountRequestSchema, walletGetAccountResultSchema, walletGetAccountSuccessResponseSchema, walletGetAccountV2ParamsSchema, walletGetAccountV2RequestSchema, walletGetAccountV2ResultSchema, walletGetAccountV2SuccessResponseSchema, walletGetCurrentPermissionsParamsSchema, walletGetCurrentPermissionsRequestSchema, walletGetCurrentPermissionsResultSchema, walletGetCurrentPermissionsSuccessResponseSchema, walletGetNetworkParamsSchema, walletGetNetworkRequestSchema, walletGetNetworkResultSchema, walletGetNetworkSuccessResponseSchema, walletGetNetworksParamsSchema, walletGetNetworksRequestSchema, walletGetNetworksResultSchema, walletGetNetworksSuccessResponseSchema, walletGetWalletTypeParamsSchema, walletGetWalletTypeRequestSchema, walletGetWalletTypeResultSchema, walletGetWalletTypeSuccessResponseSchema, walletMethods, walletOpenBridgeParamsSchema, walletOpenBridgeRequestSchema, walletOpenBridgeResultSchema, walletOpenBridgeSuccessResponseSchema, walletOpenBuyParamsSchema, walletOpenBuyRequestSchema, walletOpenBuyResultSchema, walletOpenBuySuccessResponseSchema, walletOpenParamsSchema, walletOpenReceiveParamsSchema, walletOpenReceiveRequestSchema, walletOpenReceiveResultSchema, walletOpenReceiveSuccessResponseSchema, walletOpenRequestSchema, walletOpenResultSchema, walletOpenSuccessResponseSchema, walletRenouncePermissionsParamsSchema, walletRenouncePermissionsRequestSchema, walletRenouncePermissionsResultSchema, walletRenouncePermissionsSuccessResponseSchema, walletRequestPermissionsParamsSchema, walletRequestPermissionsRequestSchema, walletRequestPermissionsResultSchema, walletRequestPermissionsSuccessResponseSchema, walletRequestSchema, walletSuccessResponseSchema, walletSwitchNetworkParamsSchema, walletSwitchNetworkRequestSchema, walletSwitchNetworkResultSchema, walletSwitchNetworkSuccessResponseSchema, walletTypeSchema, walletTypes };
3339
+ export { AddressPurpose, AddressType, BaseAdapter, BitcoinNetworkType, DefaultAdaptersInfo, MessageSigningProtocols, ProviderPlatform, RpcErrorCode, SatsConnectAdapter, SparkNetworkType, StacksNetworkType, StarknetNetworkType, accountChangeEventName, accountChangeSchema, addListener, addressSchema, allResolvedNetworksSchema, bitcoinGetAccountsParamsSchema, bitcoinGetAccountsRequestSchema, bitcoinGetAccountsResultSchema, bitcoinGetAccountsSuccessResponseSchema, bitcoinGetAddressesParamsSchema, bitcoinGetAddressesRequestSchema, bitcoinGetAddressesResultSchema, bitcoinGetAddressesSuccessResponseSchema, bitcoinGetAddressesV2ParamsSchema, bitcoinGetAddressesV2RequestSchema, bitcoinGetAddressesV2ResultSchema, bitcoinGetAddressesV2SuccessResponseSchema, bitcoinGetBalanceParamsSchema, bitcoinGetBalanceRequestSchema, bitcoinGetBalanceResultSchema, bitcoinGetBalanceSuccessResponseSchema, bitcoinGetBalanceV2ParamsSchema, bitcoinGetBalanceV2RequestSchema, bitcoinGetBalanceV2ResultSchema, bitcoinGetBalanceV2SuccessResponseSchema, bitcoinGetInfoParamsSchema, bitcoinGetInfoRequestSchema, bitcoinGetInfoResultSchema, bitcoinGetInfoSuccessResponseSchema, bitcoinMethods, bitcoinModeToLegacyBitcoinNetworkType, bitcoinNetworkConfigurationOptionsSchema, bitcoinRequestSchema, bitcoinSendTransferParamsSchema, bitcoinSendTransferRequestSchema, bitcoinSendTransferResultSchema, bitcoinSendTransferSuccessResponseSchema, bitcoinSendTransferV2ParamsSchema, bitcoinSendTransferV2RequestSchema, bitcoinSendTransferV2ResultSchema, bitcoinSendTransferV2SuccessResponseSchema, bitcoinSignMessageParamsSchema, bitcoinSignMessageRequestSchema, bitcoinSignMessageResultSchema, bitcoinSignMessageSuccessResponseSchema, bitcoinSignMessageV2ParamsSchema, bitcoinSignMessageV2RequestSchema, bitcoinSignMessageV2ResultSchema, bitcoinSignMessageV2SuccessResponseSchema, bitcoinSignMultipleMessagesParamsSchema, bitcoinSignMultipleMessagesRequestSchema, bitcoinSignMultipleMessagesResultSchema, bitcoinSignMultipleMessagesSuccessResponseSchema, bitcoinSignMultipleMessagesV2ParamsSchema, bitcoinSignMultipleMessagesV2RequestSchema, bitcoinSignMultipleMessagesV2ResultSchema, bitcoinSignMultipleMessagesV2SuccessResponseSchema, bitcoinSignPsbtParamsSchema, bitcoinSignPsbtRequestSchema, bitcoinSignPsbtResultSchema, bitcoinSignPsbtSuccessResponseSchema, bitcoinSignPsbtV2ParamsSchema, bitcoinSignPsbtV2RequestSchema, bitcoinSignPsbtV2ResultSchema, bitcoinSignPsbtV2SuccessResponseSchema, bitcoinSuccessResponseSchema, createInscription, createRepeatInscriptions, createRpcRequest, createRpcSuccessResponse, defaultAdapters, defineMethodSupport, disconnectEventName, disconnectSchema, getAddress, getCapabilities, getDefaultProvider, getProviderById, getProviderOrThrow, getProviders, getSupportedWallets, isProviderInstalled, listen, methods, networkChangeEventName, networkChangeEventNameV2, networkChangeSchema, networkChangeV2Schema, networkConfigurationOptionsSchema, ordinalsGetInscriptionsParamsSchema, ordinalsGetInscriptionsRequestSchema, ordinalsGetInscriptionsResultSchema, ordinalsGetInscriptionsSuccessResponseSchema, ordinalsMethods, ordinalsRequestSchema, ordinalsSendInscriptionsParamsSchema, ordinalsSendInscriptionsRequestSchema, ordinalsSendInscriptionsResultSchema, ordinalsSendInscriptionsSuccessResponseSchema, ordinalsSuccessResponseSchema, permissionRequestParamsSchema, removeDefaultProvider, request, rpcIdSchema, rpcRequestSchema, rpcSuccessResponseSchema, runesEstimateEtchParamsSchema, runesEstimateEtchRequestSchema, runesEstimateEtchResultSchema, runesEstimateEtchSuccessResponseSchema, runesEstimateMintParamsSchema, runesEstimateMintRequestSchema, runesEstimateMintResultSchema, runesEstimateMintSuccessResponseSchema, runesEstimateRbfOrderParamsSchema, runesEstimateRbfOrderRequestSchema, runesEstimateRbfOrderResultSchema, runesEstimateRbfOrderSuccessResponseSchema, runesEtchParamsSchema, runesEtchRequestSchema, runesEtchResultSchema, runesEtchSuccessResponseSchema, runesGetBalanceParamsSchema, runesGetBalanceRequestSchema, runesGetBalanceResultSchema, runesGetBalanceSuccessResponseSchema, runesGetOrderParamsSchema, runesGetOrderRequestSchema, runesGetOrderResultSchema, runesGetOrderSuccessResponseSchema, runesMethods, runesMintParamsSchema, runesMintRequestSchema, runesMintResultSchema, runesMintSuccessResponseSchema, runesRbfOrderParamsSchema, runesRbfOrderRequestSchema, runesRbfOrderResultSchema, runesRbfOrderSuccessResponseSchema, runesRequestSchema, runesSuccessResponseSchema, runesTransferParamsSchema, runesTransferRequestSchema, runesTransferResultSchema, runesTransferSuccessResponseSchema, sendBtcTransaction, setDefaultProvider, signMessage, signMultipleTransactions, signTransaction, sparkFlashnetClawbackFundsParamsSchema, sparkFlashnetClawbackFundsRequestSchema, sparkFlashnetClawbackFundsResultSchema, sparkFlashnetClawbackFundsSuccessResponseSchema, sparkFlashnetExecuteRouteSwapParamsSchema, sparkFlashnetExecuteRouteSwapRequestSchema, sparkFlashnetExecuteRouteSwapResultSchema, sparkFlashnetExecuteRouteSwapSuccessResponseSchema, sparkFlashnetExecuteSwapParamsSchema, sparkFlashnetExecuteSwapRequestSchema, sparkFlashnetExecuteSwapResultSchema, sparkFlashnetExecuteSwapSuccessResponseSchema, sparkFlashnetGetJwtParamsSchema, sparkFlashnetGetJwtRequestSchema, sparkFlashnetGetJwtResultSchema, sparkFlashnetGetJwtSuccessResponseSchema, sparkFlashnetSignIntentParamsSchema, sparkFlashnetSignIntentRequestSchema, sparkFlashnetSignIntentResultSchema, sparkFlashnetSignIntentSuccessResponseSchema, sparkFlashnetSignStructuredMessageParamsSchema, sparkFlashnetSignStructuredMessageRequestSchema, sparkFlashnetSignStructuredMessageResultSchema, sparkFlashnetSignStructuredMessageSuccessResponseSchema, sparkGetAddressesParamsSchema, sparkGetAddressesRequestSchema, sparkGetAddressesResultSchema, sparkGetAddressesSuccessResponseSchema, sparkGetAddressesV2ParamsSchema, sparkGetAddressesV2RequestSchema, sparkGetAddressesV2ResultSchema, sparkGetAddressesV2SuccessResponseSchema, sparkGetBalanceParamsSchema, sparkGetBalanceRequestSchema, sparkGetBalanceResultSchema, sparkGetBalanceSuccessResponseSchema, sparkGetClawbackEligibleTransfersParamsSchema, sparkGetClawbackEligibleTransfersRequestSchema, sparkGetClawbackEligibleTransfersResultSchema, sparkGetClawbackEligibleTransfersSuccessResponseSchema, sparkMethods, sparkModeToLegacySparkNetworkType, sparkNetworkConfigurationOptionsSchema, sparkRequestSchema, sparkSignMessageParamsSchema, sparkSignMessageRequestSchema, sparkSignMessageResultSchema, sparkSignMessageSuccessResponseSchema, sparkSuccessResponseSchema, sparkTransferParamsSchema, sparkTransferRequestSchema, sparkTransferResultSchema, sparkTransferSuccessResponseSchema, sparkTransferTokenParamsSchema, sparkTransferTokenRequestSchema, sparkTransferTokenResultSchema, sparkTransferTokenSuccessResponseSchema, specErrorObjectSchema, specErrorResponseSchema, specIdSchema, specRequestSchema, specResponseSchema, specSuccessResponseSchema, specSuccessWithExtensionsResponseSchema, stacksAccountChangeResultSchema, stacksAccountChangeSchema, stacksCallContractParamsSchema, stacksCallContractRequestSchema, stacksCallContractResultSchema, stacksCallContractSuccessResponseSchema, stacksDeployContractParamsSchema, stacksDeployContractRequestSchema, stacksDeployContractResultSchema, stacksDeployContractSuccessResponseSchema, stacksGetAccountsParamsSchema, stacksGetAccountsRequestSchema, stacksGetAccountsResultSchema, stacksGetAccountsSuccessResponseSchema, stacksGetAddressesParamsSchema, stacksGetAddressesRequestSchema, stacksGetAddressesResultSchema, stacksGetAddressesSuccessResponseSchema, stacksGetNetworksParamsSchema, stacksGetNetworksRequestSchema, stacksGetNetworksResultSchema, stacksGetNetworksSuccessResponseSchema, stacksMethods, stacksModeToLegacyStacksNetworkType, stacksNetworkChangeSchema, stacksNetworkConfigurationOptionsSchema, stacksRequestSchema, stacksSignMessageParamsSchema, stacksSignMessageRequestSchema, stacksSignMessageResultSchema, stacksSignMessageSuccessResponseSchema, stacksSignStructuredMessageParamsSchema, stacksSignStructuredMessageRequestSchema, stacksSignStructuredMessageResultSchema, stacksSignStructuredMessageSuccessResponseSchema, stacksSignTransactionParamsSchema, stacksSignTransactionRequestSchema, stacksSignTransactionResultSchema, stacksSignTransactionSuccessResponseSchema, stacksSignTransactionsParamsSchema, stacksSignTransactionsRequestSchema, stacksSignTransactionsResultSchema, stacksSignTransactionsSuccessResponseSchema, stacksSuccessResponseSchema, stacksTransferStxParamsSchema, stacksTransferStxRequestSchema, stacksTransferStxResultSchema, stacksTransferStxSuccessResponseSchema, starknetNetworkConfigurationOptionsSchema, supportStates, walletAddNetworkParamsSchema, walletAddNetworkRequestSchema, walletAddNetworkResultSchema, walletAddNetworkSuccessResponseSchema, walletAddNetworkV2ParamsSchema, walletAddNetworkV2RequestSchema, walletAddNetworkV2ResultSchema, walletAddNetworkV2SuccessResponseSchema, walletChangeNetworkParamsSchema, walletChangeNetworkRequestSchema, walletChangeNetworkResultSchema, walletChangeNetworkSuccessResponseSchema, walletConnectParamsSchema, walletConnectRequestSchema, walletConnectResultSchema, walletConnectSuccessResponseSchema, walletConnectV2ParamsSchema, walletConnectV2RequestSchema, walletConnectV2ResultSchema, walletConnectV2SuccessResponseSchema, walletDisconnectParamsSchema, walletDisconnectRequestSchema, walletDisconnectResultSchema, walletDisconnectSuccessResponseSchema, walletEventSchema, walletGetAccountParamsSchema, walletGetAccountRequestSchema, walletGetAccountResultSchema, walletGetAccountSuccessResponseSchema, walletGetAccountV2ParamsSchema, walletGetAccountV2RequestSchema, walletGetAccountV2ResultSchema, walletGetAccountV2SuccessResponseSchema, walletGetCurrentPermissionsParamsSchema, walletGetCurrentPermissionsRequestSchema, walletGetCurrentPermissionsResultSchema, walletGetCurrentPermissionsSuccessResponseSchema, walletGetNetworkParamsSchema, walletGetNetworkRequestSchema, walletGetNetworkResultSchema, walletGetNetworkSuccessResponseSchema, walletGetNetworksParamsSchema, walletGetNetworksRequestSchema, walletGetNetworksResultSchema, walletGetNetworksSuccessResponseSchema, walletGetWalletTypeParamsSchema, walletGetWalletTypeRequestSchema, walletGetWalletTypeResultSchema, walletGetWalletTypeSuccessResponseSchema, walletMethods, walletOpenBridgeParamsSchema, walletOpenBridgeRequestSchema, walletOpenBridgeResultSchema, walletOpenBridgeSuccessResponseSchema, walletOpenBuyParamsSchema, walletOpenBuyRequestSchema, walletOpenBuyResultSchema, walletOpenBuySuccessResponseSchema, walletOpenParamsSchema, walletOpenReceiveParamsSchema, walletOpenReceiveRequestSchema, walletOpenReceiveResultSchema, walletOpenReceiveSuccessResponseSchema, walletOpenRequestSchema, walletOpenResultSchema, walletOpenSuccessResponseSchema, walletRenouncePermissionsParamsSchema, walletRenouncePermissionsRequestSchema, walletRenouncePermissionsResultSchema, walletRenouncePermissionsSuccessResponseSchema, walletRequestPermissionsParamsSchema, walletRequestPermissionsRequestSchema, walletRequestPermissionsResultSchema, walletRequestPermissionsSuccessResponseSchema, walletRequestSchema, walletSuccessResponseSchema, walletSwitchNetworkParamsSchema, walletSwitchNetworkRequestSchema, walletSwitchNetworkResultSchema, walletSwitchNetworkSuccessResponseSchema, walletTypeSchema, walletTypes };