clarigen-deno
0.5.0
Minor Changes
22a2ea7
Thanks @hstove! - Updates theClarityAbiNonFungibleToken
type to include a JS-native type.Fixed an issue when fetching variables in projects that use requirements.
0.4.16
Patch Changes
0.4.15
Patch Changes
b73538d
Thanks @hstove! - The documentation generator has been updated to include maps and variables!Previously, generated docs only included functions. Now, all maps and variables are included as well. Additionally, if you include comments directly above any maps, variables, and constants, those comments will be parsed and included in generated documentation.
0.4.14
Patch Changes
0.4.13
Patch Changes
e919d0a
Thanks @hstove! - You can now output multiple Clarigen generated type files. To do so, useoutputs
with an array of paths, instead ofoutput
. Example:[esm] outputs = ["src/clarigen.ts", "other/types.ts"]
You can also exclude specific contracts from having documentation generated. To do so, use the
exclude
(array) in yourClarigen.toml
. Each entry inexclude
should be the contract name - without file extensions or paths. Example:[docs] exclude = ["ft-trait"]
0.4.12
Patch Changes
0.4.11
Patch Changes
15a3f18
Thanks @hstove! - UpdatedcontractFactory
behavior - now all contract calls will have the full identifier - not just the contractName.
0.4.10
Patch Changes
0.4.9
Patch Changes
cc58a0f
Thanks @hstove! - Clarigen now outputs a “constants” property with each contract. This allows you to get the value for your constants from within the JS runtime.Example:
(define-constant my-const u1) (define-data-var my-var uint u2)
Both the constant and the variable’s initial value will be added to your contract’s type definitions. You can access it like:
console.log(contract.constants.myConst); // 1n console.log(contract.constants.myVar); // 2n
For variables, only the initial value (when the contract is deployed) is added to the contract’s types.
0.4.8
Patch Changes
588876f
Thanks @hstove! - Adds adeno.helper
configuration option. If present, a helper file will be generated, which includes helpful and common imports for Clarinet testing environments.
0.4.7
Patch Changes
7c9073e
Thanks @hstove! - Fixed an issue withclarigen --watch
, where the “file watcher” would be triggered multiple times in a row, where it should have been debounced.
fa41cd0
Thanks @hstove! - Fixed an issue with contracts that have an NFT where the “key” is a tuple type
0.4.6
Patch Changes
6636047
Thanks @hstove! - When generating files, contracts are sorted by name. This prevents git changes due to the indeterminant way that Clarinet outputs contract order
0.4.5
Patch Changes
89ce01f
Thanks @hstove! - - Fixed a bug where an error would throw if there was nooutput
in theesm
section of config- Added
chain.burnBlockHeight
- Added
0.4.4
Patch Changes
0.4.3
Patch Changes
Added a new
docs
command to the CLI! This will parse your contracts and automatically generate documentation for each of your contracts. Included in the docs are comments and rich type information.daaf0b5
Thanks @hstove! - Internally updated to Clarinet v1!
daaf0b5
Thanks @hstove! - Updated the types forrovOk
androvErr
to properly throw type errors if the function doesn’t return aresponse
0.4.2
Patch Changes
0.4.1
Patch Changes
0.4.0
Minor Changes
52d697e
Thanks @hstove! - Clarigen now comes with a fully-featured CLI, powered by Deno and Clarinet
Patch Changes
0.3.7
Patch Changes
- Updated type stubs to remove unnecessary code
0.3.6
Patch Changes
17abcf1
Thanks @hstove! - Big DX updates:- Contract calls support an “object” syntax
- Tuples are properly “camel-cased”
- Integer types are
number | bigint
now in all arguments
Object vs spread:
Updates the contract call syntax to support function arguments either as an object or an array. Previously, the only supported syntax was to “spread”.
For example, given the function:
(define-read-only (add (a uint) (b uint)))
The “spread” syntax is:
contract.add(1, 2);
Now you can also do:
contract.add({ a: 1, b: 2 });
Tuples are camel-ized
Previously, tuples (either as arguments or as results) were not properly camel-cased. Now, they are, which makes writing JS much easier.
Example function:
(define-read-only (merge-tuple (i { min-height: uint })) (merge i { max-height: u100000 }) )
Previously, the tuples in both arguments and results were not camel-case:
// old const result = contract.mergeTuple({ "min-height": 1n }); const max = result["max-height"];
Now it’s much cleaner:
const result = contract.mergeTuple({ minHeight: 1n }); const max = result.maxHeight;
Integer types for arguments
Previously, if a function had a
uint
orint
argument, you could already pass the argument asnumber | bigint
. However, if you had a type where the integer was within a type (like(list uint)
), you could only usebigint
.Now, you can use
number | bigint
within any argument type that has an integer.
0.3.5
Patch Changes
0.3.4
Patch Changes
0.3.3
Patch Changes
0.3.2
Patch Changes
0.3.1
Patch Changes
- b66cb90: Fixed - removed accounts from index file
0.3.0
Minor Changes
- 7cf0c8f: Updates generated files for Clarinet unit test environments
0.2.4
Patch Changes
- 4dd63d4: Fixed code not included in version
0.2.3
Patch Changes
- 8b4467e: Fixed camelCasing, adds variables to abi
0.2.2
Patch Changes
- c7273ce: Version bump to trigger deno push
0.2.1
Patch Changes
- 0acb708: Changed the outputted file from CLI from ‘single.ts’ to ‘index.ts’
0.2.0
Minor Changes
185f6db: First version:
- CLI to generate types
- Type-friendly test runner