tip

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidConfiguration = fmt.Errorf("invalid configuration")

Functions

func DeriveSecret

func DeriveSecret(pin, seed string) []byte

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(conf *Configuration) (*Client, []*signerPair, error)

func (*Client) Sign

func (c *Client) Sign(ks, ephemeral string, nonce, grace int64, rotate, assignee, watcher string) ([]byte, []*signerPair, error)

type Configuration

type Configuration struct {
	Commitments []string      `json:"commitments"`
	Signers     []*signerPair `json:"signers"`
}

func LoadConfigurationJSON

func LoadConfigurationJSON(data string) (*Configuration, error)

type Response

type Response struct {
	Error *struct {
		Code        int    `json:"code"`
		Description string `json:"description"`
	} `json:"error"`
	Data      *ResponseData `json:"data"`
	Signature string        `json:"signature"`
}

type ResponseData

type ResponseData struct {
	Commitments []string `json:"commitments,omitempty"`
	Identity    string   `json:"identity,omitempty"`
	Signers     []struct {
		Identity string `json:"identity"`
		Index    int    `json:"index"`
	} `json:"signers,omitempty"`
	Cipher string `json:"cipher,omitempty"`
}

Jump to

Keyboard shortcuts

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