Documentation
¶
Index ¶
- type Item
- type ParameterContext
- func (c *ParameterContext) AddSignature(ctr *wallet.Contract, pub *keys.PublicKey, sig []byte) error
- func (c *ParameterContext) GetWitness(ctr *wallet.Contract) (*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 util.Uint160
Parameters []smartcontract.Parameter
Signatures map[string][]byte
}
Item represents a transaction context item.
func (*Item) AddSignature ¶
AddSignature adds a signature for pub.
func (*Item) GetSignature ¶
GetSignature returns signature for pub if present.
func (Item) MarshalJSON ¶
MarshalJSON implements json.Marshaler interface.
func (*Item) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler interface.
type ParameterContext ¶
type ParameterContext struct {
// Type is a type of a verifiable item.
Type string
// 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, verif crypto.VerifiableDecodable) *ParameterContext
NewParameterContext returns ParameterContext with the specified type and item to sign.
func (*ParameterContext) AddSignature ¶
func (c *ParameterContext) AddSignature(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(ctr *wallet.Contract) (*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.