Documentation ¶
Index ¶
- type Item
- type ParameterContext
- func (c *ParameterContext) AddSignature(h util.Uint160, ctr *wallet.Contract, pub *keys.PublicKey, sig []byte) 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 ¶
This section is empty.
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 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) 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 json.Marshaler interface.
func (*ParameterContext) UnmarshalJSON ¶
func (c *ParameterContext) UnmarshalJSON(data []byte) error
UnmarshalJSON implements json.Unmarshaler interface.
Click to show internal directories.
Click to hide internal directories.