stake

package
v0.0.3-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StakeCircuit

func StakeCircuit(privateParams, publicParams interface{}) bool

func ValidateUnlockingScript

func ValidateUnlockingScript(scriptCommitment []byte, scriptParams *UnlockingScriptInputs, unlockingParams [][]byte) (bool, error)

ValidateUnlockingScript is a placeholder. Normally this would be part of the overall circuit to validate the functional commitment.

Types

type PrivateParams

type PrivateParams struct {
	AssetID          [types.AssetIDLen]byte
	Salt             [types.SaltLen]byte
	State            [types.StateLen]byte
	CommitmentIndex  uint64
	InclusionProof   standard.InclusionProof
	ScriptCommitment []byte
	ScriptParams     [][]byte
	UnlockingParams  [][]byte
}

type PublicParams

type PublicParams struct {
	TXORoot   []byte
	SigHash   []byte
	Amount    uint64
	Nullifier []byte
	Locktime  time.Time
}

type UnlockingScriptInputs

type UnlockingScriptInputs struct {
	InputIndex    int
	PrivateParams PrivateParams
	PublicParams  PublicParams
	ScriptParams  [][]byte
}

Jump to

Keyboard shortcuts

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