Documentation ¶
Index ¶
- Constants
- func CommitteeAddress() string
- func CommitteeScriptHash() util.Uint160
- func CommitteeSize() int
- func CommitteeVerificationScript() []byte
- func IDToOrder(id int) int
- func MultisigAddress() string
- func MultisigScriptHash() util.Uint160
- func MultisigVerificationScript() []byte
- func Network() netmode.Magic
- func NewBlock(t *testing.T, bc blockchainer.Blockchainer, offset uint32, primary uint32, ...) *block.Block
- func NewDeployTx(bc blockchainer.Blockchainer, name string, sender util.Uint160, r gio.Reader, ...) (*transaction.Transaction, util.Uint160, []byte, error)
- func NewTransferFromOwner(bc blockchainer.Blockchainer, contractHash, to util.Uint160, amount int64, ...) (*transaction.Transaction, error)
- func PrivateKey(i int) *keys.PrivateKey
- func PrivateKeyByID(id int) *keys.PrivateKey
- func Sign(h hash.Hashable) []byte
- func SignCommittee(h hash.Hashable) []byte
- func SignTx(bc blockchainer.Blockchainer, txs ...*transaction.Transaction) error
- func SignTxCommittee(bc blockchainer.Blockchainer, txs ...*transaction.Transaction) error
- func Size() int
- func WIF(i int) string
Constants ¶
const ValidatorsCount = 4
ValidatorsCount returns number of validators in the testchain.
Variables ¶
This section is empty.
Functions ¶
func CommitteeAddress ¶
func CommitteeAddress() string
CommitteeAddress return committee address as string.
func CommitteeScriptHash ¶
CommitteeScriptHash returns committee address as Uint160.
func CommitteeVerificationScript ¶
func CommitteeVerificationScript() []byte
CommitteeVerificationScript returns script hash of the committee multisig address.
func MultisigAddress ¶
func MultisigAddress() string
MultisigAddress return consensus address as string.
func MultisigScriptHash ¶
MultisigScriptHash returns consensus address as Uint160.
func MultisigVerificationScript ¶
func MultisigVerificationScript() []byte
MultisigVerificationScript returns script hash of the consensus multisig address.
func NewBlock ¶
func NewBlock(t *testing.T, bc blockchainer.Blockchainer, offset uint32, primary uint32, txs ...*transaction.Transaction) *block.Block
NewBlock creates new block for the given blockchain with the given offset (usually, 1), primary node index and transactions.
func NewDeployTx ¶
func NewDeployTx(bc blockchainer.Blockchainer, name string, sender util.Uint160, r gio.Reader, confFile *string) (*transaction.Transaction, util.Uint160, []byte, error)
NewDeployTx returns new deployment tx for contract with name with Go code read from r.
func NewTransferFromOwner ¶
func NewTransferFromOwner(bc blockchainer.Blockchainer, contractHash, to util.Uint160, amount int64, nonce, validUntil uint32) (*transaction.Transaction, error)
NewTransferFromOwner returns transaction transferring funds from NEO and GAS owner.
func PrivateKey ¶
func PrivateKey(i int) *keys.PrivateKey
PrivateKey returns private key of node #i.
func PrivateKeyByID ¶
func PrivateKeyByID(id int) *keys.PrivateKey
PrivateKeyByID returns private keys of a node with the specified id.
func SignCommittee ¶
SignCommittee signs data by a majority of committee members.
func SignTx ¶
func SignTx(bc blockchainer.Blockchainer, txs ...*transaction.Transaction) error
SignTx signs provided transactions with validator keys.
func SignTxCommittee ¶ added in v0.93.0
func SignTxCommittee(bc blockchainer.Blockchainer, txs ...*transaction.Transaction) error
SignTxCommittee signs transactions by committee.
Types ¶
This section is empty.