Documentation ¶
Overview ¶
package tests contains tests and test helper functions To run the tests, a local network with default configuration is expected to be running. You can use algokit to start one with `algokit localnet start` Custom configuration can be set by changing the exposed variables at the top of the algosdkwrapper/setup.go file.
Index ¶
- func CompileWithPuyaPy(filepath string, options string) error
- func CreateDirectoryIfNeeded(dir string) error
- func DeserializeCompiledCircuit(filepath string) (*ap.CompiledCircuit, error)
- func RandomBigInt(maxBits int64) *big.Int
- func RenamePuyaPyOutput(oldname string, newname string, dir string) error
- func SerializeCompiledCircuit(cc *ap.CompiledCircuit, filepath string) error
- func ShouldRecompile(sourcePath, outputPath string) bool
- func Substitute(filepath string, mapping map[string]string) error
- func TestCircuitWithGnark(circuit frontend.Circuit, assignment frontend.Circuit, curve ecc.ID) (*ap.CompiledCircuit, *ap.VerifiedProof, error)
- type CompiledCircuitBytes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompileWithPuyaPy ¶ added in v0.1.4
CompileWithPuyaPy compiles `filepath` with puyapy, with `options'. Leave `options` empty to not pass any options
func CreateDirectoryIfNeeded ¶
CreateDirectoryIfNeeded creates `dir` if it does not exist
func DeserializeCompiledCircuit ¶ added in v0.1.4
func DeserializeCompiledCircuit(filepath string) (*ap.CompiledCircuit, error)
DeserializeCompiledCircuit deserializes a compiled circuit from file
func RandomBigInt ¶
RandomBigInt returns a random big integer bigger than 1 of up to maxBits bits. If maxBits is less than 1, it defaults to 32.
func RenamePuyaPyOutput ¶ added in v0.1.4
RenamePuyaPyOutput renames puyapy output files, e.g., 'oldname.approval.teal' is renamed to 'newname.approval.teal'. It looks in `dir` for the files to rename, looking for these files: oldname.approval.teal, oldname.clear.teal, oldname.arc32.json, oldname.teal
func SerializeCompiledCircuit ¶ added in v0.1.4
func SerializeCompiledCircuit(cc *ap.CompiledCircuit, filepath string) error
SerializeCompiledCircuit serializes a compiled circuit to file
func ShouldRecompile ¶ added in v0.1.4
ShouldRecompile returns true if sourcePath is more recent than outputPath or if it encounters an error
func Substitute ¶ added in v0.1.4
Substitute replaces all instances of `mapping` keys with their values overwriting `filepath`
func TestCircuitWithGnark ¶
func TestCircuitWithGnark(circuit frontend.Circuit, assignment frontend.Circuit, curve ecc.ID) (*ap.CompiledCircuit, *ap.VerifiedProof, error)
TestCircuitWithGnark compiles a circuit and verifies a proof from an assignment using gnark (no interaction with the AVM)
Types ¶
Directories ¶
Path | Synopsis |
---|---|
package algosdkwrapper provides utility functions to interact with an Algorand local network wrapping the go-algorand-sdk.
|
package algosdkwrapper provides utility functions to interact with an Algorand local network wrapping the go-algorand-sdk. |