Skip to content
GitLab
Explore
Sign in
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
e1a13278
Commit
e1a13278
authored
4 years ago
by
Mahdi Yari
Browse files
Options
Downloads
Patches
Plain Diff
add claimRewardBalanceWith
parent
06b66140
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!17
update readme
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/README.md
+40
-0
40 additions, 0 deletions
doc/README.md
with
40 additions
and
0 deletions
doc/README.md
+
40
−
0
View file @
e1a13278
...
...
@@ -878,6 +878,46 @@ Return Example:
extensions
:
[],
signatures
:
[
'
205......614e
'
]
}
```
### Claim Reward Balance With Options
Claims pending rewards, be they HIVE, HBD or VESTS.
```
js
hive
.
broadcast
.
claimRewardBalanceWith
(
wif
,
options
,
callback
);
```
|Parameter|Datatype|Description|
|---------|--------|-----------|
|wif|string|Use
<
hive.auth.toWif
(
user
,
pass
,
type
)
>
|
|options|object|an object containing the calim parameters. Look at the example below.|
|callback|function|function(err, data) {/
*code*
/}|
Call Example:
```
js
var
options
=
{
account
:
"
username
"
,
reward_hbd
:
"
0.000 HBD
"
,
reward_hive
:
"
0.000 HIVE
"
,
reward_vests
:
"
0.000006 VESTS
"
}
hive
.
broadcast
.
claimRewardBalanceWith
(
"
5Hupd....pp7vGY
"
,
options
,
function
(
err
,
data
)
{
console
.
log
(
err
,
data
);
});
```
Return Example:
```
js
{
id
:
'
4b7b........034c7
'
,
block_num
:
19756322
,
trx_num
:
3
,
expired
:
false
,
ref_block_num
:
29965
,
ref_block_prefix
:
4245658614
,
expiration
:
'
2018-02-10T20:14:00
'
,
operations
:
[
[
'
claim_reward_balance
'
,
[
Object
]
]
],
extensions
:
[],
signatures
:
[
'
1f61a..........4f3d7
'
]
}
```
### Get Vesting Delegations
```
js
hive
.
api
.
getVestingDelegations
(
account
,
from
,
limit
,
function
(
err
,
result
)
{
...
...
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