transaction

package
v0.0.0-...-950a2ea Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPairLocalPlain

func NewPairLocalPlain(
	fromID, toID string,
	amount float64,
	timestamp int64,
) (*LocalPlain, *LocalPlain)

Types

type AudOnChain

type AudOnChain struct {
	ID        string
	CipherRes string `json:"cipher_res"`
	CipherB   string `json:"cipher_b"`
	CipherC   string `json:"cipher_c"`
	CipherD   string `json:"cipher_d"`
}

func NewAudOnChain

func NewAudOnChain(id, cipherRes, cipherB, cipherC, cipherD string) *AudOnChain

func (*AudOnChain) KeyVal

func (a *AudOnChain) KeyVal() (string, []byte, error)

func (*AudOnChain) ToPlain

func (a *AudOnChain) ToPlain() (*AudPlain, error)

type AudPlain

type AudPlain struct {
	ID        []byte
	CipherRes []byte
	CipherB   []byte
	CipherC   []byte
	CipherD   []byte
}

func NewAudPlain

func NewAudPlain(id, cipherRes, cipherB, cipherC, cipherD []byte) *AudPlain

func (*AudPlain) ToOnChain

func (a *AudPlain) ToOnChain() *AudOnChain

type LocalHidden

type LocalHidden struct {
	CounterParty []byte
	Commitment   []byte
	Timestamp    int64
}

func NewLocalHidden

func NewLocalHidden(counterParty, commitment []byte, timestamp int64) *LocalHidden

func (*LocalHidden) ToOnChain

func (h *LocalHidden) ToOnChain() *LocalOnChain

type LocalOnChain

type LocalOnChain struct {
	CounterParty string `json:"counter_party"`
	Commitment   string `json:"commitment"`
	Timestamp    string `json:"timestamp"`
}

func NewLocalOnChain

func NewLocalOnChain(counterParty, commitment, timestamp string) *LocalOnChain

func (*LocalOnChain) KeyVal

func (l *LocalOnChain) KeyVal() (string, []byte, error)

func (*LocalOnChain) ToHidden

func (l *LocalOnChain) ToHidden() (*LocalHidden, error)

type LocalPlain

type LocalPlain struct {
	CounterParty string
	Amount       int64
	Timestamp    int64
}

func NewLocalPlain

func NewLocalPlain(counterParty string, amount float64, timestamp int64) *LocalPlain

func (*LocalPlain) Hide

func (l *LocalPlain) Hide() (hiddenTX *LocalHidden,
	commitment kyber.Point, randScalar kyber.Scalar, err error)

type OrgOnChain

type OrgOnChain struct {
	Accumulator string `json:"accumulator"`
}

func NewOrgOnChain

func NewOrgOnChain(accumulator string) *OrgOnChain

func (*OrgOnChain) KeyVal

func (o *OrgOnChain) KeyVal() (string, []byte, error)

func (*OrgOnChain) ToPlain

func (o *OrgOnChain) ToPlain() (*OrgPlain, error)

type OrgPlain

type OrgPlain struct {
	Accumulator []byte
}

func NewOrgPlain

func NewOrgPlain(accumulator []byte) *OrgPlain

func (*OrgPlain) ToOnChain

func (o *OrgPlain) ToOnChain() *OrgOnChain

Jump to

Keyboard shortcuts

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