ilp-protocol-psk2
Advanced tools
Comparing version 0.2.0 to 0.2.1
{ | ||
"name": "ilp-protocol-psk2", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "Implementation of the ILP Pre-Shared Key V2 Transport Protocol", | ||
@@ -24,3 +24,3 @@ "main": "src/index.js", | ||
"type": "git", | ||
"url": "git+https://github.com/emschwartz/ilp-protocol-psk2.git" | ||
"url": "git+https://github.com/interledgerjs/ilp-protocol-psk2.git" | ||
}, | ||
@@ -38,5 +38,5 @@ "keywords": [ | ||
"bugs": { | ||
"url": "https://github.com/emschwartz/ilp-protocol-psk2/issues" | ||
"url": "https://github.com/interledgerjs/ilp-protocol-psk2/issues" | ||
}, | ||
"homepage": "https://github.com/emschwartz/ilp-protocol-psk2#readme", | ||
"homepage": "https://github.com/interledgerjs/ilp-protocol-psk2#readme", | ||
"dependencies": { | ||
@@ -43,0 +43,0 @@ "bignumber.js": "^5.0.0", |
# PSKv2 | ||
> Javascript implementation of the [Pre-Shared Key V2](https://github.com/interledger/rfcs/pull/351) Interledger Transport Protocol. | ||
[](https://circleci.com/gh/emschwartz/ilp-protocol-psk2) | ||
[](https://codecov.io/gh/emschwartz/ilp-protocol-psk2) | ||
[](https://circleci.com/gh/interledgerjs/ilp-protocol-psk2) | ||
[](https://codecov.io/gh/interledgerjs/ilp-protocol-psk2) | ||
[](https://standardjs.com) | ||
@@ -23,3 +23,3 @@ | ||
See https://emschwartz.github.io/ilp-protocol-psk2 | ||
See https://interledgerjs.github.io/ilp-protocol-psk2 | ||
@@ -30,6 +30,6 @@ ## Usage | ||
Uses [`createReceiver`](https://emschwartz.github.io/ilp-protocol-psk2/modules/_receiver_.html#createreceiver) and [`Receiver.generateAddressAndSecret`](https://emschwartz.github.io/ilp-protocol-psk2/classes/_receiver_.receiver.html#generateaddressandsecret). | ||
Uses [`createReceiver`](https://interledgerjs.github.io/ilp-protocol-psk2/modules/_receiver_.html#createreceiver) and [`Receiver.generateAddressAndSecret`](https://interledgerjs.github.io/ilp-protocol-psk2/classes/_receiver_.receiver.html#generateaddressandsecret). | ||
```typescript | ||
import { createReceiver } from 'ilp-protocol-psk2' | ||
```js | ||
const { createReceive } = require('ilp-protocol-psk2') | ||
const receiver = await createReceiver({ | ||
@@ -50,6 +50,6 @@ plugin: myLedgerPlugin, | ||
Uses [`sendSingleChunk`](https://emschwartz.github.io/ilp-protocol-psk2/modules/_sender_.html#sendsinglechunk) and [`quoteDestinationAmount`](https://emschwartz.github.io/ilp-protocol-psk2/modules/_sender_.html#quotedestinationamount). | ||
Uses [`sendSingleChunk`](https://interledgerjs.github.io/ilp-protocol-psk2/modules/_sender_.html#sendsinglechunk) and [`quoteDestinationAmount`](https://interledgerjs.github.io/ilp-protocol-psk2/modules/_sender_.html#quotedestinationamount). | ||
```typescript | ||
import { sendSingleChunk, quoteDestinationAmount } from 'ilp-protocol-psk2' | ||
```js | ||
const { sendSingleChunk, quoteDestinationAmount } = require('ilp-protocol-psk2') | ||
@@ -76,7 +76,7 @@ // These values must be communicated beforehand for the sender to send a payment | ||
Uses [`sendSingleChunk`](https://emschwartz.github.io/ilp-protocol-psk2/modules/_sender_.html#sendsinglechunk). | ||
Uses [`sendSingleChunk`](https://interledgerjs.github.io/ilp-protocol-psk2/modules/_sender_.html#sendsinglechunk). | ||
```typescript | ||
import { randomBytes } from 'crypto' | ||
import { sendSingleChunk } from 'ilp-protocol-psk2' | ||
const { randomBytes } = require('crypto') | ||
const { sendSingleChunk } = require('ilp-protocol-psk2') | ||
@@ -116,2 +116,2 @@ // These values must be communicated beforehand for the sender to send a payment | ||
See [`sendSourceAmount`](https://emschwartz.github.io/ilp-protocol-psk2/modules/_sender_.html#sendsourceamount) and [`sendDestinationAmount`](https://emschwartz.github.io/ilp-protocol-psk2/modules/_sender_.html#senddestinationamount). | ||
See [`sendSourceAmount`](https://interledgerjs.github.io/ilp-protocol-psk2/modules/_sender_.html#sendsourceamount) and [`sendDestinationAmount`](https://interledgerjs.github.io/ilp-protocol-psk2/modules/_sender_.html#senddestinationamount). |
@@ -167,3 +167,3 @@ 'use strict'; | ||
record.finished = true; | ||
record.finishedPromise.resolve({ | ||
record.finishedPromise && record.finishedPromise.resolve({ | ||
id: request.paymentId, | ||
@@ -170,0 +170,0 @@ receivedAmount: record.received.toString(10), |
@@ -20,3 +20,3 @@ "use strict"; | ||
const condition_1 = require("./condition"); | ||
const DEFAULT_TRANSFER_TIMEOUT = 5000; | ||
const DEFAULT_TRANSFER_TIMEOUT = 30000; | ||
const STARTING_TRANSFER_AMOUNT = 1000; | ||
@@ -23,0 +23,0 @@ const TRANSFER_INCREASE = 1.1; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
137122
113