Documentation ¶
Index ¶
- Variables
- func CreateRawTransaction(param CreateRawTransactionParam) ([]byte, error)
- type Account
- type AccountMeta
- type CompiledInstruction
- type CreateRawTransactionParam
- type Instruction
- type Message
- type MessageHeader
- type Signature
- type Transaction
- 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)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAccountFailedToBase58Decode = errors.New("failed to base58 decode") ErrAccountFailedToHexDecode = errors.New("failed to hex decode") ErrAccountPrivateKeyLengthMismatch = errors.New("key length mismatch") )
View Source
var (
ErrTransactionAddNotNecessarySignatures = errors.New("add not necessary signatures")
)
Functions ¶
func CreateRawTransaction ¶
func CreateRawTransaction(param CreateRawTransactionParam) ([]byte, error)
Types ¶
type Account ¶
type Account struct { PublicKey common.PublicKey PrivateKey ed25519.PrivateKey }
func AccountFromBase58 ¶
AccountFromBase58 generate a account by base58 private key
func AccountFromBytes ¶
AccountFromBytes generate a account by bytes private key
func AccountFromHex ¶
AccountFromHex generate a account by hex private key
func AccountFromPrivateKeyBytes ¶
AccountFromPrivateKeyBytes DEPRECATED, use AccountFromBytes instead. it will be removed in v2.0.0
func NewAccount ¶
func NewAccount() Account
type AccountMeta ¶
type CompiledInstruction ¶
type CreateRawTransactionParam ¶
type CreateRawTransactionParam struct { Instructions []Instruction Signers []Account FeePayer common.PublicKey RecentBlockHash string }
type Instruction ¶
type Instruction struct { ProgramID common.PublicKey Accounts []AccountMeta Data []byte }
type Message ¶
type Message struct { Header MessageHeader Accounts []common.PublicKey RecentBlockHash string Instructions []CompiledInstruction }
func MessageDeserialize ¶
func MustMessageDeserialize ¶
func NewMessage ¶
func NewMessage(feePayer common.PublicKey, instructions []Instruction, recentBlockHash string) Message
func (*Message) DecompileInstructions ¶
func (m *Message) DecompileInstructions() []Instruction
type MessageHeader ¶
type Transaction ¶
func CreateTransaction ¶
func MustTransactionDeserialize ¶
func MustTransactionDeserialize(data []byte) Transaction
func NewTransaction ¶
func NewTransaction(message Message, signers []Account) (Transaction, error)
func TransactionDeserialize ¶
func TransactionDeserialize(tx []byte) (Transaction, error)
func (*Transaction) AddSignature ¶
func (tx *Transaction) AddSignature(sig []byte) error
func (*Transaction) Serialize ¶
func (tx *Transaction) Serialize() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.