This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.7" | |
services: | |
backend: | |
container_name: backend | |
image: docker.io/desoprotocol/backend:stable | |
command: run | |
volumes: | |
- db:/db | |
ports: | |
- 17001:17001 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Do `npm i elliptic sha256` before hand | |
const EC = require('elliptic').ec; | |
const sha256 = require('sha256'); | |
function seedHexToPrivateKey(seedHex) { | |
const ec = new EC('secp256k1'); | |
return ec.keyFromPrivate(seedHex); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
See @adonoustech/desoscript-core | |
*/ | |
// construct interface request | |
const req: IDesoLayerSinglePostRequest = { | |
userSub: null, // optional internal Id for user | |
instruction: CanonicalCLIInstructions.SINGLE_POST, //enum | |
payload: { // IGetSinglePostRequestPayload | |
AddGlobalFeedBool: false, | |
CommentLimit: 0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.7" | |
services: | |
backend: | |
container_name: backend | |
image: docker.io/desoprotocol/backend:stable | |
command: run | |
volumes: | |
- db:/db | |
ports: | |
- 17001:17001 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# install latest version of docker the lazy way | |
curl -sSL https://get.docker.com | sh | |
# make it so you don't need to sudo to run docker commands | |
usermod -aG docker ubuntu | |
# install docker-compose | |
curl -L https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Parses a string containing one or multiple JSON encoded objects in the string. | |
* The result is always an array of objects. | |
* | |
* @param {String} data | |
* @return {Array} | |
*/ | |
function parseJson(data) { | |
data = data.replace('\n', '', 'g'); |
OlderNewer