common

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetTransferActionMetadata

func SetTransferActionMetadata(attrs map[interface{}]interface{}, metadata map[string][]byte)

SetTransferActionMetadata extracts the transfer metadata from the passed attributes and sets them to the passed metadata

Types

type Backend

type Backend struct {
	// Ledger to access the ledger state
	Ledger driver.GetStateFnc
	// signed Message
	Message []byte
	// Cursor is used to iterate over the signatures
	Cursor int
	// signatures on Message
	Sigs [][]byte
}

func NewBackend

func NewBackend(ledger driver.GetStateFnc, message []byte, sigs [][]byte) *Backend

func (*Backend) GetState

func (b *Backend) GetState(key string) ([]byte, error)

func (*Backend) HasBeenSignedBy

func (b *Backend) HasBeenSignedBy(id view.Identity, verifier driver.Verifier) ([]byte, error)

HasBeenSignedBy checks if a given Message has been signed by the signing identity matching the passed verifier

func (*Backend) Signatures

func (b *Backend) Signatures() [][]byte

Jump to

Keyboard shortcuts

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