Skip to content

Instantly share code, notes, and snippets.

@javiertc
Last active July 15, 2022 18:22
Show Gist options
  • Save javiertc/86fede03968de470dfb3f509d0bf0a80 to your computer and use it in GitHub Desktop.
Save javiertc/86fede03968de470dfb3f509d0bf0a80 to your computer and use it in GitHub Desktop.
onchain.js
const axios = require('axios').default;
const HOST = 'cardano-testnet.tangocrypto.com';
const APP_ID = 'XXXXX';
const API_KEY = 'XXXXX';
axios.defaults.baseURL = `https://${HOST}/${APP_ID}/v1`;
axios.defaults.headers.common['x-api-key'] = API_KEY;
axios.defaults.headers.post['Content-Type'] = 'application/json';
const collection = {
"name": "Candles",
"description": "Tango collection Animations 02",
"url": "https://www.candels02.com",
"payout_address": "addr_test1qp9mj7vnenx4v99hw7ztfq03n7dmmujpgtlyfjhhel9w67nk72usllcew208n60ym94xcptfrgytuy5apwp565x28jgsg0ztq3",
"policy": {
"lock": true,
"lock_time": 1800764339758
},
"metadata": {
"asset_name": "<asset_name>",
"name": "<name>",
"image": "<image_link>",
"media_type": "<mime_type>",
"description": "<description>",
"attributes": {
"collection": "On-chain animation Collection",
"artist": "Tangocrypto",
"twitter": "https://twitter.com/tango_crypto",
"copyright": "Tangocrypto 2022"
},
"version": "1.0"
}
};
const tokensArr = {
"tokens": [{
"asset_name": "CANDLE",
"name": "CANDLE",
"description": "Funny candle",
"media_type": "text/html",
"metadata_attributes": [{
"tag": "<color>",
"name": "Candle color",
"value": "Attribute color"
}
],
"image": [
"data:text/html;base64,PCFET0NUWVBFIGh0bWw+PGh0bWwgbGFuZz0iZW4iPj",
"xoZWFkPiA8bWV0YSBjaGFyc2V0PSJVVEYtOCI+IDx0aXRsZT5DYW5kbGUgRnVuIC",
"hQdXJlIENTUyBBbmltYXRpb24pPC90aXRsZT4gPHN0eWxlPmJvZHl7YmFja2dyb3",
"VuZC1jb2xvcjogI0ZGRjsgYW5pbWF0aW9uOiBjaGFuZ2UtYmFja2dyb3VuZCAzcy",
"BpbmZpbml0ZSBsaW5lYXI7fS53cmF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FuZGxlMl9fc3RpY2",
"siPjwvZGl2PjwvZGl2PjxkaXYgY2xhc3M9ImNhbmRsZTJfX2ZpcmUiPjwvZGl2Pj",
"xkaXYgY2xhc3M9InNwYXJrbGVzLW9uZSI+PC9kaXY+PGRpdiBjbGFzcz0ic3Bhcm",
"tsZXMtdHdvIj48L2Rpdj48ZGl2IGNsYXNzPSJjYW5kbGVfX3Ntb2tlLW9uZSI+ID",
"wvZGl2PjxkaXYgY2xhc3M9ImNhbmRsZV9fc21va2UtdHdvIj4gPC9kaXY+PC9kaX",
"Y+PGRpdiBjbGFzcz0iZmxvb3IiPiA8L2Rpdj48L2Rpdj48L2JvZHk+PC9odG1sPg",
"=="
]
},
{
"asset_name": "SUBMARINE",
"name": "RED SUBMARINE",
"description": "Red submarine",
"media_type": "text/html",
"metadata_attributes": [{
"tag": "<color>",
"name": "Attribute color",
"value": "Orange"
}
],
"image": [
"data:text/html;base64,PCFET0NUWVBFIGh0bWw+PGh0bWwgbGFuZz0iZW4iPj",
"xoZWFkPiA8bWV0YSBjaGFyc2V0PSJVVEYtOCI+IDx0aXRsZT5TdWJtYXJpbmUgd2",
"l0aCBDU1M8L3RpdGxlPiA8c3R5bGU+I2FqZXJlentwb3NpdGlvbjogYWJzb2x1dG",
"U7IHRvcDogNXB4OyByaWdodDogNXB4OyB6LWluZGV4OiA5OTk5O30jYWplcmV6IG",
"ltZ3tib3gtc2l6aW5nOiBib3JkZXItYm94OyB3aWR0aDogNDVweDsgaGVpZ2h0Oi",
"A0NXB4OyBib3JkZXItcmFkaXVzOiA1MCU7IGJvcmRlcjogMnB4IHNvbGlkICM3ND",
"gyQTU7IHRyYW5zaXRpb246IGJvcmRlci1yYWRpdXMgMC4ycyBlYXNlLWluLW91dD",
"t9I2FqZXJleiBpbWc6aG92ZXJ7Ym9yZGVyLXJhZGl1czogMzAlO31ib2R5e2JhY2",
"tncm91bmQtY29sb3I6ICMzMDZEODU7IG1hcmdpbjogMDt9KiwgKjpiZWZvcmUsI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gY2xhc3M9ImxlZH",
"MiPjwvZGl2PjwvZGl2PjwvZGl2PjwvZGl2PjwvZGl2PjwvZGl2PjxhIGlkPSJham",
"VyZXoiIGhyZWY9Imh0dHA6Ly93d3cuYWplcmV6LmVzL2VuLyIgdGFyZ2V0PSJfYm",
"xhbmsiPjxpbWcgc3JjPSJodHRwczovL2kuaW1ndXIuY29tL0FJNEJTMkkucG5nIi",
"8+PC9hPjwvYm9keT48L2h0bWw+"
]
}
]
};
const salePhase = {
"type": "random",
"name": "public-sale",
"total_tokens": 6,
"reservation_time": 1200,
"price_tiers": [{
"name": "Golden plan",
"quantity": 2,
"supply": 1,
"price": 50000000
}]
};
async function createCollection(collection) {
try {
console.log("Create Collection");
const response = await axios.post('/nft/collections', JSON.stringify(collection));
console.log(response.data);
return response.data.id;
} catch (error) {
console.error(error);
}
}
async function createTokens(collectionId, tokens) {
try {
console.log("Create Tokens");
const response = await axios.post(`/nft/collections/${collectionId}/tokens`, JSON.stringify(tokens));
console.log(response.data);
} catch (error) {
console.error(error);
}
}
async function createSalePhase(collectionId, salePhase) {
try {
console.log("Create Sale phase");
const response = await axios.post(`/nft/collections/${collectionId}/phases`, JSON.stringify(salePhase));
return response.data;
} catch (error) {
console.error(error);
}
}
async function main() {
let collectionId = await createCollection(collection);
let tokens = await createTokens(collectionId, tokensArr);
let phase = await createSalePhase(collectionId, salePhase);
console.log(phase);
}
main();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment