Random number oracle - it is an Oracle for generating deterministic digital signatures for random numbers generation on the Waves blockchain. It includes 2 functions: sign and sendtoBlockchain
Signs incoming data with three RSA private keys and returns an array containing message and 3 RSA signatures.
$rsa->setHash('sha256'); - to use a different hashing method, replace sha256 with your own
(string) $data- message for sign (tx.id)
array: array includes message and 3 RSA signs
messagereturns as string,signreturns as byte array
Creates Invoke transaction with arguments and broadcast it to the blockchain
$wk = new WavesKit('T');-Tfor Testnet,Wfor Mainnet$seed = 'your seed here';- changeyour seed hereon your own seed phrase$dApp = 'your dApp address';- changeyour dApp addresson your dApp addresstx = $wk->txInvokeScript($dApp, 'dApp method', $args, $payments);- changedApp methodon your @Callable function name
(array) $data - result of Sign function
tx.id|error
tx.idif transaction was broadcasted,erroron failure
- WavesKit : WavesKit documentation
- phpseclib/phpseclib
- laravel