Skip to content

Instantly share code, notes, and snippets.

View dmdeklerk's full-sized avatar
😋

Dennis de Klerk dmdeklerk

😋
View GitHub Profile
@dmdeklerk
dmdeklerk / heat_centos_setup.md
Last active July 16, 2024 08:15
CENTOS SETUP

Heat Server CENTOS setup

You can run a HEAT node on a 8 dollar a month digital ocean virtual machine, these are available here.

https://www.digitalocean.com/pricing/droplets#basic-droplets

When you create a droplet and choose CENTOS as its OS the below instructions will help you get started.

Important! Choose Intel nvme disk

const { fromSeed } = require("bip32")
const wif = require('wif')
/**
* Derives a bip44 path from a mnemonic
*
* @param {{
* seedHex: string,
* paths: Array<{
* path: string,

Instructions to scan and verify your chain

Sometimes you need to scan and verify your chain, this process will wipe the state of your server and rebuilds it by replaying all transactions.

When your node is forked it is advised to both scan and verify your chain read on for how to do that.

The forceScan command

heat.forceScan=true will instruct the server to replay all blocks and rebuild the state.

@dmdeklerk
dmdeklerk / heat_docker_background.md
Last active February 17, 2021 13:11
Some background on running HEAT on Docker

Some background on running HEAT on Docker

First of all installation of Docker is needed see here how to do that https://docs.docker.com/engine/install/

Docker usage noob level

After we've installed Docker two hidden repositories will be created on your machine usually only visible through special docker commands.

Hidden repositories that eat up space

@dmdeklerk
dmdeklerk / broadcastProtocol.ts
Created October 14, 2020 22:30
Airgapped broadcast protocol
/**
* Air gapped broadcast protocol for Heat Wallet.
*/
const RECIPIENT_ADDRESS = 0
const RECIPIENT_ADDRESS_TYPE = 1
const BLOCKCHAIN_NUM = 2
const ASSET_TYPE_NUM = 3
const ASSET_ID = 4
const TRANSACTION_TYPE_ID = 5
const TRANSACTION_HEX = 6

xx

WELCOME

Hi, there!

Welcome to HEAT wallet, here you can be your own bank.

With HEAT wallet you can easily and securely backup and keep safe your cryptocurrencies.

Click below to get started or swipe left to learn more.

@dmdeklerk
dmdeklerk / erc20.js
Created December 4, 2019 09:59
Transfer ERC20 Ethereum token
const Web3 = require('web3')
const web3 = new Web3();
const erc20TransferAbi = [{
"constant": false,
"inputs": [{
"name": "_to",
"type": "address"
},{
"name": "_value",
"type": "uint256"
@dmdeklerk
dmdeklerk / swagger.json
Last active September 30, 2018 13:47
paytah api
{
"swagger": "2.0",
"info": {
"description": "The PAYTAH <u><b>INTERACTIVE</b></u> REST API, ",
"version": "1.0",
"title": "PAYTAH API",
"contact": {
"url": "http://paytah.com/"
},
"license": {
@dmdeklerk
dmdeklerk / sample.ts
Created April 19, 2018 10:14
heat-sdk transactions
public placeBidOrder(
currencyId: string,
assetId: string,
quantity: string,
price: string,
expiration: number
) {
let builder = new Builder()
.isTestnet(this.config.isTestnet)
.attachment(
@dmdeklerk
dmdeklerk / betanet-instructions.md
Last active March 15, 2018 19:56
B E T A N E T Installation Instructions

HEAT - B E T A N E T

HEAT beta network is an exact clone of the main HEAT blockchain, the HEAT developers use the beta network to try out and test updates before we apply them to the main network.

The beta server is built in such a way that its safe to run it besides your existing HEAT server (on the same machine).

In order to truly replicate the main chain beta net releases are seeded with all past blocks and transactions from the main chain.