Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 915 Bytes

README.md

File metadata and controls

40 lines (29 loc) · 915 Bytes

Agent CLI

go install github.com/aviate-labs/agent-go/cmd/goic
goic version
# 0.0.1

Generating Agents

To generate an agent you will need the .did file. Some interface specifications can be fetched directly from a canister through the __get_candid_interface_tmp_hack endpoint (this gets exposed by default w/ Motoko). Based on this file an agent can be generated.

Options

The generate command can be customized by defining a custom output or packageName flag.

Fetch The DID

goic generate did {PATH_TO_DID} {NAME}
goic fetch ryjl3-tyaaa-aaaaa-aaaba-cai --output=ledger.did
goic generate did ledger.did ledger --output=ledger.go --packageName=main
go fmt ledger.go

OR

goic generate remote {CANISTER_ID} {NAME}
goic generate remote ryjl3-tyaaa-aaaaa-aaaba-cai ledger --output=ledger.go --packageName=main
go fmt ledger.go