@sats-connect/core 0.8.2-b625163 → 0.8.2
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 +1 -355
- package/dist/index.d.ts +1 -355
- package/dist/index.js +167 -399
- package/dist/index.mjs +167 -379
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -173,26 +173,6 @@ __export(index_exports, {
|
|
|
173
173
|
signPsbtRequestMessageSchema: () => signPsbtRequestMessageSchema,
|
|
174
174
|
signPsbtResultSchema: () => signPsbtResultSchema,
|
|
175
175
|
signTransaction: () => signTransaction,
|
|
176
|
-
sparkFlashnetAddLiquidityIntentSchema: () => sparkFlashnetAddLiquidityIntentSchema,
|
|
177
|
-
sparkFlashnetClawbackIntentSchema: () => sparkFlashnetClawbackIntentSchema,
|
|
178
|
-
sparkFlashnetConfirmInitialDepositIntentSchema: () => sparkFlashnetConfirmInitialDepositIntentSchema,
|
|
179
|
-
sparkFlashnetCreateConstantProductPoolIntentSchema: () => sparkFlashnetCreateConstantProductPoolIntentSchema,
|
|
180
|
-
sparkFlashnetCreateSingleSidedPoolIntentSchema: () => sparkFlashnetCreateSingleSidedPoolIntentSchema,
|
|
181
|
-
sparkFlashnetGetJwtMethodName: () => sparkFlashnetGetJwtMethodName,
|
|
182
|
-
sparkFlashnetGetJwtParamsSchema: () => sparkFlashnetGetJwtParamsSchema,
|
|
183
|
-
sparkFlashnetGetJwtRequestMessageSchema: () => sparkFlashnetGetJwtRequestMessageSchema,
|
|
184
|
-
sparkFlashnetGetJwtResultSchema: () => sparkFlashnetGetJwtResultSchema,
|
|
185
|
-
sparkFlashnetRemoveLiquidityIntentSchema: () => sparkFlashnetRemoveLiquidityIntentSchema,
|
|
186
|
-
sparkFlashnetRouteSwapIntentSchema: () => sparkFlashnetRouteSwapIntentSchema,
|
|
187
|
-
sparkFlashnetSignIntentMethodName: () => sparkFlashnetSignIntentMethodName,
|
|
188
|
-
sparkFlashnetSignIntentParamsSchema: () => sparkFlashnetSignIntentParamsSchema,
|
|
189
|
-
sparkFlashnetSignIntentRequestMessageSchema: () => sparkFlashnetSignIntentRequestMessageSchema,
|
|
190
|
-
sparkFlashnetSignIntentResultSchema: () => sparkFlashnetSignIntentResultSchema,
|
|
191
|
-
sparkFlashnetSignStructuredMessageMethodName: () => sparkFlashnetSignStructuredMessageMethodName,
|
|
192
|
-
sparkFlashnetSignStructuredMessageParamsSchema: () => sparkFlashnetSignStructuredMessageParamsSchema,
|
|
193
|
-
sparkFlashnetSignStructuredMessageRequestMessageSchema: () => sparkFlashnetSignStructuredMessageRequestMessageSchema,
|
|
194
|
-
sparkFlashnetSignStructuredMessageResultSchema: () => sparkFlashnetSignStructuredMessageResultSchema,
|
|
195
|
-
sparkFlashnetSwapIntentSchema: () => sparkFlashnetSwapIntentSchema,
|
|
196
176
|
sparkGetAddressesMethodName: () => sparkGetAddressesMethodName,
|
|
197
177
|
sparkGetAddressesParamsSchema: () => sparkGetAddressesParamsSchema,
|
|
198
178
|
sparkGetAddressesRequestMessageSchema: () => sparkGetAddressesRequestMessageSchema,
|
|
@@ -254,7 +234,7 @@ __export(index_exports, {
|
|
|
254
234
|
module.exports = __toCommonJS(index_exports);
|
|
255
235
|
|
|
256
236
|
// src/request/index.ts
|
|
257
|
-
var
|
|
237
|
+
var v25 = __toESM(require("valibot"));
|
|
258
238
|
|
|
259
239
|
// src/provider/types.ts
|
|
260
240
|
var v4 = __toESM(require("valibot"));
|
|
@@ -1117,338 +1097,146 @@ var runesTransferRequestMessageSchema = v11.object({
|
|
|
1117
1097
|
}).entries
|
|
1118
1098
|
});
|
|
1119
1099
|
|
|
1120
|
-
// src/request/types/sparkMethods/flashnetMethods/getJwt.ts
|
|
1121
|
-
var v12 = __toESM(require("valibot"));
|
|
1122
|
-
var sparkFlashnetGetJwtMethodName = "spark_flashnet_getJwt";
|
|
1123
|
-
var sparkFlashnetGetJwtParamsSchema = v12.null();
|
|
1124
|
-
var sparkFlashnetGetJwtResultSchema = v12.object({
|
|
1125
|
-
/**
|
|
1126
|
-
* The JWT token for authenticated requests to the Flashnet API.
|
|
1127
|
-
*/
|
|
1128
|
-
jwt: v12.string()
|
|
1129
|
-
});
|
|
1130
|
-
var sparkFlashnetGetJwtRequestMessageSchema = v12.object({
|
|
1131
|
-
...rpcRequestMessageSchema.entries,
|
|
1132
|
-
...v12.object({
|
|
1133
|
-
method: v12.literal(sparkFlashnetGetJwtMethodName),
|
|
1134
|
-
params: sparkFlashnetGetJwtParamsSchema,
|
|
1135
|
-
id: v12.string()
|
|
1136
|
-
}).entries
|
|
1137
|
-
});
|
|
1138
|
-
|
|
1139
|
-
// src/request/types/sparkMethods/flashnetMethods/intents/addLiquidity.ts
|
|
1140
|
-
var v13 = __toESM(require("valibot"));
|
|
1141
|
-
var sparkFlashnetAddLiquidityIntentSchema = v13.object({
|
|
1142
|
-
type: v13.literal("addLiquidity"),
|
|
1143
|
-
data: v13.object({
|
|
1144
|
-
userPublicKey: v13.string(),
|
|
1145
|
-
poolId: v13.string(),
|
|
1146
|
-
assetAAmount: v13.string(),
|
|
1147
|
-
assetBAmount: v13.string(),
|
|
1148
|
-
assetAMinAmountIn: v13.string(),
|
|
1149
|
-
assetBMinAmountIn: v13.string(),
|
|
1150
|
-
assetATransferId: v13.string(),
|
|
1151
|
-
assetBTransferId: v13.string(),
|
|
1152
|
-
nonce: v13.string()
|
|
1153
|
-
})
|
|
1154
|
-
});
|
|
1155
|
-
|
|
1156
|
-
// src/request/types/sparkMethods/flashnetMethods/intents/clawback.ts
|
|
1157
|
-
var v14 = __toESM(require("valibot"));
|
|
1158
|
-
var sparkFlashnetClawbackIntentSchema = v14.object({
|
|
1159
|
-
type: v14.literal("clawback"),
|
|
1160
|
-
data: v14.object({
|
|
1161
|
-
senderPublicKey: v14.string(),
|
|
1162
|
-
sparkTransferId: v14.string(),
|
|
1163
|
-
lpIdentityPublicKey: v14.string(),
|
|
1164
|
-
nonce: v14.string()
|
|
1165
|
-
})
|
|
1166
|
-
});
|
|
1167
|
-
|
|
1168
|
-
// src/request/types/sparkMethods/flashnetMethods/intents/confirmInitialDeposit.ts
|
|
1169
|
-
var v15 = __toESM(require("valibot"));
|
|
1170
|
-
var sparkFlashnetConfirmInitialDepositIntentSchema = v15.object({
|
|
1171
|
-
type: v15.literal("confirmInitialDeposit"),
|
|
1172
|
-
data: v15.object({
|
|
1173
|
-
poolId: v15.string(),
|
|
1174
|
-
assetASparkTransferId: v15.string(),
|
|
1175
|
-
poolOwnerPublicKey: v15.string(),
|
|
1176
|
-
nonce: v15.string()
|
|
1177
|
-
})
|
|
1178
|
-
});
|
|
1179
|
-
|
|
1180
|
-
// src/request/types/sparkMethods/flashnetMethods/intents/createConstantProductPool.ts
|
|
1181
|
-
var v16 = __toESM(require("valibot"));
|
|
1182
|
-
var sparkFlashnetCreateConstantProductPoolIntentSchema = v16.object({
|
|
1183
|
-
type: v16.literal("createConstantProductPool"),
|
|
1184
|
-
data: v16.object({
|
|
1185
|
-
poolOwnerPublicKey: v16.string(),
|
|
1186
|
-
assetAAddress: v16.string(),
|
|
1187
|
-
assetBAddress: v16.string(),
|
|
1188
|
-
lpFeeRateBps: v16.union([v16.number(), v16.string()]),
|
|
1189
|
-
totalHostFeeRateBps: v16.union([v16.number(), v16.string()]),
|
|
1190
|
-
nonce: v16.string()
|
|
1191
|
-
})
|
|
1192
|
-
});
|
|
1193
|
-
|
|
1194
|
-
// src/request/types/sparkMethods/flashnetMethods/intents/createSingleSidedPool.ts
|
|
1195
|
-
var v17 = __toESM(require("valibot"));
|
|
1196
|
-
var sparkFlashnetCreateSingleSidedPoolIntentSchema = v17.object({
|
|
1197
|
-
type: v17.literal("createSingleSidedPool"),
|
|
1198
|
-
data: v17.object({
|
|
1199
|
-
assetAAddress: v17.string(),
|
|
1200
|
-
assetBAddress: v17.string(),
|
|
1201
|
-
assetAInitialReserve: v17.string(),
|
|
1202
|
-
virtualReserveA: v17.union([v17.number(), v17.string()]),
|
|
1203
|
-
virtualReserveB: v17.union([v17.number(), v17.string()]),
|
|
1204
|
-
threshold: v17.union([v17.number(), v17.string()]),
|
|
1205
|
-
lpFeeRateBps: v17.union([v17.number(), v17.string()]),
|
|
1206
|
-
totalHostFeeRateBps: v17.union([v17.number(), v17.string()]),
|
|
1207
|
-
poolOwnerPublicKey: v17.string(),
|
|
1208
|
-
nonce: v17.string()
|
|
1209
|
-
})
|
|
1210
|
-
});
|
|
1211
|
-
|
|
1212
|
-
// src/request/types/sparkMethods/flashnetMethods/intents/removeLiquidity.ts
|
|
1213
|
-
var v18 = __toESM(require("valibot"));
|
|
1214
|
-
var sparkFlashnetRemoveLiquidityIntentSchema = v18.object({
|
|
1215
|
-
type: v18.literal("removeLiquidity"),
|
|
1216
|
-
data: v18.object({
|
|
1217
|
-
userPublicKey: v18.string(),
|
|
1218
|
-
poolId: v18.string(),
|
|
1219
|
-
lpTokensToRemove: v18.string(),
|
|
1220
|
-
nonce: v18.string()
|
|
1221
|
-
})
|
|
1222
|
-
});
|
|
1223
|
-
|
|
1224
|
-
// src/request/types/sparkMethods/flashnetMethods/intents/routeSwap.ts
|
|
1225
|
-
var v19 = __toESM(require("valibot"));
|
|
1226
|
-
var sparkFlashnetRouteSwapIntentSchema = v19.object({
|
|
1227
|
-
type: v19.literal("executeRouteSwap"),
|
|
1228
|
-
data: v19.object({
|
|
1229
|
-
userPublicKey: v19.string(),
|
|
1230
|
-
initialSparkTransferId: v19.string(),
|
|
1231
|
-
hops: v19.array(
|
|
1232
|
-
v19.object({
|
|
1233
|
-
poolId: v19.string(),
|
|
1234
|
-
inputAssetAddress: v19.string(),
|
|
1235
|
-
outputAssetAddress: v19.string(),
|
|
1236
|
-
hopIntegratorFeeRateBps: v19.optional(v19.union([v19.number(), v19.string()]))
|
|
1237
|
-
})
|
|
1238
|
-
),
|
|
1239
|
-
inputAmount: v19.string(),
|
|
1240
|
-
maxRouteSlippageBps: v19.union([v19.number(), v19.string()]),
|
|
1241
|
-
minAmountOut: v19.string(),
|
|
1242
|
-
defaultIntegratorFeeRateBps: v19.optional(v19.union([v19.number(), v19.string()])),
|
|
1243
|
-
nonce: v19.string()
|
|
1244
|
-
})
|
|
1245
|
-
});
|
|
1246
|
-
|
|
1247
|
-
// src/request/types/sparkMethods/flashnetMethods/intents/swap.ts
|
|
1248
|
-
var v20 = __toESM(require("valibot"));
|
|
1249
|
-
var sparkFlashnetSwapIntentSchema = v20.object({
|
|
1250
|
-
type: v20.literal("executeSwap"),
|
|
1251
|
-
data: v20.object({
|
|
1252
|
-
userPublicKey: v20.string(),
|
|
1253
|
-
poolId: v20.string(),
|
|
1254
|
-
transferId: v20.string(),
|
|
1255
|
-
assetInAddress: v20.string(),
|
|
1256
|
-
assetOutAddress: v20.string(),
|
|
1257
|
-
amountIn: v20.string(),
|
|
1258
|
-
maxSlippageBps: v20.union([v20.number(), v20.string()]),
|
|
1259
|
-
minAmountOut: v20.string(),
|
|
1260
|
-
totalIntegratorFeeRateBps: v20.optional(v20.union([v20.number(), v20.string()])),
|
|
1261
|
-
nonce: v20.string()
|
|
1262
|
-
})
|
|
1263
|
-
});
|
|
1264
|
-
|
|
1265
|
-
// src/request/types/sparkMethods/flashnetMethods/signIntent.ts
|
|
1266
|
-
var v21 = __toESM(require("valibot"));
|
|
1267
|
-
var sparkFlashnetSignIntentMethodName = "spark_flashnet_signIntent";
|
|
1268
|
-
var sparkFlashnetSignIntentParamsSchema = v21.union([
|
|
1269
|
-
sparkFlashnetSwapIntentSchema,
|
|
1270
|
-
sparkFlashnetRouteSwapIntentSchema,
|
|
1271
|
-
sparkFlashnetAddLiquidityIntentSchema,
|
|
1272
|
-
sparkFlashnetClawbackIntentSchema,
|
|
1273
|
-
sparkFlashnetConfirmInitialDepositIntentSchema,
|
|
1274
|
-
sparkFlashnetCreateConstantProductPoolIntentSchema,
|
|
1275
|
-
sparkFlashnetCreateSingleSidedPoolIntentSchema,
|
|
1276
|
-
sparkFlashnetRemoveLiquidityIntentSchema
|
|
1277
|
-
]);
|
|
1278
|
-
var sparkFlashnetSignIntentResultSchema = v21.object({
|
|
1279
|
-
/**
|
|
1280
|
-
* The signed intent as a hex string.
|
|
1281
|
-
*/
|
|
1282
|
-
signature: v21.string()
|
|
1283
|
-
});
|
|
1284
|
-
var sparkFlashnetSignIntentRequestMessageSchema = v21.object({
|
|
1285
|
-
...rpcRequestMessageSchema.entries,
|
|
1286
|
-
...v21.object({
|
|
1287
|
-
method: v21.literal(sparkFlashnetSignIntentMethodName),
|
|
1288
|
-
params: sparkFlashnetSignIntentParamsSchema,
|
|
1289
|
-
id: v21.string()
|
|
1290
|
-
}).entries
|
|
1291
|
-
});
|
|
1292
|
-
|
|
1293
|
-
// src/request/types/sparkMethods/flashnetMethods/signStructuredMessage.ts
|
|
1294
|
-
var v22 = __toESM(require("valibot"));
|
|
1295
|
-
var sparkFlashnetSignStructuredMessageMethodName = "spark_flashnet_signStructuredMessage";
|
|
1296
|
-
var sparkFlashnetSignStructuredMessageParamsSchema = v22.object({
|
|
1297
|
-
message: v22.string()
|
|
1298
|
-
});
|
|
1299
|
-
var sparkFlashnetSignStructuredMessageResultSchema = v22.object({
|
|
1300
|
-
message: v22.string(),
|
|
1301
|
-
signature: v22.string()
|
|
1302
|
-
});
|
|
1303
|
-
var sparkFlashnetSignStructuredMessageRequestMessageSchema = v22.object({
|
|
1304
|
-
...rpcRequestMessageSchema.entries,
|
|
1305
|
-
...v22.object({
|
|
1306
|
-
method: v22.literal(sparkFlashnetSignStructuredMessageMethodName),
|
|
1307
|
-
params: sparkFlashnetSignStructuredMessageParamsSchema,
|
|
1308
|
-
id: v22.string()
|
|
1309
|
-
}).entries
|
|
1310
|
-
});
|
|
1311
|
-
|
|
1312
1100
|
// src/request/types/sparkMethods/getAddresses.ts
|
|
1313
|
-
var
|
|
1101
|
+
var v12 = __toESM(require("valibot"));
|
|
1314
1102
|
var sparkGetAddressesMethodName = "spark_getAddresses";
|
|
1315
|
-
var sparkGetAddressesParamsSchema =
|
|
1316
|
-
|
|
1103
|
+
var sparkGetAddressesParamsSchema = v12.nullish(
|
|
1104
|
+
v12.object({
|
|
1317
1105
|
/**
|
|
1318
1106
|
* A message to be displayed to the user in the request prompt.
|
|
1319
1107
|
*/
|
|
1320
|
-
message:
|
|
1108
|
+
message: v12.optional(v12.string())
|
|
1321
1109
|
})
|
|
1322
1110
|
);
|
|
1323
|
-
var sparkGetAddressesResultSchema =
|
|
1111
|
+
var sparkGetAddressesResultSchema = v12.object({
|
|
1324
1112
|
/**
|
|
1325
1113
|
* The addresses generated for the given purposes.
|
|
1326
1114
|
*/
|
|
1327
|
-
addresses:
|
|
1115
|
+
addresses: v12.array(addressSchema),
|
|
1328
1116
|
network: getNetworkResultSchema
|
|
1329
1117
|
});
|
|
1330
|
-
var sparkGetAddressesRequestMessageSchema =
|
|
1118
|
+
var sparkGetAddressesRequestMessageSchema = v12.object({
|
|
1331
1119
|
...rpcRequestMessageSchema.entries,
|
|
1332
|
-
...
|
|
1333
|
-
method:
|
|
1120
|
+
...v12.object({
|
|
1121
|
+
method: v12.literal(sparkGetAddressesMethodName),
|
|
1334
1122
|
params: sparkGetAddressesParamsSchema,
|
|
1335
|
-
id:
|
|
1123
|
+
id: v12.string()
|
|
1336
1124
|
}).entries
|
|
1337
1125
|
});
|
|
1338
1126
|
|
|
1339
1127
|
// src/request/types/sparkMethods/getBalance.ts
|
|
1340
|
-
var
|
|
1128
|
+
var v13 = __toESM(require("valibot"));
|
|
1341
1129
|
var sparkGetBalanceMethodName = "spark_getBalance";
|
|
1342
|
-
var sparkGetBalanceParamsSchema =
|
|
1343
|
-
var sparkGetBalanceResultSchema =
|
|
1130
|
+
var sparkGetBalanceParamsSchema = v13.nullish(v13.null());
|
|
1131
|
+
var sparkGetBalanceResultSchema = v13.object({
|
|
1344
1132
|
/**
|
|
1345
1133
|
* The Spark Bitcoin address balance in sats in string form.
|
|
1346
1134
|
*/
|
|
1347
|
-
balance:
|
|
1348
|
-
tokenBalances:
|
|
1349
|
-
|
|
1135
|
+
balance: v13.string(),
|
|
1136
|
+
tokenBalances: v13.array(
|
|
1137
|
+
v13.object({
|
|
1350
1138
|
/* The address balance of the token in string form as it can overflow a js number */
|
|
1351
|
-
balance:
|
|
1352
|
-
tokenMetadata:
|
|
1353
|
-
tokenIdentifier:
|
|
1354
|
-
tokenName:
|
|
1355
|
-
tokenTicker:
|
|
1356
|
-
decimals:
|
|
1357
|
-
maxSupply:
|
|
1139
|
+
balance: v13.string(),
|
|
1140
|
+
tokenMetadata: v13.object({
|
|
1141
|
+
tokenIdentifier: v13.string(),
|
|
1142
|
+
tokenName: v13.string(),
|
|
1143
|
+
tokenTicker: v13.string(),
|
|
1144
|
+
decimals: v13.number(),
|
|
1145
|
+
maxSupply: v13.string()
|
|
1358
1146
|
})
|
|
1359
1147
|
})
|
|
1360
1148
|
)
|
|
1361
1149
|
});
|
|
1362
|
-
var sparkGetBalanceRequestMessageSchema =
|
|
1150
|
+
var sparkGetBalanceRequestMessageSchema = v13.object({
|
|
1363
1151
|
...rpcRequestMessageSchema.entries,
|
|
1364
|
-
...
|
|
1365
|
-
method:
|
|
1152
|
+
...v13.object({
|
|
1153
|
+
method: v13.literal(sparkGetBalanceMethodName),
|
|
1366
1154
|
params: sparkGetBalanceParamsSchema,
|
|
1367
|
-
id:
|
|
1155
|
+
id: v13.string()
|
|
1368
1156
|
}).entries
|
|
1369
1157
|
});
|
|
1370
1158
|
|
|
1371
1159
|
// src/request/types/sparkMethods/transfer.ts
|
|
1372
|
-
var
|
|
1160
|
+
var v14 = __toESM(require("valibot"));
|
|
1373
1161
|
var sparkTransferMethodName = "spark_transfer";
|
|
1374
|
-
var sparkTransferParamsSchema =
|
|
1162
|
+
var sparkTransferParamsSchema = v14.object({
|
|
1375
1163
|
/**
|
|
1376
1164
|
* Amount of SATS to transfer as a string or number.
|
|
1377
1165
|
*/
|
|
1378
|
-
amountSats:
|
|
1166
|
+
amountSats: v14.union([v14.number(), v14.string()]),
|
|
1379
1167
|
/**
|
|
1380
1168
|
* The recipient's spark address.
|
|
1381
1169
|
*/
|
|
1382
|
-
receiverSparkAddress:
|
|
1170
|
+
receiverSparkAddress: v14.string()
|
|
1383
1171
|
});
|
|
1384
|
-
var sparkTransferResultSchema =
|
|
1172
|
+
var sparkTransferResultSchema = v14.object({
|
|
1385
1173
|
/**
|
|
1386
1174
|
* The ID of the transaction.
|
|
1387
1175
|
*/
|
|
1388
|
-
id:
|
|
1176
|
+
id: v14.string()
|
|
1389
1177
|
});
|
|
1390
|
-
var sparkTransferRequestMessageSchema =
|
|
1178
|
+
var sparkTransferRequestMessageSchema = v14.object({
|
|
1391
1179
|
...rpcRequestMessageSchema.entries,
|
|
1392
|
-
...
|
|
1393
|
-
method:
|
|
1180
|
+
...v14.object({
|
|
1181
|
+
method: v14.literal(sparkTransferMethodName),
|
|
1394
1182
|
params: sparkTransferParamsSchema,
|
|
1395
|
-
id:
|
|
1183
|
+
id: v14.string()
|
|
1396
1184
|
}).entries
|
|
1397
1185
|
});
|
|
1398
1186
|
|
|
1399
1187
|
// src/request/types/sparkMethods/transferToken.ts
|
|
1400
|
-
var
|
|
1188
|
+
var v15 = __toESM(require("valibot"));
|
|
1401
1189
|
var sparkTransferTokenMethodName = "spark_transferToken";
|
|
1402
|
-
var sparkTransferTokenParamsSchema =
|
|
1190
|
+
var sparkTransferTokenParamsSchema = v15.object({
|
|
1403
1191
|
/**
|
|
1404
1192
|
* Amount of units of the token to transfer as a string or number.
|
|
1405
1193
|
*/
|
|
1406
|
-
tokenAmount:
|
|
1194
|
+
tokenAmount: v15.union([v15.number(), v15.string()]),
|
|
1407
1195
|
/**
|
|
1408
1196
|
* The Bech32m token identifier.
|
|
1409
1197
|
*/
|
|
1410
|
-
tokenIdentifier:
|
|
1198
|
+
tokenIdentifier: v15.string(),
|
|
1411
1199
|
/**
|
|
1412
1200
|
* The recipient's spark address.
|
|
1413
1201
|
*/
|
|
1414
|
-
receiverSparkAddress:
|
|
1202
|
+
receiverSparkAddress: v15.string()
|
|
1415
1203
|
});
|
|
1416
|
-
var sparkTransferTokenResultSchema =
|
|
1204
|
+
var sparkTransferTokenResultSchema = v15.object({
|
|
1417
1205
|
/**
|
|
1418
1206
|
* The ID of the transaction.
|
|
1419
1207
|
*/
|
|
1420
|
-
id:
|
|
1208
|
+
id: v15.string()
|
|
1421
1209
|
});
|
|
1422
|
-
var sparkTransferTokenRequestMessageSchema =
|
|
1210
|
+
var sparkTransferTokenRequestMessageSchema = v15.object({
|
|
1423
1211
|
...rpcRequestMessageSchema.entries,
|
|
1424
|
-
...
|
|
1425
|
-
method:
|
|
1212
|
+
...v15.object({
|
|
1213
|
+
method: v15.literal(sparkTransferTokenMethodName),
|
|
1426
1214
|
params: sparkTransferTokenParamsSchema,
|
|
1427
|
-
id:
|
|
1215
|
+
id: v15.string()
|
|
1428
1216
|
}).entries
|
|
1429
1217
|
});
|
|
1430
1218
|
|
|
1431
1219
|
// src/request/types/stxMethods/callContract.ts
|
|
1432
|
-
var
|
|
1220
|
+
var v16 = __toESM(require("valibot"));
|
|
1433
1221
|
var stxCallContractMethodName = "stx_callContract";
|
|
1434
|
-
var stxCallContractParamsSchema =
|
|
1222
|
+
var stxCallContractParamsSchema = v16.object({
|
|
1435
1223
|
/**
|
|
1436
1224
|
* The contract principal.
|
|
1437
1225
|
*
|
|
1438
1226
|
* E.g. `"SPKE...GD5C.my-contract"`
|
|
1439
1227
|
*/
|
|
1440
|
-
contract:
|
|
1228
|
+
contract: v16.string(),
|
|
1441
1229
|
/**
|
|
1442
1230
|
* The name of the function to call.
|
|
1443
1231
|
*
|
|
1444
1232
|
* Note: spec changes ongoing,
|
|
1445
1233
|
* https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
|
|
1446
1234
|
*/
|
|
1447
|
-
functionName:
|
|
1235
|
+
functionName: v16.string(),
|
|
1448
1236
|
/**
|
|
1449
1237
|
* @deprecated in favor of `functionArgs` for @stacks/connect compatibility
|
|
1450
1238
|
*/
|
|
1451
|
-
arguments:
|
|
1239
|
+
arguments: v16.optional(v16.array(v16.string())),
|
|
1452
1240
|
/**
|
|
1453
1241
|
* The function's arguments. The arguments are expected to be hex-encoded
|
|
1454
1242
|
* strings of Clarity values.
|
|
@@ -1463,274 +1251,274 @@ var stxCallContractParamsSchema = v27.object({
|
|
|
1463
1251
|
* const hexArgs = functionArgs.map(cvToHex);
|
|
1464
1252
|
* ```
|
|
1465
1253
|
*/
|
|
1466
|
-
functionArgs:
|
|
1254
|
+
functionArgs: v16.optional(v16.array(v16.string())),
|
|
1467
1255
|
/**
|
|
1468
1256
|
* The post conditions to apply to the contract call.
|
|
1469
1257
|
*/
|
|
1470
|
-
postConditions:
|
|
1258
|
+
postConditions: v16.optional(v16.array(v16.string())),
|
|
1471
1259
|
/**
|
|
1472
1260
|
* The mode to apply to the post conditions.
|
|
1473
1261
|
*/
|
|
1474
|
-
postConditionMode:
|
|
1262
|
+
postConditionMode: v16.optional(v16.union([v16.literal("allow"), v16.literal("deny")]))
|
|
1475
1263
|
});
|
|
1476
|
-
var stxCallContractResultSchema =
|
|
1264
|
+
var stxCallContractResultSchema = v16.object({
|
|
1477
1265
|
/**
|
|
1478
1266
|
* The ID of the transaction.
|
|
1479
1267
|
*/
|
|
1480
|
-
txid:
|
|
1268
|
+
txid: v16.string(),
|
|
1481
1269
|
/**
|
|
1482
1270
|
* A Stacks transaction as a hex-encoded string.
|
|
1483
1271
|
*/
|
|
1484
|
-
transaction:
|
|
1272
|
+
transaction: v16.string()
|
|
1485
1273
|
});
|
|
1486
|
-
var stxCallContractRequestMessageSchema =
|
|
1274
|
+
var stxCallContractRequestMessageSchema = v16.object({
|
|
1487
1275
|
...rpcRequestMessageSchema.entries,
|
|
1488
|
-
...
|
|
1489
|
-
method:
|
|
1276
|
+
...v16.object({
|
|
1277
|
+
method: v16.literal(stxCallContractMethodName),
|
|
1490
1278
|
params: stxCallContractParamsSchema,
|
|
1491
|
-
id:
|
|
1279
|
+
id: v16.string()
|
|
1492
1280
|
}).entries
|
|
1493
1281
|
});
|
|
1494
1282
|
|
|
1495
1283
|
// src/request/types/stxMethods/deployContract.ts
|
|
1496
|
-
var
|
|
1284
|
+
var v17 = __toESM(require("valibot"));
|
|
1497
1285
|
var stxDeployContractMethodName = "stx_deployContract";
|
|
1498
|
-
var stxDeployContractParamsSchema =
|
|
1286
|
+
var stxDeployContractParamsSchema = v17.object({
|
|
1499
1287
|
/**
|
|
1500
1288
|
* Name of the contract.
|
|
1501
1289
|
*/
|
|
1502
|
-
name:
|
|
1290
|
+
name: v17.string(),
|
|
1503
1291
|
/**
|
|
1504
1292
|
* The source code of the Clarity contract.
|
|
1505
1293
|
*/
|
|
1506
|
-
clarityCode:
|
|
1294
|
+
clarityCode: v17.string(),
|
|
1507
1295
|
/**
|
|
1508
1296
|
* The version of the Clarity contract.
|
|
1509
1297
|
*/
|
|
1510
|
-
clarityVersion:
|
|
1298
|
+
clarityVersion: v17.optional(v17.number()),
|
|
1511
1299
|
/**
|
|
1512
1300
|
* The post conditions to apply to the contract call.
|
|
1513
1301
|
*/
|
|
1514
|
-
postConditions:
|
|
1302
|
+
postConditions: v17.optional(v17.array(v17.string())),
|
|
1515
1303
|
/**
|
|
1516
1304
|
* The mode to apply to the post conditions.
|
|
1517
1305
|
*/
|
|
1518
|
-
postConditionMode:
|
|
1306
|
+
postConditionMode: v17.optional(v17.union([v17.literal("allow"), v17.literal("deny")]))
|
|
1519
1307
|
});
|
|
1520
|
-
var stxDeployContractResultSchema =
|
|
1308
|
+
var stxDeployContractResultSchema = v17.object({
|
|
1521
1309
|
/**
|
|
1522
1310
|
* The ID of the transaction.
|
|
1523
1311
|
*/
|
|
1524
|
-
txid:
|
|
1312
|
+
txid: v17.string(),
|
|
1525
1313
|
/**
|
|
1526
1314
|
* A Stacks transaction as a hex-encoded string.
|
|
1527
1315
|
*/
|
|
1528
|
-
transaction:
|
|
1316
|
+
transaction: v17.string()
|
|
1529
1317
|
});
|
|
1530
|
-
var stxDeployContractRequestMessageSchema =
|
|
1318
|
+
var stxDeployContractRequestMessageSchema = v17.object({
|
|
1531
1319
|
...rpcRequestMessageSchema.entries,
|
|
1532
|
-
...
|
|
1533
|
-
method:
|
|
1320
|
+
...v17.object({
|
|
1321
|
+
method: v17.literal(stxDeployContractMethodName),
|
|
1534
1322
|
params: stxDeployContractParamsSchema,
|
|
1535
|
-
id:
|
|
1323
|
+
id: v17.string()
|
|
1536
1324
|
}).entries
|
|
1537
1325
|
});
|
|
1538
1326
|
|
|
1539
1327
|
// src/request/types/stxMethods/getAccounts.ts
|
|
1540
|
-
var
|
|
1328
|
+
var v18 = __toESM(require("valibot"));
|
|
1541
1329
|
var stxGetAccountsMethodName = "stx_getAccounts";
|
|
1542
|
-
var stxGetAccountsParamsSchema =
|
|
1543
|
-
var stxGetAccountsResultSchema =
|
|
1330
|
+
var stxGetAccountsParamsSchema = v18.nullish(v18.null());
|
|
1331
|
+
var stxGetAccountsResultSchema = v18.object({
|
|
1544
1332
|
/**
|
|
1545
1333
|
* The addresses generated for the given purposes.
|
|
1546
1334
|
*/
|
|
1547
|
-
addresses:
|
|
1548
|
-
|
|
1549
|
-
address:
|
|
1550
|
-
publicKey:
|
|
1551
|
-
gaiaHubUrl:
|
|
1552
|
-
gaiaAppKey:
|
|
1335
|
+
addresses: v18.array(
|
|
1336
|
+
v18.object({
|
|
1337
|
+
address: v18.string(),
|
|
1338
|
+
publicKey: v18.string(),
|
|
1339
|
+
gaiaHubUrl: v18.string(),
|
|
1340
|
+
gaiaAppKey: v18.string()
|
|
1553
1341
|
})
|
|
1554
1342
|
),
|
|
1555
1343
|
network: getNetworkResultSchema
|
|
1556
1344
|
});
|
|
1557
|
-
var stxGetAccountsRequestMessageSchema =
|
|
1345
|
+
var stxGetAccountsRequestMessageSchema = v18.object({
|
|
1558
1346
|
...rpcRequestMessageSchema.entries,
|
|
1559
|
-
...
|
|
1560
|
-
method:
|
|
1347
|
+
...v18.object({
|
|
1348
|
+
method: v18.literal(stxGetAccountsMethodName),
|
|
1561
1349
|
params: stxGetAccountsParamsSchema,
|
|
1562
|
-
id:
|
|
1350
|
+
id: v18.string()
|
|
1563
1351
|
}).entries
|
|
1564
1352
|
});
|
|
1565
1353
|
|
|
1566
1354
|
// src/request/types/stxMethods/getAddresses.ts
|
|
1567
|
-
var
|
|
1355
|
+
var v19 = __toESM(require("valibot"));
|
|
1568
1356
|
var stxGetAddressesMethodName = "stx_getAddresses";
|
|
1569
|
-
var stxGetAddressesParamsSchema =
|
|
1570
|
-
|
|
1357
|
+
var stxGetAddressesParamsSchema = v19.nullish(
|
|
1358
|
+
v19.object({
|
|
1571
1359
|
/**
|
|
1572
1360
|
* A message to be displayed to the user in the request prompt.
|
|
1573
1361
|
*/
|
|
1574
|
-
message:
|
|
1362
|
+
message: v19.optional(v19.string())
|
|
1575
1363
|
})
|
|
1576
1364
|
);
|
|
1577
|
-
var stxGetAddressesResultSchema =
|
|
1365
|
+
var stxGetAddressesResultSchema = v19.object({
|
|
1578
1366
|
/**
|
|
1579
1367
|
* The addresses generated for the given purposes.
|
|
1580
1368
|
*/
|
|
1581
|
-
addresses:
|
|
1369
|
+
addresses: v19.array(addressSchema),
|
|
1582
1370
|
network: getNetworkResultSchema
|
|
1583
1371
|
});
|
|
1584
|
-
var stxGetAddressesRequestMessageSchema =
|
|
1372
|
+
var stxGetAddressesRequestMessageSchema = v19.object({
|
|
1585
1373
|
...rpcRequestMessageSchema.entries,
|
|
1586
|
-
...
|
|
1587
|
-
method:
|
|
1374
|
+
...v19.object({
|
|
1375
|
+
method: v19.literal(stxGetAddressesMethodName),
|
|
1588
1376
|
params: stxGetAddressesParamsSchema,
|
|
1589
|
-
id:
|
|
1377
|
+
id: v19.string()
|
|
1590
1378
|
}).entries
|
|
1591
1379
|
});
|
|
1592
1380
|
|
|
1593
1381
|
// src/request/types/stxMethods/signMessage.ts
|
|
1594
|
-
var
|
|
1382
|
+
var v20 = __toESM(require("valibot"));
|
|
1595
1383
|
var stxSignMessageMethodName = "stx_signMessage";
|
|
1596
|
-
var stxSignMessageParamsSchema =
|
|
1384
|
+
var stxSignMessageParamsSchema = v20.object({
|
|
1597
1385
|
/**
|
|
1598
1386
|
* The message to sign.
|
|
1599
1387
|
*/
|
|
1600
|
-
message:
|
|
1388
|
+
message: v20.string()
|
|
1601
1389
|
});
|
|
1602
|
-
var stxSignMessageResultSchema =
|
|
1390
|
+
var stxSignMessageResultSchema = v20.object({
|
|
1603
1391
|
/**
|
|
1604
1392
|
* The signature of the message.
|
|
1605
1393
|
*/
|
|
1606
|
-
signature:
|
|
1394
|
+
signature: v20.string(),
|
|
1607
1395
|
/**
|
|
1608
1396
|
* The public key used to sign the message.
|
|
1609
1397
|
*/
|
|
1610
|
-
publicKey:
|
|
1398
|
+
publicKey: v20.string()
|
|
1611
1399
|
});
|
|
1612
|
-
var stxSignMessageRequestMessageSchema =
|
|
1400
|
+
var stxSignMessageRequestMessageSchema = v20.object({
|
|
1613
1401
|
...rpcRequestMessageSchema.entries,
|
|
1614
|
-
...
|
|
1615
|
-
method:
|
|
1402
|
+
...v20.object({
|
|
1403
|
+
method: v20.literal(stxSignMessageMethodName),
|
|
1616
1404
|
params: stxSignMessageParamsSchema,
|
|
1617
|
-
id:
|
|
1405
|
+
id: v20.string()
|
|
1618
1406
|
}).entries
|
|
1619
1407
|
});
|
|
1620
1408
|
|
|
1621
1409
|
// src/request/types/stxMethods/signStructuredMessage.ts
|
|
1622
|
-
var
|
|
1410
|
+
var v21 = __toESM(require("valibot"));
|
|
1623
1411
|
var stxSignStructuredMessageMethodName = "stx_signStructuredMessage";
|
|
1624
|
-
var stxSignStructuredMessageParamsSchema =
|
|
1412
|
+
var stxSignStructuredMessageParamsSchema = v21.object({
|
|
1625
1413
|
/**
|
|
1626
1414
|
* The domain to be signed.
|
|
1627
1415
|
*/
|
|
1628
|
-
domain:
|
|
1416
|
+
domain: v21.string(),
|
|
1629
1417
|
/**
|
|
1630
1418
|
* Message payload to be signed.
|
|
1631
1419
|
*/
|
|
1632
|
-
message:
|
|
1420
|
+
message: v21.string(),
|
|
1633
1421
|
/**
|
|
1634
1422
|
* The public key to sign the message with.
|
|
1635
1423
|
*/
|
|
1636
|
-
publicKey:
|
|
1424
|
+
publicKey: v21.optional(v21.string())
|
|
1637
1425
|
});
|
|
1638
|
-
var stxSignStructuredMessageResultSchema =
|
|
1426
|
+
var stxSignStructuredMessageResultSchema = v21.object({
|
|
1639
1427
|
/**
|
|
1640
1428
|
* Signature of the message.
|
|
1641
1429
|
*/
|
|
1642
|
-
signature:
|
|
1430
|
+
signature: v21.string(),
|
|
1643
1431
|
/**
|
|
1644
1432
|
* Public key as hex-encoded string.
|
|
1645
1433
|
*/
|
|
1646
|
-
publicKey:
|
|
1434
|
+
publicKey: v21.string()
|
|
1647
1435
|
});
|
|
1648
|
-
var stxSignStructuredMessageRequestMessageSchema =
|
|
1436
|
+
var stxSignStructuredMessageRequestMessageSchema = v21.object({
|
|
1649
1437
|
...rpcRequestMessageSchema.entries,
|
|
1650
|
-
...
|
|
1651
|
-
method:
|
|
1438
|
+
...v21.object({
|
|
1439
|
+
method: v21.literal(stxSignStructuredMessageMethodName),
|
|
1652
1440
|
params: stxSignStructuredMessageParamsSchema,
|
|
1653
|
-
id:
|
|
1441
|
+
id: v21.string()
|
|
1654
1442
|
}).entries
|
|
1655
1443
|
});
|
|
1656
1444
|
|
|
1657
1445
|
// src/request/types/stxMethods/signTransaction.ts
|
|
1658
|
-
var
|
|
1446
|
+
var v22 = __toESM(require("valibot"));
|
|
1659
1447
|
var stxSignTransactionMethodName = "stx_signTransaction";
|
|
1660
|
-
var stxSignTransactionParamsSchema =
|
|
1448
|
+
var stxSignTransactionParamsSchema = v22.object({
|
|
1661
1449
|
/**
|
|
1662
1450
|
* The transaction to sign as a hex-encoded string.
|
|
1663
1451
|
*/
|
|
1664
|
-
transaction:
|
|
1452
|
+
transaction: v22.string(),
|
|
1665
1453
|
/**
|
|
1666
1454
|
* The public key to sign the transaction with. The wallet may use any key
|
|
1667
1455
|
* when not provided.
|
|
1668
1456
|
*/
|
|
1669
|
-
pubkey:
|
|
1457
|
+
pubkey: v22.optional(v22.string()),
|
|
1670
1458
|
/**
|
|
1671
1459
|
* Whether to broadcast the transaction after signing. Defaults to `true`.
|
|
1672
1460
|
*/
|
|
1673
|
-
broadcast:
|
|
1461
|
+
broadcast: v22.optional(v22.boolean())
|
|
1674
1462
|
});
|
|
1675
|
-
var stxSignTransactionResultSchema =
|
|
1463
|
+
var stxSignTransactionResultSchema = v22.object({
|
|
1676
1464
|
/**
|
|
1677
1465
|
* The signed transaction as a hex-encoded string.
|
|
1678
1466
|
*/
|
|
1679
|
-
transaction:
|
|
1467
|
+
transaction: v22.string()
|
|
1680
1468
|
});
|
|
1681
|
-
var stxSignTransactionRequestMessageSchema =
|
|
1469
|
+
var stxSignTransactionRequestMessageSchema = v22.object({
|
|
1682
1470
|
...rpcRequestMessageSchema.entries,
|
|
1683
|
-
...
|
|
1684
|
-
method:
|
|
1471
|
+
...v22.object({
|
|
1472
|
+
method: v22.literal(stxSignTransactionMethodName),
|
|
1685
1473
|
params: stxSignTransactionParamsSchema,
|
|
1686
|
-
id:
|
|
1474
|
+
id: v22.string()
|
|
1687
1475
|
}).entries
|
|
1688
1476
|
});
|
|
1689
1477
|
|
|
1690
1478
|
// src/request/types/stxMethods/signTransactions.ts
|
|
1691
|
-
var
|
|
1479
|
+
var v23 = __toESM(require("valibot"));
|
|
1692
1480
|
var stxSignTransactionsMethodName = "stx_signTransactions";
|
|
1693
|
-
var stxSignTransactionsParamsSchema =
|
|
1481
|
+
var stxSignTransactionsParamsSchema = v23.object({
|
|
1694
1482
|
/**
|
|
1695
1483
|
* The transactions to sign as hex-encoded strings.
|
|
1696
1484
|
*/
|
|
1697
|
-
transactions:
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1485
|
+
transactions: v23.pipe(
|
|
1486
|
+
v23.array(
|
|
1487
|
+
v23.pipe(
|
|
1488
|
+
v23.string(),
|
|
1489
|
+
v23.check((hex) => {
|
|
1702
1490
|
return true;
|
|
1703
1491
|
}, "Invalid hex-encoded Stacks transaction.")
|
|
1704
1492
|
)
|
|
1705
1493
|
),
|
|
1706
|
-
|
|
1494
|
+
v23.minLength(1)
|
|
1707
1495
|
),
|
|
1708
1496
|
/**
|
|
1709
1497
|
* Whether the signed transactions should be broadcast after signing. Defaults
|
|
1710
1498
|
* to `true`.
|
|
1711
1499
|
*/
|
|
1712
|
-
broadcast:
|
|
1500
|
+
broadcast: v23.optional(v23.boolean())
|
|
1713
1501
|
});
|
|
1714
|
-
var stxSignTransactionsResultSchema =
|
|
1502
|
+
var stxSignTransactionsResultSchema = v23.object({
|
|
1715
1503
|
/**
|
|
1716
1504
|
* The signed transactions as hex-encoded strings, in the same order as in the
|
|
1717
1505
|
* sign request.
|
|
1718
1506
|
*/
|
|
1719
|
-
transactions:
|
|
1507
|
+
transactions: v23.array(v23.string())
|
|
1720
1508
|
});
|
|
1721
|
-
var stxSignTransactionsRequestMessageSchema =
|
|
1509
|
+
var stxSignTransactionsRequestMessageSchema = v23.object({
|
|
1722
1510
|
...rpcRequestMessageSchema.entries,
|
|
1723
|
-
...
|
|
1724
|
-
method:
|
|
1511
|
+
...v23.object({
|
|
1512
|
+
method: v23.literal(stxSignTransactionsMethodName),
|
|
1725
1513
|
params: stxSignTransactionsParamsSchema,
|
|
1726
|
-
id:
|
|
1514
|
+
id: v23.string()
|
|
1727
1515
|
}).entries
|
|
1728
1516
|
});
|
|
1729
1517
|
|
|
1730
1518
|
// src/request/types/stxMethods/transferStx.ts
|
|
1731
|
-
var
|
|
1519
|
+
var v24 = __toESM(require("valibot"));
|
|
1732
1520
|
var stxTransferStxMethodName = "stx_transferStx";
|
|
1733
|
-
var stxTransferStxParamsSchema =
|
|
1521
|
+
var stxTransferStxParamsSchema = v24.object({
|
|
1734
1522
|
/**
|
|
1735
1523
|
* Amount of STX tokens to transfer in microstacks as a string. Anything
|
|
1736
1524
|
* parseable by `BigInt` is acceptable.
|
|
@@ -1743,23 +1531,23 @@ var stxTransferStxParamsSchema = v35.object({
|
|
|
1743
1531
|
* const amount3 = '1234';
|
|
1744
1532
|
* ```
|
|
1745
1533
|
*/
|
|
1746
|
-
amount:
|
|
1534
|
+
amount: v24.union([v24.number(), v24.string()]),
|
|
1747
1535
|
/**
|
|
1748
1536
|
* The recipient's principal.
|
|
1749
1537
|
*/
|
|
1750
|
-
recipient:
|
|
1538
|
+
recipient: v24.string(),
|
|
1751
1539
|
/**
|
|
1752
1540
|
* A string representing the memo.
|
|
1753
1541
|
*/
|
|
1754
|
-
memo:
|
|
1542
|
+
memo: v24.optional(v24.string()),
|
|
1755
1543
|
/**
|
|
1756
1544
|
* Version of parameter format.
|
|
1757
1545
|
*/
|
|
1758
|
-
version:
|
|
1546
|
+
version: v24.optional(v24.string()),
|
|
1759
1547
|
/**
|
|
1760
1548
|
* The mode of the post conditions.
|
|
1761
1549
|
*/
|
|
1762
|
-
postConditionMode:
|
|
1550
|
+
postConditionMode: v24.optional(v24.number()),
|
|
1763
1551
|
/**
|
|
1764
1552
|
* A hex-encoded string representing the post conditions.
|
|
1765
1553
|
*
|
|
@@ -1772,29 +1560,29 @@ var stxTransferStxParamsSchema = v35.object({
|
|
|
1772
1560
|
* const hexPostCondition = serializePostCondition(postCondition).toString('hex');
|
|
1773
1561
|
* ```
|
|
1774
1562
|
*/
|
|
1775
|
-
postConditions:
|
|
1563
|
+
postConditions: v24.optional(v24.array(v24.string())),
|
|
1776
1564
|
/**
|
|
1777
1565
|
* The public key to sign the transaction with. The wallet may use any key
|
|
1778
1566
|
* when not provided.
|
|
1779
1567
|
*/
|
|
1780
|
-
pubkey:
|
|
1568
|
+
pubkey: v24.optional(v24.string())
|
|
1781
1569
|
});
|
|
1782
|
-
var stxTransferStxResultSchema =
|
|
1570
|
+
var stxTransferStxResultSchema = v24.object({
|
|
1783
1571
|
/**
|
|
1784
1572
|
* The ID of the transaction.
|
|
1785
1573
|
*/
|
|
1786
|
-
txid:
|
|
1574
|
+
txid: v24.string(),
|
|
1787
1575
|
/**
|
|
1788
1576
|
* A Stacks transaction as a hex-encoded string.
|
|
1789
1577
|
*/
|
|
1790
|
-
transaction:
|
|
1578
|
+
transaction: v24.string()
|
|
1791
1579
|
});
|
|
1792
|
-
var stxTransferStxRequestMessageSchema =
|
|
1580
|
+
var stxTransferStxRequestMessageSchema = v24.object({
|
|
1793
1581
|
...rpcRequestMessageSchema.entries,
|
|
1794
|
-
...
|
|
1795
|
-
method:
|
|
1582
|
+
...v24.object({
|
|
1583
|
+
method: v24.literal(stxTransferStxMethodName),
|
|
1796
1584
|
params: stxTransferStxParamsSchema,
|
|
1797
|
-
id:
|
|
1585
|
+
id: v24.string()
|
|
1798
1586
|
}).entries
|
|
1799
1587
|
});
|
|
1800
1588
|
|
|
@@ -1802,13 +1590,13 @@ var stxTransferStxRequestMessageSchema = v35.object({
|
|
|
1802
1590
|
var cache = {};
|
|
1803
1591
|
var requestInternal = async (provider, method, params) => {
|
|
1804
1592
|
const response = await provider.request(method, params);
|
|
1805
|
-
if (
|
|
1593
|
+
if (v25.is(rpcErrorResponseMessageSchema, response)) {
|
|
1806
1594
|
return {
|
|
1807
1595
|
status: "error",
|
|
1808
1596
|
error: response.error
|
|
1809
1597
|
};
|
|
1810
1598
|
}
|
|
1811
|
-
if (
|
|
1599
|
+
if (v25.is(rpcSuccessResponseMessageSchema, response)) {
|
|
1812
1600
|
return {
|
|
1813
1601
|
status: "success",
|
|
1814
1602
|
result: response.result
|
|
@@ -2997,26 +2785,6 @@ var signMultipleTransactions = async (options) => {
|
|
|
2997
2785
|
signPsbtRequestMessageSchema,
|
|
2998
2786
|
signPsbtResultSchema,
|
|
2999
2787
|
signTransaction,
|
|
3000
|
-
sparkFlashnetAddLiquidityIntentSchema,
|
|
3001
|
-
sparkFlashnetClawbackIntentSchema,
|
|
3002
|
-
sparkFlashnetConfirmInitialDepositIntentSchema,
|
|
3003
|
-
sparkFlashnetCreateConstantProductPoolIntentSchema,
|
|
3004
|
-
sparkFlashnetCreateSingleSidedPoolIntentSchema,
|
|
3005
|
-
sparkFlashnetGetJwtMethodName,
|
|
3006
|
-
sparkFlashnetGetJwtParamsSchema,
|
|
3007
|
-
sparkFlashnetGetJwtRequestMessageSchema,
|
|
3008
|
-
sparkFlashnetGetJwtResultSchema,
|
|
3009
|
-
sparkFlashnetRemoveLiquidityIntentSchema,
|
|
3010
|
-
sparkFlashnetRouteSwapIntentSchema,
|
|
3011
|
-
sparkFlashnetSignIntentMethodName,
|
|
3012
|
-
sparkFlashnetSignIntentParamsSchema,
|
|
3013
|
-
sparkFlashnetSignIntentRequestMessageSchema,
|
|
3014
|
-
sparkFlashnetSignIntentResultSchema,
|
|
3015
|
-
sparkFlashnetSignStructuredMessageMethodName,
|
|
3016
|
-
sparkFlashnetSignStructuredMessageParamsSchema,
|
|
3017
|
-
sparkFlashnetSignStructuredMessageRequestMessageSchema,
|
|
3018
|
-
sparkFlashnetSignStructuredMessageResultSchema,
|
|
3019
|
-
sparkFlashnetSwapIntentSchema,
|
|
3020
2788
|
sparkGetAddressesMethodName,
|
|
3021
2789
|
sparkGetAddressesParamsSchema,
|
|
3022
2790
|
sparkGetAddressesRequestMessageSchema,
|