@sats-connect/core 0.16.0-8db93ef → 0.16.0-9abf1a3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. package/dist/index.cjs +1097 -1255
  2. package/dist/index.d.cts +2885 -2973
  3. package/dist/index.d.mts +2885 -2973
  4. package/dist/index.mjs +1093 -1240
  5. package/package.json +2 -2
package/dist/index.cjs CHANGED
@@ -35,23 +35,36 @@ let buffer = require("buffer");
35
35
  let ts_pattern = require("ts-pattern");
36
36
 
37
37
  //#region src/request/rpc/objects/namespaces/wallet/shared/networks.ts
38
+ const networkConfigurationChains = {
39
+ bitcoin: "bitcoin",
40
+ spark: "spark",
41
+ stacks: "stacks",
42
+ starknet: "starknet"
43
+ };
44
+ const networkConfigurationChainSchema = valibot.enum(networkConfigurationChains);
45
+ const networkConfigurationSources = {
46
+ builtin: "builtin",
47
+ custom: "custom"
48
+ };
49
+ const networkConfigurationSourceSchema = valibot.enum(networkConfigurationSources);
38
50
  const commonNetworkConfigurationSchema = valibot.object({
39
51
  id: valibot.string(),
40
52
  name: valibot.string(),
41
53
  mode: valibot.picklist([]),
54
+ source: networkConfigurationSourceSchema,
42
55
  blockExplorerUrl: valibot.optional(valibot.union([valibot.pipe(valibot.literal(""), valibot.transform(() => void 0)), valibot.pipe(valibot.string(), valibot.url())]))
43
56
  });
44
- const bitcoinChainModeSchema = valibot.enum({
57
+ const bitcoinChainModeSchema = valibot.pipe(valibot.string(), valibot.enum({
45
58
  mainnet: "mainnet",
46
59
  testnet: "testnet",
47
60
  testnet4: "testnet4",
48
61
  signet: "signet",
49
62
  regtest: "regtest"
50
- });
63
+ }));
51
64
  const bitcoinNetworkConfigurationSchema = valibot.object({
52
- chain: valibot.literal("bitcoin"),
53
65
  ...commonNetworkConfigurationSchema.entries,
54
- mode: valibot.pipe(valibot.string(), bitcoinChainModeSchema),
66
+ chain: valibot.literal(networkConfigurationChains.bitcoin),
67
+ mode: bitcoinChainModeSchema,
55
68
  xverseApiUrl: valibot.pipe(valibot.string(), valibot.url()),
56
69
  electrsApiUrl: valibot.pipe(valibot.string(), valibot.url())
57
70
  });
@@ -59,11 +72,11 @@ const sparkChainMode = {
59
72
  mainnet: "mainnet",
60
73
  regtest: "regtest"
61
74
  };
62
- const sparkChainModeSchema = valibot.enum(sparkChainMode);
75
+ const sparkChainModeSchema = valibot.pipe(valibot.string(), valibot.enum(sparkChainMode));
63
76
  const sparkNetworkConfigurationSchema = valibot.object({
64
- chain: valibot.literal("spark"),
65
77
  ...commonNetworkConfigurationSchema.entries,
66
- mode: valibot.pipe(valibot.string(), sparkChainModeSchema),
78
+ chain: valibot.literal(networkConfigurationChains.spark),
79
+ mode: sparkChainModeSchema,
67
80
  electrsApiUrl: valibot.pipe(valibot.string(), valibot.url())
68
81
  });
69
82
  const stacksChainMode = {
@@ -72,11 +85,11 @@ const stacksChainMode = {
72
85
  devnet: "devnet",
73
86
  mocknet: "mocknet"
74
87
  };
75
- const stacksChainModeSchema = valibot.enum(stacksChainMode);
88
+ const stacksChainModeSchema = valibot.pipe(valibot.string(), valibot.enum(stacksChainMode));
76
89
  const stacksNetworkConfigurationSchema = valibot.object({
77
- chain: valibot.literal("stacks"),
78
90
  ...commonNetworkConfigurationSchema.entries,
79
- mode: valibot.pipe(valibot.string(), stacksChainModeSchema),
91
+ chain: valibot.literal(networkConfigurationChains.stacks),
92
+ mode: stacksChainModeSchema,
80
93
  stacksApiUrl: valibot.pipe(valibot.string(), valibot.url()),
81
94
  xverseApiUrl: valibot.pipe(valibot.string(), valibot.url())
82
95
  });
@@ -84,11 +97,11 @@ const starknetChainMode = {
84
97
  mainnet: "mainnet",
85
98
  sepolia: "sepolia"
86
99
  };
87
- const starknetChainModeSchema = valibot.enum(starknetChainMode);
100
+ const starknetChainModeSchema = valibot.pipe(valibot.string(), valibot.enum(starknetChainMode));
88
101
  const starknetNetworkConfigurationSchema = valibot.object({
89
- chain: valibot.literal("starknet"),
90
102
  ...commonNetworkConfigurationSchema.entries,
91
- mode: valibot.pipe(valibot.string(), starknetChainModeSchema),
103
+ chain: valibot.literal(networkConfigurationChains.starknet),
104
+ mode: starknetChainModeSchema,
92
105
  rpcApiUrl: valibot.pipe(valibot.string(), valibot.url()),
93
106
  xverseApiUrl: valibot.pipe(valibot.string(), valibot.url())
94
107
  });
@@ -98,10 +111,11 @@ const networkConfigurationSchema = valibot.variant("chain", [
98
111
  stacksNetworkConfigurationSchema,
99
112
  starknetNetworkConfigurationSchema
100
113
  ]);
101
- const bitcoinNetworkConfigurationOptionsSchema = valibot.omit(bitcoinNetworkConfigurationSchema, ["id"]);
102
- const sparkNetworkConfigurationOptionsSchema = valibot.omit(sparkNetworkConfigurationSchema, ["id"]);
103
- const stacksNetworkConfigurationOptionsSchema = valibot.omit(stacksNetworkConfigurationSchema, ["id"]);
104
- const starknetNetworkConfigurationOptionsSchema = valibot.omit(starknetNetworkConfigurationSchema, ["id"]);
114
+ const omitFields = ["id", "source"];
115
+ const bitcoinNetworkConfigurationOptionsSchema = valibot.omit(bitcoinNetworkConfigurationSchema, omitFields);
116
+ const sparkNetworkConfigurationOptionsSchema = valibot.omit(sparkNetworkConfigurationSchema, omitFields);
117
+ const stacksNetworkConfigurationOptionsSchema = valibot.omit(stacksNetworkConfigurationSchema, omitFields);
118
+ const starknetNetworkConfigurationOptionsSchema = valibot.omit(starknetNetworkConfigurationSchema, omitFields);
105
119
  const networkConfigurationOptionsSchema = valibot.variant("chain", [
106
120
  bitcoinNetworkConfigurationOptionsSchema,
107
121
  sparkNetworkConfigurationOptionsSchema,
@@ -115,18 +129,7 @@ const allResolvedNetworksSchema = valibot.object({
115
129
  stacks: stacksNetworkConfigurationSchema,
116
130
  starknet: starknetNetworkConfigurationSchema
117
131
  }),
118
- builtin: valibot.object({
119
- bitcoin: valibot.array(bitcoinNetworkConfigurationSchema),
120
- spark: valibot.array(sparkNetworkConfigurationSchema),
121
- stacks: valibot.array(stacksNetworkConfigurationSchema),
122
- starknet: valibot.array(starknetNetworkConfigurationSchema)
123
- }),
124
- custom: valibot.object({
125
- bitcoin: valibot.array(bitcoinNetworkConfigurationSchema),
126
- spark: valibot.array(sparkNetworkConfigurationSchema),
127
- stacks: valibot.array(stacksNetworkConfigurationSchema),
128
- starknet: valibot.array(starknetNetworkConfigurationSchema)
129
- })
132
+ all: valibot.array(networkConfigurationSchema)
130
133
  });
131
134
 
132
135
  //#endregion
@@ -974,13 +977,11 @@ const sanitizeAddressPurposeRequest = (method, params) => {
974
977
  //#region src/request/methods.ts
975
978
  const bitcoinMethods = {
976
979
  getAccounts: "getAccounts",
977
- bitcoin_getAccountsV2: "bitcoin_getAccountsV2",
978
980
  getAddresses: "getAddresses",
979
981
  bitcoin_getAddressesV2: "bitcoin_getAddressesV2",
980
982
  getBalance: "getBalance",
981
983
  bitcoin_getBalanceV2: "bitcoin_getBalanceV2",
982
984
  getInfo: "getInfo",
983
- bitcoin_getInfoV2: "bitcoin_getInfoV2",
984
985
  sendTransfer: "sendTransfer",
985
986
  bitcoin_sendTransferV2: "bitcoin_sendTransferV2",
986
987
  signMessage: "signMessage",
@@ -995,7 +996,6 @@ const stacksMethods = {
995
996
  stx_deployContract: "stx_deployContract",
996
997
  stx_getAccounts: "stx_getAccounts",
997
998
  stx_getAddresses: "stx_getAddresses",
998
- stacks_getAddressesV2: "stacks_getAddressesV2",
999
999
  stx_signMessage: "stx_signMessage",
1000
1000
  stx_signStructuredMessage: "stx_signStructuredMessage",
1001
1001
  stx_signTransaction: "stx_signTransaction",
@@ -1035,7 +1035,6 @@ const ordinalsMethods = {
1035
1035
  const walletMethods = {
1036
1036
  wallet_addNetwork: "wallet_addNetwork",
1037
1037
  wallet_addNetworkV2: "wallet_addNetworkV2",
1038
- wallet_changeNetworkById: "wallet_changeNetworkById",
1039
1038
  wallet_changeNetwork: "wallet_changeNetwork",
1040
1039
  wallet_connect: "wallet_connect",
1041
1040
  wallet_connectV2: "wallet_connectV2",
@@ -1050,7 +1049,16 @@ const walletMethods = {
1050
1049
  wallet_openBuy: "wallet_openBuy",
1051
1050
  wallet_openReceive: "wallet_openReceive",
1052
1051
  wallet_renouncePermissions: "wallet_renouncePermissions",
1053
- wallet_requestPermissions: "wallet_requestPermissions"
1052
+ wallet_requestPermissions: "wallet_requestPermissions",
1053
+ wallet_switchNetwork: "wallet_switchNetwork"
1054
+ };
1055
+ const methods = {
1056
+ ...bitcoinMethods,
1057
+ ...stacksMethods,
1058
+ ...sparkMethods,
1059
+ ...runesMethods,
1060
+ ...ordinalsMethods,
1061
+ ...walletMethods
1054
1062
  };
1055
1063
 
1056
1064
  //#endregion
@@ -1074,13 +1082,11 @@ const { active } = {
1074
1082
  };
1075
1083
  const methodSupport = {
1076
1084
  [bitcoinMethods.getAccounts]: active,
1077
- [bitcoinMethods.bitcoin_getAccountsV2]: active,
1078
1085
  [bitcoinMethods.getAddresses]: active,
1079
1086
  [bitcoinMethods.bitcoin_getAddressesV2]: active,
1080
1087
  [bitcoinMethods.getBalance]: active,
1081
1088
  [bitcoinMethods.bitcoin_getBalanceV2]: active,
1082
1089
  [bitcoinMethods.getInfo]: active,
1083
- [bitcoinMethods.bitcoin_getInfoV2]: active,
1084
1090
  [bitcoinMethods.sendTransfer]: active,
1085
1091
  [bitcoinMethods.bitcoin_sendTransferV2]: active,
1086
1092
  [bitcoinMethods.signMessage]: active,
@@ -1093,7 +1099,6 @@ const methodSupport = {
1093
1099
  [stacksMethods.stx_deployContract]: active,
1094
1100
  [stacksMethods.stx_getAccounts]: active,
1095
1101
  [stacksMethods.stx_getAddresses]: active,
1096
- [stacksMethods.stacks_getAddressesV2]: active,
1097
1102
  [stacksMethods.stx_signMessage]: active,
1098
1103
  [stacksMethods.stx_signStructuredMessage]: active,
1099
1104
  [stacksMethods.stx_signTransaction]: active,
@@ -1125,7 +1130,6 @@ const methodSupport = {
1125
1130
  [ordinalsMethods.ord_sendInscriptions]: active,
1126
1131
  [walletMethods.wallet_addNetwork]: active,
1127
1132
  [walletMethods.wallet_addNetworkV2]: active,
1128
- [walletMethods.wallet_changeNetworkById]: active,
1129
1133
  [walletMethods.wallet_changeNetwork]: active,
1130
1134
  [walletMethods.wallet_connect]: active,
1131
1135
  [walletMethods.wallet_connectV2]: active,
@@ -1140,7 +1144,8 @@ const methodSupport = {
1140
1144
  [walletMethods.wallet_openBuy]: active,
1141
1145
  [walletMethods.wallet_openReceive]: active,
1142
1146
  [walletMethods.wallet_renouncePermissions]: active,
1143
- [walletMethods.wallet_requestPermissions]: active
1147
+ [walletMethods.wallet_requestPermissions]: active,
1148
+ [walletMethods.wallet_switchNetwork]: active
1144
1149
  };
1145
1150
 
1146
1151
  //#endregion
@@ -1191,28 +1196,6 @@ const bitcoinGetAccountsSuccessResponseSchema = createSuccessResponseSchema({
1191
1196
  method: bitcoinMethods.getAccounts
1192
1197
  });
1193
1198
 
1194
- //#endregion
1195
- //#region src/request/rpc/objects/namespaces/bitcoin/methods/getAccountsV2/request.ts
1196
- const bitcoinGetAccountsV2ParamsSchema = valibot.object({
1197
- purposes: valibot.array(valibot.enum(AddressPurpose)),
1198
- message: valibot.optional(valibot.string())
1199
- });
1200
- const bitcoinGetAccountsV2RequestSchema = createRequestSchema({
1201
- paramsSchema: bitcoinGetAccountsV2ParamsSchema,
1202
- method: bitcoinMethods.bitcoin_getAccountsV2
1203
- });
1204
-
1205
- //#endregion
1206
- //#region src/request/rpc/objects/namespaces/bitcoin/methods/getAccountsV2/response.ts
1207
- const bitcoinGetAccountsV2ResultSchema = valibot.array(valibot.object({
1208
- ...addressSchema.entries,
1209
- ...valibot.object({ walletType: walletTypeSchema }).entries
1210
- }));
1211
- const bitcoinGetAccountsV2SuccessResponseSchema = createSuccessResponseSchema({
1212
- resultSchema: bitcoinGetAccountsV2ResultSchema,
1213
- method: bitcoinMethods.bitcoin_getAccountsV2
1214
- });
1215
-
1216
1199
  //#endregion
1217
1200
  //#region src/request/rpc/objects/namespaces/bitcoin/methods/getAddresses/request.ts
1218
1201
  const bitcoinGetAddressesParamsSchema = valibot.object({
@@ -1252,1494 +1235,1393 @@ const bitcoinGetAddressesV2RequestSchema = createRequestSchema({
1252
1235
  });
1253
1236
 
1254
1237
  //#endregion
1255
- //#region src/request/rpc/objects/namespaces/bitcoin/methods/getAddressesV2/response.ts
1256
- const getNetworksResultSchema = valibot.object({
1257
- active: valibot.object({
1258
- bitcoin: valibot.object({
1259
- id: valibot.string(),
1260
- type: valibot.string(),
1261
- name: valibot.string()
1262
- }),
1263
- stacks: valibot.object({
1264
- id: valibot.string(),
1265
- type: valibot.string(),
1266
- name: valibot.string()
1267
- }),
1268
- spark: valibot.object({
1269
- id: valibot.string(),
1270
- type: valibot.string(),
1271
- name: valibot.string()
1272
- }),
1273
- starknet: valibot.object({
1274
- id: valibot.string(),
1275
- type: valibot.string(),
1276
- name: valibot.string()
1277
- })
1238
+ //#region src/request/rpc/objects/namespaces/wallet/methods/addNetwork/request.ts
1239
+ const walletAddNetworkParamsSchema = valibot.variant("chain", [
1240
+ valibot.object({
1241
+ chain: valibot.literal("bitcoin"),
1242
+ type: valibot.enum(BitcoinNetworkType),
1243
+ name: valibot.string(),
1244
+ rpcUrl: valibot.string(),
1245
+ rpcFallbackUrl: valibot.optional(valibot.string()),
1246
+ indexerUrl: valibot.optional(valibot.string()),
1247
+ blockExplorerUrl: valibot.optional(valibot.string()),
1248
+ switch: valibot.optional(valibot.boolean())
1278
1249
  }),
1279
- builtin: valibot.object({
1280
- bitcoin: valibot.array(valibot.any()),
1281
- stacks: valibot.array(valibot.any()),
1282
- spark: valibot.array(valibot.any()),
1283
- starknet: valibot.array(valibot.any())
1250
+ valibot.object({
1251
+ chain: valibot.literal("stacks"),
1252
+ name: valibot.string(),
1253
+ type: valibot.enum(StacksNetworkType),
1254
+ rpcUrl: valibot.string(),
1255
+ blockExplorerUrl: valibot.optional(valibot.string()),
1256
+ switch: valibot.optional(valibot.boolean())
1284
1257
  }),
1285
- custom: valibot.object({
1286
- bitcoin: valibot.array(valibot.any()),
1287
- stacks: valibot.array(valibot.any()),
1288
- spark: valibot.array(valibot.any()),
1289
- starknet: valibot.array(valibot.any())
1258
+ valibot.object({
1259
+ chain: valibot.literal("starknet"),
1260
+ name: valibot.string(),
1261
+ type: valibot.enum(StarknetNetworkType),
1262
+ rpcUrl: valibot.string(),
1263
+ blockExplorerUrl: valibot.optional(valibot.string()),
1264
+ switch: valibot.optional(valibot.boolean())
1290
1265
  })
1291
- });
1292
- const bitcoinGetAddressesV2ResultSchema = valibot.object({
1293
- addresses: valibot.array(addressSchema),
1294
- networks: getNetworksResultSchema
1295
- });
1296
- const bitcoinGetAddressesV2SuccessResponseSchema = createSuccessResponseSchema({
1297
- resultSchema: bitcoinGetAddressesV2ResultSchema,
1298
- method: bitcoinMethods.bitcoin_getAddressesV2
1266
+ ]);
1267
+ const walletAddNetworkRequestSchema = createRequestSchema({
1268
+ paramsSchema: walletAddNetworkParamsSchema,
1269
+ method: walletMethods.wallet_addNetwork
1299
1270
  });
1300
1271
 
1301
1272
  //#endregion
1302
- //#region src/request/rpc/objects/namespaces/bitcoin/methods/getBalance/request.ts
1303
- const bitcoinGetBalanceParamsSchema = valibot.nullish(valibot.null());
1304
- const bitcoinGetBalanceRequestSchema = createRequestSchema({
1305
- paramsSchema: bitcoinGetBalanceParamsSchema,
1306
- method: bitcoinMethods.getBalance
1273
+ //#region src/request/rpc/objects/namespaces/wallet/methods/addNetwork/response.ts
1274
+ const walletAddNetworkResultSchema = valibot.object({ id: valibot.string() });
1275
+ const walletAddNetworkSuccessResponseSchema = createSuccessResponseSchema({
1276
+ resultSchema: walletAddNetworkResultSchema,
1277
+ method: walletMethods.wallet_addNetwork
1307
1278
  });
1308
1279
 
1309
1280
  //#endregion
1310
- //#region src/request/rpc/objects/namespaces/bitcoin/methods/getBalance/response.ts
1311
- const bitcoinGetBalanceResultSchema = valibot.object({
1312
- confirmed: valibot.string(),
1313
- unconfirmed: valibot.string(),
1314
- total: valibot.string()
1281
+ //#region src/request/rpc/objects/namespaces/wallet/shared/permissions.ts
1282
+ const accountActionsSchema = valibot.object({ read: valibot.optional(valibot.boolean()) });
1283
+ const walletActionsSchema = valibot.object({ readNetwork: valibot.optional(valibot.boolean()) });
1284
+ const accountPermissionSchema = valibot.object({
1285
+ type: valibot.literal("account"),
1286
+ resourceId: valibot.string(),
1287
+ clientId: valibot.string(),
1288
+ actions: accountActionsSchema
1315
1289
  });
1316
- const bitcoinGetBalanceSuccessResponseSchema = createSuccessResponseSchema({
1317
- resultSchema: bitcoinGetBalanceResultSchema,
1318
- method: bitcoinMethods.getBalance
1290
+ const walletPermissionSchema = valibot.object({
1291
+ type: valibot.literal("wallet"),
1292
+ resourceId: valibot.string(),
1293
+ clientId: valibot.string(),
1294
+ actions: walletActionsSchema
1319
1295
  });
1296
+ const permissionSchema = valibot.variant("type", [accountPermissionSchema, walletPermissionSchema]);
1297
+ const permission = valibot.variant("type", [accountPermissionSchema, walletPermissionSchema]);
1298
+ /**
1299
+ * Permissions with the clientId field omitted and optional actions. Used for
1300
+ * permission requests, since the wallet performs authentication based on the
1301
+ * client's tab origin and should not rely on the client authenticating
1302
+ * themselves.
1303
+ */
1304
+ const permissionRequestParamsSchema = valibot.variant("type", [valibot.object({ ...valibot.omit(accountPermissionSchema, ["clientId"]).entries }), valibot.object({ ...valibot.omit(walletPermissionSchema, ["clientId"]).entries })]);
1320
1305
 
1321
1306
  //#endregion
1322
- //#region src/request/rpc/objects/namespaces/bitcoin/methods/getBalanceV2/request.ts
1323
- const bitcoinGetBalanceV2ParamsSchema = valibot.nullish(valibot.null());
1324
- const bitcoinGetBalanceV2RequestSchema = createRequestSchema({
1325
- paramsSchema: bitcoinGetBalanceV2ParamsSchema,
1326
- method: bitcoinMethods.bitcoin_getBalanceV2
1307
+ //#region src/request/rpc/objects/namespaces/wallet/methods/addNetworkV2/request.ts
1308
+ const walletAddNetworkV2ParamsSchema = valibot.object({
1309
+ network: networkConfigurationOptionsSchema,
1310
+ switch: valibot.optional(valibot.boolean(), false)
1311
+ });
1312
+ const walletAddNetworkV2RequestSchema = createRequestSchema({
1313
+ paramsSchema: walletAddNetworkV2ParamsSchema,
1314
+ method: walletMethods.wallet_addNetworkV2
1327
1315
  });
1328
1316
 
1329
1317
  //#endregion
1330
- //#region src/request/rpc/objects/namespaces/bitcoin/methods/getBalanceV2/response.ts
1331
- const bitcoinGetBalanceV2ResultSchema = valibot.object({
1332
- confirmed: valibot.string(),
1333
- unconfirmed: valibot.string(),
1334
- total: valibot.string()
1335
- });
1336
- const bitcoinGetBalanceV2SuccessResponseSchema = createSuccessResponseSchema({
1337
- resultSchema: bitcoinGetBalanceV2ResultSchema,
1338
- method: bitcoinMethods.bitcoin_getBalanceV2
1318
+ //#region src/request/rpc/objects/namespaces/wallet/methods/addNetworkV2/response.ts
1319
+ const walletAddNetworkV2ResultSchema = networkConfigurationSchema;
1320
+ const walletAddNetworkV2SuccessResponseSchema = createSuccessResponseSchema({
1321
+ resultSchema: walletAddNetworkV2ResultSchema,
1322
+ method: walletMethods.wallet_addNetworkV2
1339
1323
  });
1340
1324
 
1341
1325
  //#endregion
1342
- //#region src/request/rpc/objects/namespaces/bitcoin/methods/getInfo/request.ts
1343
- const bitcoinGetInfoParamsSchema = valibot.nullish(valibot.null());
1344
- const bitcoinGetInfoRequestSchema = createRequestSchema({
1345
- paramsSchema: bitcoinGetInfoParamsSchema,
1346
- method: bitcoinMethods.getInfo
1326
+ //#region src/request/rpc/objects/namespaces/wallet/methods/changeNetwork/request.ts
1327
+ const walletChangeNetworkParamsSchema = valibot.object({ name: valibot.enum(BitcoinNetworkType) });
1328
+ const walletChangeNetworkRequestSchema = createRequestSchema({
1329
+ paramsSchema: walletChangeNetworkParamsSchema,
1330
+ method: walletMethods.wallet_changeNetwork
1347
1331
  });
1348
1332
 
1349
1333
  //#endregion
1350
- //#region src/request/rpc/objects/namespaces/bitcoin/methods/getInfo/response.ts
1351
- const bitcoinGetInfoResultSchema = valibot.object({
1352
- version: valibot.string(),
1353
- platform: valibot.optional(valibot.enum(ProviderPlatform)),
1354
- methods: valibot.optional(valibot.array(valibot.string())),
1355
- supports: valibot.array(valibot.string())
1356
- });
1357
- const bitcoinGetInfoSuccessResponseSchema = createSuccessResponseSchema({
1358
- resultSchema: bitcoinGetInfoResultSchema,
1359
- method: bitcoinMethods.getInfo
1334
+ //#region src/request/rpc/objects/namespaces/wallet/methods/changeNetwork/response.ts
1335
+ const walletChangeNetworkResultSchema = valibot.nullish(valibot.null());
1336
+ const walletChangeNetworkSuccessResponseSchema = createSuccessResponseSchema({
1337
+ resultSchema: walletChangeNetworkResultSchema,
1338
+ method: walletMethods.wallet_changeNetwork
1360
1339
  });
1361
1340
 
1362
1341
  //#endregion
1363
- //#region src/request/rpc/objects/namespaces/bitcoin/methods/getInfoV2/request.ts
1364
- const bitcoinGetInfoV2ParamsSchema = valibot.nullish(valibot.null());
1365
- const bitcoinGetInfoV2RequestSchema = createRequestSchema({
1366
- paramsSchema: bitcoinGetInfoV2ParamsSchema,
1367
- method: bitcoinMethods.bitcoin_getInfoV2
1342
+ //#region src/request/rpc/objects/namespaces/wallet/methods/connect/request.ts
1343
+ const walletConnectParamsSchema = valibot.nullish(valibot.object({
1344
+ permissions: valibot.optional(valibot.array(permissionRequestParamsSchema)),
1345
+ addresses: valibot.optional(valibot.array(valibot.enum(AddressPurpose))),
1346
+ message: valibot.optional(valibot.pipe(valibot.string(), valibot.maxLength(80, "The message must not exceed 80 characters."))),
1347
+ network: valibot.optional(valibot.picklist([
1348
+ "Mainnet",
1349
+ "Testnet",
1350
+ "Signet"
1351
+ ]))
1352
+ }));
1353
+ const walletConnectRequestSchema = createRequestSchema({
1354
+ paramsSchema: walletConnectParamsSchema,
1355
+ method: walletMethods.wallet_connect
1368
1356
  });
1369
1357
 
1370
1358
  //#endregion
1371
- //#region src/request/rpc/objects/namespaces/bitcoin/methods/getInfoV2/response.ts
1372
- const bitcoinGetInfoV2ResultSchema = valibot.object({
1373
- version: valibot.string(),
1374
- platform: valibot.optional(valibot.enum(ProviderPlatform)),
1375
- methods: valibot.optional(valibot.array(valibot.string())),
1376
- supports: valibot.array(valibot.string())
1377
- });
1378
- const bitcoinGetInfoV2SuccessResponseSchema = createSuccessResponseSchema({
1379
- resultSchema: bitcoinGetInfoV2ResultSchema,
1380
- method: bitcoinMethods.bitcoin_getInfoV2
1359
+ //#region src/request/rpc/objects/namespaces/wallet/methods/getNetwork/request.ts
1360
+ const walletGetNetworkParamsSchema = valibot.nullish(valibot.null());
1361
+ const walletGetNetworkRequestSchema = createRequestSchema({
1362
+ paramsSchema: walletGetNetworkParamsSchema,
1363
+ method: walletMethods.wallet_getNetwork
1381
1364
  });
1382
1365
 
1383
1366
  //#endregion
1384
- //#region src/request/rpc/objects/namespaces/bitcoin/methods/sendTransfer/request.ts
1385
- const bitcoinSendTransferParamsSchema = valibot.object({ recipients: valibot.array(valibot.object({
1386
- address: valibot.string(),
1387
- amount: valibot.number()
1388
- })) });
1389
- const bitcoinSendTransferRequestSchema = createRequestSchema({
1390
- paramsSchema: bitcoinSendTransferParamsSchema,
1391
- method: bitcoinMethods.sendTransfer
1367
+ //#region src/request/rpc/objects/namespaces/wallet/methods/getNetwork/response.ts
1368
+ const walletGetNetworkResultSchema = valibot.object({
1369
+ bitcoin: valibot.object({ name: valibot.enum(BitcoinNetworkType) }),
1370
+ stacks: valibot.object({ name: valibot.enum(StacksNetworkType) }),
1371
+ spark: valibot.object({ name: valibot.enum(SparkNetworkType) })
1372
+ });
1373
+ const walletGetNetworkSuccessResponseSchema = createSuccessResponseSchema({
1374
+ resultSchema: walletGetNetworkResultSchema,
1375
+ method: walletMethods.wallet_getNetwork
1392
1376
  });
1393
1377
 
1394
1378
  //#endregion
1395
- //#region src/request/rpc/objects/namespaces/bitcoin/methods/sendTransfer/response.ts
1396
- const bitcoinSendTransferResultSchema = valibot.object({ txid: valibot.string() });
1397
- const bitcoinSendTransferSuccessResponseSchema = createSuccessResponseSchema({
1398
- resultSchema: bitcoinSendTransferResultSchema,
1399
- method: bitcoinMethods.sendTransfer
1379
+ //#region src/request/rpc/objects/namespaces/wallet/methods/connect/response.ts
1380
+ const walletConnectResultSchema = valibot.object({
1381
+ id: valibot.string(),
1382
+ addresses: valibot.array(addressSchema),
1383
+ walletType: walletTypeSchema,
1384
+ network: walletGetNetworkResultSchema
1385
+ });
1386
+ const walletConnectSuccessResponseSchema = createSuccessResponseSchema({
1387
+ resultSchema: walletConnectResultSchema,
1388
+ method: walletMethods.wallet_connect
1400
1389
  });
1401
1390
 
1402
1391
  //#endregion
1403
- //#region src/request/rpc/objects/namespaces/bitcoin/methods/sendTransferV2/request.ts
1404
- const bitcoinSendTransferV2ParamsSchema = valibot.object({ recipients: valibot.array(valibot.object({
1405
- address: valibot.string(),
1406
- amount: valibot.number()
1407
- })) });
1408
- const bitcoinSendTransferV2RequestSchema = createRequestSchema({
1409
- paramsSchema: bitcoinSendTransferV2ParamsSchema,
1410
- method: bitcoinMethods.bitcoin_sendTransferV2
1392
+ //#region src/request/rpc/objects/namespaces/wallet/methods/connectV2/request.ts
1393
+ const walletConnectV2ParamsSchema = valibot.nullish(valibot.object({
1394
+ permissions: permissionRequestParamsSchema,
1395
+ addressPurposes: valibot.optional(valibot.array(valibot.enum(AddressPurpose))),
1396
+ message: valibot.optional(valibot.pipe(valibot.string(), valibot.maxLength(80, "The message must not exceed 80 characters."))),
1397
+ networkId: valibot.optional(valibot.string())
1398
+ }));
1399
+ const walletConnectV2RequestSchema = createRequestSchema({
1400
+ paramsSchema: walletConnectV2ParamsSchema,
1401
+ method: walletMethods.wallet_connectV2
1411
1402
  });
1412
1403
 
1413
1404
  //#endregion
1414
- //#region src/request/rpc/objects/namespaces/bitcoin/methods/sendTransferV2/response.ts
1415
- const bitcoinSendTransferV2ResultSchema = valibot.object({ txid: valibot.string() });
1416
- const bitcoinSendTransferV2SuccessResponseSchema = createSuccessResponseSchema({
1417
- resultSchema: bitcoinSendTransferV2ResultSchema,
1418
- method: bitcoinMethods.bitcoin_sendTransferV2
1405
+ //#region src/request/rpc/objects/namespaces/wallet/methods/getNetworks/request.ts
1406
+ const walletGetNetworksParamsSchema = valibot.nullish(valibot.null());
1407
+ const walletGetNetworksRequestSchema = createRequestSchema({
1408
+ paramsSchema: walletGetNetworksParamsSchema,
1409
+ method: walletMethods.wallet_getNetworks
1419
1410
  });
1420
1411
 
1421
1412
  //#endregion
1422
- //#region src/request/rpc/objects/namespaces/bitcoin/methods/signMessage/request.ts
1423
- const bitcoinSignMessageParamsSchema = valibot.object({
1424
- address: valibot.string(),
1425
- message: valibot.string(),
1426
- protocol: valibot.optional(valibot.enum(MessageSigningProtocols))
1427
- });
1428
- const bitcoinSignMessageRequestSchema = createRequestSchema({
1429
- paramsSchema: bitcoinSignMessageParamsSchema,
1430
- method: bitcoinMethods.signMessage
1413
+ //#region src/request/rpc/objects/namespaces/wallet/methods/getNetworks/response.ts
1414
+ const walletGetNetworksResultSchema = allResolvedNetworksSchema;
1415
+ const walletGetNetworksSuccessResponseSchema = createSuccessResponseSchema({
1416
+ resultSchema: walletGetNetworksResultSchema,
1417
+ method: walletMethods.wallet_getNetworks
1431
1418
  });
1432
1419
 
1433
1420
  //#endregion
1434
- //#region src/request/rpc/objects/namespaces/bitcoin/methods/signMessage/response.ts
1435
- const bitcoinSignMessageResultSchema = valibot.object({
1436
- signature: valibot.string(),
1437
- messageHash: valibot.string(),
1438
- address: valibot.string(),
1439
- protocol: valibot.enum(MessageSigningProtocols)
1421
+ //#region src/request/rpc/objects/namespaces/wallet/methods/connectV2/response.ts
1422
+ const walletConnectV2ResultSchema = valibot.object({
1423
+ accountId: valibot.string(),
1424
+ addresses: valibot.array(addressSchema),
1425
+ walletType: walletTypeSchema,
1426
+ networks: walletGetNetworksResultSchema
1440
1427
  });
1441
- const bitcoinSignMessageSuccessResponseSchema = createSuccessResponseSchema({
1442
- resultSchema: bitcoinSignMessageResultSchema,
1443
- method: bitcoinMethods.signMessage
1428
+ const walletConnectV2SuccessResponseSchema = createSuccessResponseSchema({
1429
+ resultSchema: walletConnectV2ResultSchema,
1430
+ method: walletMethods.wallet_connectV2
1444
1431
  });
1445
1432
 
1446
1433
  //#endregion
1447
- //#region src/request/rpc/objects/namespaces/bitcoin/methods/signMessageV2/request.ts
1448
- const bitcoinSignMessageV2ParamsSchema = valibot.object({
1449
- address: valibot.string(),
1450
- message: valibot.string(),
1451
- protocol: valibot.optional(valibot.enum(MessageSigningProtocols))
1452
- });
1453
- const bitcoinSignMessageV2RequestSchema = createRequestSchema({
1454
- paramsSchema: bitcoinSignMessageV2ParamsSchema,
1455
- method: bitcoinMethods.bitcoin_signMessageV2
1434
+ //#region src/request/rpc/objects/namespaces/wallet/methods/disconnect/request.ts
1435
+ const walletDisconnectParamsSchema = valibot.nullish(valibot.null());
1436
+ const walletDisconnectRequestSchema = createRequestSchema({
1437
+ paramsSchema: walletDisconnectParamsSchema,
1438
+ method: walletMethods.wallet_disconnect
1456
1439
  });
1457
1440
 
1458
1441
  //#endregion
1459
- //#region src/request/rpc/objects/namespaces/bitcoin/methods/signMessageV2/response.ts
1460
- const bitcoinSignMessageV2ResultSchema = valibot.object({
1461
- signature: valibot.string(),
1462
- messageHash: valibot.string(),
1463
- address: valibot.string(),
1464
- protocol: valibot.enum(MessageSigningProtocols)
1465
- });
1466
- const bitcoinSignMessageV2SuccessResponseSchema = createSuccessResponseSchema({
1467
- resultSchema: bitcoinSignMessageV2ResultSchema,
1468
- method: bitcoinMethods.bitcoin_signMessageV2
1442
+ //#region src/request/rpc/objects/namespaces/wallet/methods/disconnect/response.ts
1443
+ const walletDisconnectResultSchema = valibot.nullish(valibot.null());
1444
+ const walletDisconnectSuccessResponseSchema = createSuccessResponseSchema({
1445
+ resultSchema: walletDisconnectResultSchema,
1446
+ method: walletMethods.wallet_disconnect
1469
1447
  });
1470
1448
 
1471
1449
  //#endregion
1472
- //#region src/request/rpc/objects/namespaces/bitcoin/methods/signMultipleMessages/request.ts
1473
- const bitcoinSignMultipleMessagesParamsSchema = valibot.array(valibot.object({
1474
- address: valibot.string(),
1475
- message: valibot.string(),
1476
- protocol: valibot.optional(valibot.enum(MessageSigningProtocols))
1477
- }));
1478
- const bitcoinSignMultipleMessagesRequestSchema = createRequestSchema({
1479
- paramsSchema: bitcoinSignMultipleMessagesParamsSchema,
1480
- method: bitcoinMethods.signMultipleMessages
1450
+ //#region src/request/rpc/objects/namespaces/wallet/methods/getAccount/request.ts
1451
+ const walletGetAccountParamsSchema = valibot.nullish(valibot.null());
1452
+ const walletGetAccountRequestSchema = createRequestSchema({
1453
+ paramsSchema: walletGetAccountParamsSchema,
1454
+ method: walletMethods.wallet_getAccount
1481
1455
  });
1482
1456
 
1483
1457
  //#endregion
1484
- //#region src/request/rpc/objects/namespaces/bitcoin/methods/signMultipleMessages/response.ts
1485
- const bitcoinSignMultipleMessagesResultSchema = valibot.array(valibot.object({
1486
- signature: valibot.string(),
1487
- message: valibot.string(),
1488
- messageHash: valibot.string(),
1489
- address: valibot.string(),
1490
- protocol: valibot.enum(MessageSigningProtocols)
1491
- }));
1492
- const bitcoinSignMultipleMessagesSuccessResponseSchema = createSuccessResponseSchema({
1493
- resultSchema: bitcoinSignMultipleMessagesResultSchema,
1494
- method: bitcoinMethods.signMultipleMessages
1458
+ //#region src/request/rpc/objects/namespaces/wallet/methods/getAccount/response.ts
1459
+ const walletGetAccountResultSchema = valibot.object({
1460
+ id: valibot.string(),
1461
+ addresses: valibot.array(addressSchema),
1462
+ walletType: walletTypeSchema,
1463
+ network: walletGetNetworkResultSchema
1495
1464
  });
1496
-
1497
- //#endregion
1498
- //#region src/request/rpc/objects/namespaces/bitcoin/methods/signMultipleMessagesV2/request.ts
1499
- const bitcoinSignMultipleMessagesV2ParamsSchema = valibot.array(valibot.object({
1500
- address: valibot.string(),
1501
- message: valibot.string(),
1502
- protocol: valibot.optional(valibot.enum(MessageSigningProtocols))
1503
- }));
1504
- const bitcoinSignMultipleMessagesV2RequestSchema = createRequestSchema({
1505
- paramsSchema: bitcoinSignMultipleMessagesV2ParamsSchema,
1506
- method: bitcoinMethods.bitcoin_signMultipleMessagesV2
1465
+ const walletGetAccountSuccessResponseSchema = createSuccessResponseSchema({
1466
+ resultSchema: walletGetAccountResultSchema,
1467
+ method: walletMethods.wallet_getAccount
1507
1468
  });
1508
1469
 
1509
1470
  //#endregion
1510
- //#region src/request/rpc/objects/namespaces/bitcoin/methods/signMultipleMessagesV2/response.ts
1511
- const bitcoinSignMultipleMessagesV2ResultSchema = valibot.array(valibot.object({
1512
- signature: valibot.string(),
1513
- message: valibot.string(),
1514
- messageHash: valibot.string(),
1515
- address: valibot.string(),
1516
- protocol: valibot.enum(MessageSigningProtocols)
1517
- }));
1518
- const bitcoinSignMultipleMessagesV2SuccessResponseSchema = createSuccessResponseSchema({
1519
- resultSchema: bitcoinSignMultipleMessagesV2ResultSchema,
1520
- method: bitcoinMethods.bitcoin_signMultipleMessagesV2
1471
+ //#region src/request/rpc/objects/namespaces/wallet/methods/getAccountV2/request.ts
1472
+ const walletGetAccountV2ParamsSchema = valibot.nullish(valibot.null());
1473
+ const walletGetAccountV2RequestSchema = createRequestSchema({
1474
+ paramsSchema: walletGetAccountV2ParamsSchema,
1475
+ method: walletMethods.wallet_getAccountV2
1521
1476
  });
1522
1477
 
1523
1478
  //#endregion
1524
- //#region src/request/rpc/objects/namespaces/bitcoin/methods/signPsbt/request.ts
1525
- const bitcoinSignPsbtParamsSchema = valibot.object({
1526
- psbt: valibot.string(),
1527
- signInputs: valibot.optional(valibot.record(valibot.string(), valibot.array(valibot.number()))),
1528
- broadcast: valibot.optional(valibot.boolean())
1479
+ //#region src/request/rpc/objects/namespaces/wallet/methods/getAccountV2/response.ts
1480
+ const walletGetAccountV2ResultSchema = valibot.object({
1481
+ id: valibot.string(),
1482
+ addresses: valibot.array(addressSchema),
1483
+ walletType: walletTypeSchema,
1484
+ networks: walletGetNetworksResultSchema
1529
1485
  });
1530
- const bitcoinSignPsbtRequestSchema = createRequestSchema({
1531
- paramsSchema: bitcoinSignPsbtParamsSchema,
1532
- method: bitcoinMethods.signPsbt
1486
+ const walletGetAccountV2SuccessResponseSchema = createSuccessResponseSchema({
1487
+ resultSchema: walletGetAccountV2ResultSchema,
1488
+ method: walletMethods.wallet_getAccountV2
1533
1489
  });
1534
1490
 
1535
1491
  //#endregion
1536
- //#region src/request/rpc/objects/namespaces/bitcoin/methods/signPsbt/response.ts
1537
- const bitcoinSignPsbtResultSchema = valibot.object({
1538
- psbt: valibot.string(),
1539
- txid: valibot.optional(valibot.string())
1540
- });
1541
- const bitcoinSignPsbtSuccessResponseSchema = createSuccessResponseSchema({
1542
- resultSchema: bitcoinSignPsbtResultSchema,
1543
- method: bitcoinMethods.signPsbt
1492
+ //#region src/request/rpc/objects/namespaces/wallet/methods/getCurrentPermissions/request.ts
1493
+ const walletGetCurrentPermissionsParamsSchema = valibot.nullish(valibot.null());
1494
+ const walletGetCurrentPermissionsRequestSchema = createRequestSchema({
1495
+ paramsSchema: walletGetCurrentPermissionsParamsSchema,
1496
+ method: walletMethods.wallet_getCurrentPermissions
1544
1497
  });
1545
1498
 
1546
1499
  //#endregion
1547
- //#region src/request/rpc/objects/namespaces/bitcoin/methods/signPsbtV2/request.ts
1548
- const bitcoinSignPsbtV2ParamsSchema = valibot.object({
1549
- psbt: valibot.string(),
1550
- signInputs: valibot.optional(valibot.record(valibot.string(), valibot.array(valibot.number()))),
1551
- broadcast: valibot.optional(valibot.boolean())
1552
- });
1553
- const bitcoinSignPsbtV2RequestSchema = createRequestSchema({
1554
- paramsSchema: bitcoinSignPsbtV2ParamsSchema,
1555
- method: bitcoinMethods.bitcoin_signPsbtV2
1500
+ //#region src/request/rpc/objects/namespaces/wallet/methods/getCurrentPermissions/response.ts
1501
+ const walletGetCurrentPermissionsResultSchema = permission;
1502
+ const walletGetCurrentPermissionsSuccessResponseSchema = createSuccessResponseSchema({
1503
+ resultSchema: walletGetCurrentPermissionsResultSchema,
1504
+ method: walletMethods.wallet_getCurrentPermissions
1556
1505
  });
1557
1506
 
1558
1507
  //#endregion
1559
- //#region src/request/rpc/objects/namespaces/bitcoin/methods/signPsbtV2/response.ts
1560
- const bitcoinSignPsbtV2ResultSchema = valibot.object({
1561
- psbt: valibot.string(),
1562
- txid: valibot.optional(valibot.string())
1563
- });
1564
- const bitcoinSignPsbtV2SuccessResponseSchema = createSuccessResponseSchema({
1565
- resultSchema: bitcoinSignPsbtV2ResultSchema,
1566
- method: bitcoinMethods.bitcoin_signPsbtV2
1508
+ //#region src/request/rpc/objects/namespaces/wallet/methods/getWalletType/request.ts
1509
+ const walletGetWalletTypeParamsSchema = valibot.nullish(valibot.null());
1510
+ const walletGetWalletTypeRequestSchema = createRequestSchema({
1511
+ paramsSchema: walletGetWalletTypeParamsSchema,
1512
+ method: walletMethods.wallet_getWalletType
1567
1513
  });
1568
1514
 
1569
1515
  //#endregion
1570
- //#region src/request/rpc/objects/namespaces/bitcoin/index.ts
1571
- const bitcoinRequestSchema = valibot.variant("method", [
1572
- bitcoinGetAccountsRequestSchema,
1573
- bitcoinGetAccountsV2RequestSchema,
1574
- bitcoinGetAddressesRequestSchema,
1575
- bitcoinGetAddressesV2RequestSchema,
1576
- bitcoinGetBalanceRequestSchema,
1577
- bitcoinGetBalanceV2RequestSchema,
1578
- bitcoinGetInfoRequestSchema,
1579
- bitcoinGetInfoV2RequestSchema,
1580
- bitcoinSendTransferRequestSchema,
1581
- bitcoinSendTransferV2RequestSchema,
1582
- bitcoinSignMessageRequestSchema,
1583
- bitcoinSignMessageV2RequestSchema,
1584
- bitcoinSignMultipleMessagesRequestSchema,
1585
- bitcoinSignMultipleMessagesV2RequestSchema,
1586
- bitcoinSignPsbtRequestSchema,
1587
- bitcoinSignPsbtV2RequestSchema
1588
- ]);
1589
- const bitcoinSuccessResponseSchema = valibot.variant("~sats-connect-method", [
1590
- bitcoinGetAccountsSuccessResponseSchema,
1591
- bitcoinGetAccountsV2SuccessResponseSchema,
1592
- bitcoinGetAddressesSuccessResponseSchema,
1593
- bitcoinGetAddressesV2SuccessResponseSchema,
1594
- bitcoinGetBalanceSuccessResponseSchema,
1595
- bitcoinGetBalanceV2SuccessResponseSchema,
1596
- bitcoinGetInfoSuccessResponseSchema,
1597
- bitcoinGetInfoV2SuccessResponseSchema,
1598
- bitcoinSendTransferSuccessResponseSchema,
1599
- bitcoinSendTransferV2SuccessResponseSchema,
1600
- bitcoinSignMessageSuccessResponseSchema,
1601
- bitcoinSignMessageV2SuccessResponseSchema,
1602
- bitcoinSignMultipleMessagesSuccessResponseSchema,
1603
- bitcoinSignMultipleMessagesV2SuccessResponseSchema,
1604
- bitcoinSignPsbtSuccessResponseSchema,
1605
- bitcoinSignPsbtV2SuccessResponseSchema
1606
- ]);
1516
+ //#region src/request/rpc/objects/namespaces/wallet/methods/getWalletType/response.ts
1517
+ const walletGetWalletTypeResultSchema = walletTypeSchema;
1518
+ const walletGetWalletTypeSuccessResponseSchema = createSuccessResponseSchema({
1519
+ resultSchema: walletGetWalletTypeResultSchema,
1520
+ method: walletMethods.wallet_getWalletType
1521
+ });
1607
1522
 
1608
1523
  //#endregion
1609
- //#region src/request/rpc/objects/namespaces/ordinals/methods/getInscriptions/request.ts
1610
- const ordinalsGetInscriptionsParamsSchema = valibot.object({
1611
- offset: valibot.number(),
1612
- limit: valibot.number()
1524
+ //#region src/request/rpc/objects/namespaces/wallet/methods/openBridge/request.ts
1525
+ const walletOpenBridgeParamsSchema = valibot.object({
1526
+ fromAsset: valibot.string(),
1527
+ toAsset: valibot.string()
1613
1528
  });
1614
- const ordinalsGetInscriptionsRequestSchema = createRequestSchema({
1615
- paramsSchema: ordinalsGetInscriptionsParamsSchema,
1616
- method: ordinalsMethods.ord_getInscriptions
1529
+ const walletOpenBridgeRequestSchema = createRequestSchema({
1530
+ paramsSchema: walletOpenBridgeParamsSchema,
1531
+ method: walletMethods.wallet_openBridge
1617
1532
  });
1618
1533
 
1619
1534
  //#endregion
1620
- //#region src/request/rpc/objects/namespaces/ordinals/methods/getInscriptions/response.ts
1621
- const ordinalsGetInscriptionsResultSchema = valibot.object({
1622
- total: valibot.number(),
1623
- limit: valibot.number(),
1624
- offset: valibot.number(),
1625
- inscriptions: valibot.array(valibot.object({
1626
- inscriptionId: valibot.string(),
1627
- inscriptionNumber: valibot.string(),
1628
- address: valibot.string(),
1629
- collectionName: valibot.optional(valibot.string()),
1630
- postage: valibot.string(),
1631
- contentLength: valibot.string(),
1632
- contentType: valibot.string(),
1633
- timestamp: valibot.number(),
1634
- offset: valibot.number(),
1635
- genesisTransaction: valibot.string(),
1636
- output: valibot.string()
1637
- }))
1535
+ //#region src/request/rpc/objects/namespaces/wallet/methods/openBridge/response.ts
1536
+ const walletOpenBridgeResultSchema = valibot.nullish(valibot.null());
1537
+ const walletOpenBridgeSuccessResponseSchema = createSuccessResponseSchema({
1538
+ resultSchema: walletOpenBridgeResultSchema,
1539
+ method: walletMethods.wallet_openBridge
1638
1540
  });
1639
- const ordinalsGetInscriptionsSuccessResponseSchema = createSuccessResponseSchema({
1640
- resultSchema: ordinalsGetInscriptionsResultSchema,
1641
- method: ordinalsMethods.ord_getInscriptions
1541
+
1542
+ //#endregion
1543
+ //#region src/request/rpc/objects/namespaces/wallet/methods/openBuy/request.ts
1544
+ const walletOpenBuyParamsSchema = valibot.object({ asset: valibot.string() });
1545
+ const walletOpenBuyRequestSchema = createRequestSchema({
1546
+ paramsSchema: walletOpenBuyParamsSchema,
1547
+ method: walletMethods.wallet_openBuy
1642
1548
  });
1643
1549
 
1644
1550
  //#endregion
1645
- //#region src/request/rpc/objects/namespaces/ordinals/methods/sendInscriptions/request.ts
1646
- const ordinalsSendInscriptionsParamsSchema = valibot.object({ transfers: valibot.array(valibot.object({
1647
- address: valibot.string(),
1648
- inscriptionId: valibot.string()
1649
- })) });
1650
- const ordinalsSendInscriptionsRequestSchema = createRequestSchema({
1651
- paramsSchema: ordinalsSendInscriptionsParamsSchema,
1652
- method: ordinalsMethods.ord_sendInscriptions
1551
+ //#region src/request/rpc/objects/namespaces/wallet/methods/openBuy/response.ts
1552
+ const walletOpenBuyResultSchema = valibot.nullish(valibot.null());
1553
+ const walletOpenBuySuccessResponseSchema = createSuccessResponseSchema({
1554
+ resultSchema: walletOpenBuyResultSchema,
1555
+ method: walletMethods.wallet_openBuy
1653
1556
  });
1654
1557
 
1655
1558
  //#endregion
1656
- //#region src/request/rpc/objects/namespaces/ordinals/methods/sendInscriptions/response.ts
1657
- const ordinalsSendInscriptionsResultSchema = valibot.object({ txid: valibot.string() });
1658
- const ordinalsSendInscriptionsSuccessResponseSchema = createSuccessResponseSchema({
1659
- resultSchema: ordinalsSendInscriptionsResultSchema,
1660
- method: ordinalsMethods.ord_sendInscriptions
1559
+ //#region src/request/rpc/objects/namespaces/wallet/methods/openReceive/request.ts
1560
+ const walletOpenReceiveParamsSchema = valibot.object({ address: valibot.string() });
1561
+ const walletOpenReceiveRequestSchema = createRequestSchema({
1562
+ paramsSchema: walletOpenReceiveParamsSchema,
1563
+ method: walletMethods.wallet_openReceive
1661
1564
  });
1662
1565
 
1663
1566
  //#endregion
1664
- //#region src/request/rpc/objects/namespaces/ordinals/index.ts
1665
- const ordinalsRequestSchema = valibot.variant("method", [ordinalsGetInscriptionsRequestSchema, ordinalsSendInscriptionsRequestSchema]);
1666
- const ordinalsSuccessResponseSchema = valibot.variant("~sats-connect-method", [ordinalsGetInscriptionsSuccessResponseSchema, ordinalsSendInscriptionsSuccessResponseSchema]);
1567
+ //#region src/request/rpc/objects/namespaces/wallet/methods/openReceive/response.ts
1568
+ const walletOpenReceiveResultSchema = addressSchema;
1569
+ const walletOpenReceiveSuccessResponseSchema = createSuccessResponseSchema({
1570
+ resultSchema: walletOpenReceiveResultSchema,
1571
+ method: walletMethods.wallet_openReceive
1572
+ });
1667
1573
 
1668
1574
  //#endregion
1669
- //#region src/request/rpc/objects/namespaces/runes/methods/estimateEtch/request.ts
1670
- const etchTermsSchema$1 = valibot.object({
1671
- amount: valibot.optional(valibot.string()),
1672
- cap: valibot.optional(valibot.string()),
1673
- heightStart: valibot.optional(valibot.string()),
1674
- heightEnd: valibot.optional(valibot.string()),
1675
- offsetStart: valibot.optional(valibot.string()),
1676
- offsetEnd: valibot.optional(valibot.string())
1677
- });
1678
- const inscriptionDetailsSchema$1 = valibot.object({
1679
- contentType: valibot.string(),
1680
- contentBase64: valibot.string()
1681
- });
1682
- const runesEstimateEtchParamsSchema = valibot.object({
1683
- runeName: valibot.string(),
1684
- divisibility: valibot.optional(valibot.number()),
1685
- symbol: valibot.optional(valibot.string()),
1686
- premine: valibot.optional(valibot.string()),
1687
- isMintable: valibot.boolean(),
1688
- terms: valibot.optional(etchTermsSchema$1),
1689
- inscriptionDetails: valibot.optional(inscriptionDetailsSchema$1),
1690
- delegateInscriptionId: valibot.optional(valibot.string()),
1691
- destinationAddress: valibot.string(),
1692
- feeRate: valibot.number(),
1693
- appServiceFee: valibot.optional(valibot.number()),
1694
- appServiceFeeAddress: valibot.optional(valibot.string()),
1695
- network: valibot.optional(valibot.enum(BitcoinNetworkType))
1696
- });
1697
- const runesEstimateEtchRequestSchema = createRequestSchema({
1698
- paramsSchema: runesEstimateEtchParamsSchema,
1699
- method: runesMethods.runes_estimateEtch
1575
+ //#region src/request/rpc/objects/namespaces/wallet/methods/renouncePermissions/request.ts
1576
+ const walletRenouncePermissionsParamsSchema = valibot.nullish(valibot.null());
1577
+ const walletRenouncePermissionsRequestSchema = createRequestSchema({
1578
+ paramsSchema: walletRenouncePermissionsParamsSchema,
1579
+ method: walletMethods.wallet_renouncePermissions
1700
1580
  });
1701
1581
 
1702
1582
  //#endregion
1703
- //#region src/request/rpc/objects/namespaces/runes/methods/estimateEtch/response.ts
1704
- const runesEstimateEtchResultSchema = valibot.object({
1705
- totalSize: valibot.number(),
1706
- totalCost: valibot.number(),
1707
- costBreakdown: valibot.object({
1708
- postage: valibot.number(),
1709
- networkFee: valibot.number(),
1710
- serviceFee: valibot.number(),
1711
- appServiceFee: valibot.number()
1712
- })
1713
- });
1714
- const runesEstimateEtchSuccessResponseSchema = createSuccessResponseSchema({
1715
- resultSchema: runesEstimateEtchResultSchema,
1716
- method: runesMethods.runes_estimateEtch
1583
+ //#region src/request/rpc/objects/namespaces/wallet/methods/renouncePermissions/response.ts
1584
+ const walletRenouncePermissionsResultSchema = valibot.nullish(valibot.null());
1585
+ const walletRenouncePermissionsSuccessResponseSchema = createSuccessResponseSchema({
1586
+ resultSchema: walletRenouncePermissionsResultSchema,
1587
+ method: walletMethods.wallet_renouncePermissions
1717
1588
  });
1718
1589
 
1719
1590
  //#endregion
1720
- //#region src/request/rpc/objects/namespaces/runes/methods/estimateMint/request.ts
1721
- const runesEstimateMintParamsSchema = valibot.object({
1722
- runeName: valibot.string(),
1723
- repeats: valibot.number(),
1724
- destinationAddress: valibot.string(),
1725
- feeRate: valibot.number(),
1726
- appServiceFee: valibot.optional(valibot.number()),
1727
- appServiceFeeAddress: valibot.optional(valibot.string()),
1728
- network: valibot.optional(valibot.enum(BitcoinNetworkType))
1729
- });
1730
- const runesEstimateMintRequestSchema = createRequestSchema({
1731
- paramsSchema: runesEstimateMintParamsSchema,
1732
- method: runesMethods.runes_estimateMint
1591
+ //#region src/request/rpc/objects/namespaces/wallet/methods/requestPermissions/request.ts
1592
+ const walletRequestPermissionsParamsSchema = valibot.array(permissionRequestParamsSchema);
1593
+ const walletRequestPermissionsRequestSchema = createRequestSchema({
1594
+ paramsSchema: walletRequestPermissionsParamsSchema,
1595
+ method: walletMethods.wallet_requestPermissions
1733
1596
  });
1734
1597
 
1735
1598
  //#endregion
1736
- //#region src/request/rpc/objects/namespaces/runes/methods/estimateMint/response.ts
1737
- const runesEstimateMintResultSchema = valibot.object({
1738
- totalSize: valibot.number(),
1739
- totalCost: valibot.number(),
1740
- costBreakdown: valibot.object({
1741
- postage: valibot.number(),
1742
- networkFee: valibot.number(),
1743
- serviceFee: valibot.number(),
1744
- appServiceFee: valibot.number()
1745
- })
1746
- });
1747
- const runesEstimateMintSuccessResponseSchema = createSuccessResponseSchema({
1748
- resultSchema: runesEstimateMintResultSchema,
1749
- method: runesMethods.runes_estimateMint
1599
+ //#region src/request/rpc/objects/namespaces/wallet/methods/requestPermissions/response.ts
1600
+ const walletRequestPermissionsResultSchema = valibot.literal(true);
1601
+ const walletRequestPermissionsSuccessResponseSchema = createSuccessResponseSchema({
1602
+ resultSchema: walletRequestPermissionsResultSchema,
1603
+ method: walletMethods.wallet_requestPermissions
1750
1604
  });
1751
1605
 
1752
1606
  //#endregion
1753
- //#region src/request/rpc/objects/namespaces/runes/methods/estimateRbfOrder/request.ts
1754
- const runesEstimateRbfOrderParamsSchema = valibot.object({
1755
- orderId: valibot.string(),
1756
- newFeeRate: valibot.number(),
1757
- network: valibot.optional(valibot.enum(BitcoinNetworkType))
1758
- });
1759
- const runesEstimateRbfOrderRequestSchema = createRequestSchema({
1760
- paramsSchema: runesEstimateRbfOrderParamsSchema,
1761
- method: runesMethods.runes_estimateRbfOrder
1607
+ //#region src/request/rpc/objects/namespaces/wallet/methods/switchNetwork/request.ts
1608
+ const walletSwitchNetworkParamsSchema = valibot.variant("selector", [valibot.object({
1609
+ selector: valibot.literal("id"),
1610
+ id: valibot.string()
1611
+ })]);
1612
+ const walletSwitchNetworkRequestSchema = createRequestSchema({
1613
+ paramsSchema: walletSwitchNetworkParamsSchema,
1614
+ method: walletMethods.wallet_switchNetwork
1762
1615
  });
1763
1616
 
1764
1617
  //#endregion
1765
- //#region src/request/rpc/objects/namespaces/runes/methods/estimateRbfOrder/response.ts
1766
- const runesEstimateRbfOrderResultSchema = valibot.object({
1767
- rbfCost: valibot.number(),
1768
- fundingAddress: valibot.string()
1769
- });
1770
- const runesEstimateRbfOrderSuccessResponseSchema = createSuccessResponseSchema({
1771
- resultSchema: runesEstimateRbfOrderResultSchema,
1772
- method: runesMethods.runes_estimateRbfOrder
1618
+ //#region src/request/rpc/objects/namespaces/wallet/methods/switchNetwork/response.ts
1619
+ const walletSwitchNetworkResultSchema = valibot.nullish(valibot.null());
1620
+ const walletSwitchNetworkSuccessResponseSchema = createSuccessResponseSchema({
1621
+ resultSchema: walletSwitchNetworkResultSchema,
1622
+ method: walletMethods.wallet_switchNetwork
1773
1623
  });
1774
1624
 
1775
1625
  //#endregion
1776
- //#region src/request/rpc/objects/namespaces/runes/methods/etch/request.ts
1777
- const etchTermsSchema = valibot.object({
1778
- amount: valibot.optional(valibot.string()),
1779
- cap: valibot.optional(valibot.string()),
1780
- heightStart: valibot.optional(valibot.string()),
1781
- heightEnd: valibot.optional(valibot.string()),
1782
- offsetStart: valibot.optional(valibot.string()),
1783
- offsetEnd: valibot.optional(valibot.string())
1626
+ //#region src/request/rpc/objects/namespaces/wallet/index.ts
1627
+ const walletRequestSchema = valibot.variant("method", [
1628
+ walletAddNetworkRequestSchema,
1629
+ walletAddNetworkV2RequestSchema,
1630
+ walletChangeNetworkRequestSchema,
1631
+ walletConnectRequestSchema,
1632
+ walletConnectV2RequestSchema,
1633
+ walletDisconnectRequestSchema,
1634
+ walletGetAccountRequestSchema,
1635
+ walletGetAccountV2RequestSchema,
1636
+ walletGetCurrentPermissionsRequestSchema,
1637
+ walletGetNetworkRequestSchema,
1638
+ walletGetNetworksRequestSchema,
1639
+ walletGetWalletTypeRequestSchema,
1640
+ walletOpenBridgeRequestSchema,
1641
+ walletOpenBuyRequestSchema,
1642
+ walletOpenReceiveRequestSchema,
1643
+ walletRenouncePermissionsRequestSchema,
1644
+ walletRequestPermissionsRequestSchema,
1645
+ walletSwitchNetworkRequestSchema
1646
+ ]);
1647
+ const walletSuccessResponseSchema = valibot.variant("~sats-connect-method", [
1648
+ walletAddNetworkSuccessResponseSchema,
1649
+ walletAddNetworkV2SuccessResponseSchema,
1650
+ walletChangeNetworkSuccessResponseSchema,
1651
+ walletConnectSuccessResponseSchema,
1652
+ walletConnectV2SuccessResponseSchema,
1653
+ walletDisconnectSuccessResponseSchema,
1654
+ walletGetAccountSuccessResponseSchema,
1655
+ walletGetAccountV2SuccessResponseSchema,
1656
+ walletGetCurrentPermissionsSuccessResponseSchema,
1657
+ walletGetNetworksSuccessResponseSchema,
1658
+ walletGetNetworkSuccessResponseSchema,
1659
+ walletGetWalletTypeSuccessResponseSchema,
1660
+ walletOpenBridgeSuccessResponseSchema,
1661
+ walletOpenBuySuccessResponseSchema,
1662
+ walletOpenReceiveSuccessResponseSchema,
1663
+ walletRenouncePermissionsSuccessResponseSchema,
1664
+ walletRequestPermissionsSuccessResponseSchema,
1665
+ walletSwitchNetworkSuccessResponseSchema
1666
+ ]);
1667
+
1668
+ //#endregion
1669
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/getAddressesV2/response.ts
1670
+ const bitcoinGetAddressesV2ResultSchema = valibot.object({
1671
+ addresses: valibot.array(addressSchema),
1672
+ networks: allResolvedNetworksSchema
1784
1673
  });
1785
- const inscriptionDetailsSchema = valibot.object({
1786
- contentType: valibot.string(),
1787
- contentBase64: valibot.string()
1674
+ const bitcoinGetAddressesV2SuccessResponseSchema = createSuccessResponseSchema({
1675
+ resultSchema: bitcoinGetAddressesV2ResultSchema,
1676
+ method: bitcoinMethods.bitcoin_getAddressesV2
1788
1677
  });
1789
- const runesEtchParamsSchema = valibot.object({
1790
- runeName: valibot.string(),
1791
- divisibility: valibot.optional(valibot.number()),
1792
- symbol: valibot.optional(valibot.string()),
1793
- premine: valibot.optional(valibot.string()),
1794
- isMintable: valibot.boolean(),
1795
- terms: valibot.optional(etchTermsSchema),
1796
- inscriptionDetails: valibot.optional(inscriptionDetailsSchema),
1797
- delegateInscriptionId: valibot.optional(valibot.string()),
1798
- destinationAddress: valibot.string(),
1799
- refundAddress: valibot.string(),
1800
- feeRate: valibot.number(),
1801
- appServiceFee: valibot.optional(valibot.number()),
1802
- appServiceFeeAddress: valibot.optional(valibot.string()),
1803
- network: valibot.optional(valibot.enum(BitcoinNetworkType))
1678
+
1679
+ //#endregion
1680
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/getBalance/request.ts
1681
+ const bitcoinGetBalanceParamsSchema = valibot.nullish(valibot.null());
1682
+ const bitcoinGetBalanceRequestSchema = createRequestSchema({
1683
+ paramsSchema: bitcoinGetBalanceParamsSchema,
1684
+ method: bitcoinMethods.getBalance
1804
1685
  });
1805
- const runesEtchRequestSchema = createRequestSchema({
1806
- paramsSchema: runesEtchParamsSchema,
1807
- method: runesMethods.runes_etch
1686
+
1687
+ //#endregion
1688
+ //#region src/request/rpc/objects/namespaces/bitcoin/shared/balanceResultSchema.ts
1689
+ const balanceResultSchema = valibot.object({
1690
+ confirmed: valibot.string(),
1691
+ unconfirmed: valibot.string(),
1692
+ total: valibot.string()
1808
1693
  });
1809
1694
 
1810
1695
  //#endregion
1811
- //#region src/request/rpc/objects/namespaces/runes/methods/etch/response.ts
1812
- const runesEtchResultSchema = valibot.object({
1813
- orderId: valibot.string(),
1814
- fundTransactionId: valibot.string(),
1815
- fundingAddress: valibot.string()
1696
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/getBalance/response.ts
1697
+ const bitcoinGetBalanceResultSchema = balanceResultSchema;
1698
+ const bitcoinGetBalanceSuccessResponseSchema = createSuccessResponseSchema({
1699
+ resultSchema: bitcoinGetBalanceResultSchema,
1700
+ method: bitcoinMethods.getBalance
1816
1701
  });
1817
- const runesEtchSuccessResponseSchema = createSuccessResponseSchema({
1818
- resultSchema: runesEtchResultSchema,
1819
- method: runesMethods.runes_etch
1702
+
1703
+ //#endregion
1704
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/getBalanceV2/request.ts
1705
+ const bitcoinGetBalanceV2ParamsSchema = valibot.nullish(valibot.null());
1706
+ const bitcoinGetBalanceV2RequestSchema = createRequestSchema({
1707
+ paramsSchema: bitcoinGetBalanceV2ParamsSchema,
1708
+ method: bitcoinMethods.bitcoin_getBalanceV2
1820
1709
  });
1821
1710
 
1822
1711
  //#endregion
1823
- //#region src/request/rpc/objects/namespaces/runes/methods/getBalance/request.ts
1824
- const runesGetBalanceParamsSchema = valibot.nullish(valibot.null());
1825
- const runesGetBalanceRequestSchema = createRequestSchema({
1826
- paramsSchema: runesGetBalanceParamsSchema,
1827
- method: runesMethods.runes_getBalance
1712
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/getBalanceV2/response.ts
1713
+ const bitcoinGetBalanceV2ResultSchema = balanceResultSchema;
1714
+ const bitcoinGetBalanceV2SuccessResponseSchema = createSuccessResponseSchema({
1715
+ resultSchema: bitcoinGetBalanceV2ResultSchema,
1716
+ method: bitcoinMethods.bitcoin_getBalanceV2
1828
1717
  });
1829
1718
 
1830
1719
  //#endregion
1831
- //#region src/request/rpc/objects/namespaces/runes/methods/getBalance/response.ts
1832
- const runesGetBalanceResultSchema = valibot.object({ balances: valibot.array(valibot.object({
1833
- runeName: valibot.string(),
1834
- amount: valibot.string(),
1835
- divisibility: valibot.number(),
1836
- symbol: valibot.string(),
1837
- inscriptionId: valibot.nullish(valibot.string()),
1838
- spendableBalance: valibot.string()
1839
- })) });
1840
- const runesGetBalanceSuccessResponseSchema = createSuccessResponseSchema({
1841
- resultSchema: runesGetBalanceResultSchema,
1842
- method: runesMethods.runes_getBalance
1720
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/getInfo/request.ts
1721
+ const bitcoinGetInfoParamsSchema = valibot.nullish(valibot.null());
1722
+ const bitcoinGetInfoRequestSchema = createRequestSchema({
1723
+ paramsSchema: bitcoinGetInfoParamsSchema,
1724
+ method: bitcoinMethods.getInfo
1843
1725
  });
1844
1726
 
1845
1727
  //#endregion
1846
- //#region src/request/rpc/objects/namespaces/runes/methods/getOrder/request.ts
1847
- const runesGetOrderParamsSchema = valibot.object({
1848
- id: valibot.string(),
1849
- network: valibot.optional(valibot.enum(BitcoinNetworkType))
1728
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/getInfo/response.ts
1729
+ const bitcoinGetInfoResultSchema = valibot.object({
1730
+ version: valibot.string(),
1731
+ platform: valibot.optional(valibot.enum(ProviderPlatform)),
1732
+ methods: valibot.optional(valibot.array(valibot.string())),
1733
+ supports: valibot.array(valibot.string())
1850
1734
  });
1851
- const runesGetOrderRequestSchema = createRequestSchema({
1852
- paramsSchema: runesGetOrderParamsSchema,
1853
- method: runesMethods.runes_getOrder
1735
+ const bitcoinGetInfoSuccessResponseSchema = createSuccessResponseSchema({
1736
+ resultSchema: bitcoinGetInfoResultSchema,
1737
+ method: bitcoinMethods.getInfo
1854
1738
  });
1855
1739
 
1856
1740
  //#endregion
1857
- //#region src/request/rpc/objects/namespaces/runes/methods/getOrder/response.ts
1858
- const runesGetOrderResultSchema = valibot.object({
1859
- id: valibot.string(),
1860
- orderType: valibot.union([valibot.literal("rune_mint"), valibot.literal("rune_etch")]),
1861
- state: valibot.union([
1862
- valibot.literal("new"),
1863
- valibot.literal("pending"),
1864
- valibot.literal("executing"),
1865
- valibot.literal("complete"),
1866
- valibot.literal("failed"),
1867
- valibot.literal("refunded"),
1868
- valibot.literal("stale")
1869
- ]),
1870
- fundingAddress: valibot.string(),
1871
- reason: valibot.optional(valibot.string()),
1872
- createdAt: valibot.string()
1873
- });
1874
- const runesGetOrderSuccessResponseSchema = createSuccessResponseSchema({
1875
- resultSchema: runesGetOrderResultSchema,
1876
- method: runesMethods.runes_getOrder
1877
- });
1741
+ //#region src/request/rpc/objects/namespaces/bitcoin/shared/sendTransfer.ts
1742
+ const sendTransferParamsSchema = valibot.object({ recipients: valibot.array(valibot.object({
1743
+ address: valibot.string(),
1744
+ amount: valibot.number()
1745
+ })) });
1746
+ const sendTransferResultSchema = valibot.object({ txid: valibot.string() });
1878
1747
 
1879
1748
  //#endregion
1880
- //#region src/request/rpc/objects/namespaces/runes/methods/mint/request.ts
1881
- const runesMintParamsSchema = valibot.object({
1882
- appServiceFee: valibot.optional(valibot.number()),
1883
- appServiceFeeAddress: valibot.optional(valibot.string()),
1884
- destinationAddress: valibot.string(),
1885
- feeRate: valibot.number(),
1886
- refundAddress: valibot.string(),
1887
- repeats: valibot.number(),
1888
- runeName: valibot.string(),
1889
- network: valibot.optional(valibot.enum(BitcoinNetworkType))
1749
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/sendTransfer/request.ts
1750
+ const bitcoinSendTransferParamsSchema = sendTransferParamsSchema;
1751
+ const bitcoinSendTransferRequestSchema = createRequestSchema({
1752
+ paramsSchema: bitcoinSendTransferParamsSchema,
1753
+ method: bitcoinMethods.sendTransfer
1890
1754
  });
1891
- const runesMintRequestSchema = createRequestSchema({
1892
- paramsSchema: runesMintParamsSchema,
1893
- method: runesMethods.runes_mint
1755
+
1756
+ //#endregion
1757
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/sendTransfer/response.ts
1758
+ const bitcoinSendTransferResultSchema = sendTransferResultSchema;
1759
+ const bitcoinSendTransferSuccessResponseSchema = createSuccessResponseSchema({
1760
+ resultSchema: bitcoinSendTransferResultSchema,
1761
+ method: bitcoinMethods.sendTransfer
1894
1762
  });
1895
1763
 
1896
1764
  //#endregion
1897
- //#region src/request/rpc/objects/namespaces/runes/methods/mint/response.ts
1898
- const runesMintResultSchema = valibot.object({
1899
- orderId: valibot.string(),
1900
- fundTransactionId: valibot.string(),
1901
- fundingAddress: valibot.string()
1765
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/sendTransferV2/request.ts
1766
+ const bitcoinSendTransferV2ParamsSchema = sendTransferParamsSchema;
1767
+ const bitcoinSendTransferV2RequestSchema = createRequestSchema({
1768
+ paramsSchema: bitcoinSendTransferV2ParamsSchema,
1769
+ method: bitcoinMethods.bitcoin_sendTransferV2
1902
1770
  });
1903
- const runesMintSuccessResponseSchema = createSuccessResponseSchema({
1904
- resultSchema: runesMintResultSchema,
1905
- method: runesMethods.runes_mint
1771
+
1772
+ //#endregion
1773
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/sendTransferV2/response.ts
1774
+ const bitcoinSendTransferV2ResultSchema = sendTransferResultSchema;
1775
+ const bitcoinSendTransferV2SuccessResponseSchema = createSuccessResponseSchema({
1776
+ resultSchema: bitcoinSendTransferV2ResultSchema,
1777
+ method: bitcoinMethods.bitcoin_sendTransferV2
1906
1778
  });
1907
1779
 
1908
1780
  //#endregion
1909
- //#region src/request/rpc/objects/namespaces/runes/methods/rbfOrder/request.ts
1910
- const runesRbfOrderParamsSchema = valibot.object({
1911
- orderId: valibot.string(),
1912
- newFeeRate: valibot.number(),
1913
- network: valibot.optional(valibot.enum(BitcoinNetworkType))
1781
+ //#region src/request/rpc/objects/namespaces/bitcoin/shared/signMessage.ts
1782
+ const signMessageParamsSchema = valibot.object({
1783
+ address: valibot.string(),
1784
+ message: valibot.string(),
1785
+ protocol: valibot.optional(valibot.enum(MessageSigningProtocols))
1914
1786
  });
1915
- const runesRbfOrderRequestSchema = createRequestSchema({
1916
- paramsSchema: runesRbfOrderParamsSchema,
1917
- method: runesMethods.runes_rbfOrder
1787
+ const signMessageResultSchema = valibot.object({
1788
+ signature: valibot.string(),
1789
+ messageHash: valibot.string(),
1790
+ address: valibot.string(),
1791
+ protocol: valibot.enum(MessageSigningProtocols)
1918
1792
  });
1919
1793
 
1920
1794
  //#endregion
1921
- //#region src/request/rpc/objects/namespaces/runes/methods/rbfOrder/response.ts
1922
- const runesRbfOrderResultSchema = valibot.object({
1923
- orderId: valibot.string(),
1924
- fundRBFTransactionId: valibot.string(),
1925
- fundingAddress: valibot.string()
1926
- });
1927
- const runesRbfOrderSuccessResponseSchema = createSuccessResponseSchema({
1928
- resultSchema: runesRbfOrderResultSchema,
1929
- method: runesMethods.runes_rbfOrder
1795
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/signMessage/request.ts
1796
+ const bitcoinSignMessageParamsSchema = signMessageParamsSchema;
1797
+ const bitcoinSignMessageRequestSchema = createRequestSchema({
1798
+ paramsSchema: bitcoinSignMessageParamsSchema,
1799
+ method: bitcoinMethods.signMessage
1930
1800
  });
1931
1801
 
1932
1802
  //#endregion
1933
- //#region src/request/rpc/objects/namespaces/runes/methods/transfer/request.ts
1934
- const runesTransferParamsSchema = valibot.object({
1935
- recipients: valibot.array(valibot.object({
1936
- runeName: valibot.string(),
1937
- amount: valibot.string(),
1938
- address: valibot.string()
1939
- })),
1940
- network: valibot.optional(valibot.enum(BitcoinNetworkType))
1803
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/signMessage/response.ts
1804
+ const bitcoinSignMessageResultSchema = signMessageResultSchema;
1805
+ const bitcoinSignMessageSuccessResponseSchema = createSuccessResponseSchema({
1806
+ resultSchema: bitcoinSignMessageResultSchema,
1807
+ method: bitcoinMethods.signMessage
1941
1808
  });
1942
- const runesTransferRequestSchema = createRequestSchema({
1943
- paramsSchema: runesTransferParamsSchema,
1944
- method: runesMethods.runes_transfer
1809
+
1810
+ //#endregion
1811
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/signMessageV2/request.ts
1812
+ const bitcoinSignMessageV2ParamsSchema = signMessageParamsSchema;
1813
+ const bitcoinSignMessageV2RequestSchema = createRequestSchema({
1814
+ paramsSchema: bitcoinSignMessageV2ParamsSchema,
1815
+ method: bitcoinMethods.bitcoin_signMessageV2
1945
1816
  });
1946
1817
 
1947
1818
  //#endregion
1948
- //#region src/request/rpc/objects/namespaces/runes/methods/transfer/response.ts
1949
- const runesTransferResultSchema = valibot.object({ txid: valibot.string() });
1950
- const runesTransferSuccessResponseSchema = createSuccessResponseSchema({
1951
- resultSchema: runesTransferResultSchema,
1952
- method: runesMethods.runes_transfer
1819
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/signMessageV2/response.ts
1820
+ const bitcoinSignMessageV2ResultSchema = signMessageResultSchema;
1821
+ const bitcoinSignMessageV2SuccessResponseSchema = createSuccessResponseSchema({
1822
+ resultSchema: bitcoinSignMessageV2ResultSchema,
1823
+ method: bitcoinMethods.bitcoin_signMessageV2
1953
1824
  });
1954
1825
 
1955
1826
  //#endregion
1956
- //#region src/request/rpc/objects/namespaces/runes/index.ts
1957
- const runesRequestSchema = valibot.variant("method", [
1958
- runesEstimateEtchRequestSchema,
1959
- runesEstimateMintRequestSchema,
1960
- runesEstimateRbfOrderRequestSchema,
1961
- runesEtchRequestSchema,
1962
- runesGetBalanceRequestSchema,
1963
- runesGetOrderRequestSchema,
1964
- runesMintRequestSchema,
1965
- runesRbfOrderRequestSchema,
1966
- runesTransferRequestSchema
1967
- ]);
1968
- const runesSuccessResponseSchema = valibot.variant("~sats-connect-method", [
1969
- runesEstimateEtchSuccessResponseSchema,
1970
- runesEstimateMintSuccessResponseSchema,
1971
- runesEstimateRbfOrderSuccessResponseSchema,
1972
- runesEtchSuccessResponseSchema,
1973
- runesGetBalanceSuccessResponseSchema,
1974
- runesGetOrderSuccessResponseSchema,
1975
- runesMintSuccessResponseSchema,
1976
- runesRbfOrderSuccessResponseSchema,
1977
- runesTransferSuccessResponseSchema
1978
- ]);
1827
+ //#region src/request/rpc/objects/namespaces/bitcoin/shared/signMultipleMessages.ts
1828
+ const signMultipleMessagesParamsSchema = valibot.array(signMessageParamsSchema);
1829
+ const signMultipleMessagesResultSchema = valibot.array(valibot.object({
1830
+ ...signMessageResultSchema.entries,
1831
+ message: valibot.string()
1832
+ }));
1979
1833
 
1980
1834
  //#endregion
1981
- //#region src/request/rpc/objects/namespaces/spark/methods/flashnetClawbackFunds/request.ts
1982
- const sparkFlashnetClawbackFundsParamsSchema = valibot.object({
1983
- sparkTransferId: valibot.string(),
1984
- lpIdentityPublicKey: valibot.string()
1985
- });
1986
- const sparkFlashnetClawbackFundsRequestSchema = createRequestSchema({
1987
- paramsSchema: sparkFlashnetClawbackFundsParamsSchema,
1988
- method: sparkMethods.spark_flashnet_clawbackFunds
1835
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/signMultipleMessages/request.ts
1836
+ const bitcoinSignMultipleMessagesParamsSchema = signMultipleMessagesParamsSchema;
1837
+ const bitcoinSignMultipleMessagesRequestSchema = createRequestSchema({
1838
+ paramsSchema: bitcoinSignMultipleMessagesParamsSchema,
1839
+ method: bitcoinMethods.signMultipleMessages
1989
1840
  });
1990
1841
 
1991
1842
  //#endregion
1992
- //#region src/request/rpc/objects/namespaces/spark/methods/flashnetClawbackFunds/response.ts
1993
- const sparkFlashnetClawbackFundsResultSchema = valibot.object({
1994
- requestId: valibot.string(),
1995
- accepted: valibot.boolean(),
1996
- internalRequestId: valibot.optional(valibot.string()),
1997
- sparkStatusTrackingId: valibot.optional(valibot.string()),
1998
- error: valibot.optional(valibot.string())
1999
- });
2000
- const sparkFlashnetClawbackFundsSuccessResponseSchema = createSuccessResponseSchema({
2001
- resultSchema: sparkFlashnetClawbackFundsResultSchema,
2002
- method: sparkMethods.spark_flashnet_clawbackFunds
1843
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/signMultipleMessages/response.ts
1844
+ const bitcoinSignMultipleMessagesResultSchema = signMultipleMessagesResultSchema;
1845
+ const bitcoinSignMultipleMessagesSuccessResponseSchema = createSuccessResponseSchema({
1846
+ resultSchema: bitcoinSignMultipleMessagesResultSchema,
1847
+ method: bitcoinMethods.signMultipleMessages
2003
1848
  });
2004
1849
 
2005
1850
  //#endregion
2006
- //#region src/request/rpc/objects/namespaces/spark/methods/flashnetExecuteRouteSwap/request.ts
2007
- const sparkFlashnetExecuteRouteSwapParamsSchema = valibot.object({
2008
- hops: valibot.array(valibot.object({
2009
- poolId: valibot.string(),
2010
- assetInAddress: valibot.string(),
2011
- assetOutAddress: valibot.string(),
2012
- hopIntegratorFeeRateBps: valibot.optional(valibot.number())
2013
- })),
2014
- initialAssetAddress: valibot.string(),
2015
- inputAmount: valibot.string(),
2016
- maxRouteSlippageBps: valibot.string(),
2017
- minAmountOut: valibot.optional(valibot.string()),
2018
- integratorFeeRateBps: valibot.optional(valibot.number()),
2019
- integratorPublicKey: valibot.optional(valibot.string())
2020
- });
2021
- const sparkFlashnetExecuteRouteSwapRequestSchema = createRequestSchema({
2022
- paramsSchema: sparkFlashnetExecuteRouteSwapParamsSchema,
2023
- method: sparkMethods.spark_flashnet_executeRouteSwap
1851
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/signMultipleMessagesV2/request.ts
1852
+ const bitcoinSignMultipleMessagesV2ParamsSchema = signMultipleMessagesParamsSchema;
1853
+ const bitcoinSignMultipleMessagesV2RequestSchema = createRequestSchema({
1854
+ paramsSchema: bitcoinSignMultipleMessagesV2ParamsSchema,
1855
+ method: bitcoinMethods.bitcoin_signMultipleMessagesV2
2024
1856
  });
2025
1857
 
2026
1858
  //#endregion
2027
- //#region src/request/rpc/objects/namespaces/spark/methods/flashnetExecuteRouteSwap/response.ts
2028
- const sparkFlashnetExecuteRouteSwapResultSchema = valibot.object({
2029
- requestId: valibot.string(),
2030
- accepted: valibot.boolean(),
2031
- outputAmount: valibot.string(),
2032
- executionPrice: valibot.string(),
2033
- finalOutboundTransferId: valibot.string(),
2034
- error: valibot.optional(valibot.string())
2035
- });
2036
- const sparkFlashnetExecuteRouteSwapSuccessResponseSchema = createSuccessResponseSchema({
2037
- resultSchema: sparkFlashnetExecuteRouteSwapResultSchema,
2038
- method: sparkMethods.spark_flashnet_executeRouteSwap
1859
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/signMultipleMessagesV2/response.ts
1860
+ const bitcoinSignMultipleMessagesV2ResultSchema = signMultipleMessagesResultSchema;
1861
+ const bitcoinSignMultipleMessagesV2SuccessResponseSchema = createSuccessResponseSchema({
1862
+ resultSchema: bitcoinSignMultipleMessagesV2ResultSchema,
1863
+ method: bitcoinMethods.bitcoin_signMultipleMessagesV2
2039
1864
  });
2040
1865
 
2041
1866
  //#endregion
2042
- //#region src/request/rpc/objects/namespaces/spark/methods/flashnetExecuteSwap/request.ts
2043
- const sparkFlashnetExecuteSwapParamsSchema = valibot.object({
2044
- poolId: valibot.string(),
2045
- assetInAddress: valibot.string(),
2046
- assetOutAddress: valibot.string(),
2047
- amountIn: valibot.string(),
2048
- maxSlippageBps: valibot.number(),
2049
- minAmountOut: valibot.optional(valibot.string()),
2050
- integratorFeeRateBps: valibot.optional(valibot.number()),
2051
- integratorPublicKey: valibot.optional(valibot.string())
1867
+ //#region src/request/rpc/objects/namespaces/bitcoin/shared/signPsbt.ts
1868
+ const signPsbtParamsSchema = valibot.object({
1869
+ psbt: valibot.string(),
1870
+ signInputs: valibot.optional(valibot.record(valibot.string(), valibot.array(valibot.number()))),
1871
+ broadcast: valibot.optional(valibot.boolean(), false)
2052
1872
  });
2053
- const sparkFlashnetExecuteSwapRequestSchema = createRequestSchema({
2054
- paramsSchema: sparkFlashnetExecuteSwapParamsSchema,
2055
- method: sparkMethods.spark_flashnet_executeSwap
1873
+ const signPsbtResultSchema = valibot.object({
1874
+ psbt: valibot.string(),
1875
+ txid: valibot.optional(valibot.string())
2056
1876
  });
2057
1877
 
2058
1878
  //#endregion
2059
- //#region src/request/rpc/objects/namespaces/spark/methods/flashnetExecuteSwap/response.ts
2060
- const sparkFlashnetExecuteSwapResultSchema = valibot.object({
2061
- requestId: valibot.string(),
2062
- accepted: valibot.boolean(),
2063
- amountOut: valibot.optional(valibot.string()),
2064
- feeAmount: valibot.optional(valibot.string()),
2065
- executionPrice: valibot.optional(valibot.string()),
2066
- assetOutAddress: valibot.optional(valibot.string()),
2067
- assetInAddress: valibot.optional(valibot.string()),
2068
- outboundTransferId: valibot.optional(valibot.string()),
2069
- error: valibot.optional(valibot.string())
2070
- });
2071
- const sparkFlashnetExecuteSwapSuccessResponseSchema = createSuccessResponseSchema({
2072
- resultSchema: sparkFlashnetExecuteSwapResultSchema,
2073
- method: sparkMethods.spark_flashnet_executeSwap
1879
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/signPsbt/request.ts
1880
+ const bitcoinSignPsbtParamsSchema = signPsbtParamsSchema;
1881
+ const bitcoinSignPsbtRequestSchema = createRequestSchema({
1882
+ paramsSchema: bitcoinSignPsbtParamsSchema,
1883
+ method: bitcoinMethods.signPsbt
2074
1884
  });
2075
1885
 
2076
1886
  //#endregion
2077
- //#region src/request/rpc/objects/namespaces/spark/methods/flashnetGetClawbackEligibleTransfers/request.ts
2078
- const sparkGetClawbackEligibleTransfersParamsSchema = valibot.nullish(valibot.null());
2079
- const sparkGetClawbackEligibleTransfersRequestSchema = createRequestSchema({
2080
- paramsSchema: sparkGetClawbackEligibleTransfersParamsSchema,
2081
- method: sparkMethods.spark_flashnet_getClawbackEligibleTransfers
1887
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/signPsbt/response.ts
1888
+ const bitcoinSignPsbtResultSchema = signPsbtResultSchema;
1889
+ const bitcoinSignPsbtSuccessResponseSchema = createSuccessResponseSchema({
1890
+ resultSchema: bitcoinSignPsbtResultSchema,
1891
+ method: bitcoinMethods.signPsbt
2082
1892
  });
2083
1893
 
2084
1894
  //#endregion
2085
- //#region src/request/rpc/objects/namespaces/spark/methods/flashnetGetClawbackEligibleTransfers/response.ts
2086
- const sparkGetClawbackEligibleTransfersResultSchema = valibot.object({ eligibleTransfers: valibot.array(valibot.object({
2087
- txId: valibot.string(),
2088
- createdAt: valibot.string(),
2089
- lpIdentityPublicKey: valibot.string()
2090
- })) });
2091
- const sparkGetClawbackEligibleTransfersSuccessResponseSchema = createSuccessResponseSchema({
2092
- resultSchema: sparkGetClawbackEligibleTransfersResultSchema,
2093
- method: sparkMethods.spark_flashnet_getClawbackEligibleTransfers
1895
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/signPsbtV2/request.ts
1896
+ const bitcoinSignPsbtV2ParamsSchema = signPsbtParamsSchema;
1897
+ const bitcoinSignPsbtV2RequestSchema = createRequestSchema({
1898
+ paramsSchema: bitcoinSignPsbtV2ParamsSchema,
1899
+ method: bitcoinMethods.bitcoin_signPsbtV2
2094
1900
  });
2095
1901
 
2096
1902
  //#endregion
2097
- //#region src/request/rpc/objects/namespaces/spark/methods/flashnetGetJwt/request.ts
2098
- const sparkFlashnetGetJwtParamsSchema = valibot.null();
2099
- const sparkFlashnetGetJwtRequestSchema = createRequestSchema({
2100
- paramsSchema: sparkFlashnetGetJwtParamsSchema,
2101
- method: sparkMethods.spark_flashnet_getJwt
1903
+ //#region src/request/rpc/objects/namespaces/bitcoin/methods/signPsbtV2/response.ts
1904
+ const bitcoinSignPsbtV2ResultSchema = signPsbtResultSchema;
1905
+ const bitcoinSignPsbtV2SuccessResponseSchema = createSuccessResponseSchema({
1906
+ resultSchema: bitcoinSignPsbtV2ResultSchema,
1907
+ method: bitcoinMethods.bitcoin_signPsbtV2
2102
1908
  });
2103
1909
 
2104
1910
  //#endregion
2105
- //#region src/request/rpc/objects/namespaces/spark/methods/flashnetGetJwt/response.ts
2106
- const sparkFlashnetGetJwtResultSchema = valibot.object({ jwt: valibot.string() });
2107
- const sparkFlashnetGetJwtSuccessResponseSchema = createSuccessResponseSchema({
2108
- resultSchema: sparkFlashnetGetJwtResultSchema,
2109
- method: sparkMethods.spark_flashnet_getJwt
2110
- });
1911
+ //#region src/request/rpc/objects/namespaces/bitcoin/index.ts
1912
+ const bitcoinRequestSchema = valibot.variant("method", [
1913
+ bitcoinGetAccountsRequestSchema,
1914
+ bitcoinGetAddressesRequestSchema,
1915
+ bitcoinGetAddressesV2RequestSchema,
1916
+ bitcoinGetBalanceRequestSchema,
1917
+ bitcoinGetBalanceV2RequestSchema,
1918
+ bitcoinGetInfoRequestSchema,
1919
+ bitcoinSendTransferRequestSchema,
1920
+ bitcoinSendTransferV2RequestSchema,
1921
+ bitcoinSignMessageRequestSchema,
1922
+ bitcoinSignMessageV2RequestSchema,
1923
+ bitcoinSignMultipleMessagesRequestSchema,
1924
+ bitcoinSignMultipleMessagesV2RequestSchema,
1925
+ bitcoinSignPsbtRequestSchema,
1926
+ bitcoinSignPsbtV2RequestSchema
1927
+ ]);
1928
+ const bitcoinSuccessResponseSchema = valibot.variant("~sats-connect-method", [
1929
+ bitcoinGetAccountsSuccessResponseSchema,
1930
+ bitcoinGetAddressesSuccessResponseSchema,
1931
+ bitcoinGetAddressesV2SuccessResponseSchema,
1932
+ bitcoinGetBalanceSuccessResponseSchema,
1933
+ bitcoinGetBalanceV2SuccessResponseSchema,
1934
+ bitcoinGetInfoSuccessResponseSchema,
1935
+ bitcoinSendTransferSuccessResponseSchema,
1936
+ bitcoinSendTransferV2SuccessResponseSchema,
1937
+ bitcoinSignMessageSuccessResponseSchema,
1938
+ bitcoinSignMessageV2SuccessResponseSchema,
1939
+ bitcoinSignMultipleMessagesSuccessResponseSchema,
1940
+ bitcoinSignMultipleMessagesV2SuccessResponseSchema,
1941
+ bitcoinSignPsbtSuccessResponseSchema,
1942
+ bitcoinSignPsbtV2SuccessResponseSchema
1943
+ ]);
2111
1944
 
2112
1945
  //#endregion
2113
- //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignIntent/intents/addLiquidity.ts
2114
- const sparkFlashnetAddLiquidityIntentSchema = valibot.object({
2115
- type: valibot.literal("addLiquidity"),
2116
- data: valibot.object({
2117
- userPublicKey: valibot.string(),
2118
- poolId: valibot.string(),
2119
- assetAAmount: valibot.string(),
2120
- assetBAmount: valibot.string(),
2121
- assetAMinAmountIn: valibot.string(),
2122
- assetBMinAmountIn: valibot.string(),
2123
- assetATransferId: valibot.string(),
2124
- assetBTransferId: valibot.string(),
2125
- nonce: valibot.string()
2126
- })
1946
+ //#region src/request/rpc/objects/namespaces/ordinals/methods/getInscriptions/request.ts
1947
+ const ordinalsGetInscriptionsParamsSchema = valibot.object({
1948
+ offset: valibot.number(),
1949
+ limit: valibot.number()
2127
1950
  });
2128
-
2129
- //#endregion
2130
- //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignIntent/intents/clawback.ts
2131
- const sparkFlashnetClawbackIntentSchema = valibot.object({
2132
- type: valibot.literal("clawback"),
2133
- data: valibot.object({
2134
- senderPublicKey: valibot.string(),
2135
- sparkTransferId: valibot.string(),
2136
- lpIdentityPublicKey: valibot.string(),
2137
- nonce: valibot.string()
2138
- })
1951
+ const ordinalsGetInscriptionsRequestSchema = createRequestSchema({
1952
+ paramsSchema: ordinalsGetInscriptionsParamsSchema,
1953
+ method: ordinalsMethods.ord_getInscriptions
2139
1954
  });
2140
1955
 
2141
1956
  //#endregion
2142
- //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignIntent/intents/confirmInitialDeposit.ts
2143
- const sparkFlashnetConfirmInitialDepositIntentSchema = valibot.object({
2144
- type: valibot.literal("confirmInitialDeposit"),
2145
- data: valibot.object({
2146
- poolId: valibot.string(),
2147
- assetASparkTransferId: valibot.string(),
2148
- poolOwnerPublicKey: valibot.string(),
2149
- nonce: valibot.string()
2150
- })
1957
+ //#region src/request/rpc/objects/namespaces/ordinals/methods/getInscriptions/response.ts
1958
+ const ordinalsGetInscriptionsResultSchema = valibot.object({
1959
+ total: valibot.number(),
1960
+ limit: valibot.number(),
1961
+ offset: valibot.number(),
1962
+ inscriptions: valibot.array(valibot.object({
1963
+ inscriptionId: valibot.string(),
1964
+ inscriptionNumber: valibot.string(),
1965
+ address: valibot.string(),
1966
+ collectionName: valibot.optional(valibot.string()),
1967
+ postage: valibot.string(),
1968
+ contentLength: valibot.string(),
1969
+ contentType: valibot.string(),
1970
+ timestamp: valibot.number(),
1971
+ offset: valibot.number(),
1972
+ genesisTransaction: valibot.string(),
1973
+ output: valibot.string()
1974
+ }))
1975
+ });
1976
+ const ordinalsGetInscriptionsSuccessResponseSchema = createSuccessResponseSchema({
1977
+ resultSchema: ordinalsGetInscriptionsResultSchema,
1978
+ method: ordinalsMethods.ord_getInscriptions
2151
1979
  });
2152
1980
 
2153
1981
  //#endregion
2154
- //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignIntent/intents/createConstantProductPool.ts
2155
- const sparkFlashnetCreateConstantProductPoolIntentSchema = valibot.object({
2156
- type: valibot.literal("createConstantProductPool"),
2157
- data: valibot.object({
2158
- poolOwnerPublicKey: valibot.string(),
2159
- assetAAddress: valibot.string(),
2160
- assetBAddress: valibot.string(),
2161
- lpFeeRateBps: valibot.union([valibot.number(), valibot.string()]),
2162
- totalHostFeeRateBps: valibot.union([valibot.number(), valibot.string()]),
2163
- nonce: valibot.string()
2164
- })
1982
+ //#region src/request/rpc/objects/namespaces/ordinals/methods/sendInscriptions/request.ts
1983
+ const ordinalsSendInscriptionsParamsSchema = valibot.object({ transfers: valibot.array(valibot.object({
1984
+ address: valibot.string(),
1985
+ inscriptionId: valibot.string()
1986
+ })) });
1987
+ const ordinalsSendInscriptionsRequestSchema = createRequestSchema({
1988
+ paramsSchema: ordinalsSendInscriptionsParamsSchema,
1989
+ method: ordinalsMethods.ord_sendInscriptions
2165
1990
  });
2166
1991
 
2167
1992
  //#endregion
2168
- //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignIntent/intents/createSingleSidedPool.ts
2169
- const sparkFlashnetCreateSingleSidedPoolIntentSchema = valibot.object({
2170
- type: valibot.literal("createSingleSidedPool"),
2171
- data: valibot.object({
2172
- assetAAddress: valibot.string(),
2173
- assetBAddress: valibot.string(),
2174
- assetAInitialReserve: valibot.string(),
2175
- virtualReserveA: valibot.union([valibot.number(), valibot.string()]),
2176
- virtualReserveB: valibot.union([valibot.number(), valibot.string()]),
2177
- threshold: valibot.union([valibot.number(), valibot.string()]),
2178
- lpFeeRateBps: valibot.union([valibot.number(), valibot.string()]),
2179
- totalHostFeeRateBps: valibot.union([valibot.number(), valibot.string()]),
2180
- poolOwnerPublicKey: valibot.string(),
2181
- nonce: valibot.string()
2182
- })
1993
+ //#region src/request/rpc/objects/namespaces/ordinals/methods/sendInscriptions/response.ts
1994
+ const ordinalsSendInscriptionsResultSchema = valibot.object({ txid: valibot.string() });
1995
+ const ordinalsSendInscriptionsSuccessResponseSchema = createSuccessResponseSchema({
1996
+ resultSchema: ordinalsSendInscriptionsResultSchema,
1997
+ method: ordinalsMethods.ord_sendInscriptions
2183
1998
  });
2184
1999
 
2185
2000
  //#endregion
2186
- //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignIntent/intents/removeLiquidity.ts
2187
- const sparkFlashnetRemoveLiquidityIntentSchema = valibot.object({
2188
- type: valibot.literal("removeLiquidity"),
2189
- data: valibot.object({
2190
- userPublicKey: valibot.string(),
2191
- poolId: valibot.string(),
2192
- lpTokensToRemove: valibot.string(),
2193
- nonce: valibot.string()
2194
- })
2195
- });
2001
+ //#region src/request/rpc/objects/namespaces/ordinals/index.ts
2002
+ const ordinalsRequestSchema = valibot.variant("method", [ordinalsGetInscriptionsRequestSchema, ordinalsSendInscriptionsRequestSchema]);
2003
+ const ordinalsSuccessResponseSchema = valibot.variant("~sats-connect-method", [ordinalsGetInscriptionsSuccessResponseSchema, ordinalsSendInscriptionsSuccessResponseSchema]);
2196
2004
 
2197
2005
  //#endregion
2198
- //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignIntent/intents/routeSwap.ts
2199
- const sparkFlashnetRouteSwapIntentSchema = valibot.object({
2200
- type: valibot.literal("executeRouteSwap"),
2201
- data: valibot.object({
2202
- userPublicKey: valibot.string(),
2203
- initialSparkTransferId: valibot.string(),
2204
- hops: valibot.array(valibot.object({
2205
- poolId: valibot.string(),
2206
- inputAssetAddress: valibot.string(),
2207
- outputAssetAddress: valibot.string(),
2208
- hopIntegratorFeeRateBps: valibot.optional(valibot.union([valibot.number(), valibot.string()]))
2209
- })),
2210
- inputAmount: valibot.string(),
2211
- maxRouteSlippageBps: valibot.union([valibot.number(), valibot.string()]),
2212
- minAmountOut: valibot.string(),
2213
- defaultIntegratorFeeRateBps: valibot.optional(valibot.union([valibot.number(), valibot.string()])),
2214
- nonce: valibot.string()
2215
- })
2006
+ //#region src/request/rpc/objects/namespaces/runes/methods/estimateEtch/request.ts
2007
+ const etchTermsSchema$1 = valibot.object({
2008
+ amount: valibot.optional(valibot.string()),
2009
+ cap: valibot.optional(valibot.string()),
2010
+ heightStart: valibot.optional(valibot.string()),
2011
+ heightEnd: valibot.optional(valibot.string()),
2012
+ offsetStart: valibot.optional(valibot.string()),
2013
+ offsetEnd: valibot.optional(valibot.string())
2014
+ });
2015
+ const inscriptionDetailsSchema$1 = valibot.object({
2016
+ contentType: valibot.string(),
2017
+ contentBase64: valibot.string()
2018
+ });
2019
+ const runesEstimateEtchParamsSchema = valibot.object({
2020
+ runeName: valibot.string(),
2021
+ divisibility: valibot.optional(valibot.number()),
2022
+ symbol: valibot.optional(valibot.string()),
2023
+ premine: valibot.optional(valibot.string()),
2024
+ isMintable: valibot.boolean(),
2025
+ terms: valibot.optional(etchTermsSchema$1),
2026
+ inscriptionDetails: valibot.optional(inscriptionDetailsSchema$1),
2027
+ delegateInscriptionId: valibot.optional(valibot.string()),
2028
+ destinationAddress: valibot.string(),
2029
+ feeRate: valibot.number(),
2030
+ appServiceFee: valibot.optional(valibot.number()),
2031
+ appServiceFeeAddress: valibot.optional(valibot.string()),
2032
+ network: valibot.optional(valibot.enum(BitcoinNetworkType))
2033
+ });
2034
+ const runesEstimateEtchRequestSchema = createRequestSchema({
2035
+ paramsSchema: runesEstimateEtchParamsSchema,
2036
+ method: runesMethods.runes_estimateEtch
2216
2037
  });
2217
2038
 
2218
2039
  //#endregion
2219
- //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignIntent/intents/swap.ts
2220
- const sparkFlashnetSwapIntentSchema = valibot.object({
2221
- type: valibot.literal("executeSwap"),
2222
- data: valibot.object({
2223
- userPublicKey: valibot.string(),
2224
- poolId: valibot.string(),
2225
- transferId: valibot.string(),
2226
- assetInAddress: valibot.string(),
2227
- assetOutAddress: valibot.string(),
2228
- amountIn: valibot.string(),
2229
- maxSlippageBps: valibot.union([valibot.number(), valibot.string()]),
2230
- minAmountOut: valibot.string(),
2231
- totalIntegratorFeeRateBps: valibot.optional(valibot.union([valibot.number(), valibot.string()])),
2232
- nonce: valibot.string()
2040
+ //#region src/request/rpc/objects/namespaces/runes/methods/estimateEtch/response.ts
2041
+ const runesEstimateEtchResultSchema = valibot.object({
2042
+ totalSize: valibot.number(),
2043
+ totalCost: valibot.number(),
2044
+ costBreakdown: valibot.object({
2045
+ postage: valibot.number(),
2046
+ networkFee: valibot.number(),
2047
+ serviceFee: valibot.number(),
2048
+ appServiceFee: valibot.number()
2233
2049
  })
2234
2050
  });
2235
-
2236
- //#endregion
2237
- //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignIntent/request.ts
2238
- const sparkFlashnetSignIntentParamsSchema = valibot.union([
2239
- sparkFlashnetSwapIntentSchema,
2240
- sparkFlashnetRouteSwapIntentSchema,
2241
- sparkFlashnetAddLiquidityIntentSchema,
2242
- sparkFlashnetClawbackIntentSchema,
2243
- sparkFlashnetConfirmInitialDepositIntentSchema,
2244
- sparkFlashnetCreateConstantProductPoolIntentSchema,
2245
- sparkFlashnetCreateSingleSidedPoolIntentSchema,
2246
- sparkFlashnetRemoveLiquidityIntentSchema
2247
- ]);
2248
- const sparkFlashnetSignIntentRequestSchema = createRequestSchema({
2249
- paramsSchema: sparkFlashnetSignIntentParamsSchema,
2250
- method: sparkMethods.spark_flashnet_signIntent
2051
+ const runesEstimateEtchSuccessResponseSchema = createSuccessResponseSchema({
2052
+ resultSchema: runesEstimateEtchResultSchema,
2053
+ method: runesMethods.runes_estimateEtch
2251
2054
  });
2252
2055
 
2253
2056
  //#endregion
2254
- //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignIntent/response.ts
2255
- const sparkFlashnetSignIntentResultSchema = valibot.object({ signature: valibot.string() });
2256
- const sparkFlashnetSignIntentSuccessResponseSchema = createSuccessResponseSchema({
2257
- resultSchema: sparkFlashnetSignIntentResultSchema,
2258
- method: sparkMethods.spark_flashnet_signIntent
2057
+ //#region src/request/rpc/objects/namespaces/runes/methods/estimateMint/request.ts
2058
+ const runesEstimateMintParamsSchema = valibot.object({
2059
+ runeName: valibot.string(),
2060
+ repeats: valibot.number(),
2061
+ destinationAddress: valibot.string(),
2062
+ feeRate: valibot.number(),
2063
+ appServiceFee: valibot.optional(valibot.number()),
2064
+ appServiceFeeAddress: valibot.optional(valibot.string()),
2065
+ network: valibot.optional(valibot.enum(BitcoinNetworkType))
2259
2066
  });
2260
-
2261
- //#endregion
2262
- //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignStructuredMessage/request.ts
2263
- const sparkFlashnetSignStructuredMessageParamsSchema = valibot.object({ message: valibot.string() });
2264
- const sparkFlashnetSignStructuredMessageRequestSchema = createRequestSchema({
2265
- paramsSchema: sparkFlashnetSignStructuredMessageParamsSchema,
2266
- method: sparkMethods.spark_flashnet_signStructuredMessage
2067
+ const runesEstimateMintRequestSchema = createRequestSchema({
2068
+ paramsSchema: runesEstimateMintParamsSchema,
2069
+ method: runesMethods.runes_estimateMint
2267
2070
  });
2268
2071
 
2269
2072
  //#endregion
2270
- //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignStructuredMessage/response.ts
2271
- const sparkFlashnetSignStructuredMessageResultSchema = valibot.object({
2272
- message: valibot.string(),
2273
- signature: valibot.string()
2073
+ //#region src/request/rpc/objects/namespaces/runes/methods/estimateMint/response.ts
2074
+ const runesEstimateMintResultSchema = valibot.object({
2075
+ totalSize: valibot.number(),
2076
+ totalCost: valibot.number(),
2077
+ costBreakdown: valibot.object({
2078
+ postage: valibot.number(),
2079
+ networkFee: valibot.number(),
2080
+ serviceFee: valibot.number(),
2081
+ appServiceFee: valibot.number()
2082
+ })
2274
2083
  });
2275
- const sparkFlashnetSignStructuredMessageSuccessResponseSchema = createSuccessResponseSchema({
2276
- resultSchema: sparkFlashnetSignStructuredMessageResultSchema,
2277
- method: sparkMethods.spark_flashnet_signStructuredMessage
2084
+ const runesEstimateMintSuccessResponseSchema = createSuccessResponseSchema({
2085
+ resultSchema: runesEstimateMintResultSchema,
2086
+ method: runesMethods.runes_estimateMint
2278
2087
  });
2279
2088
 
2280
2089
  //#endregion
2281
- //#region src/request/rpc/objects/namespaces/spark/methods/getAddresses/request.ts
2282
- const sparkGetAddressesParamsSchema = valibot.nullish(valibot.object({ message: valibot.optional(valibot.string()) }));
2283
- const sparkGetAddressesRequestSchema = createRequestSchema({
2284
- paramsSchema: sparkGetAddressesParamsSchema,
2285
- method: sparkMethods.spark_getAddresses
2090
+ //#region src/request/rpc/objects/namespaces/runes/methods/estimateRbfOrder/request.ts
2091
+ const runesEstimateRbfOrderParamsSchema = valibot.object({
2092
+ orderId: valibot.string(),
2093
+ newFeeRate: valibot.number(),
2094
+ network: valibot.optional(valibot.enum(BitcoinNetworkType))
2286
2095
  });
2287
-
2288
- //#endregion
2289
- //#region src/request/rpc/objects/namespaces/wallet/methods/addNetwork/request.ts
2290
- const walletAddNetworkParamsSchema = valibot.variant("chain", [
2291
- valibot.object({
2292
- chain: valibot.literal("bitcoin"),
2293
- type: valibot.enum(BitcoinNetworkType),
2294
- name: valibot.string(),
2295
- rpcUrl: valibot.string(),
2296
- rpcFallbackUrl: valibot.optional(valibot.string()),
2297
- indexerUrl: valibot.optional(valibot.string()),
2298
- blockExplorerUrl: valibot.optional(valibot.string()),
2299
- switch: valibot.optional(valibot.boolean())
2300
- }),
2301
- valibot.object({
2302
- chain: valibot.literal("stacks"),
2303
- name: valibot.string(),
2304
- type: valibot.enum(StacksNetworkType),
2305
- rpcUrl: valibot.string(),
2306
- blockExplorerUrl: valibot.optional(valibot.string()),
2307
- switch: valibot.optional(valibot.boolean())
2308
- }),
2309
- valibot.object({
2310
- chain: valibot.literal("starknet"),
2311
- name: valibot.string(),
2312
- type: valibot.enum(StarknetNetworkType),
2313
- rpcUrl: valibot.string(),
2314
- blockExplorerUrl: valibot.optional(valibot.string()),
2315
- switch: valibot.optional(valibot.boolean())
2316
- })
2317
- ]);
2318
- const walletAddNetworkRequestSchema = createRequestSchema({
2319
- paramsSchema: walletAddNetworkParamsSchema,
2320
- method: walletMethods.wallet_addNetwork
2096
+ const runesEstimateRbfOrderRequestSchema = createRequestSchema({
2097
+ paramsSchema: runesEstimateRbfOrderParamsSchema,
2098
+ method: runesMethods.runes_estimateRbfOrder
2321
2099
  });
2322
2100
 
2323
2101
  //#endregion
2324
- //#region src/request/rpc/objects/namespaces/wallet/methods/addNetwork/response.ts
2325
- const walletAddNetworkResultSchema = valibot.object({ id: valibot.string() });
2326
- const walletAddNetworkSuccessResponseSchema = createSuccessResponseSchema({
2327
- resultSchema: walletAddNetworkResultSchema,
2328
- method: walletMethods.wallet_addNetwork
2102
+ //#region src/request/rpc/objects/namespaces/runes/methods/estimateRbfOrder/response.ts
2103
+ const runesEstimateRbfOrderResultSchema = valibot.object({
2104
+ rbfCost: valibot.number(),
2105
+ fundingAddress: valibot.string()
2106
+ });
2107
+ const runesEstimateRbfOrderSuccessResponseSchema = createSuccessResponseSchema({
2108
+ resultSchema: runesEstimateRbfOrderResultSchema,
2109
+ method: runesMethods.runes_estimateRbfOrder
2329
2110
  });
2330
2111
 
2331
2112
  //#endregion
2332
- //#region src/request/rpc/objects/namespaces/wallet/shared/permissions.ts
2333
- const accountActionsSchema$2 = valibot.object({ read: valibot.optional(valibot.boolean()) });
2334
- const walletActionsSchema$2 = valibot.object({ readNetwork: valibot.optional(valibot.boolean()) });
2335
- const accountPermissionSchema$1 = valibot.object({
2336
- type: valibot.literal("account"),
2337
- resourceId: valibot.string(),
2338
- clientId: valibot.string(),
2339
- actions: accountActionsSchema$2
2113
+ //#region src/request/rpc/objects/namespaces/runes/methods/etch/request.ts
2114
+ const etchTermsSchema = valibot.object({
2115
+ amount: valibot.optional(valibot.string()),
2116
+ cap: valibot.optional(valibot.string()),
2117
+ heightStart: valibot.optional(valibot.string()),
2118
+ heightEnd: valibot.optional(valibot.string()),
2119
+ offsetStart: valibot.optional(valibot.string()),
2120
+ offsetEnd: valibot.optional(valibot.string())
2340
2121
  });
2341
- const walletPermissionSchema$1 = valibot.object({
2342
- type: valibot.literal("wallet"),
2343
- resourceId: valibot.string(),
2344
- clientId: valibot.string(),
2345
- actions: walletActionsSchema$2
2122
+ const inscriptionDetailsSchema = valibot.object({
2123
+ contentType: valibot.string(),
2124
+ contentBase64: valibot.string()
2125
+ });
2126
+ const runesEtchParamsSchema = valibot.object({
2127
+ runeName: valibot.string(),
2128
+ divisibility: valibot.optional(valibot.number()),
2129
+ symbol: valibot.optional(valibot.string()),
2130
+ premine: valibot.optional(valibot.string()),
2131
+ isMintable: valibot.boolean(),
2132
+ terms: valibot.optional(etchTermsSchema),
2133
+ inscriptionDetails: valibot.optional(inscriptionDetailsSchema),
2134
+ delegateInscriptionId: valibot.optional(valibot.string()),
2135
+ destinationAddress: valibot.string(),
2136
+ refundAddress: valibot.string(),
2137
+ feeRate: valibot.number(),
2138
+ appServiceFee: valibot.optional(valibot.number()),
2139
+ appServiceFeeAddress: valibot.optional(valibot.string()),
2140
+ network: valibot.optional(valibot.enum(BitcoinNetworkType))
2141
+ });
2142
+ const runesEtchRequestSchema = createRequestSchema({
2143
+ paramsSchema: runesEtchParamsSchema,
2144
+ method: runesMethods.runes_etch
2346
2145
  });
2347
- const permissionSchema$1 = valibot.variant("type", [accountPermissionSchema$1, walletPermissionSchema$1]);
2348
- /**
2349
- * Permissions with the clientId field omitted and optional actions. Used for
2350
- * permission requests, since the wallet performs authentication based on the
2351
- * client's tab origin and should not rely on the client authenticating
2352
- * themselves.
2353
- */
2354
- const permissionRequestParamsSchema = valibot.variant("type", [valibot.object({ ...valibot.omit(accountPermissionSchema$1, ["clientId"]).entries }), valibot.object({ ...valibot.omit(walletPermissionSchema$1, ["clientId"]).entries })]);
2355
2146
 
2356
2147
  //#endregion
2357
- //#region src/request/rpc/objects/namespaces/wallet/methods/addNetworkV2/request.ts
2358
- const walletAddNetworkV2ParamsSchema = valibot.object({
2359
- network: networkConfigurationOptionsSchema,
2360
- isActive: valibot.optional(valibot.boolean())
2148
+ //#region src/request/rpc/objects/namespaces/runes/methods/etch/response.ts
2149
+ const runesEtchResultSchema = valibot.object({
2150
+ orderId: valibot.string(),
2151
+ fundTransactionId: valibot.string(),
2152
+ fundingAddress: valibot.string()
2361
2153
  });
2362
- const walletAddNetworkV2RequestSchema = createRequestSchema({
2363
- paramsSchema: walletAddNetworkV2ParamsSchema,
2364
- method: walletMethods.wallet_addNetworkV2
2154
+ const runesEtchSuccessResponseSchema = createSuccessResponseSchema({
2155
+ resultSchema: runesEtchResultSchema,
2156
+ method: runesMethods.runes_etch
2365
2157
  });
2366
2158
 
2367
2159
  //#endregion
2368
- //#region src/request/rpc/objects/namespaces/wallet/methods/addNetworkV2/response.ts
2369
- const walletAddNetworkV2ResultSchema = valibot.object({ id: valibot.string() });
2370
- const walletAddNetworkV2SuccessResponseSchema = createSuccessResponseSchema({
2371
- resultSchema: walletAddNetworkV2ResultSchema,
2372
- method: walletMethods.wallet_addNetworkV2
2160
+ //#region src/request/rpc/objects/namespaces/runes/methods/getBalance/request.ts
2161
+ const runesGetBalanceParamsSchema = valibot.nullish(valibot.null());
2162
+ const runesGetBalanceRequestSchema = createRequestSchema({
2163
+ paramsSchema: runesGetBalanceParamsSchema,
2164
+ method: runesMethods.runes_getBalance
2373
2165
  });
2374
2166
 
2375
2167
  //#endregion
2376
- //#region src/request/rpc/objects/namespaces/wallet/methods/changeNetwork/request.ts
2377
- const walletChangeNetworkParamsSchema = valibot.object({ name: valibot.enum(BitcoinNetworkType) });
2378
- const walletChangeNetworkRequestSchema = createRequestSchema({
2379
- paramsSchema: walletChangeNetworkParamsSchema,
2380
- method: walletMethods.wallet_changeNetwork
2168
+ //#region src/request/rpc/objects/namespaces/runes/methods/getBalance/response.ts
2169
+ const runesGetBalanceResultSchema = valibot.object({ balances: valibot.array(valibot.object({
2170
+ runeName: valibot.string(),
2171
+ amount: valibot.string(),
2172
+ divisibility: valibot.number(),
2173
+ symbol: valibot.string(),
2174
+ inscriptionId: valibot.nullish(valibot.string()),
2175
+ spendableBalance: valibot.string()
2176
+ })) });
2177
+ const runesGetBalanceSuccessResponseSchema = createSuccessResponseSchema({
2178
+ resultSchema: runesGetBalanceResultSchema,
2179
+ method: runesMethods.runes_getBalance
2381
2180
  });
2382
2181
 
2383
2182
  //#endregion
2384
- //#region src/request/rpc/objects/namespaces/wallet/methods/changeNetwork/response.ts
2385
- const walletChangeNetworkResultSchema = valibot.nullish(valibot.null());
2386
- const walletChangeNetworkSuccessResponseSchema = createSuccessResponseSchema({
2387
- resultSchema: walletChangeNetworkResultSchema,
2388
- method: walletMethods.wallet_changeNetwork
2183
+ //#region src/request/rpc/objects/namespaces/runes/methods/getOrder/request.ts
2184
+ const runesGetOrderParamsSchema = valibot.object({
2185
+ id: valibot.string(),
2186
+ network: valibot.optional(valibot.enum(BitcoinNetworkType))
2187
+ });
2188
+ const runesGetOrderRequestSchema = createRequestSchema({
2189
+ paramsSchema: runesGetOrderParamsSchema,
2190
+ method: runesMethods.runes_getOrder
2389
2191
  });
2390
2192
 
2391
2193
  //#endregion
2392
- //#region src/request/rpc/objects/namespaces/wallet/methods/changeNetworkById/request.ts
2393
- const walletChangeNetworkByIdParamsSchema = valibot.object({ id: valibot.string() });
2394
- const walletChangeNetworkByIdRequestSchema = createRequestSchema({
2395
- paramsSchema: walletChangeNetworkByIdParamsSchema,
2396
- method: walletMethods.wallet_changeNetworkById
2194
+ //#region src/request/rpc/objects/namespaces/runes/methods/getOrder/response.ts
2195
+ const runesGetOrderResultSchema = valibot.object({
2196
+ id: valibot.string(),
2197
+ orderType: valibot.union([valibot.literal("rune_mint"), valibot.literal("rune_etch")]),
2198
+ state: valibot.union([
2199
+ valibot.literal("new"),
2200
+ valibot.literal("pending"),
2201
+ valibot.literal("executing"),
2202
+ valibot.literal("complete"),
2203
+ valibot.literal("failed"),
2204
+ valibot.literal("refunded"),
2205
+ valibot.literal("stale")
2206
+ ]),
2207
+ fundingAddress: valibot.string(),
2208
+ reason: valibot.optional(valibot.string()),
2209
+ createdAt: valibot.string()
2210
+ });
2211
+ const runesGetOrderSuccessResponseSchema = createSuccessResponseSchema({
2212
+ resultSchema: runesGetOrderResultSchema,
2213
+ method: runesMethods.runes_getOrder
2397
2214
  });
2398
2215
 
2399
2216
  //#endregion
2400
- //#region src/request/rpc/objects/namespaces/wallet/methods/changeNetworkById/response.ts
2401
- const walletChangeNetworkByIdResultSchema = valibot.nullish(valibot.null());
2402
- const walletChangeNetworkByIdSuccessResponseSchema = createSuccessResponseSchema({
2403
- resultSchema: walletChangeNetworkByIdResultSchema,
2404
- method: walletMethods.wallet_changeNetworkById
2217
+ //#region src/request/rpc/objects/namespaces/runes/methods/mint/request.ts
2218
+ const runesMintParamsSchema = valibot.object({
2219
+ appServiceFee: valibot.optional(valibot.number()),
2220
+ appServiceFeeAddress: valibot.optional(valibot.string()),
2221
+ destinationAddress: valibot.string(),
2222
+ feeRate: valibot.number(),
2223
+ refundAddress: valibot.string(),
2224
+ repeats: valibot.number(),
2225
+ runeName: valibot.string(),
2226
+ network: valibot.optional(valibot.enum(BitcoinNetworkType))
2227
+ });
2228
+ const runesMintRequestSchema = createRequestSchema({
2229
+ paramsSchema: runesMintParamsSchema,
2230
+ method: runesMethods.runes_mint
2405
2231
  });
2406
2232
 
2407
2233
  //#endregion
2408
- //#region src/request/rpc/objects/namespaces/wallet/methods/connect/request.ts
2409
- const walletConnectParamsSchema = valibot.nullish(valibot.object({
2410
- permissions: valibot.optional(valibot.array(permissionRequestParamsSchema)),
2411
- addresses: valibot.optional(valibot.array(valibot.enum(AddressPurpose))),
2412
- message: valibot.optional(valibot.pipe(valibot.string(), valibot.maxLength(80, "The message must not exceed 80 characters."))),
2413
- network: valibot.optional(valibot.picklist([
2414
- "Mainnet",
2415
- "Testnet",
2416
- "Signet"
2417
- ]))
2418
- }));
2419
- const walletConnectRequestSchema = createRequestSchema({
2420
- paramsSchema: walletConnectParamsSchema,
2421
- method: walletMethods.wallet_connect
2234
+ //#region src/request/rpc/objects/namespaces/runes/methods/mint/response.ts
2235
+ const runesMintResultSchema = valibot.object({
2236
+ orderId: valibot.string(),
2237
+ fundTransactionId: valibot.string(),
2238
+ fundingAddress: valibot.string()
2239
+ });
2240
+ const runesMintSuccessResponseSchema = createSuccessResponseSchema({
2241
+ resultSchema: runesMintResultSchema,
2242
+ method: runesMethods.runes_mint
2422
2243
  });
2423
2244
 
2424
2245
  //#endregion
2425
- //#region src/request/rpc/objects/namespaces/wallet/methods/getNetwork/request.ts
2426
- const walletGetNetworkParamsSchema = valibot.nullish(valibot.null());
2427
- const walletGetNetworkRequestSchema = createRequestSchema({
2428
- paramsSchema: walletGetNetworkParamsSchema,
2429
- method: walletMethods.wallet_getNetwork
2246
+ //#region src/request/rpc/objects/namespaces/runes/methods/rbfOrder/request.ts
2247
+ const runesRbfOrderParamsSchema = valibot.object({
2248
+ orderId: valibot.string(),
2249
+ newFeeRate: valibot.number(),
2250
+ network: valibot.optional(valibot.enum(BitcoinNetworkType))
2251
+ });
2252
+ const runesRbfOrderRequestSchema = createRequestSchema({
2253
+ paramsSchema: runesRbfOrderParamsSchema,
2254
+ method: runesMethods.runes_rbfOrder
2430
2255
  });
2431
2256
 
2432
2257
  //#endregion
2433
- //#region src/request/rpc/objects/namespaces/wallet/methods/getNetwork/response.ts
2434
- const walletGetNetworkResultSchema = valibot.object({
2435
- bitcoin: valibot.object({ name: valibot.enum(BitcoinNetworkType) }),
2436
- stacks: valibot.object({ name: valibot.enum(StacksNetworkType) }),
2437
- spark: valibot.object({ name: valibot.enum(SparkNetworkType) })
2258
+ //#region src/request/rpc/objects/namespaces/runes/methods/rbfOrder/response.ts
2259
+ const runesRbfOrderResultSchema = valibot.object({
2260
+ orderId: valibot.string(),
2261
+ fundRBFTransactionId: valibot.string(),
2262
+ fundingAddress: valibot.string()
2438
2263
  });
2439
- const walletGetNetworkSuccessResponseSchema = createSuccessResponseSchema({
2440
- resultSchema: walletGetNetworkResultSchema,
2441
- method: walletMethods.wallet_getNetwork
2264
+ const runesRbfOrderSuccessResponseSchema = createSuccessResponseSchema({
2265
+ resultSchema: runesRbfOrderResultSchema,
2266
+ method: runesMethods.runes_rbfOrder
2442
2267
  });
2443
2268
 
2444
2269
  //#endregion
2445
- //#region src/request/rpc/objects/namespaces/wallet/methods/connect/response.ts
2446
- const walletConnectResultSchema = valibot.object({
2447
- id: valibot.string(),
2448
- addresses: valibot.array(addressSchema),
2449
- walletType: walletTypeSchema,
2450
- network: walletGetNetworkResultSchema
2270
+ //#region src/request/rpc/objects/namespaces/runes/methods/transfer/request.ts
2271
+ const runesTransferParamsSchema = valibot.object({
2272
+ recipients: valibot.array(valibot.object({
2273
+ runeName: valibot.string(),
2274
+ amount: valibot.string(),
2275
+ address: valibot.string()
2276
+ })),
2277
+ network: valibot.optional(valibot.enum(BitcoinNetworkType))
2451
2278
  });
2452
- const walletConnectSuccessResponseSchema = createSuccessResponseSchema({
2453
- resultSchema: walletConnectResultSchema,
2454
- method: walletMethods.wallet_connect
2279
+ const runesTransferRequestSchema = createRequestSchema({
2280
+ paramsSchema: runesTransferParamsSchema,
2281
+ method: runesMethods.runes_transfer
2455
2282
  });
2456
2283
 
2457
2284
  //#endregion
2458
- //#region src/request/rpc/objects/namespaces/wallet/methods/connectV2/request.ts
2459
- const walletConnectV2ParamsSchema = valibot.nullish(valibot.object({
2460
- permissions: permissionRequestParamsSchema,
2461
- addresses: valibot.optional(valibot.array(valibot.enum(AddressPurpose))),
2462
- message: valibot.optional(valibot.pipe(valibot.string(), valibot.maxLength(80, "The message must not exceed 80 characters."))),
2463
- networkId: valibot.optional(valibot.string())
2464
- }));
2465
- const walletConnectV2RequestSchema = createRequestSchema({
2466
- paramsSchema: walletConnectV2ParamsSchema,
2467
- method: walletMethods.wallet_connectV2
2285
+ //#region src/request/rpc/objects/namespaces/runes/methods/transfer/response.ts
2286
+ const runesTransferResultSchema = valibot.object({ txid: valibot.string() });
2287
+ const runesTransferSuccessResponseSchema = createSuccessResponseSchema({
2288
+ resultSchema: runesTransferResultSchema,
2289
+ method: runesMethods.runes_transfer
2468
2290
  });
2469
2291
 
2470
2292
  //#endregion
2471
- //#region src/request/rpc/objects/namespaces/wallet/methods/getNetworks/request.ts
2472
- const walletGetNetworksParamsSchema = valibot.nullish(valibot.null());
2473
- const walletGetNetworksRequestSchema = createRequestSchema({
2474
- paramsSchema: walletGetNetworksParamsSchema,
2475
- method: walletMethods.wallet_getNetworks
2476
- });
2293
+ //#region src/request/rpc/objects/namespaces/runes/index.ts
2294
+ const runesRequestSchema = valibot.variant("method", [
2295
+ runesEstimateEtchRequestSchema,
2296
+ runesEstimateMintRequestSchema,
2297
+ runesEstimateRbfOrderRequestSchema,
2298
+ runesEtchRequestSchema,
2299
+ runesGetBalanceRequestSchema,
2300
+ runesGetOrderRequestSchema,
2301
+ runesMintRequestSchema,
2302
+ runesRbfOrderRequestSchema,
2303
+ runesTransferRequestSchema
2304
+ ]);
2305
+ const runesSuccessResponseSchema = valibot.variant("~sats-connect-method", [
2306
+ runesEstimateEtchSuccessResponseSchema,
2307
+ runesEstimateMintSuccessResponseSchema,
2308
+ runesEstimateRbfOrderSuccessResponseSchema,
2309
+ runesEtchSuccessResponseSchema,
2310
+ runesGetBalanceSuccessResponseSchema,
2311
+ runesGetOrderSuccessResponseSchema,
2312
+ runesMintSuccessResponseSchema,
2313
+ runesRbfOrderSuccessResponseSchema,
2314
+ runesTransferSuccessResponseSchema
2315
+ ]);
2477
2316
 
2478
2317
  //#endregion
2479
- //#region src/request/rpc/objects/namespaces/wallet/methods/getNetworks/response.ts
2480
- const walletGetNetworksResultSchema = allResolvedNetworksSchema;
2481
- const walletGetNetworksSuccessResponseSchema = createSuccessResponseSchema({
2482
- resultSchema: walletGetNetworksResultSchema,
2483
- method: walletMethods.wallet_getNetworks
2318
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetClawbackFunds/request.ts
2319
+ const sparkFlashnetClawbackFundsParamsSchema = valibot.object({
2320
+ sparkTransferId: valibot.string(),
2321
+ lpIdentityPublicKey: valibot.string()
2322
+ });
2323
+ const sparkFlashnetClawbackFundsRequestSchema = createRequestSchema({
2324
+ paramsSchema: sparkFlashnetClawbackFundsParamsSchema,
2325
+ method: sparkMethods.spark_flashnet_clawbackFunds
2484
2326
  });
2485
2327
 
2486
2328
  //#endregion
2487
- //#region src/request/rpc/objects/namespaces/wallet/methods/connectV2/response.ts
2488
- const walletConnectV2ResultSchema = valibot.object({
2489
- accountId: valibot.string(),
2490
- addresses: valibot.array(addressSchema),
2491
- walletType: walletTypeSchema,
2492
- networks: walletGetNetworksResultSchema
2329
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetClawbackFunds/response.ts
2330
+ const sparkFlashnetClawbackFundsResultSchema = valibot.object({
2331
+ requestId: valibot.string(),
2332
+ accepted: valibot.boolean(),
2333
+ internalRequestId: valibot.optional(valibot.string()),
2334
+ sparkStatusTrackingId: valibot.optional(valibot.string()),
2335
+ error: valibot.optional(valibot.string())
2493
2336
  });
2494
- const walletConnectV2SuccessResponseSchema = createSuccessResponseSchema({
2495
- resultSchema: walletConnectV2ResultSchema,
2496
- method: walletMethods.wallet_connectV2
2337
+ const sparkFlashnetClawbackFundsSuccessResponseSchema = createSuccessResponseSchema({
2338
+ resultSchema: sparkFlashnetClawbackFundsResultSchema,
2339
+ method: sparkMethods.spark_flashnet_clawbackFunds
2497
2340
  });
2498
2341
 
2499
2342
  //#endregion
2500
- //#region src/request/rpc/objects/namespaces/wallet/methods/disconnect/request.ts
2501
- const walletDisconnectParamsSchema = valibot.nullish(valibot.null());
2502
- const walletDisconnectRequestSchema = createRequestSchema({
2503
- paramsSchema: walletDisconnectParamsSchema,
2504
- method: walletMethods.wallet_disconnect
2343
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetExecuteRouteSwap/request.ts
2344
+ const sparkFlashnetExecuteRouteSwapParamsSchema = valibot.object({
2345
+ hops: valibot.array(valibot.object({
2346
+ poolId: valibot.string(),
2347
+ assetInAddress: valibot.string(),
2348
+ assetOutAddress: valibot.string(),
2349
+ hopIntegratorFeeRateBps: valibot.optional(valibot.number())
2350
+ })),
2351
+ initialAssetAddress: valibot.string(),
2352
+ inputAmount: valibot.string(),
2353
+ maxRouteSlippageBps: valibot.string(),
2354
+ minAmountOut: valibot.optional(valibot.string()),
2355
+ integratorFeeRateBps: valibot.optional(valibot.number()),
2356
+ integratorPublicKey: valibot.optional(valibot.string())
2357
+ });
2358
+ const sparkFlashnetExecuteRouteSwapRequestSchema = createRequestSchema({
2359
+ paramsSchema: sparkFlashnetExecuteRouteSwapParamsSchema,
2360
+ method: sparkMethods.spark_flashnet_executeRouteSwap
2505
2361
  });
2506
2362
 
2507
2363
  //#endregion
2508
- //#region src/request/rpc/objects/namespaces/wallet/methods/disconnect/response.ts
2509
- const walletDisconnectResultSchema = valibot.nullish(valibot.null());
2510
- const walletDisconnectSuccessResponseSchema = createSuccessResponseSchema({
2511
- resultSchema: walletDisconnectResultSchema,
2512
- method: walletMethods.wallet_disconnect
2364
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetExecuteRouteSwap/response.ts
2365
+ const sparkFlashnetExecuteRouteSwapResultSchema = valibot.object({
2366
+ requestId: valibot.string(),
2367
+ accepted: valibot.boolean(),
2368
+ outputAmount: valibot.string(),
2369
+ executionPrice: valibot.string(),
2370
+ finalOutboundTransferId: valibot.string(),
2371
+ error: valibot.optional(valibot.string())
2372
+ });
2373
+ const sparkFlashnetExecuteRouteSwapSuccessResponseSchema = createSuccessResponseSchema({
2374
+ resultSchema: sparkFlashnetExecuteRouteSwapResultSchema,
2375
+ method: sparkMethods.spark_flashnet_executeRouteSwap
2513
2376
  });
2514
2377
 
2515
2378
  //#endregion
2516
- //#region src/request/rpc/objects/namespaces/wallet/methods/getAccount/request.ts
2517
- const walletGetAccountParamsSchema = valibot.nullish(valibot.null());
2518
- const walletGetAccountRequestSchema = createRequestSchema({
2519
- paramsSchema: walletGetAccountParamsSchema,
2520
- method: walletMethods.wallet_getAccount
2379
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetExecuteSwap/request.ts
2380
+ const sparkFlashnetExecuteSwapParamsSchema = valibot.object({
2381
+ poolId: valibot.string(),
2382
+ assetInAddress: valibot.string(),
2383
+ assetOutAddress: valibot.string(),
2384
+ amountIn: valibot.string(),
2385
+ maxSlippageBps: valibot.number(),
2386
+ minAmountOut: valibot.optional(valibot.string()),
2387
+ integratorFeeRateBps: valibot.optional(valibot.number()),
2388
+ integratorPublicKey: valibot.optional(valibot.string())
2389
+ });
2390
+ const sparkFlashnetExecuteSwapRequestSchema = createRequestSchema({
2391
+ paramsSchema: sparkFlashnetExecuteSwapParamsSchema,
2392
+ method: sparkMethods.spark_flashnet_executeSwap
2521
2393
  });
2522
2394
 
2523
2395
  //#endregion
2524
- //#region src/request/rpc/objects/namespaces/wallet/methods/getAccount/response.ts
2525
- const walletGetAccountResultSchema = valibot.object({
2526
- id: valibot.string(),
2527
- addresses: valibot.array(addressSchema),
2528
- walletType: walletTypeSchema,
2529
- network: walletGetNetworkResultSchema
2396
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetExecuteSwap/response.ts
2397
+ const sparkFlashnetExecuteSwapResultSchema = valibot.object({
2398
+ requestId: valibot.string(),
2399
+ accepted: valibot.boolean(),
2400
+ amountOut: valibot.optional(valibot.string()),
2401
+ feeAmount: valibot.optional(valibot.string()),
2402
+ executionPrice: valibot.optional(valibot.string()),
2403
+ assetOutAddress: valibot.optional(valibot.string()),
2404
+ assetInAddress: valibot.optional(valibot.string()),
2405
+ outboundTransferId: valibot.optional(valibot.string()),
2406
+ error: valibot.optional(valibot.string())
2530
2407
  });
2531
- const walletGetAccountSuccessResponseSchema = createSuccessResponseSchema({
2532
- resultSchema: walletGetAccountResultSchema,
2533
- method: walletMethods.wallet_getAccount
2408
+ const sparkFlashnetExecuteSwapSuccessResponseSchema = createSuccessResponseSchema({
2409
+ resultSchema: sparkFlashnetExecuteSwapResultSchema,
2410
+ method: sparkMethods.spark_flashnet_executeSwap
2534
2411
  });
2535
2412
 
2536
2413
  //#endregion
2537
- //#region src/request/rpc/objects/namespaces/wallet/methods/getAccountV2/request.ts
2538
- const walletGetAccountV2ParamsSchema = valibot.nullish(valibot.null());
2539
- const walletGetAccountV2RequestSchema = createRequestSchema({
2540
- paramsSchema: walletGetAccountV2ParamsSchema,
2541
- method: walletMethods.wallet_getAccountV2
2414
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetGetClawbackEligibleTransfers/request.ts
2415
+ const sparkGetClawbackEligibleTransfersParamsSchema = valibot.nullish(valibot.null());
2416
+ const sparkGetClawbackEligibleTransfersRequestSchema = createRequestSchema({
2417
+ paramsSchema: sparkGetClawbackEligibleTransfersParamsSchema,
2418
+ method: sparkMethods.spark_flashnet_getClawbackEligibleTransfers
2542
2419
  });
2543
2420
 
2544
2421
  //#endregion
2545
- //#region src/request/rpc/objects/namespaces/wallet/methods/getAccountV2/response.ts
2546
- const walletGetAccountV2ResultSchema = valibot.object({
2547
- id: valibot.string(),
2548
- addresses: valibot.array(addressSchema),
2549
- walletType: walletTypeSchema,
2550
- networks: walletGetNetworksResultSchema
2551
- });
2552
- const walletGetAccountV2SuccessResponseSchema = createSuccessResponseSchema({
2553
- resultSchema: walletGetAccountV2ResultSchema,
2554
- method: walletMethods.wallet_getAccountV2
2422
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetGetClawbackEligibleTransfers/response.ts
2423
+ const sparkGetClawbackEligibleTransfersResultSchema = valibot.object({ eligibleTransfers: valibot.array(valibot.object({
2424
+ txId: valibot.string(),
2425
+ createdAt: valibot.string(),
2426
+ lpIdentityPublicKey: valibot.string()
2427
+ })) });
2428
+ const sparkGetClawbackEligibleTransfersSuccessResponseSchema = createSuccessResponseSchema({
2429
+ resultSchema: sparkGetClawbackEligibleTransfersResultSchema,
2430
+ method: sparkMethods.spark_flashnet_getClawbackEligibleTransfers
2555
2431
  });
2556
2432
 
2557
2433
  //#endregion
2558
- //#region src/request/rpc/objects/namespaces/wallet/methods/getCurrentPermissions/request.ts
2559
- const walletGetCurrentPermissionsParamsSchema = valibot.nullish(valibot.null());
2560
- const walletGetCurrentPermissionsRequestSchema = createRequestSchema({
2561
- paramsSchema: walletGetCurrentPermissionsParamsSchema,
2562
- method: walletMethods.wallet_getCurrentPermissions
2434
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetGetJwt/request.ts
2435
+ const sparkFlashnetGetJwtParamsSchema = valibot.null();
2436
+ const sparkFlashnetGetJwtRequestSchema = createRequestSchema({
2437
+ paramsSchema: sparkFlashnetGetJwtParamsSchema,
2438
+ method: sparkMethods.spark_flashnet_getJwt
2563
2439
  });
2564
2440
 
2565
2441
  //#endregion
2566
- //#region src/request/rpc/objects/namespaces/wallet/methods/getCurrentPermissions/response.ts
2567
- const accountActionsSchema$1 = valibot.object({ read: valibot.optional(valibot.boolean()) });
2568
- const walletActionsSchema$1 = valibot.object({ readNetwork: valibot.optional(valibot.boolean()) });
2569
- const accountPermissionSchema = valibot.object({
2570
- type: valibot.literal("account"),
2571
- resourceId: valibot.string(),
2572
- clientId: valibot.string(),
2573
- actions: accountActionsSchema$1
2574
- });
2575
- const walletPermissionSchema = valibot.object({
2576
- type: valibot.literal("wallet"),
2577
- resourceId: valibot.string(),
2578
- clientId: valibot.string(),
2579
- actions: walletActionsSchema$1
2442
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetGetJwt/response.ts
2443
+ const sparkFlashnetGetJwtResultSchema = valibot.object({ jwt: valibot.string() });
2444
+ const sparkFlashnetGetJwtSuccessResponseSchema = createSuccessResponseSchema({
2445
+ resultSchema: sparkFlashnetGetJwtResultSchema,
2446
+ method: sparkMethods.spark_flashnet_getJwt
2580
2447
  });
2581
- const permissionSchema = valibot.variant("type", [accountPermissionSchema, walletPermissionSchema]);
2582
- const walletGetCurrentPermissionsResultSchema = valibot.array(permissionSchema);
2583
- const walletGetCurrentPermissionsSuccessResponseSchema = createSuccessResponseSchema({
2584
- resultSchema: walletGetCurrentPermissionsResultSchema,
2585
- method: walletMethods.wallet_getCurrentPermissions
2448
+
2449
+ //#endregion
2450
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignIntent/intents/addLiquidity.ts
2451
+ const sparkFlashnetAddLiquidityIntentSchema = valibot.object({
2452
+ type: valibot.literal("addLiquidity"),
2453
+ data: valibot.object({
2454
+ userPublicKey: valibot.string(),
2455
+ poolId: valibot.string(),
2456
+ assetAAmount: valibot.string(),
2457
+ assetBAmount: valibot.string(),
2458
+ assetAMinAmountIn: valibot.string(),
2459
+ assetBMinAmountIn: valibot.string(),
2460
+ assetATransferId: valibot.string(),
2461
+ assetBTransferId: valibot.string(),
2462
+ nonce: valibot.string()
2463
+ })
2586
2464
  });
2587
2465
 
2588
2466
  //#endregion
2589
- //#region src/request/rpc/objects/namespaces/wallet/methods/getWalletType/request.ts
2590
- const walletGetWalletTypeParamsSchema = valibot.nullish(valibot.null());
2591
- const walletGetWalletTypeRequestSchema = createRequestSchema({
2592
- paramsSchema: walletGetWalletTypeParamsSchema,
2593
- method: walletMethods.wallet_getWalletType
2467
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignIntent/intents/clawback.ts
2468
+ const sparkFlashnetClawbackIntentSchema = valibot.object({
2469
+ type: valibot.literal("clawback"),
2470
+ data: valibot.object({
2471
+ senderPublicKey: valibot.string(),
2472
+ sparkTransferId: valibot.string(),
2473
+ lpIdentityPublicKey: valibot.string(),
2474
+ nonce: valibot.string()
2475
+ })
2594
2476
  });
2595
2477
 
2596
2478
  //#endregion
2597
- //#region src/request/rpc/objects/namespaces/wallet/methods/getWalletType/response.ts
2598
- const walletGetWalletTypeResultSchema = walletTypeSchema;
2599
- const walletGetWalletTypeSuccessResponseSchema = createSuccessResponseSchema({
2600
- resultSchema: walletGetWalletTypeResultSchema,
2601
- method: walletMethods.wallet_getWalletType
2479
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignIntent/intents/confirmInitialDeposit.ts
2480
+ const sparkFlashnetConfirmInitialDepositIntentSchema = valibot.object({
2481
+ type: valibot.literal("confirmInitialDeposit"),
2482
+ data: valibot.object({
2483
+ poolId: valibot.string(),
2484
+ assetASparkTransferId: valibot.string(),
2485
+ poolOwnerPublicKey: valibot.string(),
2486
+ nonce: valibot.string()
2487
+ })
2602
2488
  });
2603
2489
 
2604
2490
  //#endregion
2605
- //#region src/request/rpc/objects/namespaces/wallet/methods/openBridge/request.ts
2606
- const walletOpenBridgeParamsSchema = valibot.object({
2607
- fromAsset: valibot.string(),
2608
- toAsset: valibot.string()
2609
- });
2610
- const walletOpenBridgeRequestSchema = createRequestSchema({
2611
- paramsSchema: walletOpenBridgeParamsSchema,
2612
- method: walletMethods.wallet_openBridge
2491
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignIntent/intents/createConstantProductPool.ts
2492
+ const sparkFlashnetCreateConstantProductPoolIntentSchema = valibot.object({
2493
+ type: valibot.literal("createConstantProductPool"),
2494
+ data: valibot.object({
2495
+ poolOwnerPublicKey: valibot.string(),
2496
+ assetAAddress: valibot.string(),
2497
+ assetBAddress: valibot.string(),
2498
+ lpFeeRateBps: valibot.union([valibot.number(), valibot.string()]),
2499
+ totalHostFeeRateBps: valibot.union([valibot.number(), valibot.string()]),
2500
+ nonce: valibot.string()
2501
+ })
2613
2502
  });
2614
2503
 
2615
2504
  //#endregion
2616
- //#region src/request/rpc/objects/namespaces/wallet/methods/openBridge/response.ts
2617
- const walletOpenBridgeResultSchema = valibot.nullish(valibot.null());
2618
- const walletOpenBridgeSuccessResponseSchema = createSuccessResponseSchema({
2619
- resultSchema: walletOpenBridgeResultSchema,
2620
- method: walletMethods.wallet_openBridge
2505
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignIntent/intents/createSingleSidedPool.ts
2506
+ const sparkFlashnetCreateSingleSidedPoolIntentSchema = valibot.object({
2507
+ type: valibot.literal("createSingleSidedPool"),
2508
+ data: valibot.object({
2509
+ assetAAddress: valibot.string(),
2510
+ assetBAddress: valibot.string(),
2511
+ assetAInitialReserve: valibot.string(),
2512
+ virtualReserveA: valibot.union([valibot.number(), valibot.string()]),
2513
+ virtualReserveB: valibot.union([valibot.number(), valibot.string()]),
2514
+ threshold: valibot.union([valibot.number(), valibot.string()]),
2515
+ lpFeeRateBps: valibot.union([valibot.number(), valibot.string()]),
2516
+ totalHostFeeRateBps: valibot.union([valibot.number(), valibot.string()]),
2517
+ poolOwnerPublicKey: valibot.string(),
2518
+ nonce: valibot.string()
2519
+ })
2621
2520
  });
2622
2521
 
2623
2522
  //#endregion
2624
- //#region src/request/rpc/objects/namespaces/wallet/methods/openBuy/request.ts
2625
- const walletOpenBuyParamsSchema = valibot.object({ asset: valibot.string() });
2626
- const walletOpenBuyRequestSchema = createRequestSchema({
2627
- paramsSchema: walletOpenBuyParamsSchema,
2628
- method: walletMethods.wallet_openBuy
2523
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignIntent/intents/removeLiquidity.ts
2524
+ const sparkFlashnetRemoveLiquidityIntentSchema = valibot.object({
2525
+ type: valibot.literal("removeLiquidity"),
2526
+ data: valibot.object({
2527
+ userPublicKey: valibot.string(),
2528
+ poolId: valibot.string(),
2529
+ lpTokensToRemove: valibot.string(),
2530
+ nonce: valibot.string()
2531
+ })
2629
2532
  });
2630
2533
 
2631
2534
  //#endregion
2632
- //#region src/request/rpc/objects/namespaces/wallet/methods/openBuy/response.ts
2633
- const walletOpenBuyResultSchema = valibot.nullish(valibot.null());
2634
- const walletOpenBuySuccessResponseSchema = createSuccessResponseSchema({
2635
- resultSchema: walletOpenBuyResultSchema,
2636
- method: walletMethods.wallet_openBuy
2535
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignIntent/intents/routeSwap.ts
2536
+ const sparkFlashnetRouteSwapIntentSchema = valibot.object({
2537
+ type: valibot.literal("executeRouteSwap"),
2538
+ data: valibot.object({
2539
+ userPublicKey: valibot.string(),
2540
+ initialSparkTransferId: valibot.string(),
2541
+ hops: valibot.array(valibot.object({
2542
+ poolId: valibot.string(),
2543
+ inputAssetAddress: valibot.string(),
2544
+ outputAssetAddress: valibot.string(),
2545
+ hopIntegratorFeeRateBps: valibot.optional(valibot.union([valibot.number(), valibot.string()]))
2546
+ })),
2547
+ inputAmount: valibot.string(),
2548
+ maxRouteSlippageBps: valibot.union([valibot.number(), valibot.string()]),
2549
+ minAmountOut: valibot.string(),
2550
+ defaultIntegratorFeeRateBps: valibot.optional(valibot.union([valibot.number(), valibot.string()])),
2551
+ nonce: valibot.string()
2552
+ })
2637
2553
  });
2638
2554
 
2639
2555
  //#endregion
2640
- //#region src/request/rpc/objects/namespaces/wallet/methods/openReceive/request.ts
2641
- const walletOpenReceiveParamsSchema = valibot.object({ address: valibot.string() });
2642
- const walletOpenReceiveRequestSchema = createRequestSchema({
2643
- paramsSchema: walletOpenReceiveParamsSchema,
2644
- method: walletMethods.wallet_openReceive
2556
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignIntent/intents/swap.ts
2557
+ const sparkFlashnetSwapIntentSchema = valibot.object({
2558
+ type: valibot.literal("executeSwap"),
2559
+ data: valibot.object({
2560
+ userPublicKey: valibot.string(),
2561
+ poolId: valibot.string(),
2562
+ transferId: valibot.string(),
2563
+ assetInAddress: valibot.string(),
2564
+ assetOutAddress: valibot.string(),
2565
+ amountIn: valibot.string(),
2566
+ maxSlippageBps: valibot.union([valibot.number(), valibot.string()]),
2567
+ minAmountOut: valibot.string(),
2568
+ totalIntegratorFeeRateBps: valibot.optional(valibot.union([valibot.number(), valibot.string()])),
2569
+ nonce: valibot.string()
2570
+ })
2645
2571
  });
2646
2572
 
2647
2573
  //#endregion
2648
- //#region src/request/rpc/objects/namespaces/wallet/methods/openReceive/response.ts
2649
- const walletOpenReceiveResultSchema = addressSchema;
2650
- const walletOpenReceiveSuccessResponseSchema = createSuccessResponseSchema({
2651
- resultSchema: walletOpenReceiveResultSchema,
2652
- method: walletMethods.wallet_openReceive
2574
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignIntent/request.ts
2575
+ const sparkFlashnetSignIntentParamsSchema = valibot.union([
2576
+ sparkFlashnetSwapIntentSchema,
2577
+ sparkFlashnetRouteSwapIntentSchema,
2578
+ sparkFlashnetAddLiquidityIntentSchema,
2579
+ sparkFlashnetClawbackIntentSchema,
2580
+ sparkFlashnetConfirmInitialDepositIntentSchema,
2581
+ sparkFlashnetCreateConstantProductPoolIntentSchema,
2582
+ sparkFlashnetCreateSingleSidedPoolIntentSchema,
2583
+ sparkFlashnetRemoveLiquidityIntentSchema
2584
+ ]);
2585
+ const sparkFlashnetSignIntentRequestSchema = createRequestSchema({
2586
+ paramsSchema: sparkFlashnetSignIntentParamsSchema,
2587
+ method: sparkMethods.spark_flashnet_signIntent
2653
2588
  });
2654
2589
 
2655
2590
  //#endregion
2656
- //#region src/request/rpc/objects/namespaces/wallet/methods/renouncePermissions/request.ts
2657
- const walletRenouncePermissionsParamsSchema = valibot.nullish(valibot.null());
2658
- const walletRenouncePermissionsRequestSchema = createRequestSchema({
2659
- paramsSchema: walletRenouncePermissionsParamsSchema,
2660
- method: walletMethods.wallet_renouncePermissions
2591
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignIntent/response.ts
2592
+ const sparkFlashnetSignIntentResultSchema = valibot.object({ signature: valibot.string() });
2593
+ const sparkFlashnetSignIntentSuccessResponseSchema = createSuccessResponseSchema({
2594
+ resultSchema: sparkFlashnetSignIntentResultSchema,
2595
+ method: sparkMethods.spark_flashnet_signIntent
2661
2596
  });
2662
2597
 
2663
2598
  //#endregion
2664
- //#region src/request/rpc/objects/namespaces/wallet/methods/renouncePermissions/response.ts
2665
- const walletRenouncePermissionsResultSchema = valibot.nullish(valibot.null());
2666
- const walletRenouncePermissionsSuccessResponseSchema = createSuccessResponseSchema({
2667
- resultSchema: walletRenouncePermissionsResultSchema,
2668
- method: walletMethods.wallet_renouncePermissions
2599
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignStructuredMessage/request.ts
2600
+ const sparkFlashnetSignStructuredMessageParamsSchema = valibot.object({ message: valibot.string() });
2601
+ const sparkFlashnetSignStructuredMessageRequestSchema = createRequestSchema({
2602
+ paramsSchema: sparkFlashnetSignStructuredMessageParamsSchema,
2603
+ method: sparkMethods.spark_flashnet_signStructuredMessage
2669
2604
  });
2670
2605
 
2671
2606
  //#endregion
2672
- //#region src/request/rpc/objects/namespaces/wallet/methods/requestPermissions/request.ts
2673
- const accountActionsSchema = valibot.object({ read: valibot.optional(valibot.boolean()) });
2674
- const walletActionsSchema = valibot.object({ readNetwork: valibot.optional(valibot.boolean()) });
2675
- const accountPermissionRequestSchema = valibot.object({
2676
- type: valibot.literal("account"),
2677
- resourceId: valibot.string(),
2678
- actions: accountActionsSchema
2679
- });
2680
- const walletPermissionRequestSchema = valibot.object({
2681
- type: valibot.literal("wallet"),
2682
- resourceId: valibot.string(),
2683
- actions: walletActionsSchema
2607
+ //#region src/request/rpc/objects/namespaces/spark/methods/flashnetSignStructuredMessage/response.ts
2608
+ const sparkFlashnetSignStructuredMessageResultSchema = valibot.object({
2609
+ message: valibot.string(),
2610
+ signature: valibot.string()
2684
2611
  });
2685
- const permissionRequestParamsSchema$1 = valibot.variant("type", [accountPermissionRequestSchema, walletPermissionRequestSchema]);
2686
- const walletRequestPermissionsParamsSchema = valibot.nullish(valibot.array(permissionRequestParamsSchema$1));
2687
- const walletRequestPermissionsRequestSchema = createRequestSchema({
2688
- paramsSchema: walletRequestPermissionsParamsSchema,
2689
- method: walletMethods.wallet_requestPermissions
2612
+ const sparkFlashnetSignStructuredMessageSuccessResponseSchema = createSuccessResponseSchema({
2613
+ resultSchema: sparkFlashnetSignStructuredMessageResultSchema,
2614
+ method: sparkMethods.spark_flashnet_signStructuredMessage
2690
2615
  });
2691
2616
 
2692
2617
  //#endregion
2693
- //#region src/request/rpc/objects/namespaces/wallet/methods/requestPermissions/response.ts
2694
- const walletRequestPermissionsResultSchema = valibot.literal(true);
2695
- const walletRequestPermissionsSuccessResponseSchema = createSuccessResponseSchema({
2696
- resultSchema: walletRequestPermissionsResultSchema,
2697
- method: walletMethods.wallet_requestPermissions
2618
+ //#region src/request/rpc/objects/namespaces/spark/methods/getAddresses/request.ts
2619
+ const sparkGetAddressesParamsSchema = valibot.nullish(valibot.object({ message: valibot.optional(valibot.string()) }));
2620
+ const sparkGetAddressesRequestSchema = createRequestSchema({
2621
+ paramsSchema: sparkGetAddressesParamsSchema,
2622
+ method: sparkMethods.spark_getAddresses
2698
2623
  });
2699
2624
 
2700
- //#endregion
2701
- //#region src/request/rpc/objects/namespaces/wallet/index.ts
2702
- const walletRequestSchema = valibot.variant("method", [
2703
- walletAddNetworkRequestSchema,
2704
- walletAddNetworkV2RequestSchema,
2705
- walletChangeNetworkByIdRequestSchema,
2706
- walletChangeNetworkRequestSchema,
2707
- walletConnectRequestSchema,
2708
- walletConnectV2RequestSchema,
2709
- walletDisconnectRequestSchema,
2710
- walletGetAccountRequestSchema,
2711
- walletGetAccountV2RequestSchema,
2712
- walletGetCurrentPermissionsRequestSchema,
2713
- walletGetNetworkRequestSchema,
2714
- walletGetNetworksRequestSchema,
2715
- walletGetWalletTypeRequestSchema,
2716
- walletOpenBridgeRequestSchema,
2717
- walletOpenBuyRequestSchema,
2718
- walletOpenReceiveRequestSchema,
2719
- walletRenouncePermissionsRequestSchema,
2720
- walletRequestPermissionsRequestSchema
2721
- ]);
2722
- const walletSuccessResponseSchema = valibot.variant("~sats-connect-method", [
2723
- walletAddNetworkSuccessResponseSchema,
2724
- walletAddNetworkV2SuccessResponseSchema,
2725
- walletChangeNetworkByIdSuccessResponseSchema,
2726
- walletChangeNetworkSuccessResponseSchema,
2727
- walletConnectSuccessResponseSchema,
2728
- walletConnectV2SuccessResponseSchema,
2729
- walletDisconnectSuccessResponseSchema,
2730
- walletGetAccountSuccessResponseSchema,
2731
- walletGetAccountV2SuccessResponseSchema,
2732
- walletGetCurrentPermissionsSuccessResponseSchema,
2733
- walletGetNetworkSuccessResponseSchema,
2734
- walletGetNetworksSuccessResponseSchema,
2735
- walletGetWalletTypeSuccessResponseSchema,
2736
- walletOpenBridgeSuccessResponseSchema,
2737
- walletOpenBuySuccessResponseSchema,
2738
- walletOpenReceiveSuccessResponseSchema,
2739
- walletRenouncePermissionsSuccessResponseSchema,
2740
- walletRequestPermissionsSuccessResponseSchema
2741
- ]);
2742
-
2743
2625
  //#endregion
2744
2626
  //#region src/request/rpc/objects/namespaces/spark/methods/getAddresses/response.ts
2745
2627
  const sparkGetAddressesResultSchema = valibot.object({
@@ -2980,33 +2862,6 @@ const stacksGetAddressesSuccessResponseSchema = createSuccessResponseSchema({
2980
2862
  method: stacksMethods.stx_getAddresses
2981
2863
  });
2982
2864
 
2983
- //#endregion
2984
- //#region src/request/rpc/objects/namespaces/stacks/methods/getAddressesV2/request.ts
2985
- const stacksGetAddressesV2ParamsSchema = valibot.nullish(valibot.object({ message: valibot.optional(valibot.string()) }));
2986
- const stacksGetAddressesV2RequestSchema = createRequestSchema({
2987
- paramsSchema: stacksGetAddressesV2ParamsSchema,
2988
- method: stacksMethods.stacks_getAddressesV2
2989
- });
2990
-
2991
- //#endregion
2992
- //#region src/request/rpc/objects/namespaces/stacks/methods/getAddressesV2/response.ts
2993
- const stacksGetAddressesV2ResultSchema = valibot.object({
2994
- addresses: valibot.array(addressSchema),
2995
- network: valibot.object({
2996
- type: valibot.union([
2997
- valibot.literal("Mainnet"),
2998
- valibot.literal("Testnet"),
2999
- valibot.literal("Devnet"),
3000
- valibot.literal("Signet")
3001
- ]),
3002
- chain: valibot.union([valibot.literal("bitcoin"), valibot.literal("stacks")])
3003
- })
3004
- });
3005
- const stacksGetAddressesV2SuccessResponseSchema = createSuccessResponseSchema({
3006
- resultSchema: stacksGetAddressesV2ResultSchema,
3007
- method: stacksMethods.stacks_getAddressesV2
3008
- });
3009
-
3010
2865
  //#endregion
3011
2866
  //#region src/request/rpc/objects/namespaces/stacks/methods/signMessage/request.ts
3012
2867
  const stacksSignMessageParamsSchema = valibot.object({ message: valibot.string() });
@@ -3075,7 +2930,7 @@ const stacksSignTransactionsParamsSchema = valibot.object({
3075
2930
  transactions: valibot.pipe(valibot.array(valibot.pipe(valibot.string(), valibot.check(() => {
3076
2931
  return true;
3077
2932
  }, "Invalid hex-encoded Stacks transaction."))), valibot.minLength(1)),
3078
- broadcast: valibot.optional(valibot.boolean())
2933
+ broadcast: valibot.optional(valibot.boolean(), true)
3079
2934
  });
3080
2935
  const stacksSignTransactionsRequestSchema = createRequestSchema({
3081
2936
  paramsSchema: stacksSignTransactionsParamsSchema,
@@ -3124,7 +2979,6 @@ const stacksRequestSchema = valibot.variant("method", [
3124
2979
  stacksDeployContractRequestSchema,
3125
2980
  stacksGetAccountsRequestSchema,
3126
2981
  stacksGetAddressesRequestSchema,
3127
- stacksGetAddressesV2RequestSchema,
3128
2982
  stacksSignMessageRequestSchema,
3129
2983
  stacksSignStructuredMessageRequestSchema,
3130
2984
  stacksSignTransactionRequestSchema,
@@ -3136,7 +2990,6 @@ const stacksSuccessResponseSchema = valibot.variant("~sats-connect-method", [
3136
2990
  stacksDeployContractSuccessResponseSchema,
3137
2991
  stacksGetAccountsSuccessResponseSchema,
3138
2992
  stacksGetAddressesSuccessResponseSchema,
3139
- stacksGetAddressesV2SuccessResponseSchema,
3140
2993
  stacksSignMessageSuccessResponseSchema,
3141
2994
  stacksSignStructuredMessageSuccessResponseSchema,
3142
2995
  stacksSignTransactionSuccessResponseSchema,
@@ -3511,10 +3364,6 @@ exports.bitcoinGetAccountsParamsSchema = bitcoinGetAccountsParamsSchema;
3511
3364
  exports.bitcoinGetAccountsRequestSchema = bitcoinGetAccountsRequestSchema;
3512
3365
  exports.bitcoinGetAccountsResultSchema = bitcoinGetAccountsResultSchema;
3513
3366
  exports.bitcoinGetAccountsSuccessResponseSchema = bitcoinGetAccountsSuccessResponseSchema;
3514
- exports.bitcoinGetAccountsV2ParamsSchema = bitcoinGetAccountsV2ParamsSchema;
3515
- exports.bitcoinGetAccountsV2RequestSchema = bitcoinGetAccountsV2RequestSchema;
3516
- exports.bitcoinGetAccountsV2ResultSchema = bitcoinGetAccountsV2ResultSchema;
3517
- exports.bitcoinGetAccountsV2SuccessResponseSchema = bitcoinGetAccountsV2SuccessResponseSchema;
3518
3367
  exports.bitcoinGetAddressesParamsSchema = bitcoinGetAddressesParamsSchema;
3519
3368
  exports.bitcoinGetAddressesRequestSchema = bitcoinGetAddressesRequestSchema;
3520
3369
  exports.bitcoinGetAddressesResultSchema = bitcoinGetAddressesResultSchema;
@@ -3535,10 +3384,6 @@ exports.bitcoinGetInfoParamsSchema = bitcoinGetInfoParamsSchema;
3535
3384
  exports.bitcoinGetInfoRequestSchema = bitcoinGetInfoRequestSchema;
3536
3385
  exports.bitcoinGetInfoResultSchema = bitcoinGetInfoResultSchema;
3537
3386
  exports.bitcoinGetInfoSuccessResponseSchema = bitcoinGetInfoSuccessResponseSchema;
3538
- exports.bitcoinGetInfoV2ParamsSchema = bitcoinGetInfoV2ParamsSchema;
3539
- exports.bitcoinGetInfoV2RequestSchema = bitcoinGetInfoV2RequestSchema;
3540
- exports.bitcoinGetInfoV2ResultSchema = bitcoinGetInfoV2ResultSchema;
3541
- exports.bitcoinGetInfoV2SuccessResponseSchema = bitcoinGetInfoV2SuccessResponseSchema;
3542
3387
  exports.bitcoinMethods = bitcoinMethods;
3543
3388
  exports.bitcoinModeToLegacyBitcoinNetworkType = bitcoinModeToLegacyBitcoinNetworkType;
3544
3389
  exports.bitcoinNetworkConfigurationOptionsSchema = bitcoinNetworkConfigurationOptionsSchema;
@@ -3592,6 +3437,7 @@ exports.getProviders = getProviders;
3592
3437
  exports.getSupportedWallets = getSupportedWallets;
3593
3438
  exports.isProviderInstalled = isProviderInstalled;
3594
3439
  exports.methodSupport = methodSupport;
3440
+ exports.methods = methods;
3595
3441
  exports.networkChangeEventName = networkChangeEventName;
3596
3442
  exports.networkChangeEventNameV2 = networkChangeEventNameV2;
3597
3443
  exports.networkChangeSchema = networkChangeSchema;
@@ -3738,10 +3584,6 @@ exports.stacksGetAddressesParamsSchema = stacksGetAddressesParamsSchema;
3738
3584
  exports.stacksGetAddressesRequestSchema = stacksGetAddressesRequestSchema;
3739
3585
  exports.stacksGetAddressesResultSchema = stacksGetAddressesResultSchema;
3740
3586
  exports.stacksGetAddressesSuccessResponseSchema = stacksGetAddressesSuccessResponseSchema;
3741
- exports.stacksGetAddressesV2ParamsSchema = stacksGetAddressesV2ParamsSchema;
3742
- exports.stacksGetAddressesV2RequestSchema = stacksGetAddressesV2RequestSchema;
3743
- exports.stacksGetAddressesV2ResultSchema = stacksGetAddressesV2ResultSchema;
3744
- exports.stacksGetAddressesV2SuccessResponseSchema = stacksGetAddressesV2SuccessResponseSchema;
3745
3587
  exports.stacksMethods = stacksMethods;
3746
3588
  exports.stacksModeToLegacyStacksNetworkType = stacksModeToLegacyStacksNetworkType;
3747
3589
  exports.stacksNetworkConfigurationOptionsSchema = stacksNetworkConfigurationOptionsSchema;
@@ -3776,10 +3618,6 @@ exports.walletAddNetworkV2ParamsSchema = walletAddNetworkV2ParamsSchema;
3776
3618
  exports.walletAddNetworkV2RequestSchema = walletAddNetworkV2RequestSchema;
3777
3619
  exports.walletAddNetworkV2ResultSchema = walletAddNetworkV2ResultSchema;
3778
3620
  exports.walletAddNetworkV2SuccessResponseSchema = walletAddNetworkV2SuccessResponseSchema;
3779
- exports.walletChangeNetworkByIdParamsSchema = walletChangeNetworkByIdParamsSchema;
3780
- exports.walletChangeNetworkByIdRequestSchema = walletChangeNetworkByIdRequestSchema;
3781
- exports.walletChangeNetworkByIdResultSchema = walletChangeNetworkByIdResultSchema;
3782
- exports.walletChangeNetworkByIdSuccessResponseSchema = walletChangeNetworkByIdSuccessResponseSchema;
3783
3621
  exports.walletChangeNetworkParamsSchema = walletChangeNetworkParamsSchema;
3784
3622
  exports.walletChangeNetworkRequestSchema = walletChangeNetworkRequestSchema;
3785
3623
  exports.walletChangeNetworkResultSchema = walletChangeNetworkResultSchema;
@@ -3844,5 +3682,9 @@ exports.walletRequestPermissionsResultSchema = walletRequestPermissionsResultSch
3844
3682
  exports.walletRequestPermissionsSuccessResponseSchema = walletRequestPermissionsSuccessResponseSchema;
3845
3683
  exports.walletRequestSchema = walletRequestSchema;
3846
3684
  exports.walletSuccessResponseSchema = walletSuccessResponseSchema;
3685
+ exports.walletSwitchNetworkParamsSchema = walletSwitchNetworkParamsSchema;
3686
+ exports.walletSwitchNetworkRequestSchema = walletSwitchNetworkRequestSchema;
3687
+ exports.walletSwitchNetworkResultSchema = walletSwitchNetworkResultSchema;
3688
+ exports.walletSwitchNetworkSuccessResponseSchema = walletSwitchNetworkSuccessResponseSchema;
3847
3689
  exports.walletTypeSchema = walletTypeSchema;
3848
3690
  exports.walletTypes = walletTypes;