NAME
Circle::Node - The Circle Chain's Node module.
VERSION
Version 0.04
SYNOPSIS
use Circle::Node;
my $response = subscribe();
...
EXPORT
- subscribe
- serverFeatures
- broadcastTransaction
SUBROUTINES/METHODS
subscribe
my $response = subscribe();
if ($response->{status} == 200) {
my $data = $response->{data};
# process data here.
}
subscribe the circle chain server node and get the basic data of the node:
{
"baseHeight": 1000,
"ipPortList": ["123.34.33.16:80"]
}
serverFeatures
my $response = serverFeatures();
if ($response->{status} == 200) {
my $data = $response->{data};
# process the data here.
}
serverFeatures api provides the server features:
{
"version": "1.0.0",
"role": "CLOUDER",
"protolVersion": "0.0.1",
"publicIP": "123.32.22.12",
"localIP": "192.168.1.10",
"port": 80,
"baseHeight": 1000,
"publicKey": null
}
broadcastTransaction
my $response = broadcastTransaction({
txid => '',
type => 0,
hash => '',
version => 1,
size => 100,
vsize => 100,
weight => 0,
locktime => 0,
vin => [
{
txid => '',
vout => 0,
scriptSig => {
asm => '',
hex => '',
},
txinwitness => [],
sequence => 0,
addresses => [''],
value => '',
}
],
vout => [
{
value => '',
n => 0,
scriptPubKey => '',
}
],
blockhash => '',
confirmations => 1,
time => 1725885098000,
blocktime => 1725887098000
});
if ($response->{status} == 200) {
my $txid = $response->{data};
# the transaction is broadcast.
}
AUTHOR
charles li, <lidh04 at gmail.com>
BUGS
Please report any bugs or feature requests to bug-circle-node at rt.cpan.org
, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Circle-Node. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SEE ALSO
See Circle::Common for circle common module.
See Circle::User for circle user module .
See Circle::Wallet for circle wallet module.
See Circle::Block for circle block module.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Circle::Node
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
This module belongs to author lidh04@gmail
LICENSE AND COPYRIGHT
This software is Copyright (c) 2024 by charles li.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)