Skip to content

Instantly share code, notes, and snippets.

View whiteyhat's full-sized avatar
Building on top of bitcoin

Carlos Roldan whiteyhat

Building on top of bitcoin
View GitHub Profile
@whiteyhat
whiteyhat / DataTypes.sol
Created March 1, 2018 22:43
Solidity introduction
pragma solidity ^0.4.0;
contract DataType{
//BASIC DATA TYPES
bool myBool = false;
int8 myInt = -125;
uint8 myUint = 255;
string myString;

Keybase proof

I hereby claim:

  • I am carlosroldanx on github.
  • I am whiteyhat (https://keybase.io/whiteyhat) on keybase.
  • I have a public key ASDmv9fkEPlOh4jO1HibCRMpiGjwWzVVZqrxGmi8Qiny_Qo

To claim this, I am signing this object:

@whiteyhat
whiteyhat / lnurl-withdrawal.js
Last active October 23, 2019 02:21
Backend implementation using adonis.js framework for Lightning Network withdrawals straight to wallet using LNURL
const Logger = use('Logger')
const bech32 = require('bech32')
const Hash = use('Hash')
const lnService = require('ln-service')
const NonceHashMap = {};
const k1HashMap = {};
async requestWithdrawal ({auth, response}) {
try{

Keybase proof

I hereby claim:

  • I am whiteyhat on github.
  • I am whiteyhat (https://keybase.io/whiteyhat) on keybase.
  • I have a public key ASD4N-UoQE8YvfeR0sJ_T84BxaPMe6d_nhlR64Nd3NHPDAo

To claim this, I am signing this object:

@whiteyhat
whiteyhat / CONRTIBUTING.md
Last active May 7, 2019 22:54
Contribution Guidelines

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@whiteyhat
whiteyhat / hippocratesSmartContract.sol
Created May 21, 2019 20:23
Hippocrates smart contract to upload the IPFS hash from the hippocrates passport
pragma solidity ^0.4.17;
contract Contract {
string ipfsHash;
function sendHippocratesHash(string x) public {
ipfsHash = x;
}
function getHipocrattesHash() public view returns (string x) {
return ipfsHash;
Verifying my Blockstack ID is secured with the address 1HpUFK6CTLUeQ456yVFgW86DV4tJroG3aW https://explorer.blockstack.org/address/1HpUFK6CTLUeQ456yVFgW86DV4tJroG3aW
@whiteyhat
whiteyhat / modal-component.html
Last active June 10, 2019 16:17
Componente del front para servir un método de pago usando lightning
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Lapp: Hello, World!</title>
<link rel="icon" type="image/png" href="/icon.png"/>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
{{ style('style') }}
{{style('https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/css/toastr.min.css')}}
Verifying my Blockstack ID is secured with the address 1JBhkefmAuw7ytRAxQjaCCCXrqQAKEyDbb https://explorer.blockstack.org/address/1JBhkefmAuw7ytRAxQjaCCCXrqQAKEyDbb
@whiteyhat
whiteyhat / gist:ffa15b8116819e0bb1bc4605cf8b1260
Last active July 21, 2019 12:51
ERROR LOG WHEN DOCKERIZINg ADONIS.JS
CXX(target) Release/obj.target/secp256k1/src/publickey.o
In file included from ../src/publickey.cc:7:0:
../src/publickey.cc: In function 'Nan::NAN_METHOD_RETURN_TYPE publicKeyCreate(Nan::NAN_METHOD_ARGS_TYPE)':
../src/util.h:15:76: warning: 'v8::Maybe<bool> v8::Value::BooleanValue(v8::Local<v8::Context>) const' is deprecated: BooleanValue can never throw. Use Isolate version. [-Wdeprecated-declarations]
compressed = value->BooleanValue(info.GetIsolate()->GetCurrentContext()).ToChecked() ? v_true : v_false; \
^
../src/publickey.cc:20:3: note: in expansion of macro 'UPDATE_COMPRESSED_VALUE'
UPDATE_COMPRESSED_VALUE(flags, info[1], SECP256K1_EC_COMPRESSED, SECP256K1_EC_UNCOMPRESSED);
^~~~~~~~~~~~~~~~~~~~~~~
In file included from /root/.node-gyp/12.6.0/include/node/v8-internal.h:14:0,