@stacks/clarinet-sdk-wasm 3.25.0 → 4.0.0

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/clarinet_sdk.d.ts CHANGED
@@ -162,6 +162,10 @@ export class DeployContractArgs {
162
162
  export class SDK {
163
163
  free(): void;
164
164
  [Symbol.dispose](): void;
165
+ /**
166
+ * Submit signed bytes to the session's mempool without mining.
167
+ */
168
+ broadcastTransaction(raw_hex: string): string;
165
169
  callPrivateFn(args: CallFnArgs): TransactionRes;
166
170
  callPublicFn(args: CallFnArgs): TransactionRes;
167
171
  callReadOnlyFn(args: CallFnArgs): TransactionRes;
@@ -204,7 +208,6 @@ export class SDK {
204
208
  mintFT(token: string, recipient: string, amount: bigint): string;
205
209
  mintSTX(recipient: string, amount: bigint): string;
206
210
  constructor(fs_request: Function, options?: SDKOptions | null);
207
- runSnippet(snippet: string): string;
208
211
  setCurrentTestName(test_name: string): void;
209
212
  setEpoch(epoch: EpochString): void;
210
213
  setLocalAccounts(addresses: string[]): void;
@@ -249,9 +252,3 @@ export class TransferSTXArgs {
249
252
  [Symbol.dispose](): void;
250
253
  constructor(amount: bigint, recipient: string, sender: string, post_conditions?: string[] | null, post_condition_mode?: string | null);
251
254
  }
252
-
253
- export class TxArgs {
254
- private constructor();
255
- free(): void;
256
- [Symbol.dispose](): void;
257
- }
package/clarinet_sdk.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /* @ts-self-types="./clarinet_sdk.d.ts" */
2
- const { syncHttpRequest, syncSleep } = require(String.raw`./snippets/clarity-repl-055be6625f38156d/src/repl/remote_data/http_request/sync_http.cjs`);
2
+ const { syncHttpRequest, syncSleep } = require(String.raw`./snippets/clarity-repl-9a0504ee45c91575/src/repl/remote_data/http_request/sync_http.cjs`);
3
3
  const { existsSync, mkdirSync, readFileSync, writeFileSync } = require(`fs`);
4
4
 
5
5
  class CallFnArgs {
@@ -141,6 +141,25 @@ class SDK {
141
141
  const ret = wasm.sdk_blockHeight(this.__wbg_ptr);
142
142
  return ret >>> 0;
143
143
  }
144
+ /**
145
+ * Submit signed bytes to the session's mempool without mining.
146
+ * @param {string} raw_hex
147
+ * @returns {string}
148
+ */
149
+ broadcastTransaction(raw_hex) {
150
+ let deferred2_0;
151
+ let deferred2_1;
152
+ try {
153
+ const ptr0 = passStringToWasm0(raw_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
154
+ const len0 = WASM_VECTOR_LEN;
155
+ const ret = wasm.sdk_broadcastTransaction(this.__wbg_ptr, ptr0, len0);
156
+ deferred2_0 = ret[0];
157
+ deferred2_1 = ret[1];
158
+ return getStringFromWasm0(ret[0], ret[1]);
159
+ } finally {
160
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
161
+ }
162
+ }
144
163
  /**
145
164
  * @returns {number}
146
165
  */
@@ -603,24 +622,6 @@ class SDK {
603
622
  SDKFinalization.register(this, this.__wbg_ptr, this);
604
623
  return this;
605
624
  }
606
- /**
607
- * @param {string} snippet
608
- * @returns {string}
609
- */
610
- runSnippet(snippet) {
611
- let deferred2_0;
612
- let deferred2_1;
613
- try {
614
- const ptr0 = passStringToWasm0(snippet, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
615
- const len0 = WASM_VECTOR_LEN;
616
- const ret = wasm.sdk_runSnippet(this.__wbg_ptr, ptr0, len0);
617
- deferred2_0 = ret[0];
618
- deferred2_1 = ret[1];
619
- return getStringFromWasm0(ret[0], ret[1]);
620
- } finally {
621
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
622
- }
623
- }
624
625
  /**
625
626
  * @param {string} test_name
626
627
  */
@@ -954,21 +955,6 @@ class TransferSTXArgs {
954
955
  if (Symbol.dispose) TransferSTXArgs.prototype[Symbol.dispose] = TransferSTXArgs.prototype.free;
955
956
  exports.TransferSTXArgs = TransferSTXArgs;
956
957
 
957
- class TxArgs {
958
- __destroy_into_raw() {
959
- const ptr = this.__wbg_ptr;
960
- this.__wbg_ptr = 0;
961
- TxArgsFinalization.unregister(this);
962
- return ptr;
963
- }
964
- free() {
965
- const ptr = this.__destroy_into_raw();
966
- wasm.__wbg_txargs_free(ptr, 0);
967
- }
968
- }
969
- if (Symbol.dispose) TxArgs.prototype[Symbol.dispose] = TxArgs.prototype.free;
970
- exports.TxArgs = TxArgs;
971
-
972
958
  function __wbg_get_imports() {
973
959
  const import0 = {
974
960
  __proto__: null,
@@ -1095,7 +1081,7 @@ function __wbg_get_imports() {
1095
1081
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1096
1082
  }
1097
1083
  },
1098
- __wbg_existsSync_d89fc682d55a4f01: function(arg0, arg1) {
1084
+ __wbg_existsSync_2027dc491c465f53: function(arg0, arg1) {
1099
1085
  const ret = existsSync(getStringFromWasm0(arg0, arg1));
1100
1086
  return ret;
1101
1087
  },
@@ -1195,7 +1181,7 @@ function __wbg_get_imports() {
1195
1181
  __wbg_log_524eedafa26daa59: function(arg0) {
1196
1182
  console.log(arg0);
1197
1183
  },
1198
- __wbg_mkdirSync_9819212091183624: function(arg0, arg1, arg2) {
1184
+ __wbg_mkdirSync_8e07fae92a8c371e: function(arg0, arg1, arg2) {
1199
1185
  mkdirSync(getStringFromWasm0(arg0, arg1), arg2);
1200
1186
  },
1201
1187
  __wbg_new_0837727332ac86ba: function() { return handleError(function () {
@@ -1278,7 +1264,7 @@ function __wbg_get_imports() {
1278
1264
  __wbg_queueMicrotask_a082d78ce798393e: function(arg0) {
1279
1265
  queueMicrotask(arg0);
1280
1266
  },
1281
- __wbg_readFileSync_f411313d165766b5: function(arg0, arg1, arg2) {
1267
+ __wbg_readFileSync_91b0630039422aeb: function(arg0, arg1, arg2) {
1282
1268
  const ret = readFileSync(getStringFromWasm0(arg1, arg2));
1283
1269
  const ptr1 = passArray8ToWasm0(ret, wasm.__wbindgen_malloc);
1284
1270
  const len1 = WASM_VECTOR_LEN;
@@ -1363,11 +1349,11 @@ function __wbg_get_imports() {
1363
1349
  const ret = JSON.stringify(arg0);
1364
1350
  return ret;
1365
1351
  }, arguments); },
1366
- __wbg_syncHttpRequest_9efd217dce848531: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1352
+ __wbg_syncHttpRequest_b3076a38698e323f: function() { return handleError(function (arg0, arg1, arg2, arg3) {
1367
1353
  const ret = syncHttpRequest(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
1368
1354
  return ret;
1369
1355
  }, arguments); },
1370
- __wbg_syncSleep_5ef759d31e96271e: function(arg0) {
1356
+ __wbg_syncSleep_4eaa9daaaf9ce655: function(arg0) {
1371
1357
  syncSleep(arg0 >>> 0);
1372
1358
  },
1373
1359
  __wbg_then_098abe61755d12f6: function(arg0, arg1) {
@@ -1389,16 +1375,16 @@ function __wbg_get_imports() {
1389
1375
  const ret = arg0.value;
1390
1376
  return ret;
1391
1377
  },
1392
- __wbg_writeFileSync_e73b20696f9258e4: function(arg0, arg1, arg2, arg3) {
1378
+ __wbg_writeFileSync_411867e11cd33fe3: function(arg0, arg1, arg2, arg3) {
1393
1379
  writeFileSync(getStringFromWasm0(arg0, arg1), getArrayU8FromWasm0(arg2, arg3));
1394
1380
  },
1395
1381
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
1396
- // Cast intrinsic for `Closure(Closure { dtor_idx: 364, function: Function { arguments: [], shim_idx: 365, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1382
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 371, function: Function { arguments: [], shim_idx: 372, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1397
1383
  const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen_f212bbababd85a7e___closure__destroy___dyn_core_37ee0ce0c4cd57d5___ops__function__FnMut_____Output_______, wasm_bindgen_f212bbababd85a7e___convert__closures_____invoke_______true_);
1398
1384
  return ret;
1399
1385
  },
1400
1386
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
1401
- // Cast intrinsic for `Closure(Closure { dtor_idx: 545, function: Function { arguments: [Externref], shim_idx: 546, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1387
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 553, function: Function { arguments: [Externref], shim_idx: 554, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1402
1388
  const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen_f212bbababd85a7e___closure__destroy___dyn_core_37ee0ce0c4cd57d5___ops__function__FnMut__wasm_bindgen_f212bbababd85a7e___JsValue____Output___core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_f212bbababd85a7e___JsError___, wasm_bindgen_f212bbababd85a7e___convert__closures_____invoke___wasm_bindgen_f212bbababd85a7e___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_f212bbababd85a7e___JsError___true_);
1403
1389
  return ret;
1404
1390
  },
@@ -1490,9 +1476,6 @@ const TransactionResFinalization = (typeof FinalizationRegistry === 'undefined')
1490
1476
  const TransferSTXArgsFinalization = (typeof FinalizationRegistry === 'undefined')
1491
1477
  ? { register: () => {}, unregister: () => {} }
1492
1478
  : new FinalizationRegistry(ptr => wasm.__wbg_transferstxargs_free(ptr >>> 0, 1));
1493
- const TxArgsFinalization = (typeof FinalizationRegistry === 'undefined')
1494
- ? { register: () => {}, unregister: () => {} }
1495
- : new FinalizationRegistry(ptr => wasm.__wbg_txargs_free(ptr >>> 0, 1));
1496
1479
 
1497
1480
  function addToExternrefTable0(obj) {
1498
1481
  const idx = wasm.__externref_table_alloc();
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacks/clarinet-sdk-wasm",
3
3
  "description": "The core lib that powers @stacks/clarinet-sdk",
4
- "version": "3.25.0",
4
+ "version": "4.0.0",
5
5
  "license": "GPL-3.0",
6
6
  "repository": {
7
7
  "type": "git",