"use strict"; // P A C K A G E const fs = require("graceful-fs"); const html = require("choo-async/html"); const raw = require("nanohtml/raw"); // E X P O R T module.exports = exports = () => async () => html`
- isLoading
- jsonData
Success! Here is the response for lbry://{{ address }}:
Go to next step
- TODO:
[✓] Create message for error
[ ] Scroll to top of page when selecting a claim
*/
return html`
Let's start by getting the associated metadata for a claim.
…or select a live example from below
Anonymous
@Unbubbled
@nickatnyte
Anonymous
- isLoading
- jsonData
Success!
See the transaction on explorer.lbry.io
Here is the raw response:
Meme submission process:
- `PUT` request to `http://daemon.lbry.tech/images.php`:
- headers: "Content-Type": "text/plain"
- qs: access_token: process.env.LBRY_DAEMON_ACCESS_TOKEN
- body: document.getElementById("meme-canvas").toDataURL("image/jpeg", 0.6)
- response should be parsed as JSON
- //
- socket emit "fetch metadata":
- bid: 0.001, // hard-coded on the back-end
- description: component.description,
- file_path: uploadResponse.body.filename,
- language: component.language,
- license: component.license,
- method: "publish",
- name: component.title,
- nsfw: component.nsfw,
- title: component.title
- socket emit error from back-end if any field is missing
Process after submitting meme:
- isLoading appears
- exampleCode and jsonData replace `#step2-placeholder` contents
- next button should exist
Issues:
- image isn't uploaded to spee.ch
- response is blank
- response should have link to upload on Blockchain Explorer
- NSFW flag should work
*/
const images = [
{
alt: "Carl Sagan",
src: "/assets/media/images/carlsagan2.jpg"
},
{
alt: "Doge",
src: "/assets/media/images/doge-meme.jpg"
},
{
alt: "LBRY Logo With Green Background",
src: "/assets/media/images/lbry-green.png"
}
];
const memePlaceholderData = {
bottomLine: {
placeholder: "Top line",
value: "that I made"
},
description: {
placeholder: "Description",
value: "Check out this image I published to LBRY via lbry.tech"
},
topLine: {
placeholder: "Top line",
value: "This is an example meme"
},
title: {
placeholder: "Title",
value: "Dank Meme Supreme da Cheese"
}
};
const renderedImages = [];
for (const image of images) {
renderedImages.push(``);
}
return html`
`;
}
function step3() {
/**
Step 3 loading steps:
- exampleCode !== ''
- isLoading
- jsonData
Success! Here is the response:
*/
return html`
`;
}