Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hirosystems/clarinet-sdk-wasm

Package Overview
Dependencies
Maintainers
4
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hirosystems/clarinet-sdk-wasm - npm Package Compare versions

Comparing version 2.6.0 to 2.7.0-beta1

131

clarinet_sdk.d.ts
/* tslint:disable */
/* eslint-disable */
type EpochString = "2.0" | "2.05" | "2.1" | "2.2" | "2.3" | "2.4" | "2.5" | "3.0"
type Atom = {
Atom: String;
};
type AtomValue = {
AtomValue: any;
};
type List = {
List: Expression[];
};
type LiteralValue = {
LiteralValue: any;
};
type Field = {
Field: any;
};
type TraitReference = {
TraitReference: any;
};
type ExpressionType = Atom | AtomValue | List | LiteralValue | Field | TraitReference;
type Span = {
start_line: number;
start_column: number;
end_line: number;
end_column: number;
};
type Expression = {
expr: ExpressionType;
id: number;
span: Span;
};
type IContractAST = {
contract_identifier: any;
pre_expressions: any[];
expressions: Expression[];
top_level_expression_sorting: number[];
referenced_traits: Map<any, any>;
implemented_traits: any[];
};
type ContractInterfaceFunctionAccess = "private" | "public" | "read_only";
type ContractInterfaceTupleEntryType = { name: string; type: ContractInterfaceAtomType };
type ContractInterfaceAtomType =
| "none"
| "int128"
| "uint128"
| "bool"
| "principal"
| { buffer: { length: number } }
| { "string-utf8": { length: number } }
| { "string-ascii": { length: number } }
| { tuple: ContractInterfaceTupleEntryType[] }
| { optional: ContractInterfaceAtomType }
| { response: { ok: ContractInterfaceAtomType; error: ContractInterfaceAtomType } }
| { list: { type: ContractInterfaceAtomType; length: number } }
| "trait_reference";
type ContractInterfaceFunctionArg = { name: string; type: ContractInterfaceAtomType };
type ContractInterfaceFunctionOutput = { type: ContractInterfaceAtomType };
type ContractInterfaceFunction = {
name: string;
access: ContractInterfaceFunctionAccess;
args: ContractInterfaceFunctionArg[];
outputs: ContractInterfaceFunctionOutput;
};
type ContractInterfaceVariableAccess = "constant" | "variable";
type ContractInterfaceVariable = {
name: string;
type: ContractInterfaceAtomType;
access: ContractInterfaceVariableAccess;
};
type ContractInterfaceMap = {
name: string;
key: ContractInterfaceAtomType;
value: ContractInterfaceAtomType;
};
type ContractInterfaceFungibleTokens = { name: string };
type ContractInterfaceNonFungibleTokens = { name: string; type: ContractInterfaceAtomType };
type StacksEpochId =
| "Epoch10"
| "Epoch20"
| "Epoch2_05"
| "Epoch21"
| "Epoch22"
| "Epoch23"
| "Epoch24"
| "Epoch25"
| "Epoch30";
type ClarityVersion = "Clarity1" | "Clarity2";
type IContractInterface = {
functions: ContractInterfaceFunction[];
variables: ContractInterfaceVariable[];
maps: ContractInterfaceMap[];
fungible_tokens: ContractInterfaceFungibleTokens[];
non_fungible_tokens: ContractInterfaceNonFungibleTokens[];
epoch: StacksEpochId;
clarity_version: ClarityVersion;
};
/**

@@ -50,2 +167,6 @@ */

/**
* @returns {Promise<void>}
*/
initEmtpySession(): Promise<void>;
/**
* @param {string} cwd

@@ -61,5 +182,5 @@ * @param {string} manifest_path

/**
* @returns {any}
* @returns {Map<string, IContractInterface>}
*/
getContractsInterfaces(): any;
getContractsInterfaces(): Map<string, IContractInterface>;
/**

@@ -72,5 +193,5 @@ * @param {string} contract

* @param {string} contract
* @returns {any}
* @returns {IContractAST}
*/
getContractAST(contract: string): any;
getContractAST(contract: string): IContractAST;
/**

@@ -77,0 +198,0 @@ * @returns {Map<string, Map<string, bigint>>}

19

clarinet_sdk.js

@@ -270,3 +270,3 @@ let imports = {};

}
function __wbg_adapter_174(arg0, arg1, arg2, arg3) {
function __wbg_adapter_175(arg0, arg1, arg2, arg3) {
wasm.wasm_bindgen__convert__closures__invoke2_mut__h2d78d70b7078fa90(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));

@@ -444,2 +444,9 @@ }

/**
* @returns {Promise<void>}
*/
initEmtpySession() {
const ret = wasm.sdk_initEmtpySession(this.__wbg_ptr);
return takeObject(ret);
}
/**
* @param {string} cwd

@@ -490,3 +497,3 @@ * @param {string} manifest_path

/**
* @returns {any}
* @returns {Map<string, IContractInterface>}
*/

@@ -532,3 +539,3 @@ getContractsInterfaces() {

* @param {string} contract
* @returns {any}
* @returns {IContractAST}
*/

@@ -1502,3 +1509,3 @@ getContractAST(contract) {

try {
return __wbg_adapter_174(a, state0.b, arg0, arg1);
return __wbg_adapter_175(a, state0.b, arg0, arg1);
} finally {

@@ -1597,4 +1604,4 @@ state0.a = a;

module.exports.__wbindgen_closure_wrapper2556 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 741, __wbg_adapter_44);
module.exports.__wbindgen_closure_wrapper2572 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 745, __wbg_adapter_44);
return addHeapObject(ret);

@@ -1601,0 +1608,0 @@ };

{
"name": "@hirosystems/clarinet-sdk-wasm",
"description": "The core lib that powers @hirosystems/clarinet-sdk",
"version": "2.6.0",
"version": "2.7.0-beta1",
"license": "GPL-3.0",

@@ -6,0 +6,0 @@ "repository": {

# Clarity SDK WASM
This package is built with wasm-pack.
It powers [@hirosystems/clarinet-sdk](https://www.npmjs.com/package/@hirosystems/clarinet-sdk).
It powers [@hirosystems/clarinet-sdk](https://npmjs.com/package/@hirosystems/clarinet-sdk) and
[@hirosystems/clarinet-sdk-browser](https://npmjs.com/package/@hirosystems/clarinet-sdk-browser).
## Release
The package is built twice with `wasm-pack` as it can't target `node` and `web` at the same time.
The following script will build for both target, it will also rename the package name for the
browser build.
```sh
node build.mjs
```
Once built, the packages can be released by running the following commands. Note that by default we
release with the beta tag.
## Contributing

@@ -13,4 +26,44 @@

**Build for node**
```sh
wasm-pack build --release --target=nodejs --scope hirosystems
wasm-pack build --release --scope hirosystems --out-dir pkg-node --target nodejs
```
**Build for the browser**
```sh
wasm-pack build --release --scope hirosystems --out-dir pkg-browser --target web
```
## Use the local version of the package
### NPM overrides
In 99% of the situations, your project don't directly depend on this package, but instead on
`@hirosystems/clarinet-sdk` or `@hirosystems/clarinet-sdk-browser`. If you want to use a local or
a different version of `@hirosystems/clarinet-sdk-wasm` or `@hirosystems/clarinet-sdk-wasm-browser`,
you can use the `overrides` setting in your package.json:
```json
"overrides": {
"@hirosystems/clarinet-sdk": {
"@hirosystems/clarinet-sdk-wasm": "file:/<absolue-path-to>/clarinet/components/clarinet-sdk-wasm/pkg-node"
}
}
```
Or for the browser:
```json
"overrides": {
"@hirosystems/clarinet-sdk-browser": {
"@hirosystems/clarinet-sdk-wasm-browser": "file:/<absolue-path-to>/clarinet/components/clarinet-sdk-wasm/pkg-browser"
}
}
```
### NPM link
The command `npm link` can be useful to run the unit tests in the `clarinet-sdk`.
See the contribution section of `@hirosystems/clarinet-sdk` (`../clarinet-sdk/README.md).

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc