Skip to content
Snippets Groups Projects
Commit b4930312 authored by Mahdi Yari's avatar Mahdi Yari
Browse files

Merge branch 'feature/collateralized-convert-op' into 'master'

Issue 23 operation update for HF25

See merge request !30
parents 867abfeb e591d915
No related branches found
No related tags found
No related merge requests found
......@@ -1766,6 +1766,21 @@ hive.broadcast.convert(wif, owner, requestid, amount, function(err, result) {
console.log(err, result);
});
```
### Collateralized Convert
```js
hive.broadcast.collateralizedConvert(wif, owner, requestid, amount, function(err, result) {
console.log(err, result);
});
```
|Parameter|Datatype|Description|
|---------|--------|-----------|
|wif|string|Active private key. "5xx...xxxx"|
|owner|string|Hive username. "guest123"|
|requestid|integer|Identifier for the conversion transactions from same account. 1|
|amount|string|Hive to be used as collateral for the conversion. "100.000 HIVE"|
|callback|function|function(err, data) {/*code*/}|
### Curate Reward
```js
hive.broadcast.curateReward(wif, curator, reward, commentAuthor, commentPermlink, function(err, result) {
......
......@@ -301,6 +301,14 @@ let convert = new Serializer(
}
);
let collateralized_convert = new Serializer(
"collateralized_convert",{
owner: string,
requestid: uint32,
amount: asset
}
);
var authority = new Serializer(
"authority", {
weight_threshold: uint32,
......@@ -999,6 +1007,7 @@ operation.st_operations = [
update_proposal_votes,
remove_proposal,
update_proposal,
collateralized_convert,
claim_reward_balance2,
vote2,
smt_setup,
......
......@@ -96,6 +96,15 @@ module.exports = [
"amount"
]
},
{
"roles": ["active","owner"],
"operation": "collateralized_convert",
"params": [
"owner",
"requestid",
"amount"
]
},
{
"roles": ["active", "owner"],
"operation": "account_create",
......
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