I hereby claim:
- I am caffeinum on github.
- I am caffeinum (https://keybase.io/caffeinum) on keybase.
- I have a public key ASBvoq7v8fAoze8SlVQuWhuYEG2niXFWG3IdSD8o7J7NlQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
const bitcoin = require('bitcoinjs-lib') // version @3.3.2, ver4 won't work | |
const request = require('request-promise-native') | |
const net = process.env.NETWORK === 'testnet' | |
? bitcoin.networks.testnet | |
: bitcoin.networks.bitcoin | |
const API = net === bitcoin.networks.testnet | |
? `https://test-insight.swap.online/insight-api` | |
: `https://insight.bitpay.com/api` |
pragma solidity ^0.4.23; | |
contract AtomicSwap { | |
uint256 SafeTime = 3 hours; // atomic swap timeOut | |
struct Swap { | |
bytes32 secret; | |
bytes32 secretHash; |
pragma solidity ^0.4.23; | |
// ---------------------------------------------------------------------------- | |
// Safe maths from OpenZeppelin | |
// ---------------------------------------------------------------------------- | |
library SafeMath { | |
function mul(uint256 a, uint256 b) internal pure returns(uint256) { | |
uint256 c = a * b; | |
assert(a == 0 || c / a == b); | |
return c; |
pragma solidity ^0.4.23; | |
import './SafeMath.sol'; | |
contract EthToSmthSwaps { | |
using SafeMath for uint; | |
address public owner; | |
address public ratingContractAddress; |