Skip to content

Instantly share code, notes, and snippets.

View mralbertchen's full-sized avatar

Albert Chen mralbertchen

View GitHub Profile
@mralbertchen
mralbertchen / sdk.ts
Created November 16, 2022 19:01
Fit ixs into txs
getTransactionBaseSize(signers = 1) {
return (
3 + // compact array length encoding for signatures (compact-u16, 1-3 bytes)
64 * signers + // number of signatures
3 + // message header
32 // blockhash
);
}
getInstructionByteSize(

Keybase proof

I hereby claim:

  • I am mralbertchen on github.
  • I am mralbertchen (https://keybase.io/mralbertchen) on keybase.
  • I have a public key ASDqjoyhtvJ3R_Ftam_siPPfsuyHO6Ou97cbpoZ6TOq_xAo

To claim this, I am signing this object: