comm

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Type driver.Type = 2
)

Variables

This section is empty.

Functions

func UnmarshalTypedMetadata

func UnmarshalTypedMetadata(metadata driver.Metadata) (*tokens.TypedMetadata, error)

func UnmarshalTypedToken

func UnmarshalTypedToken(token driver.Token) (*tokens.TypedToken, error)

func WrapMetadataWithType

func WrapMetadataWithType(metadata driver.Metadata) (driver.Metadata, error)

func WrapTokenWithType

func WrapTokenWithType(token driver.Token) (driver.Token, error)

Types

type Metadata

type Metadata struct {
	// Type is the type of the token
	Type token2.Type
	// Value is the quantity of the token
	Value *math.Zr
	// BlindingFactor is the blinding factor used to commit type and value
	BlindingFactor *math.Zr
	// Owner is the owner of the token
	Owner []byte
	// Issuer is the issuer of the token, if defined
	Issuer []byte
}

Metadata contains the metadata of a token

type Token

type Token struct {
	// Owner is the owner of the token
	Owner []byte
	// Data is the Pedersen commitment to type and value
	Data *math.G1
}

Token encodes Type, Value, Owner

Jump to

Keyboard shortcuts

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