https://github.com/yankeguo-deprecated/cardanocli
a Golang wrapper for executing cardano-cli commands
https://github.com/yankeguo-deprecated/cardanocli
Last synced: about 2 months ago
JSON representation
a Golang wrapper for executing cardano-cli commands
- Host: GitHub
- URL: https://github.com/yankeguo-deprecated/cardanocli
- Owner: yankeguo-deprecated
- License: mit
- Created: 2021-03-07T00:47:57.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-03-22T03:33:45.000Z (about 4 years ago)
- Last Synced: 2025-02-14T16:59:15.472Z (3 months ago)
- Language: Go
- Size: 12.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cardanocli
a Golang wrapper for executing cardano-cli commands
## Disclaimer
`cardano-cli` command line arguments and output formats are subjected to change, always use fixed version of `cardano-cli`.
USE THIS LIBRARY AT YOUR OWN RISK.
## Usage
```golang
package mainimport (
"go.guoyk.net/cardanocli"
)func main() {
cli := cardanocli.New()
cli.SocketPath = "/path/to/cardano-node/node.socket"// example: get policy id from policy script
{
var policyID string
// cardano-cli transaction policyid --script-file /path/to/policy.script
err := cli.Cmd().Transaction().
Policyid().
OptScriptFile("/path/to/policy.script").
Run(cardanocli.CollectStdout(&policyID))
if err != nil {
panic(err)
}
}
}
```## Credits
Guo Y.K., MIT License
## Donation
Send AT LEAST 5 ADA to `addr1vycaedgwweaal9vsh04e7l09p34x3u2wqq2tpm6ld4rc2jgkvh0yx` and get you `YAUT`.
See https://yautoken.com