Message.MAGIC_BYTES = new Buffer('Bitcoin Signed Message:\n');
Message.prototype.magicHash = function magicHash() {
var prefix1 = BufferWriter.varintBufNum(Message.MAGIC_BYTES.length);
var messageBuffer = new Buffer(this.message);
var prefix2 = BufferWriter.varintBufNum(messageBuffer.length);
var buf = Buffer.concat([prefix1, Message.MAGIC_BYTES, prefix2, messageBuffer]);
var hash = sha256sha256(buf);
return hash;
};
and this is how magicHash is implemented by bitcoinjs:
function magicHash (message, network) {
var messagePrefix = new Buffer(network.messagePrefix)
var messageBuffer = new Buffer(message)
var lengthBuffer = bufferutils.varIntBuffer(messageBuffer.length)
var buffer = Buffer.concat([messagePrefix, lengthBuffer, messageBuffer])
return bcrypto.hash256(buffer)
}
I am sure you can deduct what network.messagePrefix ought to be here. I hope this helps to see if it value as set in network is set correctly
Not sure if thatâs really needed to have multicoins fully working though.[/quote]
It seems that blockr.io no longer support their site. Last news date 25.08.2014 http://ppc.blockr.io/news
If they stop supporting peercoin, my wallet can not support peercoin too.
If you canât find an up to date block explorer that exposes âsendrawtransactionâ, we might need to implement our own.
We can start a peer4commit, and I can do back-end development.
But first please try to find an up to date explorer.
If you canât find an up to date block explorer that exposes âsendrawtransactionâ, we might need to implement our own.
We can start a peer4commit, and I can do back-end development.
But first please try to find an up to date explorer.[/quote]
Thanks for the offer.
Iâve already implemented my own âsendrawtransactionâ, because blockr.io does not support it for now.
I am concerned about the possibility that blockr.io will stop supporting this API:
Transaction info (This API call returns transaction data for unconfirmed and normal blockchain transactions. )
Address balance (This api call can be used to fast request only the address balance.)
Address transactions (Returns transactions for given address. )
But itâs open source, so you might be able to add it next to your âsedrawtransactionâ service?[/quote]
yes if blockr.io is stops working then i will use API bkchain.org.
Also maybe I will develop my own blockexplorer like blockr.io if my service will be popular