Documentation ¶
Index ¶
- Constants
- type Tag
- type Transaction
- func (t *Transaction) AddTag(name string, value string) error
- func (t *Transaction) Data() string
- func (t *Transaction) Hash() string
- func (t *Transaction) ID() []byte
- func (t *Transaction) LastTx() string
- func (t *Transaction) MarshalJSON() ([]byte, error)
- func (t *Transaction) Owner() string
- func (t *Transaction) Quantity() string
- func (t *Transaction) RawData() []byte
- func (t *Transaction) RawTags() []Tag
- func (t *Transaction) Reward() string
- func (t *Transaction) SetID(id []byte)
- func (t *Transaction) Sign(w arweave_go.WalletSigner) (*Transaction, error)
- func (t *Transaction) Signature() string
- func (t *Transaction) Tags() ([]Tag, error)
- func (t *Transaction) Target() string
- func (t *Transaction) UnmarshalJSON(input []byte) error
- type TransactionNew
- type TransactionV2
- func (t *TransactionV2) AddTag(name string, value string) error
- func (t *TransactionV2) Data() string
- func (t *TransactionV2) Format() int
- func (t *TransactionV2) Hash() string
- func (t *TransactionV2) ID() []byte
- func (t *TransactionV2) LastTx() string
- func (t *TransactionV2) MarshalJSON() ([]byte, error)
- func (t *TransactionV2) Owner() string
- func (t *TransactionV2) Quantity() string
- func (t *TransactionV2) RawData() []byte
- func (t *TransactionV2) RawTags() []Tag
- func (t *TransactionV2) Reward() string
- func (t *TransactionV2) SetID(id []byte)
- func (t *TransactionV2) Sign(w arweave_go.WalletSigner) (*TransactionV2, error)
- func (t *TransactionV2) Signature() string
- func (t *TransactionV2) Tags() ([]Tag, error)
- func (t *TransactionV2) Target() string
- func (t *TransactionV2) Txid() string
- func (t *TransactionV2) UnmarshalJSON(input []byte) error
Constants ¶
const ( SHA256 = iota Sha384 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
Transaction struct
func NewTransaction ¶
func NewTransaction(lastTx string, owner *big.Int, quantity string, target string, data []byte, reward string) *Transaction
NewTransaction creates a brand new transaction struct
func (*Transaction) AddTag ¶
func (t *Transaction) AddTag(name string, value string) error
AddTag adds a new tag to the transaction
func (*Transaction) Data ¶
func (t *Transaction) Data() string
Data returns the data of the transaction
func (*Transaction) Hash ¶
func (t *Transaction) Hash() string
Hash returns the base64 RawURLEncoding of the transaction hash
func (*Transaction) ID ¶
func (t *Transaction) ID() []byte
ID returns the id of the transaction which is the SHA256 of the signature
func (*Transaction) LastTx ¶
func (t *Transaction) LastTx() string
LastTx returns the last transaction of the account
func (*Transaction) MarshalJSON ¶
func (t *Transaction) MarshalJSON() ([]byte, error)
MarshalJSON marshals as JSON
func (*Transaction) Owner ¶
func (t *Transaction) Owner() string
Owner returns the Owner of the transaction
func (*Transaction) Quantity ¶
func (t *Transaction) Quantity() string
Quantity returns the quantity of the transaction
func (*Transaction) RawData ¶
func (t *Transaction) RawData() []byte
RawData returns the unencoded data
func (*Transaction) RawTags ¶
func (t *Transaction) RawTags() []Tag
RawTags returns the unencoded tags of the transaction
func (*Transaction) Reward ¶
func (t *Transaction) Reward() string
Reward returns the reward of the transaction
func (*Transaction) SetID ¶
func (t *Transaction) SetID(id []byte)
func (*Transaction) Sign ¶
func (t *Transaction) Sign(w arweave_go.WalletSigner) (*Transaction, error)
Sign creates the signing message, and signs it using the private key, It takes the SHA256 of the resulting signature to calculate the id of the signature
func (*Transaction) Signature ¶
func (t *Transaction) Signature() string
Signature returns the signature of the transaction
func (*Transaction) Tags ¶
func (t *Transaction) Tags() ([]Tag, error)
Tags returns the tags of the transaction in plain text
func (*Transaction) Target ¶
func (t *Transaction) Target() string
Target returns the target of the transaction
func (*Transaction) UnmarshalJSON ¶
func (t *Transaction) UnmarshalJSON(input []byte) error
UnmarshalJSON unmarshals as JSON
type TransactionNew ¶
type TransactionNew struct {
// contains filtered or unexported fields
}
Transaction struct
type TransactionV2 ¶
type TransactionV2 struct {
// contains filtered or unexported fields
}
Transaction struct
func NewTransactionV2 ¶
func NewTransactionV2(lastTx string, owner *big.Int, quantity string, target string, data []byte, reward string) *TransactionV2
NewTransactionV2 creates a brand new TransactionV2 struct
func (*TransactionV2) AddTag ¶
func (t *TransactionV2) AddTag(name string, value string) error
AddTag adds a new tag to the TransactionV2
func (*TransactionV2) Data ¶
func (t *TransactionV2) Data() string
Data returns the data of the TransactionV2
func (*TransactionV2) Format ¶
func (t *TransactionV2) Format() int
Data returns the data of the TransactionV2
func (*TransactionV2) Hash ¶
func (t *TransactionV2) Hash() string
Hash returns the base64 RawURLEncoding of the TransactionV2 hash
func (*TransactionV2) ID ¶
func (t *TransactionV2) ID() []byte
ID returns the id of the TransactionV2 which is the SHA256 of the signature
func (*TransactionV2) LastTx ¶
func (t *TransactionV2) LastTx() string
LastTx returns the last TransactionV2 of the account
func (*TransactionV2) MarshalJSON ¶
func (t *TransactionV2) MarshalJSON() ([]byte, error)
MarshalJSON marshals as JSON
func (*TransactionV2) Owner ¶
func (t *TransactionV2) Owner() string
Owner returns the Owner of the TransactionV2
func (*TransactionV2) Quantity ¶
func (t *TransactionV2) Quantity() string
Quantity returns the quantity of the TransactionV2
func (*TransactionV2) RawData ¶
func (t *TransactionV2) RawData() []byte
RawData returns the unencoded data
func (*TransactionV2) RawTags ¶
func (t *TransactionV2) RawTags() []Tag
RawTags returns the unencoded tags of the TransactionV2
func (*TransactionV2) Reward ¶
func (t *TransactionV2) Reward() string
Reward returns the reward of the TransactionV2
func (*TransactionV2) SetID ¶
func (t *TransactionV2) SetID(id []byte)
func (*TransactionV2) Sign ¶
func (t *TransactionV2) Sign(w arweave_go.WalletSigner) (*TransactionV2, error)
Sign creates the signing message, and signs it using the private key, It takes the SHA256 of the resulting signature to calculate the id of the signature
func (*TransactionV2) Signature ¶
func (t *TransactionV2) Signature() string
Signature returns the signature of the TransactionV2
func (*TransactionV2) Tags ¶
func (t *TransactionV2) Tags() ([]Tag, error)
Tags returns the tags of the TransactionV2 in plain text
func (*TransactionV2) Target ¶
func (t *TransactionV2) Target() string
Target returns the target of the TransactionV2
func (*TransactionV2) UnmarshalJSON ¶
func (t *TransactionV2) UnmarshalJSON(input []byte) error
UnmarshalJSON unmarshals as JSON