-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
46 changed files
with
1,108 additions
and
649 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
coverage.out | ||
ic/.dfx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,6 @@ import ( | |
"fmt" | ||
"io/ioutil" | ||
"log" | ||
|
||
"github.com/pegn/pegn-go" | ||
) | ||
|
||
func main() { | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# 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 | ||
|
||
```shell | ||
goic generate did {PATH_TO_DID} {NAME} | ||
``` | ||
|
||
```shell | ||
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** | ||
|
||
```shell | ||
goic generate remote {CANISTER_ID} {NAME} | ||
``` | ||
|
||
```shell | ||
goic generate remote ryjl3-tyaaa-aaaaa-aaaba-cai ledger --output=ledger.go --packageName=main | ||
go fmt ledger.go | ||
``` |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.