app

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package zsl is a generated protocol buffer package.

It is generated from these files:

zslbox.proto

It has these top-level messages:

ShieldedInput
Note
ShieldedTransferRequest
VerifyShieldedTransferRequest
ShieldedTransfer
VerifyShieldingRequest
Shielding
VerifyUnshieldingRequest
Unshielding
ZAddress
Bytes
Result
Void

Index

Constants

View Source
const (
	TypeETH         = "eth"
	TypeZETH        = "zeth"
	TypePending     = "pending"
	TypeSpent       = "spent"
	TypeConfirmed   = "confirmed"
	TypeShielding   = "shielding"
	TypeUnshielding = "unshielding"
	TypeTransfer    = "transfer"
)

------------------------------------------------------------------------------------------------- JSArray cell types (mapped with CSS classes)

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	*js.Object
	// contains filtered or unexported fields
}

------------------------------------------------------------------------------------------------- App data model

func NewApp

func NewApp() *App

------------------------------------------------------------------------------------------------- Init functions

func (*App) BtnBindBankClicked

func (app *App) BtnBindBankClicked()

func (*App) BtnDeployBankClicked

func (app *App) BtnDeployBankClicked()

------------------------------------------------------------------------------------------------- Init private bank

func (*App) BtnGenerateClicked

func (app *App) BtnGenerateClicked()

------------------------------------------------------------------------------------------------- Generate new key

func (*App) BtnShieldClicked

func (app *App) BtnShieldClicked()

------------------------------------------------------------------------------------------------- Shielding

func (*App) BtnTransferClicked

func (app *App) BtnTransferClicked()

------------------------------------------------------------------------------------------------- Shielded Transfer

func (*App) BtnUnshieldClicked

func (app *App) BtnUnshieldClicked()

------------------------------------------------------------------------------------------------- Unshielding

func (*App) CheckError

func (app *App) CheckError(err error)

func (*App) CloseModal

func (app *App) CloseModal()

func (*App) CopyToClipboard

func (app *App) CopyToClipboard(content string)

------------------------------------------------------------------------------------------------- Utils

func (*App) FormShieldSubmitted

func (app *App) FormShieldSubmitted()

func (*App) FormTransferSubmitted

func (app *App) FormTransferSubmitted()

func (*App) MonitorBlockchain

func (app *App) MonitorBlockchain()

------------------------------------------------------------------------------------------------- Monitor web3js for changes

func (*App) MonitorEvents

func (app *App) MonitorEvents()

------------------------------------------------------------------------------------------------- Monitor private bank events

func (*App) OnLoad

func (app *App) OnLoad(event *js.Object)

func (*App) ShowSnackbar

func (app *App) ShowSnackbar(message string)

func (*App) StartClock

func (app *App) StartClock()

func (*App) StopClock

func (app *App) StopClock()

type Blockchain

type Blockchain struct {
	*js.Object
	// contains filtered or unexported fields
}

func NewBlockchain

func NewBlockchain() *Blockchain

func (*Blockchain) AddCommitment

func (blockchain *Blockchain) AddCommitment(commitment string)

func (*Blockchain) AddNullifier

func (blockchain *Blockchain) AddNullifier(nullifier string)

func (*Blockchain) LogEvent

func (blockchain *Blockchain) LogEvent(event *ethereum.Event)

type Bytes

type Bytes struct {
	Bytes []byte
}

func (*Bytes) GetBytes

func (m *Bytes) GetBytes() (x []byte)

GetBytes gets the Bytes of the Bytes.

func (*Bytes) Marshal

func (m *Bytes) Marshal() []byte

Marshal marshals Bytes to a slice of bytes.

func (*Bytes) MarshalToWriter

func (m *Bytes) MarshalToWriter(writer jspb.Writer)

MarshalToWriter marshals Bytes to the provided writer.

func (*Bytes) Unmarshal

func (m *Bytes) Unmarshal(rawBytes []byte) (*Bytes, error)

Unmarshal unmarshals a Bytes from a slice of bytes.

func (*Bytes) UnmarshalFromReader

func (m *Bytes) UnmarshalFromReader(reader jspb.Reader) *Bytes

UnmarshalFromReader unmarshals a Bytes from the provided reader.

type FullNote

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

type JSArray

type JSArray struct {
	*js.Object
	// contains filtered or unexported fields
}

JSArray is a wrapper around a JS Array with a convenient UpdateEntry method

func NewJSArray

func NewJSArray(headers ...interface{}) *JSArray

func (*JSArray) UpdateEntry

func (array *JSArray) UpdateEntry(key string, cells ...JSCell)

UpdateEntry update or insert row with key key. if key doesn't exist, add the new row on top of the array (shift the rest)

type JSCell

type JSCell struct {
	Type  interface{}
	Value interface{}
}

type Note

type Note struct {
	Pk    []byte
	Rho   []byte
	Value uint64
}

func (*Note) GetPk

func (m *Note) GetPk() (x []byte)

GetPk gets the Pk of the Note.

func (*Note) GetRho

func (m *Note) GetRho() (x []byte)

GetRho gets the Rho of the Note.

func (*Note) GetValue

func (m *Note) GetValue() (x uint64)

GetValue gets the Value of the Note.

func (*Note) Marshal

func (m *Note) Marshal() []byte

Marshal marshals Note to a slice of bytes.

func (*Note) MarshalToWriter

func (m *Note) MarshalToWriter(writer jspb.Writer)

MarshalToWriter marshals Note to the provided writer.

func (*Note) Unmarshal

func (m *Note) Unmarshal(rawBytes []byte) (*Note, error)

Unmarshal unmarshals a Note from a slice of bytes.

func (*Note) UnmarshalFromReader

func (m *Note) UnmarshalFromReader(reader jspb.Reader) *Note

UnmarshalFromReader unmarshals a Note from the provided reader.

type Result

type Result struct {
	Result  bool
	Message string
}

func (*Result) GetMessage

func (m *Result) GetMessage() (x string)

GetMessage gets the Message of the Result.

func (*Result) GetResult

func (m *Result) GetResult() (x bool)

GetResult gets the Result of the Result.

func (*Result) Marshal

func (m *Result) Marshal() []byte

Marshal marshals Result to a slice of bytes.

func (*Result) MarshalToWriter

func (m *Result) MarshalToWriter(writer jspb.Writer)

MarshalToWriter marshals Result to the provided writer.

func (*Result) Unmarshal

func (m *Result) Unmarshal(rawBytes []byte) (*Result, error)

Unmarshal unmarshals a Result from a slice of bytes.

func (*Result) UnmarshalFromReader

func (m *Result) UnmarshalFromReader(reader jspb.Reader) *Result

UnmarshalFromReader unmarshals a Result from the provided reader.

type ShieldedInput

type ShieldedInput struct {
	Sk        []byte
	Rho       []byte
	Value     uint64
	TreeIndex uint64
	TreePath  [][]byte
}

------------------------------------------------------------------------------------------------- Cross operation data structs

func (*ShieldedInput) GetRho

func (m *ShieldedInput) GetRho() (x []byte)

GetRho gets the Rho of the ShieldedInput.

func (*ShieldedInput) GetSk

func (m *ShieldedInput) GetSk() (x []byte)

GetSk gets the Sk of the ShieldedInput.

func (*ShieldedInput) GetTreeIndex

func (m *ShieldedInput) GetTreeIndex() (x uint64)

GetTreeIndex gets the TreeIndex of the ShieldedInput.

func (*ShieldedInput) GetTreePath

func (m *ShieldedInput) GetTreePath() (x [][]byte)

GetTreePath gets the TreePath of the ShieldedInput.

func (*ShieldedInput) GetValue

func (m *ShieldedInput) GetValue() (x uint64)

GetValue gets the Value of the ShieldedInput.

func (*ShieldedInput) Marshal

func (m *ShieldedInput) Marshal() []byte

Marshal marshals ShieldedInput to a slice of bytes.

func (*ShieldedInput) MarshalToWriter

func (m *ShieldedInput) MarshalToWriter(writer jspb.Writer)

MarshalToWriter marshals ShieldedInput to the provided writer.

func (*ShieldedInput) Unmarshal

func (m *ShieldedInput) Unmarshal(rawBytes []byte) (*ShieldedInput, error)

Unmarshal unmarshals a ShieldedInput from a slice of bytes.

func (*ShieldedInput) UnmarshalFromReader

func (m *ShieldedInput) UnmarshalFromReader(reader jspb.Reader) *ShieldedInput

UnmarshalFromReader unmarshals a ShieldedInput from the provided reader.

type ShieldedTransfer

type ShieldedTransfer struct {
	Snark []byte
	// input spend nullifiers
	SpendNullifiers [][]byte
	// output send nullifiers & commitments
	SendNullifiers [][]byte
	Commitments    [][]byte
}

func (*ShieldedTransfer) GetCommitments

func (m *ShieldedTransfer) GetCommitments() (x [][]byte)

GetCommitments gets the Commitments of the ShieldedTransfer.

func (*ShieldedTransfer) GetSendNullifiers

func (m *ShieldedTransfer) GetSendNullifiers() (x [][]byte)

GetSendNullifiers gets the SendNullifiers of the ShieldedTransfer.

func (*ShieldedTransfer) GetSnark

func (m *ShieldedTransfer) GetSnark() (x []byte)

GetSnark gets the Snark of the ShieldedTransfer.

func (*ShieldedTransfer) GetSpendNullifiers

func (m *ShieldedTransfer) GetSpendNullifiers() (x [][]byte)

GetSpendNullifiers gets the SpendNullifiers of the ShieldedTransfer.

func (*ShieldedTransfer) Marshal

func (m *ShieldedTransfer) Marshal() []byte

Marshal marshals ShieldedTransfer to a slice of bytes.

func (*ShieldedTransfer) MarshalToWriter

func (m *ShieldedTransfer) MarshalToWriter(writer jspb.Writer)

MarshalToWriter marshals ShieldedTransfer to the provided writer.

func (*ShieldedTransfer) Unmarshal

func (m *ShieldedTransfer) Unmarshal(rawBytes []byte) (*ShieldedTransfer, error)

Unmarshal unmarshals a ShieldedTransfer from a slice of bytes.

func (*ShieldedTransfer) UnmarshalFromReader

func (m *ShieldedTransfer) UnmarshalFromReader(reader jspb.Reader) *ShieldedTransfer

UnmarshalFromReader unmarshals a ShieldedTransfer from the provided reader.

type ShieldedTransferRequest

type ShieldedTransferRequest struct {
	Inputs  []*ShieldedInput
	Outputs []*Note
}

------------------------------------------------------------------------------------------------- ShieldedTransfer data structs note: a shielded transfer has 2 inputs and 2 outputs (UTXO model)

func (*ShieldedTransferRequest) GetInputs

func (m *ShieldedTransferRequest) GetInputs() (x []*ShieldedInput)

GetInputs gets the Inputs of the ShieldedTransferRequest.

func (*ShieldedTransferRequest) GetOutputs

func (m *ShieldedTransferRequest) GetOutputs() (x []*Note)

GetOutputs gets the Outputs of the ShieldedTransferRequest.

func (*ShieldedTransferRequest) Marshal

func (m *ShieldedTransferRequest) Marshal() []byte

Marshal marshals ShieldedTransferRequest to a slice of bytes.

func (*ShieldedTransferRequest) MarshalToWriter

func (m *ShieldedTransferRequest) MarshalToWriter(writer jspb.Writer)

MarshalToWriter marshals ShieldedTransferRequest to the provided writer.

func (*ShieldedTransferRequest) Unmarshal

func (m *ShieldedTransferRequest) Unmarshal(rawBytes []byte) (*ShieldedTransferRequest, error)

Unmarshal unmarshals a ShieldedTransferRequest from a slice of bytes.

func (*ShieldedTransferRequest) UnmarshalFromReader

func (m *ShieldedTransferRequest) UnmarshalFromReader(reader jspb.Reader) *ShieldedTransferRequest

UnmarshalFromReader unmarshals a ShieldedTransferRequest from the provided reader.

type Shielding

type Shielding struct {
	Snark         []byte
	Commitment    []byte
	SendNullifier []byte
}

func (*Shielding) GetCommitment

func (m *Shielding) GetCommitment() (x []byte)

GetCommitment gets the Commitment of the Shielding.

func (*Shielding) GetSendNullifier

func (m *Shielding) GetSendNullifier() (x []byte)

GetSendNullifier gets the SendNullifier of the Shielding.

func (*Shielding) GetSnark

func (m *Shielding) GetSnark() (x []byte)

GetSnark gets the Snark of the Shielding.

func (*Shielding) Marshal

func (m *Shielding) Marshal() []byte

Marshal marshals Shielding to a slice of bytes.

func (*Shielding) MarshalToWriter

func (m *Shielding) MarshalToWriter(writer jspb.Writer)

MarshalToWriter marshals Shielding to the provided writer.

func (*Shielding) Unmarshal

func (m *Shielding) Unmarshal(rawBytes []byte) (*Shielding, error)

Unmarshal unmarshals a Shielding from a slice of bytes.

func (*Shielding) UnmarshalFromReader

func (m *Shielding) UnmarshalFromReader(reader jspb.Reader) *Shielding

UnmarshalFromReader unmarshals a Shielding from the provided reader.

type Unshielding

type Unshielding struct {
	Snark          []byte
	SpendNullifier []byte
	SendNullifier  []byte
}

func (*Unshielding) GetSendNullifier

func (m *Unshielding) GetSendNullifier() (x []byte)

GetSendNullifier gets the SendNullifier of the Unshielding.

func (*Unshielding) GetSnark

func (m *Unshielding) GetSnark() (x []byte)

GetSnark gets the Snark of the Unshielding.

func (*Unshielding) GetSpendNullifier

func (m *Unshielding) GetSpendNullifier() (x []byte)

GetSpendNullifier gets the SpendNullifier of the Unshielding.

func (*Unshielding) Marshal

func (m *Unshielding) Marshal() []byte

Marshal marshals Unshielding to a slice of bytes.

func (*Unshielding) MarshalToWriter

func (m *Unshielding) MarshalToWriter(writer jspb.Writer)

MarshalToWriter marshals Unshielding to the provided writer.

func (*Unshielding) Unmarshal

func (m *Unshielding) Unmarshal(rawBytes []byte) (*Unshielding, error)

Unmarshal unmarshals a Unshielding from a slice of bytes.

func (*Unshielding) UnmarshalFromReader

func (m *Unshielding) UnmarshalFromReader(reader jspb.Reader) *Unshielding

UnmarshalFromReader unmarshals a Unshielding from the provided reader.

type VerifyShieldedTransferRequest

type VerifyShieldedTransferRequest struct {
	ShieldedTransfer *ShieldedTransfer
	TreeRoot         []byte
}

func (*VerifyShieldedTransferRequest) GetShieldedTransfer

func (m *VerifyShieldedTransferRequest) GetShieldedTransfer() (x *ShieldedTransfer)

GetShieldedTransfer gets the ShieldedTransfer of the VerifyShieldedTransferRequest.

func (*VerifyShieldedTransferRequest) GetTreeRoot

func (m *VerifyShieldedTransferRequest) GetTreeRoot() (x []byte)

GetTreeRoot gets the TreeRoot of the VerifyShieldedTransferRequest.

func (*VerifyShieldedTransferRequest) Marshal

func (m *VerifyShieldedTransferRequest) Marshal() []byte

Marshal marshals VerifyShieldedTransferRequest to a slice of bytes.

func (*VerifyShieldedTransferRequest) MarshalToWriter

func (m *VerifyShieldedTransferRequest) MarshalToWriter(writer jspb.Writer)

MarshalToWriter marshals VerifyShieldedTransferRequest to the provided writer.

func (*VerifyShieldedTransferRequest) Unmarshal

Unmarshal unmarshals a VerifyShieldedTransferRequest from a slice of bytes.

func (*VerifyShieldedTransferRequest) UnmarshalFromReader

UnmarshalFromReader unmarshals a VerifyShieldedTransferRequest from the provided reader.

type VerifyShieldingRequest

type VerifyShieldingRequest struct {
	Shielding *Shielding
	Value     uint64
}

------------------------------------------------------------------------------------------------- Shielding data structs

func (*VerifyShieldingRequest) GetShielding

func (m *VerifyShieldingRequest) GetShielding() (x *Shielding)

GetShielding gets the Shielding of the VerifyShieldingRequest.

func (*VerifyShieldingRequest) GetValue

func (m *VerifyShieldingRequest) GetValue() (x uint64)

GetValue gets the Value of the VerifyShieldingRequest.

func (*VerifyShieldingRequest) Marshal

func (m *VerifyShieldingRequest) Marshal() []byte

Marshal marshals VerifyShieldingRequest to a slice of bytes.

func (*VerifyShieldingRequest) MarshalToWriter

func (m *VerifyShieldingRequest) MarshalToWriter(writer jspb.Writer)

MarshalToWriter marshals VerifyShieldingRequest to the provided writer.

func (*VerifyShieldingRequest) Unmarshal

func (m *VerifyShieldingRequest) Unmarshal(rawBytes []byte) (*VerifyShieldingRequest, error)

Unmarshal unmarshals a VerifyShieldingRequest from a slice of bytes.

func (*VerifyShieldingRequest) UnmarshalFromReader

func (m *VerifyShieldingRequest) UnmarshalFromReader(reader jspb.Reader) *VerifyShieldingRequest

UnmarshalFromReader unmarshals a VerifyShieldingRequest from the provided reader.

type VerifyUnshieldingRequest

type VerifyUnshieldingRequest struct {
	Snark          []byte
	SpendNullifier []byte
	TreeRoot       []byte
	Value          uint64
}

------------------------------------------------------------------------------------------------- Unshielding data structs

func (*VerifyUnshieldingRequest) GetSnark

func (m *VerifyUnshieldingRequest) GetSnark() (x []byte)

GetSnark gets the Snark of the VerifyUnshieldingRequest.

func (*VerifyUnshieldingRequest) GetSpendNullifier

func (m *VerifyUnshieldingRequest) GetSpendNullifier() (x []byte)

GetSpendNullifier gets the SpendNullifier of the VerifyUnshieldingRequest.

func (*VerifyUnshieldingRequest) GetTreeRoot

func (m *VerifyUnshieldingRequest) GetTreeRoot() (x []byte)

GetTreeRoot gets the TreeRoot of the VerifyUnshieldingRequest.

func (*VerifyUnshieldingRequest) GetValue

func (m *VerifyUnshieldingRequest) GetValue() (x uint64)

GetValue gets the Value of the VerifyUnshieldingRequest.

func (*VerifyUnshieldingRequest) Marshal

func (m *VerifyUnshieldingRequest) Marshal() []byte

Marshal marshals VerifyUnshieldingRequest to a slice of bytes.

func (*VerifyUnshieldingRequest) MarshalToWriter

func (m *VerifyUnshieldingRequest) MarshalToWriter(writer jspb.Writer)

MarshalToWriter marshals VerifyUnshieldingRequest to the provided writer.

func (*VerifyUnshieldingRequest) Unmarshal

func (m *VerifyUnshieldingRequest) Unmarshal(rawBytes []byte) (*VerifyUnshieldingRequest, error)

Unmarshal unmarshals a VerifyUnshieldingRequest from a slice of bytes.

func (*VerifyUnshieldingRequest) UnmarshalFromReader

func (m *VerifyUnshieldingRequest) UnmarshalFromReader(reader jspb.Reader) *VerifyUnshieldingRequest

UnmarshalFromReader unmarshals a VerifyUnshieldingRequest from the provided reader.

type Void

type Void struct {
}

func (*Void) Marshal

func (m *Void) Marshal() []byte

Marshal marshals Void to a slice of bytes.

func (*Void) MarshalToWriter

func (m *Void) MarshalToWriter(writer jspb.Writer)

MarshalToWriter marshals Void to the provided writer.

func (*Void) Unmarshal

func (m *Void) Unmarshal(rawBytes []byte) (*Void, error)

Unmarshal unmarshals a Void from a slice of bytes.

func (*Void) UnmarshalFromReader

func (m *Void) UnmarshalFromReader(reader jspb.Reader) *Void

UnmarshalFromReader unmarshals a Void from the provided reader.

type Wallet

type Wallet struct {
	*js.Object
	// contains filtered or unexported fields
}

------------------------------------------------------------------------------------------------- Structs

func NewWallet

func NewWallet() *Wallet

------------------------------------------------------------------------------------------------- Init

func (*Wallet) ConfirmNote

func (wallet *Wallet) ConfirmNote(commitment string) error

ConfirmNote marks a note as mined in the blockchain

func (*Wallet) GenerateReceiveAddress

func (wallet *Wallet) GenerateReceiveAddress() (*ZAddress, error)

------------------------------------------------------------------------------------------------- GenerateReceiveAddress generates a new key pair (pk, sk) where pk can be used as a "receive" address

func (*Wallet) NewShielding

func (wallet *Wallet) NewShielding(value uint64) (*Shielding, error)

------------------------------------------------------------------------------------------------- Shielding

func (*Wallet) NewTransfer

func (wallet *Wallet) NewTransfer(cm1 string, treeIndex1 uint64, treePath1 []string,
	cm2 string, treeIndex2 uint64, treePath2 []string,
	transferAddress string, transferAmount uint64) (*ShieldedTransfer, []*Note, error)

------------------------------------------------------------------------------------------------- Transfer

func (*Wallet) NewUnshielding

func (wallet *Wallet) NewUnshielding(cm string, treeIndex uint64, treePath []string) (*Unshielding, uint64, error)

------------------------------------------------------------------------------------------------- Unshielding

func (*Wallet) ReceivedNote

func (wallet *Wallet) ReceivedNote(pk, rho string, value uint64)

type ZAddress

type ZAddress struct {
	Sk []byte
	Pk []byte
}

------------------------------------------------------------------------------------------------- Other

func (*ZAddress) GetPk

func (m *ZAddress) GetPk() (x []byte)

GetPk gets the Pk of the ZAddress.

func (*ZAddress) GetSk

func (m *ZAddress) GetSk() (x []byte)

GetSk gets the Sk of the ZAddress.

func (*ZAddress) Marshal

func (m *ZAddress) Marshal() []byte

Marshal marshals ZAddress to a slice of bytes.

func (*ZAddress) MarshalToWriter

func (m *ZAddress) MarshalToWriter(writer jspb.Writer)

MarshalToWriter marshals ZAddress to the provided writer.

func (*ZAddress) Unmarshal

func (m *ZAddress) Unmarshal(rawBytes []byte) (*ZAddress, error)

Unmarshal unmarshals a ZAddress from a slice of bytes.

func (*ZAddress) UnmarshalFromReader

func (m *ZAddress) UnmarshalFromReader(reader jspb.Reader) *ZAddress

UnmarshalFromReader unmarshals a ZAddress from the provided reader.

type ZSLBoxClient

type ZSLBoxClient interface {
	// CreateShielding computes a zkSNARK and a note commitment for given note.
	// Also returns a sendNullifier to ensure note.Rho (random) is unique
	CreateShielding(ctx context.Context, in *Note, opts ...grpcweb.CallOption) (*Shielding, error)
	// CreateUnshielding computes a zkSNARK, nullifiers for given input, using Unshielding circuit
	CreateUnshielding(ctx context.Context, in *ShieldedInput, opts ...grpcweb.CallOption) (*Unshielding, error)
	// CreateShieldedTransfer takes 2 notes as inputs (known Sk) and 2 desired output notes.
	// It returns the zkSNARK, the spend nullifiers for the inputs, and the commitments & send nullifiers for outputs
	CreateShieldedTransfer(ctx context.Context, in *ShieldedTransferRequest, opts ...grpcweb.CallOption) (*ShieldedTransfer, error)
	// VerifyShielding ensures that the provided Shielding proof is valid. It takes as input the zkSNARK,
	// the send nullifier, commitment and value of the shielded note.
	VerifyShielding(ctx context.Context, in *VerifyShieldingRequest, opts ...grpcweb.CallOption) (*Result, error)
	// VerifyUnshielding ensures that the provided Unshielding proof is valid. It takes as input the zkSNARK,
	// the spend nullifier, the tree root and value of the shielded note.
	VerifyUnshielding(ctx context.Context, in *VerifyUnshieldingRequest, opts ...grpcweb.CallOption) (*Result, error)
	// VerifyShieldedTransfer ensures that the provided shielded transfer proof is valid.
	// It takes as input the zkSNARK, treeRoot, spend nullifiers for inputs and send nullifiers & commitments
	// for outputs
	VerifyShieldedTransfer(ctx context.Context, in *VerifyShieldedTransferRequest, opts ...grpcweb.CallOption) (*Result, error)
	// GetCommitment returns SHA256(note.Rho || note.Pk || note.Value)
	// where note.Value is in little endian byte order
	GetCommitment(ctx context.Context, in *Note, opts ...grpcweb.CallOption) (*Bytes, error)
	// GetSendNullifier returns SHA256(0x00 || note.Rho)
	GetSendNullifier(ctx context.Context, in *Note, opts ...grpcweb.CallOption) (*Bytes, error)
	// GetSpendNullifier returns SHA256(0x01 || shieldedInput.Rho || shieldedInput.Sk)
	GetSpendNullifier(ctx context.Context, in *ShieldedInput, opts ...grpcweb.CallOption) (*Bytes, error)
	// GetNewAddress returns a tuple (Pk, Sk) where Pk is the paying (public) key and Sk is the secret key
	GetNewAddress(ctx context.Context, in *Void, opts ...grpcweb.CallOption) (*ZAddress, error)
	// Sha256Compress applies SHA-256 to one input block, excluding the padding step specified in [NIST2015, Section 5.1]
	Sha256Compress(ctx context.Context, in *Bytes, opts ...grpcweb.CallOption) (*Bytes, error)
}

Provides services to compute and verify proofs for shielding, unshielding and shielded transfer operations

func NewZSLBoxClient

func NewZSLBoxClient(hostname string, opts ...grpcweb.DialOption) ZSLBoxClient

NewZSLBoxClient creates a new gRPC-Web client.

Jump to

Keyboard shortcuts

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