Mayukha Vadari
759e075e54
refactor: use chai instead of assert-diff ( #1570 )
...
* assert-diff -> chai
* fix tests
* remove package
* fix rebase
2021-10-04 14:10:11 -04:00
Nathan Nichols
8b95ee5fab
build: Initial linting setup ( #1560 )
...
* sets up linting config and runs `yarn lint --fix` once, so that all changes will show up correctly in future PRs.
* Note that there are still a lot of linter errors.
2021-10-04 14:10:10 -04:00
Mayukha Vadari
12cfed5c17
refactor: clean up Client and associated files ( #1556 )
...
* remove _PRIVATE
* make requestAll public
* un-type connection.request
* fix lodash imports
* add comments
* Rename files to camelCase
2021-10-04 14:10:10 -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
Jackson Mills
da9feffada
Remove deprecated functions from api.ts (aka client.ts) ( #1534 )
...
* Removed deprecated functions from client.ts
* Renamed files to be camelCase
* Created top-level utils folder and tied all sub-references to it
* Grouped tests for those utils into their own section
Co-authored-by: Nathan Nichols <natenichols@cox.net >
2021-10-04 14:10:09 -04:00
Mayukha Vadari
8e52854773
fix: websocket wouldn't close properly on erroring test ( #1554 )
...
* fix: websocket wouldn't close properly on erroring test
* test: add test
2021-10-04 14:10:09 -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
59396c3f8f
Edit Client constructor to take a server URI ( #1544 )
...
* edit Client
* fix TS issues + tests
* minor edits
* rename ClientBroadcast -> BroadcastClient
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
Mukul Jangid
478e147ae0
refactor: define typescript type for SetRegularKey transaction ( #1548 )
...
* refactor: define typescript type for SetRegularKey transaction
2021-10-04 14:10:09 -04:00
Nathan Nichols
d324056203
refactor: Define PaymentChannelFund transaction model ( #1535 )
...
refactor: Define PaymentChannelFund transaction model (#1535 )
2021-10-04 14:10:09 -04:00
Nathan Nichols
db8f7c1bcb
refactor: Define EscrowCreate transaction model ( #1530 )
...
refactor: Define EscrowCreate transaction model (#1530 )
2021-10-04 14:10:09 -04:00
Nathan Nichols
4469d1cbf8
refactor: Define PaymentChannelClaim transaction model ( #1536 )
...
refactor: Define PaymentChannelClaim transaction model (#1536 )
2021-10-04 14:10:08 -04:00
Nathan Nichols
05365a8690
refactor: Define PaymentChannelCreate transaction ( #1533 )
...
refactor: Define PaymentChannelCreate transaction model (#1533 )
2021-10-04 14:10:08 -04:00
Omar Khan
f6b9878334
refactor: define TicketCreate transaction model ( #1547 )
...
- Defines a TypeScript type for TicketCreate
- Provides an optional function to users for verifying a TicketCreate instance at runtime: verifyTicketCreate()
- Adds tests for verifyTicketCreate()
2021-10-04 14:10:08 -04:00
Nathan Nichols
f68eb37565
refactor: Define EscrowFinish transaction model ( #1531 )
...
refactor: Define EscrowFinish transaction model (#1531 )
2021-10-04 14:10:08 -04:00
Nathan Nichols
f95ffee0b0
refactor: define models for EscrowCancel ( #1511 )
...
refactor: define models for EscrowCancel (#1511 )
2021-10-04 14:10:08 -04:00
Omar Khan
d5d996a92e
refactor: define TrustSet transaction model ( #1549 )
...
- Defines a TypeScript type for TrustSet
- Provides an optional function to users for verifying a TrustSet instance at runtime: verifyTrustSet()
- Adds tests for verifyTrustSet()
2021-10-04 14:10:08 -04:00
Omar Khan
2ff0dde91d
refactor: define DepositPreauth transaction model ( #1545 )
...
- Defines a TypeScript type for DepositPreauth
- Provides an optional function to users for verifying a DepositPreauth instance at runtime: verifyDepositPreauth()
- Adds tests for verifyDepositPreauth()
2021-10-04 14:10:08 -04:00
Omar Khan
bec487cf71
refactor: Define PaymentTransaction model ( #1542 )
...
- Defines a TypeScript type for PaymentTransaction
- Provides an optional function to users for verifying a PaymentTransaction instance at runtime: verifyPaymentTransaction()
- Adds tests for verifyPaymentTransaction()
- Adds isFlagEnabled() util to be used for models
2021-10-04 14:10:08 -04:00
Mukul Jangid
c1edab547a
refactor: define typescript type for AccountDelete transaction ( #1537 )
...
* refactor: define typescript type for AccountDelete transaction
2021-10-04 14:10:08 -04:00
Mukul Jangid
fef5f858fd
fix: resolve OfferCancel merge issues ( #1546 )
...
* fix: resolve OfferCancel git issues
2021-10-04 14:10:08 -04:00
Mukul Jangid
72f34d9388
refactor: define typescript type for AccountSet transaction ( #1515 )
...
* define typescript type for AccountSet transaction
2021-10-04 14:10:08 -04:00
Mukul Jangid
930d214107
refactor: define typescript types for OfferCancel Transaction Model ( #1512 )
...
* define typescript types for OfferCancel Transaction Model
2021-10-04 14:10:08 -04:00
Mukul Jangid
57c4d8be39
refactor: define SignerListSet model and tests ( #1538 )
...
* define typescript type for SignerListSet transaction
2021-10-04 14:10:08 -04:00
Mayukha Vadari
73109295b4
Rename RippleAPI client to Client ( #1520 )
...
* rename RippleAPI -> XrplClient
* more renames
* move API stuff to client folder
* rename all api -> client
* fix tests
* make tests run
* fix integ tests
* fix urls
* fix merge issues
* XrplClient -> Client
* fix merge issues
* rename xrpl-client npm symlink to xrpl-local
2021-10-04 14:10:08 -04:00
Mukul Jangid
6d08b9e12c
refactor: define typescript types for CheckCash Transaction Model ( #1522 )
...
* Define Typescript types for CheckCash Transaction Model
2021-10-04 14:10:08 -04:00
Mukul Jangid
293f09d409
refactor: define typescript types for CheckCancel Transaction Model ( #1526 )
...
* offer
* accountroot
* amendments
* check
* deposit preauth
* directory node
* escrow
* fee settings
* ledger hashes
* negative unl
* pay channel
* ripple state
* signer list
* ticket
* export
* account_channels
* account_currencies
* account_info
* account_lines
* account_objects
* account_offers
* account_tx
* gateway_balances
* no ripple check
* respond to comments
* rename files to camelCase
* account_channels
* account_currencies
* account_info
* account_lines
* account_objects
* account_offers
* account_tx
* gateway_balances
* no ripple check
* respond to comments
* export methods
* fix typos
* refactor: Define type for CommonFields
* refactor: Define OfferCreate transaction type
* add a commented out SignedTransaction
* add tests for verifyCommonFields
* remove outdated files
* refactor: Define OfferCreate transaction
* define checkCancel model
* add tests
* fix: add tests and resolve conflicts
* fix: resolve typos and seperate out test
* fix: commenting issue
* refactor: add checkCreate to tx/index
Co-authored-by: Mayukha Vadari <mvadari@ripple.com >
Co-authored-by: Nathan Nichols <natenichols@cox.net >
2021-10-04 14:10:08 -04:00
Mukul Jangid
f9bce29174
refactor: define typescript types for CheckCreate Transaction Model ( #1524 )
...
* feat: define checkCreate model
* test: add tests
2021-10-04 14:10:08 -04:00
Nathan Nichols
7fde5a2658
refactor: Define typescript definition for OfferCreate ( #1508 )
...
* refactor: Define OfferCreate transaction type
2021-10-04 14:10:08 -04:00
Nathan Nichols
d438430100
refactor: Add common transaction fields Typescript definition ( #1507 )
...
refactor: Add common transaction fields Typescript definition (#1507 )
2021-10-04 14:10:08 -04:00
Omar Khan
c431e70900
define Wallet class ( #1509 )
...
* define Wallet class
- Wallet class is a utility for deriving a wallet composed of a keypair (publicKey/privateKey).
- A wallet can be derived from either a seed, mnemnoic, or entropy (array of random numbers).
- It provides functionality to sign/verify transactions offline.
2021-10-04 14:10:08 -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
5f0c38531c
build: include lodash in webpack build ( #1500 )
...
* build: include lodash in webpack build
2021-08-10 07:43:52 -07:00
Florent
69113de552
Generate faucet wallet Testnet and Devnet ( #1497 )
...
* generate faucet wallet
* updated comments
* added example in documentation
* updated documentation
* Added xprl.org link in docs
* updated code snippet
* Made changes from comments
* new changes from comments
* yarn.lock
* removed axios and use https.request
* updated webpack to include http and https fallback
* fixed files formatting
* small fixes
* Fix typo for Testnet
Co-authored-by: Elliot Lee <github.public@intelliot.com >
Co-authored-by: Elliot Lee <github.public@intelliot.com >
2021-08-10 15:20:43 +08:00
Mayukha Vadari
b81c1dab35
fix: ledger version in getTrustlines ( #1505 )
...
* fix: correctly propagate options.ledgerVersion
* test: verify that `account_lines` uses correct `ledger_index`
2021-08-06 12:18:53 -05:00
Nathan Nichols
76780c8a8e
Run Integration Tests in Browser ( #1468 )
...
* ci: Adds github actions testing for webpacked integration test
2021-08-02 16:29:35 -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
Nathan Nichols
9adfd404e5
GitHub Actions Integration Tests ( #1466 )
...
* ci: Add Github Actions integration testing against standalone rippled
2021-07-27 12:47:55 -05: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
dd30e33e8e
fix: add void return type to Promises ( #1477 )
...
Follow-up to #1476
2021-07-26 14:04:46 -05:00
Jackson Mills
0ac1061d26
Added test for lowercase memo hex ( #1475 )
...
Added test for lowercase hex in transaction memo
* Relaxed existing test to accept case change in memo after decoding
* Added check of resulting signature
2021-07-26 10:41:21 -07:00
Antonio Campos
3fdc56ab90
fix #1210 : update mocha to use RC file config ( #1417 )
2021-06-01 15:56:07 -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