Elliot Lee
418987476e
Add DepositPreauth ( #958 )
...
* Expose parseAccountFlags() and add docs
* Add example snippet
* Default to node v10 for nvm
* Maintain existing behavior for getSettings
* Increase max line length from 80 to 120 (ter-max-len)
2018-10-31 16:27:32 -07:00
Elliot Lee
f4ad04d334
Exclude SendMax from XRP to XRP payments ( #957 )
...
Fix #954
2018-10-16 12:21:29 -07:00
wudanjs
4c23bd5ad3
Include memos when parsing trustlines ( #949 )
2018-09-19 14:17:38 -07:00
Elliot Lee
dcd0e14142
Add test of deriveKeypair with ed25519 secret
2018-09-11 18:33:07 -07:00
Mo Morsi
9458005d7f
Add tests for newly exposed API methods
2018-09-09 09:39:25 -04:00
Elliot Lee
3ff4929a49
Fix PendingLedgerVersionError message and export FormattedTransactionType ( #941 )
2018-09-04 18:31:24 -07:00
wilsonianb
b03795df09
Add hidden computeTreeHashes option
2018-08-30 13:29:50 -07:00
Elliot Lee
dbe20d6574
getLedger: include raw transaction with each transaction
...
computeLedgerHash: support new getLedger response by using
rawTransaction
BREAKING CHANGES:
* Remove the `rawTransactions` field and replace it with a new `rawTransaction` field in each transaction.
* Rename the `metaData` field (in each raw transaction) to `meta` (for consistency with rippled's `tx` method).
* Add `ledger_index` to each raw transaction.
2018-08-30 13:28:52 -07:00
Elliot Lee
3f2d9d198e
computeLedgerHash - add requireRawTransactions option
2018-08-28 17:31:12 -07:00
Elliot Lee
b9c953fce6
Fix getPaths ( #930 )
...
* getPaths:
* Filter paths correctly
* Use correct value when XRP is the destination currency
2018-08-23 17:37:02 -07:00
Elliot Lee
181cfd69de
Prevent 'amount' from being misinterpreted ( #924 )
...
The 'amount' field should almost never be used.
With partial payments, the field can show an amount that is
significantly less than the amount that the transaction actually
delivered. This change sets amount to 0 XRP when it may be misleading.
This change omits the `amount` when parsing payment transactions.
See `HISTORY.md` for recommended alternatives.
2018-08-23 16:17:23 -07:00
Elliot Lee
f5e1a4a588
Revert "Expose validation methods in public api"
...
This reverts commit 9e9a0a7d9b .
We should move methods like deriveKeypair and deriveAddress
off of the schemaValidator object.
2018-08-10 14:54:01 -07:00
Mo Morsi
9e9a0a7d9b
Expose validation methods in public api
...
Updated to fix tests
2018-08-06 16:09:04 -07:00
Elliot Lee
067bc48d4e
Add prepareTransaction() ( #898 )
...
* Export iso8601ToRippleTime(), txFlags, convertStringToHex()
* Fix a bug that caused fees exceeding 999 to throw an error
e.g. '1,000' would not be recognized as a valid number.
To use 6 decimal places, toFixed should be used instead of toFormat.
2018-07-26 12:24:29 -07:00
Elliot Lee
14704eee6b
Add more tests of getFee ( #897 )
2018-07-25 01:53:27 -07:00
Brandon Wilson
4e30b9b2fa
Require threshold and weights in signers settings ( #909 )
...
Fixes #908
2018-07-02 16:27:03 -07:00
Elliot Lee
2112d4c0b3
Round XRP fee to 6 decimal places ( #912 )
...
* Round XRP fee to 6 decimal places
Fix #911
2018-06-28 17:59:00 -07:00
Elliot Lee
e07fa11923
Maximum fee values ( #902 )
...
* Add maxFeeXRP (default 2 XRP) as an optional RippleAPI constructor parameter
- No calculated or specified fee can exceed this value
- If the fee exceeds 2 XRP, throw a ValidationError
* sign() - throw ValidationError when Fee exceeds maxFeeXRP
* Document getFee parameters
* Explain new fee limits in HISTORY.md
* Deprecate `maxFee`
2018-06-07 23:29:24 -07:00
Elliot Lee
1aa9feda71
Allow specifying amounts in drops ( #892 )
...
* Accept "drops" in lieu of "XRP"
* Export xrpToDrops() and dropsToXrp()
* Throw our own validation errors instead of BigNumber Errors
2018-05-21 13:19:18 -07:00
Elliot Lee
b2b6715ac0
Add request(), hasNextPage(), and requestNextPage() ( #887 )
...
* Add support for all rippled APIs, including subscriptions.
* Add support for arbitrary stream message types.
* Note that rippled APIs take amounts in drops.
* request() will be available in ripple-lib version 1.0.0+
2018-05-10 15:43:56 -07:00
Elliot Lee
e978ef1888
Add getAccountObjects ( #881 )
...
Squashed commit of the following:
commit 361ead8cbbbe4fa25ecba614f8f11930ff679996
commit 5ff26d7d2defbbaaa7c50d6b3b5b74bf30be19ef
commit 97f5dfc86d4730082fd016197b0c025e499912e3
commit d48654098601f2a19484d9bbae7c65786e3c5dd4
commit 4790401123e7836f6bea8d03111bce60dcf95114
commit 57512f7fc000689bb8224f33173ba91221f27281
commit e75a7e95b11368b26c40e8e6e7b583d978475e95
2018-04-11 14:37:37 -07:00
amougel
2570e2a6d8
Add signWithKeypair ( #769 )
2018-04-03 15:33:24 -07:00
Fred K. Schott
187154a2b0
Types cleanup + more API methods onto new request method ( #857 )
...
* major types cleanup, more formatted api methods onto new request method
- getPaymentChannel() now uses this.request()
- getSettings() now uses this.request()
- getLedger() now uses this.request()
- transaction types cleaned up a bit, but still some work left to do
2018-03-14 16:08:57 -07:00
Elliot Lee
facc513a52
Add support for Checks ( #853 )
...
- See https://github.com/ripple/rippled/pull/2245
* Add support for depositAuth flag
* Upgrade ripple-binary-codec to 0.1.13
2018-03-01 21:42:46 -08:00
Elliot Lee
5b51ff6071
Support for the Deposit Authorization account root flag ( #852 )
...
* Add depositAuth flag tests
* Add support for depositAuth flag
2018-02-21 17:15:23 -08:00
Elliot Lee
3cad4f4aa3
Apply code formatting to API unit tests
2018-02-21 16:05:57 -08:00
Fred K. Schott
365de6d18a
Add new request interface, implement first few request typings ( #843 )
...
* Add request interface & typings
- src/api: add basic implementation of request/requestAll()
- src/ledgers/account_info: refactor to simplify with request()
- src/ledgers/balances: refactor to simplify with request()
- src/ledgers/orderbook: refactor to simplify with requestAll()
- src/ledgers/orders: refactor to simplify with requestAll()
- src/ledgers/trustlines: refactor to simplify with requestAll()
* standardize on Formatted prefix
2018-02-20 11:44:36 -08:00
Elliot Lee
b89eae5cb1
Add test of getTrustlines with multiple pages of results ( #850 )
2018-02-14 15:57:35 -08:00
Fred K. Schott
8204f6c648
Convert from Flow to Typescript ( #816 )
...
* convert to typescript
* add docs for custom node typing
* update webpack, gulpfile
2017-12-24 00:39:18 -08:00
wilsonianb
8ed5f764fa
Add missing condition or fulfillment test
2017-11-06 13:49:38 -06:00
wilsonianb
19eb88a00e
Add getPaymentChannel
2017-04-07 13:04:21 -07:00
wilsonianb
c8f2967de0
Sign and verify payment channel claim
2017-04-07 13:01:58 -07:00
Ben Sharafian
a574e1158a
Add transactions for payment channels
2017-03-30 21:19:31 -07:00
wilsonianb
9393adf66f
Disallow escrow of IOU
2017-03-30 10:10:00 -07:00
wilsonianb
da36457d5c
Update condition and fulfillment for escrow
...
Calculate escrowFinish fulfillment fee
2017-03-29 10:27:34 -07:00
wilsonianb
15a0ededc8
Replace suspended payments with escrow
2017-03-24 12:35:22 -07:00
Matthew Fettig
a96f71b7fd
fix missing deliveredAmount data from getLedger requests
2016-07-19 21:29:50 -07:00
Chris Clark
f74e11bce0
Add support for parsing SetFee and EnableAmendment pseudo-transactions
2016-05-05 15:37:23 -07:00
Ivan Tivonenko
e17b6f172d
[FIX] on connect return error if server doesn't have validated ledgers
2016-03-24 22:26:33 +02:00
Ivan Tivonenko
4f3635eef0
add SauceLabs testing
2016-02-05 07:59:34 +02:00
Ivan Tivonenko
6740eee495
combine with different transaction test
...
test for trying to sign already signed transaction
ignore http server in coverage
2016-01-16 01:12:46 +02:00
Alan Cohen
6b8cd6151d
Filter insufficient source funds paths from pathfind results
...
When pathfinding with source amount, we need to filter out paths where source
amount is not equal to the specified source amount. This is due to the behavior
of rippled when specifying a source amount during pathfinding.
Example:
{
"command": "ripple_path_find",
"source_account": "rhFQQ4ATC6MDF9ghTq3qAoCsGbGtjnhcXF",
"destination_account": "rp91GUd5R3Rk3ipqW7XBdtrUJcX8epzGyb",
"destination_amount": {
"currency": "EUR",
"issuer": "rp91GUd5R3Rk3ipqW7XBdtrUJcX8epzGyb",
"value": -1
},
"send_max": {
"currency": "USD",
"issuer": "rhFQQ4ATC6MDF9ghTq3qAoCsGbGtjnhcXF",
"value": "1234567891"
},
"id": 2
}
{
"id": 2,
"result": {
"alternatives": [
{
"destination_amount": {
"currency": "EUR",
"issuer": "rp91GUd5R3Rk3ipqW7XBdtrUJcX8epzGyb",
"value": "3999889.62127857"
},
"paths_canonical": [],
"paths_computed": [
[
{
"account": "rcsxQxEqU2qquAKp3tBUJy8Z2t19ioQPJ",
"type": 1,
"type_hex": "0000000000000001"
},
{
"currency": "EUR",
"issuer": "rp91GUd5R3Rk3ipqW7XBdtrUJcX8epzGyb",
"type": 48,
"type_hex": "0000000000000030"
}
]
],
"source_amount": {
"currency": "USD",
"issuer": "rhFQQ4ATC6MDF9ghTq3qAoCsGbGtjnhcXF",
"value": "4170759.906037564"
}
}
],
"destination_account": "rp91GUd5R3Rk3ipqW7XBdtrUJcX8epzGyb",
"destination_amount": {
"currency": "EUR",
"issuer": "rp91GUd5R3Rk3ipqW7XBdtrUJcX8epzGyb",
"value": "-1"
},
"destination_currencies": [
"EUR",
"XRP"
],
"full_reply": true,
"id": 2,
"source_account": "rhFQQ4ATC6MDF9ghTq3qAoCsGbGtjnhcXF",
"status": "success"
},
"status": "success",
"type": "response"
}
2016-01-15 13:38:57 -08:00
Ivan Tivonenko
dc03c6e0ac
fix to work in browser
...
run unit tests and integration tests in PhantomJS
add JUnit reporter to unit test so CircleCI can show results
2016-01-13 07:11:39 +02:00
Ivan Tivonenko
3dd21a7e11
run integration tests using standalone server
2015-12-19 02:04:05 +02:00
Chris Clark
ebfe20defb
Add multisignature support
2015-12-17 11:45:08 -08:00
Chris Clark
99d08065e4
BREAKING CHANGE: Fix types of XRP values in getServerInfo response
2015-12-07 16:47:56 -08:00
Chris Clark
82613e7e8b
Allow setting maxLedgerVersion to null to specify no maximum
2015-11-30 15:52:36 -08:00
Chris Clark
7061e9afe4
BREAKING CHANGE: "servers" parameter changed to single "server" and added a new broadcast wrapper class for multiple servers
2015-11-24 16:47:12 -08:00
Ivan Tivonenko
c9704137b7
fix handling memos in prepareSettings
...
boost coverage back to 99.88%
move connection tests to separate file
group test fixtures into namespaces
2015-11-25 02:10:54 +02:00
Ivan Tivonenko
995606b1e6
boost coverage to almost 100%
2015-11-23 17:06:55 -08:00