Documentation ¶
Index ¶
- Variables
- func BlockCounter(blockTime ...time.Duration) (chain.BlockCounter, error)
- func Connect(groupSize int, honestThreshold int) *localChain
- func ConnectWithKey(groupSize int, honestThreshold int, operatorPrivateKey *operator.PrivateKey) *localChain
- func GenerateHandlerID() int
- func NewSigner(operatorPrivateKey *operator.PrivateKey) *signer
Constants ¶
This section is empty.
Variables ¶
var DefaultCurve elliptic.Curve = btcec.S256()
DefaultCurve is the default elliptic curve implementation used in the chain/local package. The local chain uses the secp256k1 curve and the specific implementation is provided by the btcec package. Normally, the go-ethereum implementation could be used as well but that implementation has an unset elliptic curve name (elliptic.Curve.Params().Name returns an empty string) so that curve cannot be easily used with operator.GenerateKeyPair which is widely used in the local chain environment. This is why the btcec implementation is used.
Functions ¶
func BlockCounter ¶
func BlockCounter(blockTime ...time.Duration) (chain.BlockCounter, error)
BlockCounter creates a BlockCounter that runs completely locally. It is designed to simply increase block height at a set time interval in the background.
func Connect ¶
Connect initializes a local stub implementation of the chain interfaces for testing. It uses auto-generated operator key.
func ConnectWithKey ¶
func ConnectWithKey( groupSize int, honestThreshold int, operatorPrivateKey *operator.PrivateKey, ) *localChain
ConnectWithKey initializes a local stub implementation of the chain interfaces for testing.
func GenerateHandlerID ¶
func GenerateHandlerID() int
func NewSigner ¶
func NewSigner(operatorPrivateKey *operator.PrivateKey) *signer
Types ¶
This section is empty.