Skip to content

Commit 76f2c77

Browse files
committed
cli: add --json envelope to ntt solana token-authority
Lets parent processes consume the per-instance token_authority PDA without text-scraping stdout. Same { ok, command, data } envelope shape as the other --json-aware commands.
1 parent 6ca1b2d commit 76f2c77

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

cli/src/commands/solana.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import type { SolanaChains } from "@wormhole-foundation/sdk-solana";
2626

2727
import { colors } from "../colors.js";
2828
import { loadConfig, type Config } from "../deployments";
29+
import { emitResult } from "../output.js";
2930
import { validatePayerOption } from "../validation";
3031
import fs from "fs";
3132

@@ -94,6 +95,11 @@ export function createSolanaCommand(
9495
instance
9596
).tokenAuthority();
9697
console.log(tokenAuthority.toBase58());
98+
emitResult("solana token-authority", {
99+
programId: programId.toBase58(),
100+
instance: instance?.toBase58() ?? null,
101+
tokenAuthority: tokenAuthority.toBase58(),
102+
});
97103
}
98104
)
99105
.command(

0 commit comments

Comments
 (0)