This is a log of me installing five-bells-wallet.
sudo hostname nexus.justmoon.com
sudo apt update
sudo apt dist-upgrade
sudo apt install build-essential libssl-dev python libpq-dev git-core
With receive:
client.on('receive', (transfer) => {
// Check amount, etc.
if (transfer.condition) {
// Try to fulfill the condition or throw if unable
}
// Process the payment
})Crypto-condition types can be viewed as curried functions. Let's take a ed25519 signature condition as an example:
ed25519(pubkey)(signature)(message)Initially, we start out with the condition type (ed25519). When we apply a first set of parameters (pubkey), it returns a condition.
A condition is another function which expects some kind of proof (signature) and returns a fulfillment.
import { Client } from 'ilp-core'
const client = new Client({
auth: {
account: 'https://far-far-away-ledger.example/accounts/bob',
password: 'super-secret-password',
}
})
const payment = client.createPayment({| /*! Github Dark Theme v1.14.75 (5/21/2016) *//* | |
| * https://github.com/StylishThemes/GitHub-Dark | |
| * http://userstyles.org/styles/37035 | |
| * License: https://creativecommons.org/licenses/by-sa/4.0/ | |
| */ | |
| /* AGENT_SHEET */ | |
| body { | |
| background-color: #222 !important; | |
| background-image: /*[[bg-choice]]*/ url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEYAAABGBAMAAACDAP+3AAAAGFBMVEUfHx8eHh4dHR0bGxshISEiIiIlJSUjIyM9IpsJAAAFjUlEQVR4AT3UuZLcOBaF4QuI2XJxboIhF/eQFe1WovoBAAqccpkaZpc5+4yrXa8/RGpx/lrIXPjFCYjTp9z8REqF4VYNWB3Av3zQJ6b6xBwlKB/9kRkCjXVwGH3ziK5UcjFHVkmgY6osiBsGDFfseqq2ZbTz7E00qBDpzOxnD7ToABeros1vM6MX0rBQaG1ith1A/HJkvkHxsPGJ82dP8vVCyWmbyPTaAfGzg40bgIdrv2f3pBVPycUcufx+BSUUWDuCZi6zBqdM50ElKYPODqtLDjc31rBb9CZ59lbN/JScuMxHLUBcGiy6QRH9zpwgZGhRj8qSydPVgNNVgbWqYX3HbM9K2rqTnKVmsmwKWzc1ffEd20+Zq3Ji65kl6TSjALNvzmJt4Pi2f1etytGJmy5erLAgbNY4bjykC3YCLIS3nSZMKgwRsBarWgjdeVzIEDzpTkoOUArTF4WFXYHwxY585sT0nmTYMxmXfs8fzwswfnam8TMU49bvqSRnyRPnqlno4tVQQiH2A9Za8tNTfXQ0lxbSxUaZna0uLlj9Q0XzD96CpsOZUftolINKBWJpAOoAJC0T6QqZnOtfvcfJFcDrD4C |
| // Used to create test vectors for five-bells-condition | |
| // https://github.com/interledger/five-bells-condition | |
| 'use strict' | |
| const fs = require('fs') | |
| const execSync = require('child_process').execSync | |
| const Rsa = require('./src/crypto/rsa') | |
| const pem = require('./src/util/pem') | |
| const sha1Data = require('./test/data/rsa/sha1.json') |
| // P2P payment | |
| import { Client } from 'spp' | |
| const client = new Client({ | |
| account: 'https://red.ilpdemo.org/accounts/alice', | |
| auth: { | |
| password: 'secret' | |
| } | |
| }) |
You can find this document at http://bit.ly/devday-ilp
Thanks for joining our session at WWW2016 Developer Day!
[TOC]