Documentation ¶
Index ¶
- Constants
- Variables
- func Engines() map[uint8]vm.AuthEngine
- func GetActor(auth chain.Auth) ed25519.PublicKey
- func GetSigner(auth chain.Auth) ed25519.PublicKey
- func UnmarshalED25519(p *codec.Packer, _ *warp.Message) (chain.Auth, error)
- type ED25519
- func (d *ED25519) AsyncVerify(msg []byte) error
- func (d *ED25519) CanDeduct(ctx context.Context, im state.Immutable, amount uint64) error
- func (d *ED25519) Deduct(ctx context.Context, mu state.Mutable, amount uint64) error
- func (*ED25519) GetTypeID() uint8
- func (d *ED25519) Marshal(p *codec.Packer)
- func (*ED25519) MaxComputeUnits(chain.Rules) uint64
- func (d *ED25519) Payer() []byte
- func (d *ED25519) Refund(ctx context.Context, mu state.Mutable, amount uint64) error
- func (*ED25519) Size() int
- func (d *ED25519) StateKeys() []string
- func (*ED25519) ValidRange(chain.Rules) (int64, int64)
- func (d *ED25519) Verify(_ context.Context, r chain.Rules, _ state.Immutable, _ chain.Action) (uint64, error)
- type ED25519AuthEngine
- type ED25519Batch
- type ED25519Factory
Constants ¶
View Source
const ( ED25519ComputeUnits = 5 ED25519Size = ed25519.PublicKeyLen + ed25519.SignatureLen )
Variables ¶
View Source
var ErrInvalidSignature = errors.New("invalid signature")
Functions ¶
func Engines ¶ added in v0.3.0
func Engines() map[uint8]vm.AuthEngine
Types ¶
type ED25519 ¶
type ED25519 struct { Signer ed25519.PublicKey `json:"signer"` Signature ed25519.Signature `json:"signature"` }
func (*ED25519) AsyncVerify ¶
func (*ED25519) MaxComputeUnits ¶ added in v0.3.0
type ED25519AuthEngine ¶ added in v0.3.0
type ED25519AuthEngine struct{}
func (*ED25519AuthEngine) Cache ¶ added in v0.3.0
func (*ED25519AuthEngine) Cache(auth chain.Auth)
func (*ED25519AuthEngine) GetBatchVerifier ¶ added in v0.3.0
func (*ED25519AuthEngine) GetBatchVerifier(cores int, count int) chain.AuthBatchVerifier
type ED25519Batch ¶ added in v0.3.0
type ED25519Batch struct {
// contains filtered or unexported fields
}
func (*ED25519Batch) Add ¶ added in v0.3.0
func (b *ED25519Batch) Add(msg []byte, rauth chain.Auth) func() error
func (*ED25519Batch) Done ¶ added in v0.3.0
func (b *ED25519Batch) Done() []func() error
type ED25519Factory ¶
type ED25519Factory struct {
// contains filtered or unexported fields
}
func NewED25519Factory ¶
func NewED25519Factory(priv ed25519.PrivateKey) *ED25519Factory
Click to show internal directories.
Click to hide internal directories.