Documentation ¶
Index ¶
- Variables
- type AccountAddress
- type AccountAuthenticator
- type AccountAuthenticatorEd25519
- type AccountAuthenticatorMultiEd25519
- type Change
- type Code
- type CollectionData
- type CollectionMutabilityConfig
- type ED25519Signature
- type EntryFunctionPayload
- type Event
- type JSONPayload
- type JSONSignature
- type JSONSigner
- type Module
- type ModuleBundlePayload
- type MultiAgent
- type MultiAgentSignature
- type MultiED25519Signature
- type PrivateKey
- type PropertyMap
- type PropertyValue
- type PublicKey
- type RawTransaction
- type RawTransactionWithData
- type ScriptPayload
- type Signature
- type Signer
- type SimpleMap
- type SingleSigner
- type Token
- type TokenData
- type TokenDataID
- type TokenDepositEvent
- type TokenID
- type TokenMutabilityConfig
- type TokenV2
- 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 TypeTagSigner
- type TypeTagStruct
- type TypeTagU128
- type TypeTagU64
- type TypeTagU8
- type TypeTagVector
- type Uint64
- 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
func (AccountAddress) ToHex ¶
func (addr AccountAddress) ToHex() 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 CollectionData ¶
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 PrivateKey ¶
type PrivateKey = ed25519.PrivateKey
type PropertyMap ¶
type PropertyMap struct {
Map SimpleMap `json:"map"`
}
type PropertyValue ¶
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 Signer ¶
type Signer interface {
Sign(tx *Transaction) *Transaction
}
type SimpleMap ¶
type SimpleMap struct { Data []struct { Key string `json:"key"` Value PropertyValue `json:"value"` } `json:"data"` }
type SingleSigner ¶
type SingleSigner struct { PrivateKey PublicKey AccountAddress }
func NewSingleSigner ¶
func NewSingleSigner(priv PrivateKey) SingleSigner
func (*SingleSigner) Sign ¶
func (s *SingleSigner) Sign(tx *Transaction) *Transaction
type Token ¶
type Token struct { ID TokenID `json:"id"` Amount Uint64 `json:"amount"` TokenProperties PropertyMap `json:"token_properties"` JSONProperties map[string]string `json:"-"` }
type TokenDataID ¶
type TokenDepositEvent ¶
type TokenID ¶
type TokenID struct { TokenDataID `json:"token_data_id"` PropertyVersion Uint64 `json:"property_version"` }
type TokenMutabilityConfig ¶
type TokenV2 ¶
type TokenV2 struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` URI string `json:"uri"` Standard string `json:"standard"` OwnerAddress string `json:"owner_address"` Amount Uint64 `json:"amount"` CollectionName string `json:"collection_name"` CreatorAddress string `json:"creator_address"` Maximum *Uint64 `json:"maximum"` Supply Uint64 `json:"supply"` PropertyVersionV1 Uint64 `json:"property_version_v1"` IsSoulboundV2 bool `json:"is_soulbound_v2"` }
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 TxArgU128 ¶
type TxArgU128 struct {
// BCS layout for "uint128": 16 bytes.
// Binary format in little-endian representation.
// For example,
// 18446744073709551615 = max uint64 = [ff, ff, ff, ff, ff, ff, ff, ff, 00, 00, 00, 00, 00, 00, 00, 00]
// 18446744073709551618 = max uint64 + 3 = [02, 00, 00, 00, 00, 00, 00, 00, 01, 00, 00, 00, 00, 00, 00, 00]
Lower, Higher uint64
}
type TxArgU8Vector ¶
type TxArgU8Vector struct {
Bytes []byte
}
func TxArgString ¶
func TxArgString(s string) TxArgU8Vector
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 TypeTagSigner ¶
type TypeTagSigner struct{}
func (TypeTagSigner) ToString ¶
func (t TypeTagSigner) 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 Uint64 ¶
type Uint64 uint64
Uint64 represents a uint64 value for JSON string format.
func (Uint64) MarshalJSON ¶
func (*Uint64) UnmarshalJSON ¶
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.