Now you can write solana programs in Typescript
poseidon is a transpiler that helps you to convert your Typescript solana programs to anchor. Which is especially convenient for people who are just getting started with solana.
Make sure you have Rust and Cargo installed
Clone the repository:
git clone https://github.com/Turbin3/poseidon
Navigate to the project directory:
cd poseidon
Build poseidon:
cargo build --release
This will create a binary named poseidon in the target/release directory. You can copy the binary to a location in your PATH for easier access.
poseidon --input "input.ts" --output "output.rs"
Check out examples in the repo to learn how to write Poseidon Typescript which can be transpiled to anchor programs. There are vote, vault and escrow(.ts files and their tranpiled .rs files)
Go to docs/src/tutorial.md to learn how to write your first Solana program in TypeScript using Poseidon and Anchor!
For more examples, check out the examples directory. You’ll find examples of vote, vault, and escrow programs in both TypeScript and the corresponding Rust programs transpiled by Poseidon.