Documentation ¶
Index ¶
- Variables
- type AccountAddress
- type AccountAuthenticator
- type AccountAuthenticatorEd25519
- type AccountAuthenticatorMultiEd25519
- type Change
- type Code
- type ED25519Signature
- type EntryFunctionPayload
- type Event
- type JSONPayload
- type JSONSignature
- type JSONSigner
- type Module
- type ModuleBundlePayload
- type MultiAgent
- type MultiAgentSignature
- type MultiED25519Signature
- type PublicKey
- type RawTransaction
- type RawTransactionWithData
- type ScriptPayload
- type Signature
- type Transaction
- func (t *Transaction) DecodeFromFullRawTxHex(s string) error
- func (t *Transaction) DecodeFromSigningMessageHex(s string) error
- func (t Transaction) Error() error
- func (t *Transaction) GetFullRawTx() ([]byte, error)
- func (t *Transaction) GetHash() (string, error)
- func (t *Transaction) GetSigningMessage() ([]byte, error)
- func (t *Transaction) SetAuthenticator(txAuth TransactionAuthenticator) *Transaction
- func (t *Transaction) SetAuthenticatorForSimulate(txAuth TransactionAuthenticator) *Transaction
- func (t *Transaction) SetChainID(chainID uint8) *Transaction
- func (t *Transaction) SetExpirationTimestampSecs(expirationTimestampSecs interface{}) *Transaction
- func (t *Transaction) SetGasUnitPrice(gasUnitPrice interface{}) *Transaction
- func (t *Transaction) SetMaxGasAmount(maxGasAmount interface{}) *Transaction
- func (t *Transaction) SetPayload(payload TransactionPayload) *Transaction
- func (t *Transaction) SetSecondarySigners(secondarySigners []AccountAddress) *Transaction
- func (t *Transaction) SetSender(sender string) *Transaction
- func (t *Transaction) SetSequenceNumber(seq interface{}) *Transaction
- type TransactionArgument
- type TransactionAuthenticator
- type TransactionAuthenticatorEd25519
- type TransactionAuthenticatorMultiAgent
- type TransactionAuthenticatorMultiEd25519
- type TransactionEnum
- type TransactionPayload
- type TxArgAddress
- type TxArgBool
- type TxArgU128
- type TxArgU64
- type TxArgU8
- type TxArgU8Vector
- type TypeTag
- type TypeTagAddress
- type TypeTagBool
- type TypeTagSinger
- type TypeTagStruct
- type TypeTagU128
- type TypeTagU64
- type TypeTagU8
- type TypeTagVector
- type UserTransaction
Constants ¶
This section is empty.
Variables ¶
View Source
var RawTransactionSalt = sha3.Sum256([]byte("APTOS::RawTransaction"))
"0xb5e97db07fa0bd0e5598aa3643a9bc6f6693bddc1a9fec9e674a461eaa00b193"
View Source
var RawTransactionWithDataSalt = sha3.Sum256([]byte("APTOS::RawTransactionWithData"))
"0x5efa3c4f02f83a0f4b2d69fc95c607cc02825cc4e7be536ef0992df050d9e67c"
View Source
var TransactionSalt = sha3.Sum256([]byte("APTOS::Transaction"))
Functions ¶
This section is empty.
Types ¶
type AccountAddress ¶
type AccountAddress [32]byte
func HexToAccountAddress ¶
func HexToAccountAddress(addr string) (AccountAddress, error)
func (AccountAddress) PrefixZeroTrimmedHex ¶
func (addr AccountAddress) PrefixZeroTrimmedHex() string
type AccountAuthenticator ¶
type AccountAuthenticator interface{}
type AccountAuthenticatorMultiEd25519 ¶
type AccountAuthenticatorMultiEd25519 struct { PublicKeyBytes []byte // for BCS serialization; p1_bytes | ... | pn_bytes | threshold SignatureBytes []byte // for BCS serialization; s1_bytes | ... | sn_bytes | bitmap PublicKeys []PublicKey `lcs:"-"` Threshold uint8 `lcs:"-"` Signatures []Signature `lcs:"-"` Bitmap [4]byte `lcs:"-"` }
func (AccountAuthenticatorMultiEd25519) SetBytes ¶
func (aa AccountAuthenticatorMultiEd25519) SetBytes() AccountAuthenticatorMultiEd25519
type Change ¶
type Change struct { Type string `json:"type"` StateKeyHash string `json:"state_key_hash"` Address string `json:"address"` Module string `json:"module"` Resource string `json:"resource"` Data struct { Handle string `json:"handle"` Key string `json:"key"` Value string `json:"value"` Bytecode string `json:"bytecode"` ABI interface{} `json:"abi"` Type string `json:"type"` Data map[string]interface{} `json:"data"` } `json:"data"` }
type Code ¶
type Code struct { Bytecode string `json:"bytecode"` ABI interface{} `json:"abi,omitempty"` }
type ED25519Signature ¶
type EntryFunctionPayload ¶
type JSONPayload ¶
type JSONPayload struct { Type string `json:"type"` TypeArguments []string `json:"type_arguments"` Arguments []interface{} `json:"arguments"` // ScriptPayload Code Code `json:"code,omitempty"` // ModuleBundlePayload Modules []Code `json:"modules,omitempty"` // EntryFunctionPayload Function string `json:"function,omitempty"` }
type JSONSignature ¶
type JSONSignature struct { Type string `json:"type"` ED25519Signature MultiED25519Signature MultiAgentSignature }
type JSONSigner ¶
type JSONSigner struct { Type string `json:"type"` ED25519Signature MultiED25519Signature }
type Module ¶
type Module struct { Address AccountAddress Name string }
type ModuleBundlePayload ¶
type ModuleBundlePayload struct { Modules []struct { Code []byte } }
type MultiAgent ¶
type MultiAgent struct { RawTransaction SecondarySigners []AccountAddress }
type MultiAgentSignature ¶
type MultiAgentSignature struct { Sender JSONSigner `json:"sender"` SecondarySignerAddresses []string `json:"secondary_signer_addresses"` SecondarySigners []JSONSigner `json:"secondary_signers"` }
type MultiED25519Signature ¶
type RawTransaction ¶
type RawTransaction struct { Sender AccountAddress SequenceNumber uint64 Payload TransactionPayload MaxGasAmount uint64 GasUnitPrice uint64 ExpirationTimestampSecs uint64 ChainID uint8 }
type RawTransactionWithData ¶
type RawTransactionWithData interface{}
type ScriptPayload ¶
type ScriptPayload struct { Code []byte TypeArguments []TypeTag Arguments []TransactionArgument }
type Transaction ¶
type Transaction struct { UserTransaction // contains filtered or unexported fields }
func (*Transaction) DecodeFromFullRawTxHex ¶
func (t *Transaction) DecodeFromFullRawTxHex(s string) error
func (*Transaction) DecodeFromSigningMessageHex ¶
func (t *Transaction) DecodeFromSigningMessageHex(s string) error
func (Transaction) Error ¶
func (t Transaction) Error() error
func (*Transaction) GetFullRawTx ¶
func (t *Transaction) GetFullRawTx() ([]byte, error)
func (*Transaction) GetHash ¶
func (t *Transaction) GetHash() (string, error)
func (*Transaction) GetSigningMessage ¶
func (t *Transaction) GetSigningMessage() ([]byte, error)
func (*Transaction) SetAuthenticator ¶
func (t *Transaction) SetAuthenticator(txAuth TransactionAuthenticator) *Transaction
func (*Transaction) SetAuthenticatorForSimulate ¶
func (t *Transaction) SetAuthenticatorForSimulate(txAuth TransactionAuthenticator) *Transaction
func (*Transaction) SetChainID ¶
func (t *Transaction) SetChainID(chainID uint8) *Transaction
func (*Transaction) SetExpirationTimestampSecs ¶
func (t *Transaction) SetExpirationTimestampSecs(expirationTimestampSecs interface{}) *Transaction
func (*Transaction) SetGasUnitPrice ¶
func (t *Transaction) SetGasUnitPrice(gasUnitPrice interface{}) *Transaction
func (*Transaction) SetMaxGasAmount ¶
func (t *Transaction) SetMaxGasAmount(maxGasAmount interface{}) *Transaction
func (*Transaction) SetPayload ¶
func (t *Transaction) SetPayload(payload TransactionPayload) *Transaction
func (*Transaction) SetSecondarySigners ¶
func (t *Transaction) SetSecondarySigners(secondarySigners []AccountAddress) *Transaction
func (*Transaction) SetSender ¶
func (t *Transaction) SetSender(sender string) *Transaction
func (*Transaction) SetSequenceNumber ¶
func (t *Transaction) SetSequenceNumber(seq interface{}) *Transaction
type TransactionArgument ¶
type TransactionArgument interface {
ToString() string
}
type TransactionAuthenticator ¶
type TransactionAuthenticator interface{}
type TransactionAuthenticatorMultiAgent ¶
type TransactionAuthenticatorMultiAgent struct { Sender AccountAuthenticator SecondarySignerAddresses []AccountAddress SecondarySigners []AccountAuthenticator }
type TransactionAuthenticatorMultiEd25519 ¶
type TransactionAuthenticatorMultiEd25519 struct { PublicKeyBytes []byte // for BCS serialization; p1_bytes | ... | pn_bytes | threshold SignatureBytes []byte // for BCS serialization; s1_bytes | ... | sn_bytes | bitmap PublicKeys []PublicKey `lcs:"-"` Threshold uint8 `lcs:"-"` Signatures []Signature `lcs:"-"` Bitmap [4]byte `lcs:"-"` }
func (TransactionAuthenticatorMultiEd25519) SetBytes ¶
func (txAuth TransactionAuthenticatorMultiEd25519) SetBytes() TransactionAuthenticatorMultiEd25519
type TransactionEnum ¶
type TransactionEnum interface{}
type TransactionPayload ¶
type TransactionPayload interface{}
type TxArgAddress ¶
type TxArgAddress struct {
Addr AccountAddress
}
func (TxArgAddress) ToString ¶
func (t TxArgAddress) ToString() string
type TxArgU8Vector ¶
type TxArgU8Vector struct {
Bytes []byte
}
func (TxArgU8Vector) ToString ¶
func (t TxArgU8Vector) ToString() string
type TypeTagAddress ¶
type TypeTagAddress struct{}
func (TypeTagAddress) ToString ¶
func (t TypeTagAddress) ToString() string
type TypeTagBool ¶
type TypeTagBool struct{}
func (TypeTagBool) ToString ¶
func (t TypeTagBool) ToString() string
type TypeTagSinger ¶
type TypeTagSinger struct{}
func (TypeTagSinger) ToString ¶
func (t TypeTagSinger) ToString() string
type TypeTagStruct ¶
type TypeTagStruct struct { Address AccountAddress Module string Name string TypeParams []TypeTag }
func (TypeTagStruct) ToString ¶
func (t TypeTagStruct) ToString() string
type TypeTagU128 ¶
type TypeTagU128 struct{}
func (TypeTagU128) ToString ¶
func (t TypeTagU128) ToString() string
type TypeTagU64 ¶
type TypeTagU64 struct{}
func (TypeTagU64) ToString ¶
func (t TypeTagU64) ToString() string
type TypeTagVector ¶
type TypeTagVector struct {
TypeTag
}
func (TypeTagVector) ToString ¶
func (t TypeTagVector) ToString() string
type UserTransaction ¶
type UserTransaction struct { RawTransaction Authenticator TransactionAuthenticator SecondarySigners []AccountAddress `lcs:"-"` }
func (UserTransaction) ForSimulate ¶
func (tx UserTransaction) ForSimulate() UserTransaction
func (UserTransaction) GetRawTransactionWithData ¶
func (tx UserTransaction) GetRawTransactionWithData() RawTransactionWithData
Click to show internal directories.
Click to hide internal directories.