Documentation ¶
Overview ¶
nolint
nolint
Index ¶
- Constants
- Variables
- func NewHandler(address core.Address, k uint8, gasSpawn, gasSpend uint64) core.Handler
- func Register(registry *registry.Registry)
- type MultiSig
- func (t *MultiSig) DecodeScale(dec *scale.Decoder) (total int, err error)
- func (t *MultiSig) EncodeScale(enc *scale.Encoder) (total int, err error)
- func (ms *MultiSig) MaxSpend(method uint8, args any) (uint64, error)
- func (ms *MultiSig) Spend(host core.Host, args *SpendArguments) error
- func (ms *MultiSig) Verify(host core.Host, raw []byte, dec *scale.Decoder) bool
- type Part
- type Signatures
- type SpawnArguments
- type SpendArguments
- type SpendTemplate
Constants ¶
View Source
const ( // TotalGasSpawn1 is consumed from principal in case of successful spawn. TotalGasSpawn1 = 100 // TotalGasSpend1 is consumed from principal in case of successful spend. TotalGasSpend1 = 100 // TotalGasSpawn2 is consumed from principal in case of successful spawn. TotalGasSpawn2 = 200 // TotalGasSpend2 is consumed from principal in case of successful spend. TotalGasSpend2 = 200 // TotalGasSpawn3 is consumed from principal in case of successful spawn. TotalGasSpawn3 = 300 // TotalGasSpend3 is consumed from principal in case of successful spend. TotalGasSpend3 = 300 // StorageLimit is a limit of keys that can be used when multisig is spawned. StorageLimit = 10 )
Variables ¶
View Source
var ( // TemplateAddress1 is an address of the 1/N multisig template. TemplateAddress1 core.Address // TemplateAddress2 is an address of the 2/N multisig template. TemplateAddress2 core.Address // TemplateAddress3 is an address of the 3/N multisig template. TemplateAddress3 core.Address )
Functions ¶
func NewHandler ¶
NewHandler instantiates multisig handler with a particular configuration.
Types ¶
type MultiSig ¶
MultiSig K/N template.
func (*MultiSig) DecodeScale ¶
func (*MultiSig) EncodeScale ¶
type Part ¶
Part contains a reference to public key and signature from private key counterpart.
func (*Part) DecodeScale ¶
func (*Part) EncodeScale ¶
type Signatures ¶
type Signatures []Part
Signatures is a collections of parts that must satisfy multisig threshold requirement.
type SpawnArguments ¶
SpawnArguments contains a collection with PublicKeys.
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 SpendTemplate ¶
type SpendTemplate interface {
Spend(core.Host, *SpendArguments) error
}
SpendTemplate interface for the template that support Spend method.
Click to show internal directories.
Click to hide internal directories.