Seahorse is beta software. Many features are unimplemented and it's not production-ready.


Using Seahorse


The @instruction decorator

Converting a function to an instruction is as simple as adding the @instruction decorator.

def simple_instruction(signer: Signer):
  # ...

def more_complex_instruction(signer: Signer, data: u64):
  # ...

The parameters of an instruction can include both accounts and regular parameters. On the Rust/Anchor side, accounts are separated and put into an accounts context struct.

Inferred program accounts

In Solana, programs are a special type of accounts. When writing a Solana program, you need to pass in every account that gets used - programs included. Seahorse simplifies this by inferring the necessity of certain program accounts, so that you don't have to include them in your instruction params.

The following table summarizes which programs Seahorse infers

ProgramNeeded when...
SystemProgramInitializing accounts
SPL TokenProgramTransferring SPL tokens
SPL tokens