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
const MY_ADDRESS = ""; | |
const FRIEND_ADDRESS = ""; | |
const BLOCKS = [ | |
// Genesis block | |
{ | |
hash: "00000244a5bae572247ca9f5b9149fc3980fa90a7a70cd35030a29d81ebc88ea", | |
version: 1, | |
previousHash: "0000000000000000000000000000000000000000000000000000000000000000", | |
timestamp: 1231006505000, |
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
Show hidden characters
{ | |
"presets": ["stage-2"], | |
"plugins": [ | |
["transform-async-to-generator"], | |
["module-resolver", { | |
"root": ["."], | |
"alias": { | |
"classes": "./src/classes", | |
"store": "./src/store", | |
"utils": "./src/utils", |
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
// webpack.config.js | |
const webpack = require('webpack'); | |
const fs = require('fs'); | |
const env = process.env.WEBPACK_ENV; | |
const libraryName = 'nodecoin'; | |
let plugins = [ ]; | |
let outputFile = 'nodecoin.js'; | |
if (env === 'production') { |
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
import base58 from 'bs58'; | |
import coinstring from 'coinstring'; | |
import crypto from 'crypto'; | |
import { ec } from 'elliptic'; | |
import ripemd160 from 'ripemd160'; | |
import secureRandom from 'secure-random'; | |
import sha256 from 'js-sha256'; | |
const ecdsa = new ec('secp256k1'); | |
const DEFAULT_VERSION = { public: 0x0, private: 0x80 }; |
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
const RIPEMD160 = require('ripemd160'); | |
const EC = require('elliptic').ec; | |
const sha256 = require('js-sha256'); | |
const ec = new EC('secp256k1'); // Bitcoin uses Elliptic Curve Digital Signing Algorithm (ECDSA) to verify transactions | |
let message = 'I want to send this money'; // This would normally be the transaction hash with amount of money, publicScriptKey | |
let publicKey = '040c1fbe8b870d636823963ff21ba6e5250571848714203a08ae8700e0d97a1d7bb94ae888af72ac9a4fe02d558599d27c8986398902fa9ac0c1654f5839db1af5'; | |
let privateKey = '2ec6d2808dc7b9d11e49516cfc747435feae8e9872d63c92bc5bde68a894199f'; |
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
""" | |
ID: thomasa3 | |
LANG: PYTHON3 | |
PROG: ariprog | |
""" | |
import math | |
import time | |
# fin = open("ariprog.in", "r") | |
# fout = open("ariprog.out", "w") |
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
""" | |
ID: thomasa3 | |
LANG: PYTHON3 | |
PROG: wormhole | |
""" | |
import itertools | |
from collections import defaultdict | |
fin = open('wormhole.in', 'r') | |
fout = open('wormhole.out', 'w') |
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
""" | |
ID: thomasa3 | |
LANG: PYTHON3 | |
PROG: wormhole | |
""" | |
import itertools | |
from collections import defaultdict | |
# import time | |
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
const Ticker = { | |
symbol: String, | |
timestamp: Date, | |
trading:{ | |
week52High: Number, | |
week52Low: Number, | |
percent_shorted: Number, | |
shares_outstanding: Number, | |
enterprise_value: Number, | |
dividend: Number, |
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
require('dotenv').config(); /* store your Angel List API token */ | |
const rp = require('request-promise'); | |
const ACCESS_TOKEN = process.env.ACCESS_TOKEN; /* access token to access Angel List API */ | |
const ANGEL_LIST = 'https://api.angel.co/1'; /* version of Angel List API */ | |
const ACCELERATOR_ID = 'YOUR_ACCELERATOR_ID_HERE'; | |
/* utility function to create query string */ | |
function encodeQueryData(data) { |