Versions in this module Expand all Collapse all v1 v1.0.0 Apr 11, 2024 Changes in this version + func AllocCache(flags ...Flag) (*C.randomx_cache, error) + func AllocDataset(flags ...Flag) (*C.randomx_dataset, error) + func CalculateHashFirst(vm *C.randomx_vm, in []byte) + func CreateVM(cache *C.randomx_cache, dataset *C.randomx_dataset, flags ...Flag) (*C.randomx_vm, error) + func DatasetItemCount() uint32 + func DestroyVM(vm *C.randomx_vm) + func FastInitFullDataset(dataset *C.randomx_dataset, cache *C.randomx_cache, workerNum uint32) + func GetCacheMemory(cache *C.randomx_cache) unsafe.Pointer + func GetDatasetMemory(dataset *C.randomx_dataset) unsafe.Pointer + func InitCache(cache *C.randomx_cache, seed []byte) + func InitDataset(dataset *C.randomx_dataset, cache *C.randomx_cache, startItem uint32, ...) + func ReleaseCache(cache *C.randomx_cache) + func ReleaseDataset(dataset *C.randomx_dataset) + func SetVMCache(vm *C.randomx_vm, cache *C.randomx_cache) + func SetVMDataset(vm *C.randomx_vm, dataset *C.randomx_dataset) + type Flag int + var FlagArgon2 Flag = 96 + var FlagArgon2AVX2 Flag = 64 + var FlagArgon2SSSE3 Flag = 32 + var FlagDefault Flag = 0 + var FlagFullMEM Flag = 4 + var FlagHardAES Flag = 2 + var FlagJIT Flag = 8 + var FlagLargePages Flag = 1 + var FlagSecure Flag = 16 + func GetFlags() Flag + type RxCache struct + func NewRxCache(flags ...Flag) (*RxCache, error) + func (c *RxCache) Close() + func (c *RxCache) Init(seed []byte) bool + func (c *RxCache) IsReady(seed []byte) bool + type RxDataset struct + func NewRxDataset(flags ...Flag) (*RxDataset, error) + func (ds *RxDataset) CInit(seed []byte, workerNum uint32) bool + func (ds *RxDataset) Close() + func (ds *RxDataset) GoInit(seed []byte, workerNum uint32) bool + type RxHash [C.RANDOMX_HASH_SIZE]byte + func CalculateCommitment(in []byte, hash RxHash) (out RxHash) + func CalculateHash(vm *C.randomx_vm, in []byte) (out RxHash) + func CalculateHashLast(vm *C.randomx_vm) (out RxHash) + func CalculateHashNext(vm *C.randomx_vm, in []byte) (out RxHash) + func Search(vm *C.randomx_vm, in []byte, target uint64, maxTimes uint64, jump uint32, ...) (hash RxHash, found bool, sol []byte) + type RxVM struct + func NewRxVM(rxDataset *RxDataset, flags ...Flag) (*RxVM, error) + func (vm *RxVM) CalcHash(in []byte) RxHash + func (vm *RxVM) CalcHashFirst(in []byte) + func (vm *RxVM) CalcHashLast() RxHash + func (vm *RxVM) CalcHashNext(in []byte) RxHash + func (vm *RxVM) Close() + func (vm *RxVM) Search(in []byte, target uint64, maxTimes uint64, jump uint32, nonce []byte) (hash RxHash, found bool, sol []byte) + func (vm *RxVM) UpdateDataset(rxDataset *RxDataset)