Public library API is currently in alpha stage, breaking changes are very likely to happen.
API documentation is available here.
var Address = Address;// Generate a new random Bitmessage identity.var addr1 = Address;console;// Or create it from passphrase.var addr2 = Address;console;
var structs = structs;var encoded = Buffer;var decoded1 = structsvar_str;console; // testvar decoded2 = structsvar_str;console; // test2var decoded3 = structsvar_int;console; // 3var decoded4 = structsvar_int_list;console; // [1, 2, 3]
var structs = structs;var messages = messages;// Simple encoding and decoding:var vermsg = messagesversion;console; // 188.8.131.52// Low-level encoding and decoding:var addrPayload = messagesaddr;var addrmsg = structsmessage;var decoded = structsmessage;console; // addrvar addr = messagesaddr;console; // 184.108.40.206// Encode with empty payload:var verackmsg = structsmessage;console; // verack
You will need to install bitmessage-transports library.
var messages = messages;var TcpTransport = TcpTransport;var tcp =dnsSeeds: "bootstrap8444.bitmessage.org" 8444;tcp;tcp;
Written in 2014-2015 by Kagami Hiiragi firstname.lastname@example.org
To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see http://creativecommons.org/publicdomain/zero/1.0/.