Documentation
¶
Index ¶
- Constants
- Variables
- func Register(registry *registry.Registry)
- type SpawnArguments
- type SpawnPayload
- type SpendArguments
- type SpendPayload
- type Wallet
- func (t *Wallet) DecodeScale(dec *scale.Decoder) (total int, err error)
- func (t *Wallet) EncodeScale(enc *scale.Encoder) (total int, err error)
- func (s *Wallet) MaxSpend(method uint8, args any) (uint64, error)
- func (s *Wallet) Spend(ctx *core.Context, args *SpendArguments) error
- func (s *Wallet) Verify(ctx *core.Context, tx []byte) bool
Constants ¶
View Source
const ( // TotalGasSpawn is consumed from principal in case of successful spawn. TotalGasSpawn = 200 // TotalGasSpend is consumed from principal in case of successful spend. TotalGasSpend = 100 )
Variables ¶
View Source
var ( // TemplateAddress is an address of the Wallet template. TemplateAddress core.Address )
Functions ¶
Types ¶
type SpawnArguments ¶
SpawnArguments ...
func (*SpawnArguments) DecodeScale ¶
func (t *SpawnArguments) DecodeScale(dec *scale.Decoder) (total int, err error)
func (*SpawnArguments) EncodeScale ¶
func (t *SpawnArguments) EncodeScale(enc *scale.Encoder) (total int, err error)
type SpawnPayload ¶
type SpawnPayload struct { Arguments SpawnArguments GasPrice uint64 }
SpawnPayload ...
func (*SpawnPayload) DecodeScale ¶
func (t *SpawnPayload) DecodeScale(dec *scale.Decoder) (total int, err error)
func (*SpawnPayload) EncodeScale ¶
func (t *SpawnPayload) EncodeScale(enc *scale.Encoder) (total int, err error)
type SpendArguments ¶
SpendArguments ...
func (*SpendArguments) DecodeScale ¶
func (t *SpendArguments) DecodeScale(dec *scale.Decoder) (total int, err error)
func (*SpendArguments) EncodeScale ¶
func (t *SpendArguments) EncodeScale(enc *scale.Encoder) (total int, err error)
type SpendPayload ¶
type SpendPayload struct { Arguments SpendArguments Nonce core.Nonce GasPrice uint64 }
SpendPayload ...
func (*SpendPayload) DecodeScale ¶
func (t *SpendPayload) DecodeScale(dec *scale.Decoder) (total int, err error)
func (*SpendPayload) EncodeScale ¶
func (t *SpendPayload) EncodeScale(enc *scale.Encoder) (total int, err error)
type Wallet ¶
Wallet is a single-key wallet.
func (*Wallet) DecodeScale ¶
func (*Wallet) EncodeScale ¶
Click to show internal directories.
Click to hide internal directories.