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
bdb59cb9
Commit
bdb59cb9
authored
1 year ago
by
Dan Notestein
Browse files
Options
Downloads
Plain Diff
Merge branch 'mirafun-master-patch-74854' into 'master'
#30
export Signature class See merge request
!32
parents
282df5ad
60f1eaca
No related branches found
No related tags found
1 merge request
!32
#30 export Signature class
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
doc/README.md
+5
-0
5 additions, 0 deletions
doc/README.md
package.json
+1
-1
1 addition, 1 deletion
package.json
src/auth/index.js
+6
-2
6 additions, 2 deletions
src/auth/index.js
with
12 additions
and
3 deletions
doc/README.md
+
5
−
0
View file @
bdb59cb9
...
@@ -2289,6 +2289,11 @@ hive.auth.wifToPublic(privWif);
...
@@ -2289,6 +2289,11 @@ hive.auth.wifToPublic(privWif);
hive.auth.signTransaction(trx, keys);
hive.auth.signTransaction(trx, keys);
```
```
### Sign a message
```js
hive.auth.signMessage(message, privateKey)
```
# Formatter
# Formatter
### Amount
### Amount
...
...
This diff is collapsed.
Click to expand it.
package.json
+
1
−
1
View file @
bdb59cb9
{
{
"name"
:
"@hiveio/hive-js"
,
"name"
:
"@hiveio/hive-js"
,
"version"
:
"2.0.
6
"
,
"version"
:
"2.0.
7
"
,
"description"
:
"Hive.js the JavaScript API for Hive blockchain"
,
"description"
:
"Hive.js the JavaScript API for Hive blockchain"
,
"main"
:
"lib/index.js"
,
"main"
:
"lib/index.js"
,
"scripts"
:
{
"scripts"
:
{
...
...
This diff is collapsed.
Click to expand it.
src/auth/index.js
+
6
−
2
View file @
bdb59cb9
...
@@ -98,9 +98,13 @@ Auth.wifToPublic = function (privWif) {
...
@@ -98,9 +98,13 @@ Auth.wifToPublic = function (privWif) {
return
pubWif
;
return
pubWif
;
};
};
Auth
.
isPubkey
=
function
(
pubkey
,
address_prefix
)
{
Auth
.
isPubkey
=
function
(
pubkey
,
address_prefix
)
{
return
PublicKey
.
fromString
(
pubkey
,
address_prefix
)
!=
null
return
PublicKey
.
fromString
(
pubkey
,
address_prefix
)
!=
null
}
};
Auth
.
signMessage
=
function
(
msg
,
privWif
)
{
return
Signature
.
sign
(
msg
,
privWif
).
toHex
();
};
Auth
.
signTransaction
=
function
(
trx
,
keys
)
{
Auth
.
signTransaction
=
function
(
trx
,
keys
)
{
var
signatures
=
[];
var
signatures
=
[];
...
...
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