sharetoken

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: 9 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type T

type T struct {
	Version     int64    `json:"version"`
	PublicKey   jsonb.PK `json:"public_key"`
	Timestamp   int64    `json:"timestamp"`
	RelayPubkey jsonb.PK `json:"relay_pubkey"`
	ShareKey    string   `json:"share_key"` // TODO
	Signature   jsonb.B  `json:"signature"`
	Nonce       string   `json:"nonce"`

	Contract *servicekey.Contract `json:"contract,omitempty"`
}

T is the struct holding the sharetoken data.

func New

func New(sk *servicekey.T, pub ed25519.PublicKey) (*T, error)

New creates a new sharetoken.

func (*T) Digest

func (t *T) Digest() string

func (*T) IsExpiredAt

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

func (*T) IsSettlingAt

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

func (*T) Verify

func (t *T) Verify() error

Jump to

Keyboard shortcuts

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