servicekey

package
v0.3.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2022 License: MIT Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Contract

type Contract struct {
	SettlementOpen  int64    `json:"settlement_open,omitempty"`
	SettlementClose int64    `json:"settlement_close,omitempty"`
	PublicKey       jsonb.PK `json:"public_key,omitempty"`
	Signature       jsonb.B  `json:"signature,omitempty"`
}

Contract encloses the data of the contract that activated this servicekey.

func (*Contract) Digest

func (c *Contract) Digest() string

func (*Contract) Sign

func (c *Contract) Sign(s signer.Signer)

func (*Contract) Verify

func (c *Contract) Verify() error

type Source

type Source func() (*T, error)

Source is the type of servicekey sources.

type T

type T struct {
	PrivateKey jsonb.SK  `json:"private_key,omitempty"`
	PublicKey  jsonb.PK  `json:"public_key,omitempty"`
	Contract   *Contract `json:"contract,omitempty"`
}

T is the struct holding the servicekey data.

func New

func New(pk ed25519.PrivateKey) *T

New creates a new servicekey from pk.

func (*T) IsExpiredAt

func (t *T) IsExpiredAt(utime int64) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL