PHP code example of nimiq / utils

1. Go to this page and download the library: Download nimiq/utils library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

nimiq / utils example snippets


use Nimiq\Utils\AddressUtils;
use Nimiq\Utils\SignatureUtils;
use Nimiq\Utils\RpcUtils;

$public_key = sodium_hex2bin('873279e12d5af18c4e899a781e55711f7910ed8ddb85b2179ece38a570253527');

AddressUtils::pubkey2address(string $public_key[, bool $with_spaces = true]): string

SignatureUtils::verify(string $signature, string $data, string $public_key): bool

SignatureUtils::verify_message(string $signature, string $message, string $public_key): bool

RpcUtils::prepareRedirectInvocation(string $targetURL, int $id, string $returnURL, string $command, array $args, string $responseMethod): string
bash
php test/test.php