1.11.0 • Published 30 days ago

@kadena/pactjs-cli v1.11.0

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
30 days ago

@kadena/pactjs-cli

CLI tool accompanying @kadena/pactjs-core and @kadena/pactjs-client to generate TypeScript definitions and Pact client

generate

Generate client based on a contract

ParameterDescriptionRequiredDefault value
-c, --cleanClean existing generated filesNo
-i, --caps-interfaceCustom name for the interface of the caps. Can be used to create a type definition with a limited set of capabilities.No
-f, --fileGenerate d.ts from Pact contract fileIf --contract is ommitted
--contractGenerate d.ts from Pact contract from the blockchainIf --file is ommitted
--apiThe API to use for retrieving the contract (e.g. https://api.chainweb.com/chainweb/0.0/mainnet01/chain/8/pact)When --contract is provided
--chainThe chainId to retrieve the contract fromWhen --contract is provided0
--networkThe networkId to retrieve the contract from (e.g. testnet)When --contract is providedmainnet

Generate from file

pactjs contract-generate --file ./myContract.pact

Generate from chain

pactjs contract-generate --contract free.coin --api https://api.testnet.chainweb.com/chainweb/0.0/testnet04/chain/1/pact --chain 1 --network testnet

retrieve-contract

Retrieve a contract from an API using a /local call

ParameterDescriptionRequiredDefault value
-m --moduleThe module you want to retrieve (e.g. "coin")Yes
-o, --outFile to write the contract to (e.g. ./myContract.pact)Yes
-a, --apiAPI to fetch the contract from (e.g. https://api.chainweb.com/chainweb/0.0/mainnet01/chain/8/pact)Yeshttps://api.chainweb.com
-n, --networkNetwork to retrieve from (e.g. testnet)Nomainnet

Retrieve a contract from chain

pactjs retrieve-contract --out ./myContract.pact --module coin --api https://api.chainweb.com/chainweb/0.0/mainnet01/chain/8/pact

template-generate

Generate statically typed generators for templates

ParameterDescriptionRequiredDefault value
-c, cleanClean existing templateNo
-f, --fileFile or directory to use to generate the clientYes
-o, --outOutput file/directory to place the generated clientYes

Generate a client from a template

pactjs template-generate --file ./contractDir --out ./myContract.pact
1.11.0

30 days ago

1.10.1

2 months ago

1.9.0

2 months ago

1.8.1

3 months ago

1.8.0

4 months ago

1.7.0

5 months ago

1.6.4

5 months ago

1.2.0

8 months ago

1.0.0

9 months ago

1.6.3

6 months ago

1.6.1

6 months ago

1.5.0

7 months ago

1.4.0

8 months ago

1.3.0

8 months ago

1.0.0-alpha.7

10 months ago

1.0.0-alpha.6

10 months ago

1.0.0-alpha.5

10 months ago

1.0.0-alpha.4

10 months ago

1.0.0-alpha.3

10 months ago

1.0.0-alpha.1

10 months ago

0.1.3

10 months ago

0.1.5

10 months ago

0.1.0

11 months ago

0.1.2

11 months ago

0.1.1

11 months ago

0.0.10

1 year ago

0.0.11

1 year ago

0.0.12

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.5

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago