Mayukha Vadari
b7c4b16a8d
feat: extra protection for AccountDelete transactions ( #1626 )
...
* add deletion blockers check to autofill
* add tests
* add fail_hard: true
* pass in account_objects response to error
* only fail_hard for AccountDelete
* reject promise instead of throwing error
* fix rebase issue
2021-10-04 14:11:26 -04:00
Mukul Jangid
f2216446e5
test: write tests for sugar functions ( #1631 )
...
* test: write tests for sugar functions
2021-10-04 14:10:13 -04:00
Jackson Mills
6fac420d9f
Remove sign.ts and move functionality into Wallet ( #1620 )
...
* Move sign.ts functionality into Wallet
* Move the corresponding tests to wallet's test cases and simplify them for readability
* Delete sign.ts
2021-10-04 14:10:13 -04:00
Mukul Jangid
fd78d1edcd
refactor: Reimplement sugar functions and clean up ( #1559 )
...
* refactor: Reimplement sugar functions and clean up
2021-10-04 14:10:13 -04:00
Nathan Nichols
633032ddd8
Lint utils directory ( #1563 )
...
* Lint the utils directory
* Modify computeLedgerHash to take new Ledger format.
2021-10-04 14:10:12 -04:00
Nathan Nichols
c8a2a6690b
feat: Add typescript types to subscribe ( #1576 )
...
feat: Add typescript types to subscribe (#1576 )
2021-10-04 14:10:12 -04:00
Nathan Nichols
e200de3073
Adds @xrplf prettier config ( #1598 )
...
* build: new prettier config
2021-10-04 14:10:11 -04:00
Nathan Nichols
75f0bb4617
refactor: migrate fixtures to use typescript ( #1565 )
...
* refactor: migrate fixtures to typescript
2021-10-04 14:10:11 -04:00
Mayukha Vadari
09ef8595e7
refactor: move fixtures closer to tests (part 2) ( #1561 )
...
* move echo
* move fee
* move subscribe/unsubscribe
* move ledger_current
* move ledger_data
* move submit/submit_multisigned
* remove account_tx/account_offers/gateway_balances
* move account_info
* remove ledger_entry
* remove tx
* remove account_lines
* remove ripple_path_find
* remove ledger
* remove book_offers
* move ping
* remove global_config
* move test_command
* additional mock-rippled cleanup
* add explanatory comment to mock.addResponse
2021-10-04 14:10:10 -04:00
Mayukha Vadari
f9fe5936b1
refactor: rename all test files to camelCase ( #1562 )
...
* rename files to camelCase
* fix imports
* more renames
* pull all client tests out of individual folders
* fix imports
* fix tests
2021-10-04 14:10:10 -04:00
Mayukha Vadari
5120b0fc83
refactor: moves fixtures closer to tests ( #1551 )
...
* modify account_info mocks
* move account_objects
* move server_info
* remove config (no longer needed)
* switch to simple dictionary instead of handlers
* fix rebase issues
* refactor: addResponse method on mock server object (#1555 )
Co-authored-by: Elliot Lee <github.public@intelliot.com >
2021-10-04 14:10:09 -04:00
Mayukha Vadari
52f1789ecd
Remove ledger methods from Connection ( #1543 )
...
* remove ledger subscription from connection
* remove more client ledger stuff
* resolve TS concerns
* fix all tests except broadcast tests
* fix broadcast tests
* clean up more ledger stuff in testing
* respond to comments
2021-10-04 14:10:09 -04:00
Mayukha Vadari
0b08de5956
Removes methods that were just rippled wrappers ( #1550 )
...
* remove getAccountInfo
* remove getAccountObjects
* remove getBalanceSheet (gateway_balances)
* remove getLedger
* remove getOrders (account_orders)
* remove getPaymentChannel (ledger_entry)
* remove getTransaction(s) (tx/account_tx)
* remove getSettings (account_info)
* remove getServerInfo (server_info)
* fix integ tests
* remove submit (also deprecated)
* fix integ tests
* add TODO
2021-10-04 14:10:09 -04:00
Mayukha Vadari
f49b9d4b0e
Rewrite XrplClient.request and general cleanup ( #1519 )
...
* first attempt at overloading
* fix TS issues
* improve connection typing
* more cleanup
* edit all ledger files
* more renames
* fix all other request calls
* clean up serverinfo
* fixes more request calls
* remove old legacy browser stuff
* remove unused types
* remove exports from objects
* add type to method signatures
* add ledger requests
* fix most tests
* comment out formatBidsAndAsks
* fix proxy test
* comment out failing tests
* move client-related files into client
* add payment channel requests
* fix imports
* remove finished TODOs
* fix tests
* fix integ tests
* remove exported types
* better ci
2021-10-04 14:10:09 -04:00
Nathan Nichols
ec121ee62d
docs: Add documentation for generateFaucetWallet() ( #1529 )
...
* docs: Add documentation for generateFaucetWallet()
2021-08-17 14:32:06 -05:00
Nathan Nichols
d9a42c8669
Allow XAddress Issuers ( #1471 )
...
* feat: Allow clients to use XAddresses for issuers
2021-07-30 13:16:01 -05:00
Mayukha Vadari
6e0fff2ad6
Reduce dependencies on lodash ( #1467 )
...
* assign -> Object.assign
* replace isundefined
* remove forEach
* remove some
* remove reduce
* remove keys
* remove map
* remove includes
* remove filter
* remove last
* remove isstring
* remove every
* remove rearg
* remove indexOf
* remove values
* remove startswith
* remove first and pick
* build smaller lodash
* remove lodash.isequal package
* add lodash-cli dev dependency
* add lodash script
* test fix
* Revert "build smaller lodash" This reverts commit 979446e57f60b29cb5d377b54efe91cfbeae0707.
* upgrade npm
* change ===/!== undefined to ==/!= null
2021-07-29 20:18:08 -04:00
Rome Reginelli
4e49b6a99c
docs: edit style and update old URLs ( #1420 )
...
Use example.com instead of ripple.com
Co-authored-by: Elliot Lee <github.public@intelliot.com >
2021-07-27 16:15:56 -07:00
Mayukha Vadari
cdf9e33ad2
Fixes miscommunication with ripplingDisabled in trustlines ( #1481 )
2021-07-27 13:23:13 -04:00
Elliot Lee
aa081a4348
refactor!: remove deprecated ledger fields ( #1160 )
...
Per https://github.com/ripple/rippled/issues/3214
The following fields are deprecated and may be removed without further notice: accepted, hash (use ledger_hash instead), seqNum (use ledger_index instead), totalCoins (use total_coins instead).
2021-07-26 16:10:55 -07:00
Elliot Lee
c8b0035897
fix: prevent getFee from returning NaN from Reporting Mode ( #1401 )
...
When using a rippled server in Reporting Mode, the server_info response does not have a load_factor property.
https://xrpl.org/rippled-server-modes.html#reporting-mode
https://github.com/ripple/rippled/issues/3812
Now, when load_factor is missing, we default to a load_factor of 1.
Fix #1398
2021-05-10 13:56:31 -07:00
elmurci
650d722609
Fix #1353 : add memos support for multiple transaction types in getTransactions ( #1397 )
...
* fix(#1353 ): adds memos support for the following transaction types in `getTransactions`:
- AccountDelete
- OfferCreate
- OfferCancel
- CheckCancel
- CheckCash
- CheckCreate
- DepositPreauth
- SetFee
- PaymentChannelFund
- PaymentChannelClaim
- PaymentChannelCreate
- TicketCreate
2021-04-08 11:46:54 +02:00
Javi
1c1a3fa583
fix(refactor): rename prepareTicket to prepareTicketCreate ( https://github.com/ripple/ripple-lib/pull/1324#discussion_r519027049 )
2020-11-08 09:53:17 +01:00
Javi
81dfd99642
fix(docs): Update docs
2020-11-06 11:23:14 +01:00
Javi
fd0f64fe54
fix(tests): more unit tests
2020-11-06 10:44:46 +01:00
Javi
c7e08378ac
feat(tickets): first commit, preparePayment and prepareTicket
2020-11-05 12:41:54 +01:00
Elliot Lee
83b5c7f678
Fix preparePayment when using source.amount/destination.minAmount ( #1295 )
...
See: https://github.com/ripple/ripple-lib/issues/1237#issuecomment-631670946
Fix #1237
Thanks to @leobel
2020-05-26 15:48:50 -07:00
Elliot Lee
138e7942da
Add support for AccountDelete ( #1120 )
...
https://xrpl.org/accountdelete.html
2020-01-06 04:01:10 -08:00
RareData
5f92b230aa
Add support for WalletLocator ( #1083 )
...
Being able to fetch the WalletLocator field opens up new use-cases. The field can store for example a transaction hash, referencing a transaction with memos containing useful data.
2019-12-11 23:47:41 -08:00
Elliot Lee
29bc5303ae
Fix tests ( #1109 )
...
* Revert "[docs] Update getTransactions example request/response (#1106 )"
This reverts commit 5314e5e7e9 .
* Redo #1106 but with passing tests
2019-12-11 22:54:33 -08:00
Elliot Lee
5314e5e7e9
[docs] Update getTransactions example request/response ( #1106 )
2019-12-11 14:45:04 -08:00
FKSRipple
321f908e76
Merge pull request #1084 from ripple/tests-to-ts-04
...
Complete move of tests to TS
2019-11-17 23:42:38 -08:00
RareData
8ebad98912
Add support for tick size ( #1090 )
2019-11-14 20:13:58 -08:00
Fred K. Schott
a98526b398
Revert "Revert "Merge pull request #1052 from FredKSchott/tests-to-ts-03""
...
This reverts commit b648387a57 .
2019-11-13 19:47:18 -08:00
Elliot Lee
b648387a57
Revert "Merge pull request #1052 from FredKSchott/tests-to-ts-03"
...
This reverts commit e08367365f , reversing
changes made to 36a9e7a7cf .
2019-11-06 10:34:05 -08:00
Fred K. Schott
39f6a51794
convert the rest of the helper files to ts
2019-11-02 07:40:52 -07:00
Elliot Lee
e1964ac5ed
Add support for the X-address format ( #1041 )
...
* Update schema-validator
* Update to ripple-address-codec 4.0.0
* Update ./src/common/hashes/index.ts
* Add generateXAddress method
* Deprecate generateAddress method
* Add unit tests
* Add documentation
2019-10-23 12:03:59 -07:00
Tyler Storm
14e6bf5ef9
Integrate ripple-hashes ( #1039 )
...
* Update TxParser and Mocha
* Convert ripple-hashes to TypeScript and add into ripple-lib along with unit tests
* Switch casing to camelCase
* Document intToVuc
* Convert Slots to numbers, add exception if number is outside 0-15
* Remove Shamap v2 support
* Improve naming
2019-10-01 23:35:11 -07:00
Namrata
b4a30d49d8
Support removing a signer list ( #1021 )
...
* Make weights an optional field
* Fix #971
2019-07-30 16:48:30 -07:00
Alexandru Chiriac
5419e67dbc
GetLedger by hash option ( #980 )
...
* update ledger input schema
* include ledgerHash option
2018-12-12 11:02:50 -08:00
Alexandru Chiriac
8d37da0952
Update Submit Response ( #978 )
...
* update submit output schema
* update submit response object
2018-12-04 15:35:07 -08:00
Elliot Lee
0f5056221f
Fix getOrderbook ( #970 )
...
* Fix `getOrderbook` (Fix #766 )
* Add `formatBidsAndAsks` as a recommended alternative to `getOrderbook`
* Add `renameCounterpartyToIssuer`
2018-11-26 15:25:15 -08:00
Elliot Lee
319a8d6ab2
Fix book-offers test fixture by swapping bids/asks ( #966 )
2018-10-31 22:48:27 -07:00
Elliot Lee
89e4ff328c
Apply formatting to book-offers fixture
2018-10-31 16:07:25 -07:00
wudanjs
4c23bd5ad3
Include memos when parsing trustlines ( #949 )
2018-09-19 14:17:38 -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
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
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
7a928804ec
feat: add payment channel details to tx (2) ( #920 )
...
* Bump transactionparser to v0.7.1 and update output schema
* yarn docgen for required `threshold` and `weights`
2018-07-17 22:22:07 -07:00
Rome Reginelli
47a139fdff
Fix text/plain MIMETYPE in examples with memos ( #914 )
2018-07-03 17:18:46 -07:00