Skip to content
Snippets Groups Projects
Commit 7418a74e authored by roadscape's avatar roadscape
Browse files

add null key tests

parent ea40b3ad
No related branches found
No related tags found
No related merge requests found
...@@ -70,6 +70,16 @@ var test = function(key) { ...@@ -70,6 +70,16 @@ var test = function(key) {
var address = Address.fromPublic(public_key, true, 56); var address = Address.fromPublic(public_key, true, 56);
assert.equal(key.Compressed_PTS, address.toString()); assert.equal(key.Compressed_PTS, address.toString());
}); });
it("null hex to pubkey", function() {
var public_key = PublicKey.fromHex(key.null_hex);
assert.equal(key.null_address, public_key.toPublicKeyString());
});
it("null pubkey to hex", function() {
var public_key = PublicKey.fromString(key.null_address);
assert.equal(key.null_hex, public_key.toHex());
});
}); });
}; };
...@@ -87,6 +97,9 @@ test({ ...@@ -87,6 +97,9 @@ test({
Uncompressed_BTC: "STMLAFmEtM8as1mbmjVcj5dphLdPguXquimn", Uncompressed_BTC: "STMLAFmEtM8as1mbmjVcj5dphLdPguXquimn",
Compressed_BTC: "STMANNTSEaUviJgWLzJBersPmyFZBY4jJETY", Compressed_BTC: "STMANNTSEaUviJgWLzJBersPmyFZBY4jJETY",
Uncompressed_PTS: "STMEgj7RM6FBwSoccGaESJLC3Mi18785bM3T", Uncompressed_PTS: "STMEgj7RM6FBwSoccGaESJLC3Mi18785bM3T",
Compressed_PTS: "STMD5rYtofD6D4UHJH6mo953P5wpBfMhdMEi" Compressed_PTS: "STMD5rYtofD6D4UHJH6mo953P5wpBfMhdMEi",
// https://github.com/steemit/steem-js/issues/267
null_hex: "000000000000000000000000000000000000000000000000000000000000000000",
null_address: "STM1111111111111111111111111111111114T1Anm"
}); });
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment