Skip to content

Commit 2e7ec73

Browse files
committed
Codama IDL + clients generation
1 parent a66990a commit 2e7ec73

29 files changed

+4548
-3
lines changed

Cargo.lock

Lines changed: 239 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ cargo-nightly:
2121
cargo $(nightly) $(ARGS)
2222

2323
generate-clients:
24-
@echo "No JavaScript clients to generate"
24+
pnpm --dir pinocchio/clients install --frozen-lockfile
25+
pnpm --dir pinocchio/clients run generate
2526

2627
audit:
2728
cargo audit \

pinocchio/clients/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# `pinocchio-associated-token-account-clients`
2+
3+
Pinocchio-specific crates and generated clients for Associated Token Account.
4+
5+
Generate IDL + clients from repo root:
6+
7+
```bash
8+
pnpm --dir pinocchio/clients install
9+
pnpm --dir pinocchio/clients run generate
10+
```

pinocchio/clients/codama.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"idl": "../interface/idl.json",
3+
"before": [
4+
{
5+
"from": "codama#updateProgramsVisitor",
6+
"args": [
7+
{
8+
"pinocchioAssociatedTokenAccountInterface": {
9+
"name": "associatedTokenAccount"
10+
}
11+
}
12+
]
13+
}
14+
],
15+
"scripts": {
16+
"js": {
17+
"from": "@codama/renderers-js",
18+
"args": ["js"]
19+
},
20+
"rust": {
21+
"from": "@codama/renderers-rust",
22+
"args": ["rust", { "formatCode": true }]
23+
}
24+
}
25+
}

pinocchio/clients/js/package.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "js-client",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "src/index.ts",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"keywords": [],
10+
"author": "",
11+
"peerDependencies": {
12+
"@solana/kit": "^6.1.0"
13+
},
14+
"dependencies": {
15+
"@solana/program-client-core": "^6.1.0"
16+
}
17+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/**
2+
* This code was AUTOGENERATED using the Codama library.
3+
* Please DO NOT EDIT THIS FILE, instead use visitors
4+
* to add features, then rerun Codama to update it.
5+
*
6+
* @see https://github.com/codama-idl/codama
7+
*/
8+
9+
export * from "./instructions";
10+
export * from "./programs";

0 commit comments

Comments
 (0)