diff --git a/app/components/client/playground-scripts.js b/app/components/client/playground-scripts.js index 5de27e0..0cab01f 100644 --- a/app/components/client/playground-scripts.js +++ b/app/components/client/playground-scripts.js @@ -170,7 +170,7 @@ function fetchMetadata(exampleNumber, data) { send({ claim: data, message: "fetch metadata", - method: "claim_tip", + method: "support_create", example: exampleNumber }); @@ -193,7 +193,7 @@ function getMemeInfo() { // TODO: Error handling language: document.getElementById("meme-language").value, license: document.getElementById("meme-license").value, name: document.getElementById("meme-title").value, - nsfw: document.getElementById("meme-nsfw-flag").checked, + tags: document.getElementById("meme-nsfw-flag").checked ? "mature" : "[]", title: document.getElementById("meme-title").value }; } @@ -216,7 +216,7 @@ function initializePlayground() { function playgroundResponseForExample1(source) { return `
# With the LBRY app/daemon running locally, you can use this in your Terminal
-curl --header "Content-Type: application/json" --data '{ "method": "resolve", "params": { "uri": "${source}" }}' http://localhost:5279
+curl --header "Content-Type: application/json" --data '{ "method": "resolve", "params": { "urls": "${source}" }}' http://localhost:5279
@@ -227,7 +227,7 @@ curl --header "Content-Type: application/json"
function playgroundResponseForExample2(source) {
return `
# With the LBRY app/daemon running locally, you can use this in your Terminal
-curl --header "Content-Type: application/json" --data '{ "method": "publish", "params": { "name": "${source.name}", "file_path": "ABSOLUTE_PATH_TO_MEDIA_ON_YOUR_COMPUTER", "bid": "0.001", "metadata": { "description": "${source.description}", "title": "${source.title}", "language": "${source.language}", "license": "${source.license}", "nsfw": ${source.nsfw} }}}' http://localhost:5279
+curl --header "Content-Type: application/json" --data '{ "method": "publish", "params": { "name": "${source.name}", "file_path": "ABSOLUTE_PATH_TO_MEDIA_ON_YOUR_COMPUTER", "bid": "0.001", "metadata": { "description": "${source.description}", "title": "${source.title}", "languages": "${source.language}", "license": "${source.license}", "tags": ${source.tags} }}}' http://localhost:5279
@@ -240,7 +240,7 @@ function playgroundResponseForExample3(source) {
return `
# With the LBRY app/daemon running locally, you can use this in your Terminal
-curl --header "Content-Type: application/json" --data '{ "method": "claim_tip", "params": { "amount": "0.001", "claim_id": "${source}" }}' http://localhost:5279
+curl --header "Content-Type: application/json" --data '{ "method": "support_create", "params": { "amount": "0.001", "claim_id": "${source}", "--tip" }}' http://localhost:5279
diff --git a/app/helpers/fetch-metadata.js b/app/helpers/fetch-metadata.js
index 61802df..a6fcced 100644
--- a/app/helpers/fetch-metadata.js
+++ b/app/helpers/fetch-metadata.js
@@ -18,7 +18,7 @@ import { send } from "~socket";
import uploadImage from "./upload-image";
const allowedQueryMethods = [
- "claim_tip",
+ "support_create",
"publish",
"resolve"
];
@@ -79,7 +79,7 @@ export default async(data, socket) => {
switch(true) {
// T I P
// E X A M P L E
- case resolveMethod === "claim_tip":
+ case resolveMethod === "support_create":
if (!approvedContentIdsForTipping.includes(claimAddress)) {
return send(socket, {
example: data.example,
@@ -95,6 +95,7 @@ export default async(data, socket) => {
apiRequestMethod = "POST";
body.amount = "0.001"; // Hardcoded tip amount
body.claim_id = claimAddress;
+ body.tip = true;
break;
@@ -109,11 +110,11 @@ export default async(data, socket) => {
body.author = "lbry.tech";
body.bid = "0.001"; // Hardcoded publish amount
body.description = dataDetails.description;
- body.language = dataDetails.language;
+ body.languages = [dataDetails.language];
body.license = dataDetails.license;
body.name = dataDetails.name + "-" + randomString(10);
- body.nsfw = dataDetails.nsfw;
body.title = dataDetails.title;
+ body.tags = dataDetails.tags;
// Gotta let the blockchain know what to save
body.file_path = dataDetails.file_path;
@@ -128,7 +129,7 @@ export default async(data, socket) => {
switch(true) {
case data.example === 2:
case memePublishResponse.result:
- case memePublishResponse.result.claim_address:
+ case memePublishResponse.result.outputs[0].address:
explorerNotice = memePublishMessaging(memePublishResponse);
break;
@@ -280,11 +281,11 @@ function memePublishMessaging(source) {
- If you want proof of the tip you just gave on behalf of LBRY, check it out on our blockchain explorer! Please note that it may take a couple minutes for the transaction to be confirmed. + If you want proof of the tip you just gave on behalf of LBRY, check it out on our blockchain explorer! Please note that it may take a couple minutes for the transaction to be confirmed.