Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStatus ¶ added in v1.8.0
func NewStatus() zcncore.TransactionCallback
Types ¶
type Transaction ¶
type Transaction struct { Hash string `json:"hash,omitempty"` Version string `json:"version,omitempty"` TransactionOutput string `json:"transaction_output,omitempty"` // contains filtered or unexported fields }
Transaction entity that encapsulates the transaction related data and metadata.
func AddAuthorizer ¶ added in v1.8.3
func AddAuthorizer(ctx context.Context, input *zcncore.AddAuthorizerPayload) (*Transaction, error)
func NewTransactionEntity ¶
func NewTransactionEntity() (*Transaction, error)
NewTransactionEntity creates Transaction with initialized fields. Sets version, client ID, creation date, public key and creates internal zcncore.TransactionScheme.
func Verify ¶ added in v1.8.3
func Verify(ctx context.Context, hash string) (*Transaction, error)
Verify checks including of transaction in the blockchain.
func (*Transaction) ExecuteSmartContract ¶
func (t *Transaction) ExecuteSmartContract(ctx context.Context, address, funcName string, input interface{}, val uint64) (string, error)
ExecuteSmartContract executes function of smart contract with provided address.
Returns hash of executed transaction.
type TxnStatus ¶
type TxnStatus int
TxnStatus represented zcncore.TransactionCallback operations statuses.
const ( // StatusSuccess represent zcncore.StatusSuccess. StatusSuccess TxnStatus = iota // StatusNetworkError represent zcncore.StatusNetworkError. StatusNetworkError // StatusError represent zcncore.StatusError. StatusError // StatusRejectedByUser represent zcncore.StatusRejectedByUser. StatusRejectedByUser // StatusInvalidSignature represent zcncore.StatusInvalidSignature. StatusInvalidSignature // StatusAuthError represent zcncore.StatusAuthError. StatusAuthError // StatusAuthVerifyFailed represent zcncore.StatusAuthVerifyFailed. StatusAuthVerifyFailed // StatusAuthTimeout represent zcncore.StatusAuthTimeout. StatusAuthTimeout // StatusUnknown represent zcncore.StatusUnknown. StatusUnknown = -1 )
Click to show internal directories.
Click to hide internal directories.