added claim_address and change_address to publish'

This commit is contained in:
bill bittner 2017-06-12 12:07:01 -07:00
parent daa7555752
commit 5569e53e2d
3 changed files with 6 additions and 8 deletions

View file

@ -68,7 +68,7 @@ function findAllClaims(name, resolve, reject){
module.exports = { module.exports = {
publishClaim: function(publishParams){ publishClaim: function(publishParams){
console.log(publishParams); console.log("publish params:>", publishParams);
var deferred = new Promise(function(resolve, reject){ var deferred = new Promise(function(resolve, reject){
axios.post('http://localhost:5279/lbryapi', { axios.post('http://localhost:5279/lbryapi', {
"method": "publish", "method": "publish",
@ -89,9 +89,7 @@ module.exports = {
}, },
getClaimBasedOnNameOnly: function(claimName){ getClaimBasedOnNameOnly: function(claimName){
// 1. create a promise
var deferred = new Promise(function (resolve, reject){ var deferred = new Promise(function (resolve, reject){
// 2. code to resolve or reject the promise
// make a call to the daemon to get the claims list // make a call to the daemon to get the claims list
axios.post('http://localhost:5279/lbryapi', { axios.post('http://localhost:5279/lbryapi', {
"method": "claim_list", "method": "claim_list",
@ -129,9 +127,7 @@ module.exports = {
reject(error); reject(error);
}); });
}); });
// 3. return the promise
return deferred; return deferred;
}, },
getClaimBasedOnUri: function(uri){ getClaimBasedOnUri: function(uri){

View file

@ -15,7 +15,7 @@ function createPublishParams(name, filepath, license, nsfw) {
var publishParams = { var publishParams = {
"name": name, "name": name,
"file_path": filepath, "file_path": filepath,
"bid": 0.1, "bid": 0.01,
"metadata": { "metadata": {
"description": name + " published via spee.ch", "description": name + " published via spee.ch",
"title": name, "title": name,
@ -23,7 +23,9 @@ function createPublishParams(name, filepath, license, nsfw) {
"language": "en", "language": "en",
"license": license, "license": license,
"nsfw": (nsfw.toLowerCase() === "true") "nsfw": (nsfw.toLowerCase() === "true")
} },
"claim_address": "", // fill in wallet address
"change_address": "" // fill in wallet address; requires daemon 0.12.2rc1 or above
}; };
return publishParams; return publishParams;
} }