@stacks/clarinet-sdk 3.13.0 → 3.14.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.
@@ -6,6 +6,6 @@ export type Simnet = {
6
6
  [K in keyof SDK]: K extends "callReadOnlyFn" | "callPublicFn" | "callPrivateFn" ? CallFn : K extends "execute" ? Execute : K extends "runSnippet" ? RunSnippet : K extends "deployContract" ? DeployContract : K extends "transferSTX" ? TransferSTX : K extends "mineBlock" ? MineBlock : K extends "getDataVar" ? GetDataVar : K extends "getMapEntry" ? GetMapEntry : SDK[K];
7
7
  };
8
8
  export declare function getSessionProxy(): {
9
- get(session: SDK, prop: keyof SDK, receiver: any): string | number | CallFn | DeployContract | TransferSTX | MineBlock | GetMapEntry | ((cwd: string, manifest_path: string) => Promise<void>) | ((include_boot_contracts: boolean, boot_contracts_path: string) => import("@stacks/clarinet-sdk-wasm").SessionReport) | ((count?: number | null) => number) | ((cost_field: string) => void) | ((addresses: string[]) => void) | ((token: string, recipient: string, amount: bigint) => string) | ((recipient: string, amount: bigint) => string);
9
+ get(session: SDK, prop: keyof SDK, receiver: any): string | number | CallFn | DeployContract | TransferSTX | MineBlock | GetMapEntry | ((include_boot_contracts: boolean, boot_contracts_path: string) => import("@stacks/clarinet-sdk-wasm").SessionReport) | ((cost_field: string) => void) | ((cwd: string, manifest_path: string) => Promise<void>) | ((count?: number | null) => number) | ((token: string, recipient: string, amount: bigint) => string) | ((recipient: string, amount: bigint) => string) | ((addresses: string[]) => void);
10
10
  };
11
11
  export {};
@@ -6,6 +6,6 @@ export type Simnet = {
6
6
  [K in keyof SDK]: K extends "callReadOnlyFn" | "callPublicFn" | "callPrivateFn" ? CallFn : K extends "execute" ? Execute : K extends "runSnippet" ? RunSnippet : K extends "deployContract" ? DeployContract : K extends "transferSTX" ? TransferSTX : K extends "mineBlock" ? MineBlock : K extends "getDataVar" ? GetDataVar : K extends "getMapEntry" ? GetMapEntry : SDK[K];
7
7
  };
8
8
  export declare function getSessionProxy(): {
9
- get(session: SDK, prop: keyof SDK, receiver: any): string | number | CallFn | DeployContract | TransferSTX | MineBlock | GetMapEntry | ((cwd: string, manifest_path: string) => Promise<void>) | ((include_boot_contracts: boolean, boot_contracts_path: string) => import("@stacks/clarinet-sdk-wasm").SessionReport) | ((count?: number | null) => number) | ((cost_field: string) => void) | ((addresses: string[]) => void) | ((token: string, recipient: string, amount: bigint) => string) | ((recipient: string, amount: bigint) => string);
9
+ get(session: SDK, prop: keyof SDK, receiver: any): string | number | CallFn | DeployContract | TransferSTX | MineBlock | GetMapEntry | ((include_boot_contracts: boolean, boot_contracts_path: string) => import("@stacks/clarinet-sdk-wasm").SessionReport) | ((cost_field: string) => void) | ((cwd: string, manifest_path: string) => Promise<void>) | ((count?: number | null) => number) | ((token: string, recipient: string, amount: bigint) => string) | ((recipient: string, amount: bigint) => string) | ((addresses: string[]) => void);
10
10
  };
11
11
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stacks/clarinet-sdk",
3
- "version": "3.13.0",
3
+ "version": "3.14.0",
4
4
  "author": "Stacks Labs",
5
5
  "description": "A SDK to interact with Clarity Smart Contracts in node.js",
6
6
  "homepage": "https://stackslabs.com/clarinet",
@@ -58,7 +58,7 @@
58
58
  "license": "GPL-3.0",
59
59
  "readme": "./README.md",
60
60
  "dependencies": {
61
- "@stacks/clarinet-sdk-wasm": "3.13.0",
61
+ "@stacks/clarinet-sdk-wasm": "3.14.0",
62
62
  "@stacks/transactions": "^7.0.6",
63
63
  "kolorist": "^1.8.0",
64
64
  "prompts": "^2.4.2",
@@ -313,7 +313,7 @@ expect.extend({
313
313
  };
314
314
  },
315
315
 
316
- toBeBuff(actual: unknown, expectedRaw: Uint8Array) {
316
+ toBeBuff(actual: unknown, expectedRaw: Uint8Array | string) {
317
317
  const expectedType = ClarityType.Buffer;
318
318
  try {
319
319
  const isCV = checkCVType(actual, expectedType, this.isNot);
@@ -322,7 +322,7 @@ expect.extend({
322
322
  return errorToAssertionResult.call(this, e);
323
323
  }
324
324
 
325
- const expected = Cl.buffer(expectedRaw);
325
+ const expected = expectedRaw instanceof Uint8Array ? Cl.buffer(expectedRaw) : Cl.bufferFromHex(expectedRaw);
326
326
  return {
327
327
  pass: this.equals(actual, expected, undefined, true),
328
328
  // note: throw a simple message and rely on `actual` and `expected` to display the diff
@@ -16,7 +16,8 @@ interface ClarityValuesMatchers<R = unknown> {
16
16
  toBeAscii(expected: string): R;
17
17
  toBeUtf8(expected: string): R;
18
18
  toBePrincipal(expected: string): R;
19
- toBeBuff(expected: Uint8Array): R;
19
+ /** Validate that a BufferCV is equal to the expected Uint8Array or hex string */
20
+ toBeBuff(expected: Uint8Array | string): R;
20
21
 
21
22
  toBeList(expected: ExpectStatic[] | ClarityValue[]): R;
22
23
  toBeTuple(expected: Record<string, ExpectStatic | ClarityValue>): R;