@sats-connect/core 0.4.0-1187a26 → 0.4.0-3185748

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1049,50 +1049,496 @@ declare const stxSignTransactionRequestMessageSchema: v.ObjectSchema<{
1049
1049
  type StxSignTransactionRequestMessage = v.InferOutput<typeof stxSignTransactionRequestMessageSchema>;
1050
1050
  type StxSignTransaction = MethodParamsAndResult<StxSignTransactionParams, StxSignTransactionResult>;
1051
1051
 
1052
+ /**
1053
+ * Permissions with the clientId field omitted and optional actions. Used for
1054
+ * permission requests, since the wallet performs authentication based on the
1055
+ * client's tab origin and should not rely on the client authenticating
1056
+ * themselves.
1057
+ */
1058
+ declare const permissionTemplate: v.VariantSchema<"type", [v.ObjectSchema<{
1059
+ readonly actions: Omit<v.ObjectSchema<{
1060
+ readonly read: v.BooleanSchema<undefined>;
1061
+ readonly autoSign: v.BooleanSchema<undefined>;
1062
+ readonly rename: v.BooleanSchema<undefined>;
1063
+ }, undefined>, "_types" | "_run" | "entries"> & {
1064
+ readonly entries: {
1065
+ readonly read: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
1066
+ readonly autoSign: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
1067
+ readonly rename: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
1068
+ };
1069
+ readonly _run: (dataset: v.Dataset<unknown, never>, config: v.Config<v.BaseIssue<unknown>>) => v.Dataset<{
1070
+ read?: boolean | undefined;
1071
+ autoSign?: boolean | undefined;
1072
+ rename?: boolean | undefined;
1073
+ }, v.ObjectIssue | v.BooleanIssue>;
1074
+ readonly _types?: {
1075
+ readonly input: {
1076
+ read?: boolean | undefined;
1077
+ autoSign?: boolean | undefined;
1078
+ rename?: boolean | undefined;
1079
+ };
1080
+ readonly output: {
1081
+ read?: boolean | undefined;
1082
+ autoSign?: boolean | undefined;
1083
+ rename?: boolean | undefined;
1084
+ };
1085
+ readonly issue: v.ObjectIssue | v.BooleanIssue;
1086
+ } | undefined;
1087
+ };
1088
+ readonly type: v.LiteralSchema<"account", undefined>;
1089
+ readonly resourceId: v.SchemaWithPipe<[v.StringSchema<undefined>, v.CheckAction<string, undefined>, v.BrandAction<string, "AccountResourceId">]>;
1090
+ }, undefined>, v.ObjectSchema<{
1091
+ readonly actions: Omit<v.ObjectSchema<{
1092
+ readonly addPrivateKey: v.BooleanSchema<undefined>;
1093
+ readonly openPopup: v.BooleanSchema<undefined>;
1094
+ readonly openFullPage: v.BooleanSchema<undefined>;
1095
+ readonly readAllAccounts: v.BooleanSchema<undefined>;
1096
+ }, undefined>, "_types" | "_run" | "entries"> & {
1097
+ readonly entries: {
1098
+ readonly addPrivateKey: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
1099
+ readonly openPopup: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
1100
+ readonly openFullPage: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
1101
+ readonly readAllAccounts: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
1102
+ };
1103
+ readonly _run: (dataset: v.Dataset<unknown, never>, config: v.Config<v.BaseIssue<unknown>>) => v.Dataset<{
1104
+ addPrivateKey?: boolean | undefined;
1105
+ openPopup?: boolean | undefined;
1106
+ openFullPage?: boolean | undefined;
1107
+ readAllAccounts?: boolean | undefined;
1108
+ }, v.ObjectIssue | v.BooleanIssue>;
1109
+ readonly _types?: {
1110
+ readonly input: {
1111
+ addPrivateKey?: boolean | undefined;
1112
+ openPopup?: boolean | undefined;
1113
+ openFullPage?: boolean | undefined;
1114
+ readAllAccounts?: boolean | undefined;
1115
+ };
1116
+ readonly output: {
1117
+ addPrivateKey?: boolean | undefined;
1118
+ openPopup?: boolean | undefined;
1119
+ openFullPage?: boolean | undefined;
1120
+ readAllAccounts?: boolean | undefined;
1121
+ };
1122
+ readonly issue: v.ObjectIssue | v.BooleanIssue;
1123
+ } | undefined;
1124
+ };
1125
+ readonly type: v.LiteralSchema<"wallet", undefined>;
1126
+ readonly resourceId: v.LiteralSchema<"wallet", undefined>;
1127
+ }, undefined>], undefined>;
1128
+ type PermissionWithoutClientId = v.InferOutput<typeof permissionTemplate>;
1052
1129
  declare const requestPermissionsMethodName = "wallet_requestPermissions";
1053
- declare const requestPermissionsParamsSchema: v.UndefinedSchema<undefined>;
1130
+ declare const requestPermissionsParamsSchema: v.NullishSchema<v.ArraySchema<v.VariantSchema<"type", [v.ObjectSchema<{
1131
+ readonly actions: Omit<v.ObjectSchema<{
1132
+ readonly read: v.BooleanSchema<undefined>;
1133
+ readonly autoSign: v.BooleanSchema<undefined>;
1134
+ readonly rename: v.BooleanSchema<undefined>;
1135
+ }, undefined>, "_types" | "_run" | "entries"> & {
1136
+ readonly entries: {
1137
+ readonly read: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
1138
+ readonly autoSign: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
1139
+ readonly rename: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
1140
+ };
1141
+ readonly _run: (dataset: v.Dataset<unknown, never>, config: v.Config<v.BaseIssue<unknown>>) => v.Dataset<{
1142
+ read?: boolean | undefined;
1143
+ autoSign?: boolean | undefined;
1144
+ rename?: boolean | undefined;
1145
+ }, v.ObjectIssue | v.BooleanIssue>;
1146
+ readonly _types?: {
1147
+ readonly input: {
1148
+ read?: boolean | undefined;
1149
+ autoSign?: boolean | undefined;
1150
+ rename?: boolean | undefined;
1151
+ };
1152
+ readonly output: {
1153
+ read?: boolean | undefined;
1154
+ autoSign?: boolean | undefined;
1155
+ rename?: boolean | undefined;
1156
+ };
1157
+ readonly issue: v.ObjectIssue | v.BooleanIssue;
1158
+ } | undefined;
1159
+ };
1160
+ readonly type: v.LiteralSchema<"account", undefined>;
1161
+ readonly resourceId: v.SchemaWithPipe<[v.StringSchema<undefined>, v.CheckAction<string, undefined>, v.BrandAction<string, "AccountResourceId">]>;
1162
+ }, undefined>, v.ObjectSchema<{
1163
+ readonly actions: Omit<v.ObjectSchema<{
1164
+ readonly addPrivateKey: v.BooleanSchema<undefined>;
1165
+ readonly openPopup: v.BooleanSchema<undefined>;
1166
+ readonly openFullPage: v.BooleanSchema<undefined>;
1167
+ readonly readAllAccounts: v.BooleanSchema<undefined>;
1168
+ }, undefined>, "_types" | "_run" | "entries"> & {
1169
+ readonly entries: {
1170
+ readonly addPrivateKey: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
1171
+ readonly openPopup: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
1172
+ readonly openFullPage: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
1173
+ readonly readAllAccounts: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
1174
+ };
1175
+ readonly _run: (dataset: v.Dataset<unknown, never>, config: v.Config<v.BaseIssue<unknown>>) => v.Dataset<{
1176
+ addPrivateKey?: boolean | undefined;
1177
+ openPopup?: boolean | undefined;
1178
+ openFullPage?: boolean | undefined;
1179
+ readAllAccounts?: boolean | undefined;
1180
+ }, v.ObjectIssue | v.BooleanIssue>;
1181
+ readonly _types?: {
1182
+ readonly input: {
1183
+ addPrivateKey?: boolean | undefined;
1184
+ openPopup?: boolean | undefined;
1185
+ openFullPage?: boolean | undefined;
1186
+ readAllAccounts?: boolean | undefined;
1187
+ };
1188
+ readonly output: {
1189
+ addPrivateKey?: boolean | undefined;
1190
+ openPopup?: boolean | undefined;
1191
+ openFullPage?: boolean | undefined;
1192
+ readAllAccounts?: boolean | undefined;
1193
+ };
1194
+ readonly issue: v.ObjectIssue | v.BooleanIssue;
1195
+ } | undefined;
1196
+ };
1197
+ readonly type: v.LiteralSchema<"wallet", undefined>;
1198
+ readonly resourceId: v.LiteralSchema<"wallet", undefined>;
1199
+ }, undefined>], undefined>, undefined>, never>;
1054
1200
  declare const requestPermissionsResultSchema: v.LiteralSchema<true, undefined>;
1055
1201
  declare const requestPermissionsRequestMessageSchema: v.ObjectSchema<{
1056
1202
  readonly method: v.LiteralSchema<"wallet_requestPermissions", undefined>;
1057
- readonly params: v.UndefinedSchema<undefined>;
1203
+ readonly params: v.NullishSchema<v.ArraySchema<v.VariantSchema<"type", [v.ObjectSchema<{
1204
+ readonly actions: Omit<v.ObjectSchema<{
1205
+ readonly read: v.BooleanSchema<undefined>;
1206
+ readonly autoSign: v.BooleanSchema<undefined>;
1207
+ readonly rename: v.BooleanSchema<undefined>;
1208
+ }, undefined>, "_types" | "_run" | "entries"> & {
1209
+ readonly entries: {
1210
+ readonly read: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
1211
+ readonly autoSign: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
1212
+ readonly rename: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
1213
+ };
1214
+ readonly _run: (dataset: v.Dataset<unknown, never>, config: v.Config<v.BaseIssue<unknown>>) => v.Dataset<{
1215
+ read?: boolean | undefined;
1216
+ autoSign?: boolean | undefined;
1217
+ rename?: boolean | undefined;
1218
+ }, v.ObjectIssue | v.BooleanIssue>;
1219
+ readonly _types?: {
1220
+ readonly input: {
1221
+ read?: boolean | undefined;
1222
+ autoSign?: boolean | undefined;
1223
+ rename?: boolean | undefined;
1224
+ };
1225
+ readonly output: {
1226
+ read?: boolean | undefined;
1227
+ autoSign?: boolean | undefined;
1228
+ rename?: boolean | undefined;
1229
+ };
1230
+ readonly issue: v.ObjectIssue | v.BooleanIssue;
1231
+ } | undefined;
1232
+ };
1233
+ readonly type: v.LiteralSchema<"account", undefined>;
1234
+ readonly resourceId: v.SchemaWithPipe<[v.StringSchema<undefined>, v.CheckAction<string, undefined>, v.BrandAction<string, "AccountResourceId">]>;
1235
+ }, undefined>, v.ObjectSchema<{
1236
+ readonly actions: Omit<v.ObjectSchema<{
1237
+ readonly addPrivateKey: v.BooleanSchema<undefined>;
1238
+ readonly openPopup: v.BooleanSchema<undefined>;
1239
+ readonly openFullPage: v.BooleanSchema<undefined>;
1240
+ readonly readAllAccounts: v.BooleanSchema<undefined>;
1241
+ }, undefined>, "_types" | "_run" | "entries"> & {
1242
+ readonly entries: {
1243
+ readonly addPrivateKey: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
1244
+ readonly openPopup: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
1245
+ readonly openFullPage: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
1246
+ readonly readAllAccounts: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
1247
+ };
1248
+ readonly _run: (dataset: v.Dataset<unknown, never>, config: v.Config<v.BaseIssue<unknown>>) => v.Dataset<{
1249
+ addPrivateKey?: boolean | undefined;
1250
+ openPopup?: boolean | undefined;
1251
+ openFullPage?: boolean | undefined;
1252
+ readAllAccounts?: boolean | undefined;
1253
+ }, v.ObjectIssue | v.BooleanIssue>;
1254
+ readonly _types?: {
1255
+ readonly input: {
1256
+ addPrivateKey?: boolean | undefined;
1257
+ openPopup?: boolean | undefined;
1258
+ openFullPage?: boolean | undefined;
1259
+ readAllAccounts?: boolean | undefined;
1260
+ };
1261
+ readonly output: {
1262
+ addPrivateKey?: boolean | undefined;
1263
+ openPopup?: boolean | undefined;
1264
+ openFullPage?: boolean | undefined;
1265
+ readAllAccounts?: boolean | undefined;
1266
+ };
1267
+ readonly issue: v.ObjectIssue | v.BooleanIssue;
1268
+ } | undefined;
1269
+ };
1270
+ readonly type: v.LiteralSchema<"wallet", undefined>;
1271
+ readonly resourceId: v.LiteralSchema<"wallet", undefined>;
1272
+ }, undefined>], undefined>, undefined>, never>;
1058
1273
  readonly id: v.StringSchema<undefined>;
1059
1274
  readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
1060
1275
  }, undefined>;
1061
1276
  type RequestPermissions = MethodParamsAndResult<v.InferOutput<typeof requestPermissionsParamsSchema>, v.InferOutput<typeof requestPermissionsResultSchema>>;
1062
1277
  declare const renouncePermissionsMethodName = "wallet_renouncePermissions";
1063
- declare const renouncePermissionsParamsSchema: v.UndefinedSchema<undefined>;
1064
- declare const renouncePermissionsResultSchema: v.LiteralSchema<true, undefined>;
1278
+ declare const renouncePermissionsParamsSchema: v.NullishSchema<v.NullSchema<undefined>, never>;
1279
+ declare const renouncePermissionsResultSchema: v.NullishSchema<v.NullSchema<undefined>, never>;
1065
1280
  declare const renouncePermissionsRequestMessageSchema: v.ObjectSchema<{
1066
1281
  readonly method: v.LiteralSchema<"wallet_renouncePermissions", undefined>;
1067
- readonly params: v.UndefinedSchema<undefined>;
1282
+ readonly params: v.NullishSchema<v.NullSchema<undefined>, never>;
1068
1283
  readonly id: v.StringSchema<undefined>;
1069
1284
  readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
1070
1285
  }, undefined>;
1071
1286
  type RenouncePermissions = MethodParamsAndResult<v.InferOutput<typeof renouncePermissionsParamsSchema>, v.InferOutput<typeof renouncePermissionsResultSchema>>;
1287
+ declare const disconnectMethodName = "wallet_disconnect";
1288
+ declare const disconnectParamsSchema: v.NullishSchema<v.NullSchema<undefined>, never>;
1289
+ declare const disconnectResultSchema: v.NullishSchema<v.NullSchema<undefined>, never>;
1290
+ declare const disconnectRequestMessageSchema: v.ObjectSchema<{
1291
+ readonly method: v.LiteralSchema<"wallet_disconnect", undefined>;
1292
+ readonly params: v.NullishSchema<v.NullSchema<undefined>, never>;
1293
+ readonly id: v.StringSchema<undefined>;
1294
+ readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
1295
+ }, undefined>;
1296
+ type Disconnect = MethodParamsAndResult<v.InferOutput<typeof disconnectParamsSchema>, v.InferOutput<typeof disconnectResultSchema>>;
1072
1297
  declare const getWalletTypeMethodName = "wallet_getWalletType";
1073
1298
  declare const getWalletTypeParamsSchema: v.NullishSchema<v.NullSchema<undefined>, never>;
1074
1299
  declare const getWalletTypeResultSchema: v.PicklistSchema<readonly ["software", "ledger"], undefined>;
1075
1300
  declare const getWalletTypeRequestMessageSchema: v.ObjectSchema<{
1076
1301
  readonly method: v.LiteralSchema<"wallet_getWalletType", undefined>;
1302
+ readonly params: v.NullishSchema<v.NullSchema<undefined>, never>;
1077
1303
  readonly id: v.StringSchema<undefined>;
1078
1304
  readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
1079
- readonly params: v.OptionalSchema<v.UnionSchema<[v.ArraySchema<v.UnknownSchema, undefined>, v.LooseObjectSchema<{}, undefined>, v.NullSchema<undefined>], undefined>, never>;
1080
1305
  }, undefined>;
1081
1306
  type GetWalletType = MethodParamsAndResult<v.InferOutput<typeof getWalletTypeParamsSchema>, v.InferOutput<typeof getWalletTypeResultSchema>>;
1082
1307
  declare const getCurrentPermissionsMethodName = "wallet_getCurrentPermissions";
1083
1308
  declare const getCurrentPermissionsParamsSchema: v.NullishSchema<v.NullSchema<undefined>, never>;
1084
- declare const getCurrentPermissionsResultSchema: v.ArraySchema<v.ObjectSchema<{
1085
- readonly clientId: v.SchemaWithPipe<[v.StringSchema<undefined>, v.UrlAction<string, undefined>, v.BrandAction<string, "ClientId">]>;
1086
- readonly resourceId: v.UnionSchema<[v.SchemaWithPipe<[v.StringSchema<undefined>, v.BrandAction<string, "AccountResourceId">]>], undefined>;
1087
- readonly actions: v.SetSchema<v.PicklistSchema<["create", "read", "update", "delete"], undefined>, undefined>;
1088
- }, undefined>, undefined>;
1309
+ declare const getCurrentPermissionsResultSchema: v.ArraySchema<v.VariantSchema<"type", [v.ObjectSchema<{
1310
+ readonly type: v.LiteralSchema<"account", undefined>;
1311
+ readonly resourceId: v.SchemaWithPipe<[v.StringSchema<undefined>, v.CheckAction<string, undefined>, v.BrandAction<string, "AccountResourceId">]>;
1312
+ readonly clientId: v.StringSchema<undefined>;
1313
+ readonly actions: v.ObjectSchema<{
1314
+ readonly read: v.BooleanSchema<undefined>;
1315
+ readonly autoSign: v.BooleanSchema<undefined>;
1316
+ readonly rename: v.BooleanSchema<undefined>;
1317
+ }, undefined>;
1318
+ }, undefined>, v.ObjectSchema<{
1319
+ readonly type: v.LiteralSchema<"wallet", undefined>;
1320
+ readonly resourceId: v.LiteralSchema<"wallet", undefined>;
1321
+ readonly clientId: v.StringSchema<undefined>;
1322
+ readonly actions: v.ObjectSchema<{
1323
+ readonly addPrivateKey: v.BooleanSchema<undefined>;
1324
+ readonly openPopup: v.BooleanSchema<undefined>;
1325
+ readonly openFullPage: v.BooleanSchema<undefined>;
1326
+ readonly readAllAccounts: v.BooleanSchema<undefined>;
1327
+ }, undefined>;
1328
+ }, undefined>], undefined>, undefined>;
1089
1329
  declare const getCurrentPermissionsRequestMessageSchema: v.ObjectSchema<{
1090
1330
  readonly method: v.LiteralSchema<"wallet_getCurrentPermissions", undefined>;
1331
+ readonly params: v.NullishSchema<v.NullSchema<undefined>, never>;
1091
1332
  readonly id: v.StringSchema<undefined>;
1092
1333
  readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
1093
- readonly params: v.OptionalSchema<v.UnionSchema<[v.ArraySchema<v.UnknownSchema, undefined>, v.LooseObjectSchema<{}, undefined>, v.NullSchema<undefined>], undefined>, never>;
1094
1334
  }, undefined>;
1095
1335
  type GetCurrentPermissions = MethodParamsAndResult<v.InferOutput<typeof getCurrentPermissionsParamsSchema>, v.InferOutput<typeof getCurrentPermissionsResultSchema>>;
1336
+ declare const getAccountMethodName = "wallet_getAccount";
1337
+ declare const getAccountParamsSchema: v.NullishSchema<v.NullSchema<undefined>, never>;
1338
+ declare const getAccountResultSchema: v.ObjectSchema<{
1339
+ readonly id: v.SchemaWithPipe<[v.StringSchema<undefined>, v.BrandAction<string, "AccountId">]>;
1340
+ readonly addresses: v.ArraySchema<v.ObjectSchema<{
1341
+ readonly address: v.StringSchema<undefined>;
1342
+ readonly publicKey: v.StringSchema<undefined>;
1343
+ readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
1344
+ readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
1345
+ }, undefined>, undefined>;
1346
+ readonly walletType: v.PicklistSchema<readonly ["software", "ledger"], undefined>;
1347
+ }, undefined>;
1348
+ declare const getAccountRequestMessageSchema: v.ObjectSchema<{
1349
+ readonly method: v.LiteralSchema<"wallet_getAccount", undefined>;
1350
+ readonly params: v.NullishSchema<v.NullSchema<undefined>, never>;
1351
+ readonly id: v.StringSchema<undefined>;
1352
+ readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
1353
+ }, undefined>;
1354
+ type GetAccount = MethodParamsAndResult<v.InferOutput<typeof getAccountParamsSchema>, v.InferOutput<typeof getAccountResultSchema>>;
1355
+ declare const registerClientMethodName = "wallet_registerClient";
1356
+ declare const registerClientParamsSchema: v.ObjectSchema<{
1357
+ readonly name: v.OptionalSchema<v.StringSchema<undefined>, never>;
1358
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, never>;
1359
+ }, undefined>;
1360
+ declare const registerClientResultSchema: v.ObjectSchema<{
1361
+ readonly id: v.StringSchema<undefined>;
1362
+ }, undefined>;
1363
+ declare const registerClientRequestMessageSchema: v.ObjectSchema<{
1364
+ readonly method: v.LiteralSchema<"wallet_registerClient", undefined>;
1365
+ readonly params: v.ObjectSchema<{
1366
+ readonly name: v.OptionalSchema<v.StringSchema<undefined>, never>;
1367
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, never>;
1368
+ }, undefined>;
1369
+ readonly id: v.StringSchema<undefined>;
1370
+ readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
1371
+ }, undefined>;
1372
+ type RegisterClient = MethodParamsAndResult<v.InferOutput<typeof registerClientParamsSchema>, v.InferOutput<typeof registerClientResultSchema>>;
1373
+ declare const connectMethodName = "wallet_connect";
1374
+ declare const connectParamsSchema: v.NullishSchema<v.ObjectSchema<{
1375
+ readonly permissions: v.OptionalSchema<v.ArraySchema<v.VariantSchema<"type", [v.ObjectSchema<{
1376
+ readonly actions: Omit<v.ObjectSchema<{
1377
+ readonly read: v.BooleanSchema<undefined>;
1378
+ readonly autoSign: v.BooleanSchema<undefined>;
1379
+ readonly rename: v.BooleanSchema<undefined>;
1380
+ }, undefined>, "_types" | "_run" | "entries"> & {
1381
+ readonly entries: {
1382
+ readonly read: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
1383
+ readonly autoSign: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
1384
+ readonly rename: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
1385
+ };
1386
+ readonly _run: (dataset: v.Dataset<unknown, never>, config: v.Config<v.BaseIssue<unknown>>) => v.Dataset<{
1387
+ read?: boolean | undefined;
1388
+ autoSign?: boolean | undefined;
1389
+ rename?: boolean | undefined;
1390
+ }, v.ObjectIssue | v.BooleanIssue>;
1391
+ readonly _types?: {
1392
+ readonly input: {
1393
+ read?: boolean | undefined;
1394
+ autoSign?: boolean | undefined;
1395
+ rename?: boolean | undefined;
1396
+ };
1397
+ readonly output: {
1398
+ read?: boolean | undefined;
1399
+ autoSign?: boolean | undefined;
1400
+ rename?: boolean | undefined;
1401
+ };
1402
+ readonly issue: v.ObjectIssue | v.BooleanIssue;
1403
+ } | undefined;
1404
+ };
1405
+ readonly type: v.LiteralSchema<"account", undefined>;
1406
+ readonly resourceId: v.SchemaWithPipe<[v.StringSchema<undefined>, v.CheckAction<string, undefined>, v.BrandAction<string, "AccountResourceId">]>;
1407
+ }, undefined>, v.ObjectSchema<{
1408
+ readonly actions: Omit<v.ObjectSchema<{
1409
+ readonly addPrivateKey: v.BooleanSchema<undefined>;
1410
+ readonly openPopup: v.BooleanSchema<undefined>;
1411
+ readonly openFullPage: v.BooleanSchema<undefined>;
1412
+ readonly readAllAccounts: v.BooleanSchema<undefined>;
1413
+ }, undefined>, "_types" | "_run" | "entries"> & {
1414
+ readonly entries: {
1415
+ readonly addPrivateKey: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
1416
+ readonly openPopup: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
1417
+ readonly openFullPage: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
1418
+ readonly readAllAccounts: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
1419
+ };
1420
+ readonly _run: (dataset: v.Dataset<unknown, never>, config: v.Config<v.BaseIssue<unknown>>) => v.Dataset<{
1421
+ addPrivateKey?: boolean | undefined;
1422
+ openPopup?: boolean | undefined;
1423
+ openFullPage?: boolean | undefined;
1424
+ readAllAccounts?: boolean | undefined;
1425
+ }, v.ObjectIssue | v.BooleanIssue>;
1426
+ readonly _types?: {
1427
+ readonly input: {
1428
+ addPrivateKey?: boolean | undefined;
1429
+ openPopup?: boolean | undefined;
1430
+ openFullPage?: boolean | undefined;
1431
+ readAllAccounts?: boolean | undefined;
1432
+ };
1433
+ readonly output: {
1434
+ addPrivateKey?: boolean | undefined;
1435
+ openPopup?: boolean | undefined;
1436
+ openFullPage?: boolean | undefined;
1437
+ readAllAccounts?: boolean | undefined;
1438
+ };
1439
+ readonly issue: v.ObjectIssue | v.BooleanIssue;
1440
+ } | undefined;
1441
+ };
1442
+ readonly type: v.LiteralSchema<"wallet", undefined>;
1443
+ readonly resourceId: v.LiteralSchema<"wallet", undefined>;
1444
+ }, undefined>], undefined>, undefined>, never>;
1445
+ readonly clientInfo: v.ObjectSchema<{
1446
+ readonly name: v.OptionalSchema<v.StringSchema<undefined>, never>;
1447
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, never>;
1448
+ }, undefined>;
1449
+ }, undefined>, never>;
1450
+ declare const connectResultSchema: v.ObjectSchema<{
1451
+ readonly id: v.SchemaWithPipe<[v.StringSchema<undefined>, v.BrandAction<string, "AccountId">]>;
1452
+ readonly addresses: v.ArraySchema<v.ObjectSchema<{
1453
+ readonly address: v.StringSchema<undefined>;
1454
+ readonly publicKey: v.StringSchema<undefined>;
1455
+ readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
1456
+ readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
1457
+ }, undefined>, undefined>;
1458
+ readonly walletType: v.PicklistSchema<readonly ["software", "ledger"], undefined>;
1459
+ }, undefined>;
1460
+ declare const connectRequestMessageSchema: v.ObjectSchema<{
1461
+ readonly method: v.LiteralSchema<"wallet_connect", undefined>;
1462
+ readonly params: v.NullishSchema<v.ObjectSchema<{
1463
+ readonly permissions: v.OptionalSchema<v.ArraySchema<v.VariantSchema<"type", [v.ObjectSchema<{
1464
+ readonly actions: Omit<v.ObjectSchema<{
1465
+ readonly read: v.BooleanSchema<undefined>;
1466
+ readonly autoSign: v.BooleanSchema<undefined>;
1467
+ readonly rename: v.BooleanSchema<undefined>;
1468
+ }, undefined>, "_types" | "_run" | "entries"> & {
1469
+ readonly entries: {
1470
+ readonly read: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
1471
+ readonly autoSign: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
1472
+ readonly rename: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
1473
+ };
1474
+ readonly _run: (dataset: v.Dataset<unknown, never>, config: v.Config<v.BaseIssue<unknown>>) => v.Dataset<{
1475
+ read?: boolean | undefined;
1476
+ autoSign?: boolean | undefined;
1477
+ rename?: boolean | undefined;
1478
+ }, v.ObjectIssue | v.BooleanIssue>;
1479
+ readonly _types?: {
1480
+ readonly input: {
1481
+ read?: boolean | undefined;
1482
+ autoSign?: boolean | undefined;
1483
+ rename?: boolean | undefined;
1484
+ };
1485
+ readonly output: {
1486
+ read?: boolean | undefined;
1487
+ autoSign?: boolean | undefined;
1488
+ rename?: boolean | undefined;
1489
+ };
1490
+ readonly issue: v.ObjectIssue | v.BooleanIssue;
1491
+ } | undefined;
1492
+ };
1493
+ readonly type: v.LiteralSchema<"account", undefined>;
1494
+ readonly resourceId: v.SchemaWithPipe<[v.StringSchema<undefined>, v.CheckAction<string, undefined>, v.BrandAction<string, "AccountResourceId">]>;
1495
+ }, undefined>, v.ObjectSchema<{
1496
+ readonly actions: Omit<v.ObjectSchema<{
1497
+ readonly addPrivateKey: v.BooleanSchema<undefined>;
1498
+ readonly openPopup: v.BooleanSchema<undefined>;
1499
+ readonly openFullPage: v.BooleanSchema<undefined>;
1500
+ readonly readAllAccounts: v.BooleanSchema<undefined>;
1501
+ }, undefined>, "_types" | "_run" | "entries"> & {
1502
+ readonly entries: {
1503
+ readonly addPrivateKey: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
1504
+ readonly openPopup: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
1505
+ readonly openFullPage: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
1506
+ readonly readAllAccounts: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
1507
+ };
1508
+ readonly _run: (dataset: v.Dataset<unknown, never>, config: v.Config<v.BaseIssue<unknown>>) => v.Dataset<{
1509
+ addPrivateKey?: boolean | undefined;
1510
+ openPopup?: boolean | undefined;
1511
+ openFullPage?: boolean | undefined;
1512
+ readAllAccounts?: boolean | undefined;
1513
+ }, v.ObjectIssue | v.BooleanIssue>;
1514
+ readonly _types?: {
1515
+ readonly input: {
1516
+ addPrivateKey?: boolean | undefined;
1517
+ openPopup?: boolean | undefined;
1518
+ openFullPage?: boolean | undefined;
1519
+ readAllAccounts?: boolean | undefined;
1520
+ };
1521
+ readonly output: {
1522
+ addPrivateKey?: boolean | undefined;
1523
+ openPopup?: boolean | undefined;
1524
+ openFullPage?: boolean | undefined;
1525
+ readAllAccounts?: boolean | undefined;
1526
+ };
1527
+ readonly issue: v.ObjectIssue | v.BooleanIssue;
1528
+ } | undefined;
1529
+ };
1530
+ readonly type: v.LiteralSchema<"wallet", undefined>;
1531
+ readonly resourceId: v.LiteralSchema<"wallet", undefined>;
1532
+ }, undefined>], undefined>, undefined>, never>;
1533
+ readonly clientInfo: v.ObjectSchema<{
1534
+ readonly name: v.OptionalSchema<v.StringSchema<undefined>, never>;
1535
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, never>;
1536
+ }, undefined>;
1537
+ }, undefined>, never>;
1538
+ readonly id: v.StringSchema<undefined>;
1539
+ readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
1540
+ }, undefined>;
1541
+ type Connect = MethodParamsAndResult<v.InferOutput<typeof connectParamsSchema>, v.InferOutput<typeof connectResultSchema>>;
1096
1542
 
1097
1543
  declare const walletTypes: readonly ["software", "ledger"];
1098
1544
  declare const walletTypeSchema: v.PicklistSchema<readonly ["software", "ledger"], undefined>;
@@ -1173,4 +1619,4 @@ declare class BaseAdapter extends SatsConnectAdapter {
1173
1619
  declare const DefaultAdaptersInfo: Record<string, Provider>;
1174
1620
  declare const defaultAdapters: Record<string, new () => SatsConnectAdapter>;
1175
1621
 
1176
- export { type AccountChangeEvent, type AddListener, type Address$1 as Address, AddressPurpose, AddressType, BaseAdapter, type BitcoinNetwork, BitcoinNetworkType, type BitcoinProvider, type BtcRequestMethod, type BtcRequests, type CallContractParams, type CallContractResult, type Capability, type CreateInscriptionOptions, type CreateInscriptionPayload, type CreateInscriptionResponse, type CreateRepeatInscriptionsOptions, type CreateRepeatInscriptionsPayload, type CreateRepeatInscriptionsResponse, DefaultAdaptersInfo, type DeployContractParams, type DeployContractResult, type DisconnectEvent, type EstimateRbfOrder, type EstimateRunesEtch, type EstimateRunesEtchParams, type EstimateRunesEtchResult, type EstimateRunesMint, type EstimateRunesMintParams, type EstimateRunesMintResult, type EtchRunes, type EtchRunesParams, type EtchRunesResult, type GetAccounts, type GetAccountsParams, type GetAccountsRequestMessage, type GetAccountsResult, type GetAddressOptions, type GetAddressPayload, type GetAddressResponse, type GetAddresses, type GetAddressesParams, type GetAddressesRequestMessage, type GetAddressesResult, type GetBalance, type GetCapabilitiesOptions, type GetCapabilitiesPayload, type GetCapabilitiesResponse, type GetCurrentPermissions, type GetInfo, type GetInfoParams, type GetInfoRequestMessage, type GetInfoResult, type GetInscriptions, type GetOrder, type GetRunesBalance, type GetRunesBalanceParams, type GetRunesBalanceRequestMessage, type GetRunesBalanceResult, type GetWalletType, type InputToSign, MessageSigningProtocols, type MethodParamsAndResult, type MintRunes, type MintRunesParams, type MintRunesResult, type NetworkChangeEvent, type OrdinalsRequestMethod, type OrdinalsRequests, type Params, type Provider, type PsbtPayload, type RbfOrder, type Recipient$2 as Recipient, type RenouncePermissions, type RequestOptions, type RequestPayload, type RequestPermissions, type Requests, type Return, type RpcBase, type RpcError, RpcErrorCode, type RpcErrorResponse, type RpcErrorResponseMessage, type RpcId, RpcIdSchema, type RpcRequest, type RpcRequestMessage, type RpcResponse, type RpcResponseMessage, type RpcResult, type RpcSuccessResponse, type RpcSuccessResponseMessage, type RunesRequestMethod, type RunesRequests, SatsConnectAdapter, type SendBtcTransactionOptions, type SendBtcTransactionPayload, type SendBtcTransactionResponse, type SendInscriptions, type SendTransfer, type SendTransferParams, type SerializedRecipient, type SerializedSendBtcTransactionPayload, type SignMessage, type SignMessageOptions, type SignMessageParams, type SignMessagePayload, type SignMessageRequestMessage, type SignMessageResponse, type SignMessageResult, type SignMultiplePsbtPayload, type SignMultipleTransactionOptions, type SignMultipleTransactionsPayload, type SignMultipleTransactionsResponse, type SignPsbt, type SignPsbtParams, type SignPsbtResult, type SignStructuredMessageResult, type SignStxMessageParams, type SignStxMessageResult, type SignTransactionOptions, type SignTransactionPayload, type SignTransactionResponse, type StxCallContract, type StxDeployContract, type StxGetAccounts, type StxGetAccountsResult, type StxGetAddresses, type StxGetAddressesParams, type StxGetAddressesRequestMessage, type StxGetAddressesResult, type StxRequestMethod, type StxRequests, type StxSignStructuredMessage, type StxSignStxMessage, type StxSignTransaction, type StxSignTransactionParams, type StxSignTransactionRequestMessage, type StxSignTransactionResult, type StxTransferStx, type SupportedWallet, type TransferRunes, type TransferRunesParams, type TransferRunesRequest, type TransferRunesResult, TransferRunesResultSchema, type TransferStxParams, type TransferStxResult, type WalletEvent, type WalletRequests, type WalletType, accountChangeEventName, accountChangeSchema, addListener, addressSchema, createInscription, createRepeatInscriptions, defaultAdapters, disconnectEventName, disconnectSchema, getAccountsMethodName, getAccountsParamsSchema, getAccountsRequestMessageSchema, getAccountsResultSchema, getAddress, getAddressesMethodName, getAddressesParamsSchema, getAddressesRequestMessageSchema, getAddressesResultSchema, getBalanceMethodName, getBalanceParamsSchema, getBalanceRequestMessageSchema, getBalanceResultSchema, getCapabilities, getCurrentPermissionsMethodName, getCurrentPermissionsParamsSchema, getCurrentPermissionsRequestMessageSchema, getCurrentPermissionsResultSchema, getDefaultProvider, getInfoMethodName, getInfoParamsSchema, getInfoRequestMessageSchema, getInfoResultSchema, getInscriptionsMethodName, getInscriptionsParamsSchema, getInscriptionsResultSchema, getInscriptionsSchema, getProviderById, getProviderOrThrow, getProviders, getRunesBalanceMethodName, getRunesBalanceParamsSchema, getRunesBalanceRequestMessageSchema, getRunesBalanceResultSchema, getSupportedWallets, getWalletTypeMethodName, getWalletTypeParamsSchema, getWalletTypeRequestMessageSchema, getWalletTypeResultSchema, isProviderInstalled, networkChangeEventName, networkChangeSchema, removeDefaultProvider, renouncePermissionsMethodName, renouncePermissionsParamsSchema, renouncePermissionsRequestMessageSchema, renouncePermissionsResultSchema, request, requestPermissionsMethodName, requestPermissionsParamsSchema, requestPermissionsRequestMessageSchema, requestPermissionsResultSchema, rpcErrorResponseMessageSchema, rpcRequestMessageSchema, rpcResponseMessageSchema, rpcSuccessResponseMessageSchema, sendBtcTransaction, sendInscriptionsMethodName, sendInscriptionsParamsSchema, sendInscriptionsResultSchema, sendInscriptionsSchema, setDefaultProvider, signMessage, signMessageMethodName, signMessageParamsSchema, signMessageRequestMessageSchema, signMessageResultSchema, signMultipleTransactions, signTransaction, stxGetAddressesMethodName, stxGetAddressesParamsSchema, stxGetAddressesRequestMessageSchema, stxGetAddressesResultSchema, stxSignTransactionMethodName, stxSignTransactionParamsSchema, stxSignTransactionRequestMessageSchema, stxSignTransactionResultSchema, transferRunesMethodName, transferRunesParamsSchema, transferRunesRequestSchema, walletEventSchema, walletTypeSchema, walletTypes };
1622
+ export { type AccountChangeEvent, type AddListener, type Address$1 as Address, AddressPurpose, AddressType, BaseAdapter, type BitcoinNetwork, BitcoinNetworkType, type BitcoinProvider, type BtcRequestMethod, type BtcRequests, type CallContractParams, type CallContractResult, type Capability, type Connect, type CreateInscriptionOptions, type CreateInscriptionPayload, type CreateInscriptionResponse, type CreateRepeatInscriptionsOptions, type CreateRepeatInscriptionsPayload, type CreateRepeatInscriptionsResponse, DefaultAdaptersInfo, type DeployContractParams, type DeployContractResult, type Disconnect, type DisconnectEvent, type EstimateRbfOrder, type EstimateRunesEtch, type EstimateRunesEtchParams, type EstimateRunesEtchResult, type EstimateRunesMint, type EstimateRunesMintParams, type EstimateRunesMintResult, type EtchRunes, type EtchRunesParams, type EtchRunesResult, type GetAccount, type GetAccounts, type GetAccountsParams, type GetAccountsRequestMessage, type GetAccountsResult, type GetAddressOptions, type GetAddressPayload, type GetAddressResponse, type GetAddresses, type GetAddressesParams, type GetAddressesRequestMessage, type GetAddressesResult, type GetBalance, type GetCapabilitiesOptions, type GetCapabilitiesPayload, type GetCapabilitiesResponse, type GetCurrentPermissions, type GetInfo, type GetInfoParams, type GetInfoRequestMessage, type GetInfoResult, type GetInscriptions, type GetOrder, type GetRunesBalance, type GetRunesBalanceParams, type GetRunesBalanceRequestMessage, type GetRunesBalanceResult, type GetWalletType, type InputToSign, MessageSigningProtocols, type MethodParamsAndResult, type MintRunes, type MintRunesParams, type MintRunesResult, type NetworkChangeEvent, type OrdinalsRequestMethod, type OrdinalsRequests, type Params, type PermissionWithoutClientId, type Provider, type PsbtPayload, type RbfOrder, type Recipient$2 as Recipient, type RegisterClient, type RenouncePermissions, type RequestOptions, type RequestPayload, type RequestPermissions, type Requests, type Return, type RpcBase, type RpcError, RpcErrorCode, type RpcErrorResponse, type RpcErrorResponseMessage, type RpcId, RpcIdSchema, type RpcRequest, type RpcRequestMessage, type RpcResponse, type RpcResponseMessage, type RpcResult, type RpcSuccessResponse, type RpcSuccessResponseMessage, type RunesRequestMethod, type RunesRequests, SatsConnectAdapter, type SendBtcTransactionOptions, type SendBtcTransactionPayload, type SendBtcTransactionResponse, type SendInscriptions, type SendTransfer, type SendTransferParams, type SerializedRecipient, type SerializedSendBtcTransactionPayload, type SignMessage, type SignMessageOptions, type SignMessageParams, type SignMessagePayload, type SignMessageRequestMessage, type SignMessageResponse, type SignMessageResult, type SignMultiplePsbtPayload, type SignMultipleTransactionOptions, type SignMultipleTransactionsPayload, type SignMultipleTransactionsResponse, type SignPsbt, type SignPsbtParams, type SignPsbtResult, type SignStructuredMessageResult, type SignStxMessageParams, type SignStxMessageResult, type SignTransactionOptions, type SignTransactionPayload, type SignTransactionResponse, type StxCallContract, type StxDeployContract, type StxGetAccounts, type StxGetAccountsResult, type StxGetAddresses, type StxGetAddressesParams, type StxGetAddressesRequestMessage, type StxGetAddressesResult, type StxRequestMethod, type StxRequests, type StxSignStructuredMessage, type StxSignStxMessage, type StxSignTransaction, type StxSignTransactionParams, type StxSignTransactionRequestMessage, type StxSignTransactionResult, type StxTransferStx, type SupportedWallet, type TransferRunes, type TransferRunesParams, type TransferRunesRequest, type TransferRunesResult, TransferRunesResultSchema, type TransferStxParams, type TransferStxResult, type WalletEvent, type WalletRequests, type WalletType, accountChangeEventName, accountChangeSchema, addListener, addressSchema, connectMethodName, connectParamsSchema, connectRequestMessageSchema, connectResultSchema, createInscription, createRepeatInscriptions, defaultAdapters, disconnectEventName, disconnectMethodName, disconnectParamsSchema, disconnectRequestMessageSchema, disconnectResultSchema, disconnectSchema, getAccountMethodName, getAccountParamsSchema, getAccountRequestMessageSchema, getAccountResultSchema, getAccountsMethodName, getAccountsParamsSchema, getAccountsRequestMessageSchema, getAccountsResultSchema, getAddress, getAddressesMethodName, getAddressesParamsSchema, getAddressesRequestMessageSchema, getAddressesResultSchema, getBalanceMethodName, getBalanceParamsSchema, getBalanceRequestMessageSchema, getBalanceResultSchema, getCapabilities, getCurrentPermissionsMethodName, getCurrentPermissionsParamsSchema, getCurrentPermissionsRequestMessageSchema, getCurrentPermissionsResultSchema, getDefaultProvider, getInfoMethodName, getInfoParamsSchema, getInfoRequestMessageSchema, getInfoResultSchema, getInscriptionsMethodName, getInscriptionsParamsSchema, getInscriptionsResultSchema, getInscriptionsSchema, getProviderById, getProviderOrThrow, getProviders, getRunesBalanceMethodName, getRunesBalanceParamsSchema, getRunesBalanceRequestMessageSchema, getRunesBalanceResultSchema, getSupportedWallets, getWalletTypeMethodName, getWalletTypeParamsSchema, getWalletTypeRequestMessageSchema, getWalletTypeResultSchema, isProviderInstalled, networkChangeEventName, networkChangeSchema, permissionTemplate, registerClientMethodName, registerClientParamsSchema, registerClientRequestMessageSchema, registerClientResultSchema, removeDefaultProvider, renouncePermissionsMethodName, renouncePermissionsParamsSchema, renouncePermissionsRequestMessageSchema, renouncePermissionsResultSchema, request, requestPermissionsMethodName, requestPermissionsParamsSchema, requestPermissionsRequestMessageSchema, requestPermissionsResultSchema, rpcErrorResponseMessageSchema, rpcRequestMessageSchema, rpcResponseMessageSchema, rpcSuccessResponseMessageSchema, sendBtcTransaction, sendInscriptionsMethodName, sendInscriptionsParamsSchema, sendInscriptionsResultSchema, sendInscriptionsSchema, setDefaultProvider, signMessage, signMessageMethodName, signMessageParamsSchema, signMessageRequestMessageSchema, signMessageResultSchema, signMultipleTransactions, signTransaction, stxGetAddressesMethodName, stxGetAddressesParamsSchema, stxGetAddressesRequestMessageSchema, stxGetAddressesResultSchema, stxSignTransactionMethodName, stxSignTransactionParamsSchema, stxSignTransactionRequestMessageSchema, stxSignTransactionResultSchema, transferRunesMethodName, transferRunesParamsSchema, transferRunesRequestSchema, walletEventSchema, walletTypeSchema, walletTypes };
package/dist/index.mjs CHANGED
@@ -386,8 +386,18 @@ var getBalanceRequestMessageSchema = v6.object({
386
386
  // src/request/types/walletMethods.ts
387
387
  import * as v7 from "valibot";
388
388
  import { permissions } from "@secretkeylabs/xverse-core";
389
+ var permissionTemplate = v7.variant("type", [
390
+ v7.object({
391
+ ...v7.omit(permissions.resources.account.accountPermissionSchema, ["clientId", "actions"]).entries,
392
+ actions: v7.partial(permissions.resources.account.accountActionsSchema)
393
+ }),
394
+ v7.object({
395
+ ...v7.omit(permissions.resources.wallet.walletPermissionSchema, ["clientId"]).entries,
396
+ actions: v7.partial(permissions.resources.wallet.walletActionSchema)
397
+ })
398
+ ]);
389
399
  var requestPermissionsMethodName = "wallet_requestPermissions";
390
- var requestPermissionsParamsSchema = v7.undefined();
400
+ var requestPermissionsParamsSchema = v7.nullish(v7.array(permissionTemplate));
391
401
  var requestPermissionsResultSchema = v7.literal(true);
392
402
  var requestPermissionsRequestMessageSchema = v7.object({
393
403
  ...rpcRequestMessageSchema.entries,
@@ -398,8 +408,8 @@ var requestPermissionsRequestMessageSchema = v7.object({
398
408
  }).entries
399
409
  });
400
410
  var renouncePermissionsMethodName = "wallet_renouncePermissions";
401
- var renouncePermissionsParamsSchema = v7.undefined();
402
- var renouncePermissionsResultSchema = v7.literal(true);
411
+ var renouncePermissionsParamsSchema = v7.nullish(v7.null());
412
+ var renouncePermissionsResultSchema = v7.nullish(v7.null());
403
413
  var renouncePermissionsRequestMessageSchema = v7.object({
404
414
  ...rpcRequestMessageSchema.entries,
405
415
  ...v7.object({
@@ -408,6 +418,17 @@ var renouncePermissionsRequestMessageSchema = v7.object({
408
418
  id: v7.string()
409
419
  }).entries
410
420
  });
421
+ var disconnectMethodName = "wallet_disconnect";
422
+ var disconnectParamsSchema = v7.nullish(v7.null());
423
+ var disconnectResultSchema = v7.nullish(v7.null());
424
+ var disconnectRequestMessageSchema = v7.object({
425
+ ...rpcRequestMessageSchema.entries,
426
+ ...v7.object({
427
+ method: v7.literal(disconnectMethodName),
428
+ params: disconnectParamsSchema,
429
+ id: v7.string()
430
+ }).entries
431
+ });
411
432
  var getWalletTypeMethodName = "wallet_getWalletType";
412
433
  var getWalletTypeParamsSchema = v7.nullish(v7.null());
413
434
  var getWalletTypeResultSchema = walletTypeSchema;
@@ -415,16 +436,65 @@ var getWalletTypeRequestMessageSchema = v7.object({
415
436
  ...rpcRequestMessageSchema.entries,
416
437
  ...v7.object({
417
438
  method: v7.literal(getWalletTypeMethodName),
439
+ params: getWalletTypeParamsSchema,
418
440
  id: v7.string()
419
441
  }).entries
420
442
  });
421
443
  var getCurrentPermissionsMethodName = "wallet_getCurrentPermissions";
422
444
  var getCurrentPermissionsParamsSchema = v7.nullish(v7.null());
423
- var getCurrentPermissionsResultSchema = v7.array(permissions.schemas.permission);
445
+ var getCurrentPermissionsResultSchema = v7.array(permissions.store.permission);
424
446
  var getCurrentPermissionsRequestMessageSchema = v7.object({
425
447
  ...rpcRequestMessageSchema.entries,
426
448
  ...v7.object({
427
449
  method: v7.literal(getCurrentPermissionsMethodName),
450
+ params: getCurrentPermissionsParamsSchema,
451
+ id: v7.string()
452
+ }).entries
453
+ });
454
+ var getAccountMethodName = "wallet_getAccount";
455
+ var getAccountParamsSchema = v7.nullish(v7.null());
456
+ var getAccountResultSchema = v7.object({
457
+ id: permissions.utils.account.accountIdSchema,
458
+ addresses: v7.array(addressSchema),
459
+ walletType: walletTypeSchema
460
+ });
461
+ var getAccountRequestMessageSchema = v7.object({
462
+ ...rpcRequestMessageSchema.entries,
463
+ ...v7.object({
464
+ method: v7.literal(getAccountMethodName),
465
+ params: getAccountParamsSchema,
466
+ id: v7.string()
467
+ }).entries
468
+ });
469
+ var registerClientMethodName = "wallet_registerClient";
470
+ var registerClientParamsSchema = v7.object({
471
+ name: v7.optional(v7.string()),
472
+ description: v7.optional(v7.string())
473
+ });
474
+ var registerClientResultSchema = v7.object({
475
+ id: v7.string()
476
+ });
477
+ var registerClientRequestMessageSchema = v7.object({
478
+ ...rpcRequestMessageSchema.entries,
479
+ ...v7.object({
480
+ method: v7.literal(registerClientMethodName),
481
+ params: registerClientParamsSchema,
482
+ id: v7.string()
483
+ }).entries
484
+ });
485
+ var connectMethodName = "wallet_connect";
486
+ var connectParamsSchema = v7.nullish(
487
+ v7.object({
488
+ permissions: v7.optional(v7.array(permissionTemplate)),
489
+ clientInfo: registerClientParamsSchema
490
+ })
491
+ );
492
+ var connectResultSchema = getAccountResultSchema;
493
+ var connectRequestMessageSchema = v7.object({
494
+ ...rpcRequestMessageSchema.entries,
495
+ ...v7.object({
496
+ method: v7.literal(connectMethodName),
497
+ params: connectParamsSchema,
428
498
  id: v7.string()
429
499
  }).entries
430
500
  });
@@ -1477,11 +1547,23 @@ export {
1477
1547
  accountChangeSchema,
1478
1548
  addListener,
1479
1549
  addressSchema,
1550
+ connectMethodName,
1551
+ connectParamsSchema,
1552
+ connectRequestMessageSchema,
1553
+ connectResultSchema,
1480
1554
  createInscription,
1481
1555
  createRepeatInscriptions,
1482
1556
  defaultAdapters,
1483
1557
  disconnectEventName,
1558
+ disconnectMethodName,
1559
+ disconnectParamsSchema,
1560
+ disconnectRequestMessageSchema,
1561
+ disconnectResultSchema,
1484
1562
  disconnectSchema,
1563
+ getAccountMethodName,
1564
+ getAccountParamsSchema,
1565
+ getAccountRequestMessageSchema,
1566
+ getAccountResultSchema,
1485
1567
  getAccountsMethodName,
1486
1568
  getAccountsParamsSchema,
1487
1569
  getAccountsRequestMessageSchema,
@@ -1524,6 +1606,11 @@ export {
1524
1606
  isProviderInstalled,
1525
1607
  networkChangeEventName,
1526
1608
  networkChangeSchema,
1609
+ permissionTemplate,
1610
+ registerClientMethodName,
1611
+ registerClientParamsSchema,
1612
+ registerClientRequestMessageSchema,
1613
+ registerClientResultSchema,
1527
1614
  removeDefaultProvider,
1528
1615
  renouncePermissionsMethodName,
1529
1616
  renouncePermissionsParamsSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sats-connect/core",
3
- "version": "0.4.0-1187a26",
3
+ "version": "0.4.0-3185748",
4
4
  "main": "dist/index.mjs",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.mts",
@@ -25,7 +25,7 @@
25
25
  ]
26
26
  },
27
27
  "dependencies": {
28
- "@secretkeylabs/xverse-core": "21.1.0-7e6ee40",
28
+ "@secretkeylabs/xverse-core": "23.0.1-c146845",
29
29
  "axios": "1.7.4",
30
30
  "bitcoin-address-validation": "2.2.3",
31
31
  "buffer": "6.0.3",