tools

package
v0.0.0-...-37be80f Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2016 License: GPL-3.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Sum512 = blake2b.Sum512

Functions

func AssureDealer

func AssureDealer(should bool, name string)

func DeriveCurve25519

func DeriveCurve25519(keys []byte) (pub, priv *[32]byte)

func DeriveEd25519

func DeriveEd25519(keys []byte) ([]byte, []byte)

func GKH

func GKH(keys ...[]byte) string

func GenerateNonce

func GenerateNonce() *[24]byte

func GetCvPub

func GetCvPub() string

func ImportKey

func ImportKey(password, salt []byte)

func MakeOrder

func MakeOrder(bcvpub, object, name, sa, contact, proof string)

func NewListing

func NewListing(name, comment, payto, deltoken, contact string) bool

func SendToServer

func SendToServer(url string, content []byte)

Types

type Dealer

type Dealer struct {
	EdPub []byte `json:"edpub"`
	CvPub []byte `json:"cvpub"`
	Name  string `json:"name"`
}

type EOrder

type EOrder struct {
	Target []byte `json:"target"`
	OCvPub []byte `json:"ocvpub"`
	Block  []byte `json:"block"`
	Nonce  []byte `json:"nonce"`
}

type ExtendedListing

type ExtendedListing struct {
	Block  string `json:"block"`
	Sig    []byte `json:"sig"`
	Dealer Dealer `json:"dealer"`
}

type Image

type Image struct {
	MIME  string
	Block []byte
}

type Keypair

type Keypair struct {
	CvPub  *[32]byte `json:"cvpub"`
	CvPriv *[32]byte `json:"cvpriv"`
	EdPub  []byte    `json:"edpub"`
	EdPriv []byte    `json:"edpriv"`
}

type Listing

type Listing struct {
	Deltoken string `json:"deltoken"`
	Dealer   Dealer `json:"dealer"`
	Block    string `json:"block"`
	Sig      []byte `json:"sig"`
}

type Listings

type Listings []ExtendedListing

type Order

type Order struct {
	Name    string // The real name of the originator
	Item    string
	SA      string // Shipping address
	Contact string // The contact info
	Proof   string // Proof of payment
}

type Orders

type Orders []EOrder

type ROrders

type ROrders []Order

func GetOrder

func GetOrder(si string) ROrders

type RealListing

type RealListing struct {
	Name    string
	Comment string
	Payto   string
	Contact string
	Images  []Image
}

type SListing

type SListing struct {
	R     RealListing
	D     Dealer
	KH    string // Human-readable KeyHash string
	CvPub string
}

type SListings

type SListings []SListing

func FListing

func FListing(lsj string) SListings

Jump to

Keyboard shortcuts

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