@taqueria/plugin-contract-types 0.21.14 → 0.21.23
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/README.md +9 -4
- package/_readme.eta +9 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -12,7 +12,8 @@ Benefits of using generated types:
|
|
|
12
12
|
|
|
13
13
|
## Requirements
|
|
14
14
|
|
|
15
|
-
-
|
|
15
|
+
- Taqueria v0.20.2 or later
|
|
16
|
+
- Node JS v16.17.1 or later
|
|
16
17
|
- Taquito v11.2 or later (optional)
|
|
17
18
|
|
|
18
19
|
## Installation
|
|
@@ -24,13 +25,13 @@ taq install @taqueria/plugin-contract-types
|
|
|
24
25
|
|
|
25
26
|
## Configuration
|
|
26
27
|
|
|
27
|
-
This plugin will look for Michelson files according to the `artifactsDir` configured in
|
|
28
|
+
This plugin will look for Michelson files according to the `artifactsDir` configured in `.taq/config.json`. By default, this value is `artifacts` but can be changed as needed
|
|
28
29
|
|
|
29
30
|
## Usage
|
|
30
31
|
|
|
31
32
|
The plugin provides a single command to Taqueria: `taq generate types`
|
|
32
33
|
|
|
33
|
-
This will look for `.tz` files in the
|
|
34
|
+
This will look for `.tz` files in the `artifacts` directory and will generate a series of related `.ts` files in the `/types` directory (default folder created to store the generated files). These files export type definitions for each method which can then be used by Taquito and your IDE
|
|
34
35
|
|
|
35
36
|
### The `generate types` Command
|
|
36
37
|
|
|
@@ -65,7 +66,7 @@ The `generate types` command will accept the following optional parameters:
|
|
|
65
66
|
The generated TS types can be used in a Taquito project which provides an improved developing experience, and simplifies the way types are provided to Taquito method calls. Some examples of how these changes are put into use are detailed below
|
|
66
67
|
|
|
67
68
|
> ### :page_with_curl: Note
|
|
68
|
-
> You can view the full example in the `example-usage.ts` file on Github: [
|
|
69
|
+
> You can view the full example in the `example-usage.ts` file on Github: [example-usage.ts](https://github.com/ecadlabs/taqueria/blob/main/taqueria-plugin-contract-types/example/example-usage.ts)
|
|
69
70
|
|
|
70
71
|
### Calling the `.at` Method of a Contract
|
|
71
72
|
|
|
@@ -123,3 +124,7 @@ Now, the contract type provides the default storage type:
|
|
|
123
124
|
const contract = await Tezos.contract.at<TestContract>(`KT123...`);
|
|
124
125
|
const storage = await contract.storage();
|
|
125
126
|
```
|
|
127
|
+
|
|
128
|
+
## Plugin Architecture
|
|
129
|
+
|
|
130
|
+
This is a plugin developed for Taqueria built on NodeJS using the Taqueria Node SDK and distributed via NPM
|
package/_readme.eta
CHANGED
|
@@ -14,7 +14,8 @@ Benefits of using generated types:
|
|
|
14
14
|
|
|
15
15
|
## Requirements
|
|
16
16
|
|
|
17
|
-
-
|
|
17
|
+
- Taqueria v0.20.2 or later
|
|
18
|
+
- Node JS v16.17.1 or later
|
|
18
19
|
- Taquito v11.2 or later (optional)
|
|
19
20
|
|
|
20
21
|
## Installation
|
|
@@ -26,13 +27,13 @@ taq install @taqueria/plugin-contract-types
|
|
|
26
27
|
|
|
27
28
|
## Configuration
|
|
28
29
|
|
|
29
|
-
This plugin will look for Michelson files according to the `artifactsDir` configured in
|
|
30
|
+
This plugin will look for Michelson files according to the `artifactsDir` configured in `.taq/config.json`. By default, this value is `artifacts` but can be changed as needed
|
|
30
31
|
|
|
31
32
|
## Usage
|
|
32
33
|
|
|
33
34
|
The plugin provides a single command to Taqueria: `taq generate types`
|
|
34
35
|
|
|
35
|
-
This will look for `.tz` files in the
|
|
36
|
+
This will look for `.tz` files in the `artifacts` directory and will generate a series of related `.ts` files in the `/types` directory (default folder created to store the generated files). These files export type definitions for each method which can then be used by Taquito and your IDE
|
|
36
37
|
|
|
37
38
|
### The `generate types` Command
|
|
38
39
|
|
|
@@ -67,7 +68,7 @@ The `generate types` command will accept the following optional parameters:
|
|
|
67
68
|
The generated TS types can be used in a Taquito project which provides an improved developing experience, and simplifies the way types are provided to Taquito method calls. Some examples of how these changes are put into use are detailed below
|
|
68
69
|
|
|
69
70
|
<%~ it.noteOpenAdmonition %>
|
|
70
|
-
You can view the full example in the `example-usage.ts` file on Github: [
|
|
71
|
+
You can view the full example in the `example-usage.ts` file on Github: [example-usage.ts](https://github.com/ecadlabs/taqueria/blob/main/taqueria-plugin-contract-types/example/example-usage.ts)
|
|
71
72
|
<%= it.closeAdmonition %>
|
|
72
73
|
|
|
73
74
|
### Calling the `.at` Method of a Contract
|
|
@@ -126,3 +127,7 @@ Now, the contract type provides the default storage type:
|
|
|
126
127
|
const contract = await Tezos.contract.at<TestContract>(`KT123...`);
|
|
127
128
|
const storage = await contract.storage();
|
|
128
129
|
```
|
|
130
|
+
|
|
131
|
+
## Plugin Architecture
|
|
132
|
+
|
|
133
|
+
This is a plugin developed for Taqueria built on NodeJS using the Taqueria Node SDK and distributed via NPM
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taqueria/plugin-contract-types",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.23",
|
|
4
4
|
"main": "index.cjs",
|
|
5
5
|
"module": "index.js",
|
|
6
6
|
"source": "index.ts",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"typescript": "^4.7.2"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@taqueria/node-sdk": "^0.21.
|
|
38
|
+
"@taqueria/node-sdk": "^0.21.23",
|
|
39
39
|
"@taquito/michel-codec": "^13.0.1",
|
|
40
40
|
"@taquito/signer": "^13.0.1",
|
|
41
41
|
"@taquito/taquito": "^13.0.1",
|