Versions in this module Expand all Collapse all v1 v1.1.1 Sep 14, 2021 Changes in this version + var ErrAccountFailedToBase58Decode = errors.New("failed to base58 decode") + var ErrAccountFailedToHexDecode = errors.New("failed to hex decode") + var ErrAccountPrivateKeyLengthMismatch = errors.New("key length mismatch") + var ErrTransactionAddNotNecessarySignatures = errors.New("add not necessary signatures") + func CreateRawTransaction(param CreateRawTransactionParam) ([]byte, error) + type Account struct + PrivateKey ed25519.PrivateKey + PublicKey common.PublicKey + func AccountFromBase58(key string) (Account, error) + func AccountFromBytes(key []byte) (Account, error) + func AccountFromHex(key string) (Account, error) + func AccountFromPrivateKeyBytes(privateKey []byte) Account + func NewAccount() Account + func (a Account) Sign(message []byte) []byte + type AccountMeta struct + IsSigner bool + IsWritable bool + PubKey common.PublicKey + type CompiledInstruction struct + Accounts []int + Data []byte + ProgramIDIndex int + type CreateRawTransactionParam struct + FeePayer common.PublicKey + Instructions []Instruction + RecentBlockHash string + Signers []Account + type Instruction struct + Accounts []AccountMeta + Data []byte + ProgramID common.PublicKey + type Message struct + Accounts []common.PublicKey + Header MessageHeader + Instructions []CompiledInstruction + RecentBlockHash string + func MessageDeserialize(messageData []byte) (Message, error) + func MustMessageDeserialize(messageData []byte) Message + func NewMessage(feePayer common.PublicKey, instructions []Instruction, recentBlockHash string) Message + func (m *Message) DecompileInstructions() []Instruction + func (m *Message) Serialize() ([]byte, error) + type MessageHeader struct + NumReadonlySignedAccounts uint8 + NumReadonlyUnsignedAccounts uint8 + NumRequireSignatures uint8 + type Signature []byte + type Transaction struct + Message Message + Signatures []Signature + func CreateTransaction(message Message, signaturePairs map[common.PublicKey]Signature) (Transaction, error) + func MustTransactionDeserialize(data []byte) Transaction + func NewTransaction(message Message, signers []Account) (Transaction, error) + func TransactionDeserialize(tx []byte) (Transaction, error) + func (tx *Transaction) AddSignature(sig []byte) error + func (tx *Transaction) Serialize() ([]byte, error) v1.0.0 Jul 27, 2021