Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the cookie-law-info domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/r1news/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the web-stories domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/r1news/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the rocket domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/r1news/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the all-in-one-wp-security-and-firewall domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/r1news/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/r1news/public_html/wp-includes/functions.php on line 6114
basic bitcoin development - Can someone explain to me about Liquid Network - R1 NEWS

basic bitcoin development – Can someone explain to me about Liquid Network

[ad_1]

You have to run elementsd with below elements.conf:

chain=elementsregtest

rpcport = 18884
rpcuser = user1
rpcpassword = password1

Use the example mentioned in Element code tutorial:

const request = require('request');

let username = "user1";
let password = "password1";

let options = 
    url: "http://localhost:18884",
    method: "post",
    headers:
     
     "content-type": "text/plain"
    ,
    auth: 
        user: username,
        pass: password
    ,
    body: JSON.stringify( "jsonrpc": "2.0", "id": "rpctest", "method": "getwalletinfo", "params": [] )
;

request(options, (error, response, body) => 
    if (error) 
        console.error('An error occurred: ', error);
     else 
        json = JSON.parse(body);
        console.log(json.result.balance.bitcoin);
    
);

The output will show the bitcoin balance returned by getwalletinfo.

Other RPCs: https://elementsproject.org/en/doc/0.18.1.11/rpc/

https://docs.blockstream.com/liquid/developer-guide/developer-guide-index.html?highlight=rpc#basic-commands

[ad_2]

Source Link