Documentation
¶
Index ¶
- Constants
- type Item
- type ParameterContext
- func (c *ParameterContext) AddSignature(h util.Uint160, ctr *wallet.Contract, pub *keys.PublicKey, sig []byte) error
- func (c *ParameterContext) GetCompleteTransaction() (*transaction.Transaction, error)
- func (c *ParameterContext) GetWitness(h util.Uint160) (*transaction.Witness, error)
- func (c ParameterContext) MarshalJSON() ([]byte, error)
- func (c *ParameterContext) UnmarshalJSON(data []byte) error
Constants ¶
View Source
const TransactionType = "Neo.Network.P2P.Payloads.Transaction"
TransactionType is the ParameterContext Type used for transactions.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Item ¶
type Item struct { Script []byte `json:"script"` Parameters []smartcontract.Parameter `json:"parameters"` Signatures map[string][]byte `json:"signatures"` }
Item represents a transaction context item.
func (*Item) AddSignature ¶
AddSignature adds a signature for the pub.
type ParameterContext ¶
type ParameterContext struct { // Type is a type of a verifiable item. Type string // Network is a network this context belongs to. Network netmode.Magic // Verifiable is an object which can be (de-)serialized. Verifiable crypto.VerifiableDecodable // Items is a map from script hashes to context items. Items map[util.Uint160]*Item }
ParameterContext represents smartcontract parameter's context.
func NewParameterContext ¶
func NewParameterContext(typ string, network netmode.Magic, verif crypto.VerifiableDecodable) *ParameterContext
NewParameterContext returns ParameterContext with the specified type and item to sign.
func (*ParameterContext) AddSignature ¶
func (c *ParameterContext) AddSignature(h util.Uint160, ctr *wallet.Contract, pub *keys.PublicKey, sig []byte) error
AddSignature adds a signature for the specified contract and public key.
func (*ParameterContext) GetCompleteTransaction ¶ added in v0.99.3
func (c *ParameterContext) GetCompleteTransaction() (*transaction.Transaction, error)
func (*ParameterContext) GetWitness ¶
func (c *ParameterContext) GetWitness(h util.Uint160) (*transaction.Witness, error)
GetWitness returns invocation and verification scripts for the specified contract.
func (ParameterContext) MarshalJSON ¶
func (c ParameterContext) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface.
func (*ParameterContext) UnmarshalJSON ¶
func (c *ParameterContext) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface.
Click to show internal directories.
Click to hide internal directories.