Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hive-js
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
hive-js
Commits
7418a74e
Commit
7418a74e
authored
6 years ago
by
roadscape
Browse files
Options
Downloads
Patches
Plain Diff
add null key tests
parent
ea40b3ad
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/KeyFormats.js
+14
-1
14 additions, 1 deletion
test/KeyFormats.js
with
14 additions
and
1 deletion
test/KeyFormats.js
+
14
−
1
View file @
7418a74e
...
@@ -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
"
});
});
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment