getbalance

package
v0.1.20 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: Unlicense Imports: 18 Imported by: 0

Documentation

Overview

Package getbalance provides an onion message layer type that makes a request for the current balance of a session.

Index

Constants

View Source
const (
	GetBalanceMagic = "getb"
	GetBalanceLen   = magic.Len + nonce.IDLen +
		3*sha256.Len + nonce.IVLen*3
)

Variables

This section is empty.

Functions

func NewGetBalance

func NewGetBalance(id nonce.ID, ep *exit.ExitPoint) ont.Onion

Types

type GetBalance

type GetBalance struct {
	ID nonce.ID

	// Ciphers is a set of 3 symmetric ciphers that are to be used in their
	// given order over the reply message from the service.
	crypto.Ciphers

	// Nonces are the nonces to use with the cipher when creating the
	// encryption for the reply message,
	// they are common with the crypts in the header.
	crypto.Nonces

	ont.Onion
}

func (*GetBalance) Account

func (x *GetBalance) Account(res *sess.Data, sm *sess.Manager,
	s *sessions.Data, last bool) (skip bool, sd *sessions.Data)

func (*GetBalance) Decode

func (x *GetBalance) Decode(s *splice.Splice) (e error)

func (*GetBalance) Encode

func (x *GetBalance) Encode(s *splice.Splice) (e error)

func (*GetBalance) Handle

func (x *GetBalance) Handle(s *splice.Splice, p ont.Onion, ng ont.Ngin) (e error)

func (*GetBalance) Len

func (x *GetBalance) Len() int

func (*GetBalance) Magic

func (x *GetBalance) Magic() string

func (*GetBalance) Unwrap

func (x *GetBalance) Unwrap() interface{}

func (*GetBalance) Wrap

func (x *GetBalance) Wrap(inner ont.Onion)

type GetBalanceParams

type GetBalanceParams struct {
	ID         nonce.ID
	Alice, Bob *sessions.Data
	S          sessions.Circuit
	KS         *crypto.KeySet
}

Jump to

Keyboard shortcuts

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