Commit Graph

36 Commits

Author SHA1 Message Date
Mayukha Vadari
87799b304b ci: run lint tests (#1603)
* turn on lint tests

* remove tsc

* fix errors in src/utils/hashes

* fix linter errors in src/utils

* fix lint issues in test/

* resolve lint issues in src/client

* resolve dependency cycle

* resolve other linting issues in src/models

* resolve rest of linting issues

* fix tests

* fix linting errors in test/integration

* fix rest of linting issues

* fix test name
2021-09-22 16:39:10 -04:00
Mayukha Vadari
b31968f367 refactor: move everything out of the common folder (#1629)
* remove common/constants (all in models now)

* remove common/txFlags (all in models now)

* move ecdsa from src/common to src

* move errors from src/common to src, export at top level
2021-09-21 14:25:37 -04:00
Mayukha Vadari
17ab3537c3 fix: renames verify... methods to validate... (#1624)
* rename verify -> validate

* fix imports

* run eslint --fix on test/
2021-09-16 21:14:22 -04:00
Mayukha Vadari
3d98de6ffa refactor: adds error response object (#1619)
* add error response object

* export error response properly

* type mockRippled

* fix linter

* fix ts

* fix comments
2021-09-16 16:44:44 -04:00
Mayukha Vadari
9d28540710 Lint integration test files and browser test files (#1612)
* clean up utils

* more cleanup

* remove client.sign

* remove unneeded tests

* remove unneeded infra

* move helper functions to separate files

* fix linter issues

* more cleanup

* make helper functions more generally useful

* fix test account funding

* add import note to README

* lint browser tests

* run eslint --fix
2021-09-14 17:14:34 -04:00
Mukul Jangid
09522e9ce2 refactor: add verify() function (#1552)
* refactor: add verify() function
2021-09-14 17:11:53 -04:00
Nathan Nichols
df1fd90f55 feat: cleanup flag naming (#1609)
* feat: cleanup flag naming
2021-09-14 17:08:44 -04:00
Jackson Mills
c3774cd531 Signer (#1573)
Create Signer class to allow for offline signing, multisigning and signing authorizeChannel requests.
2021-09-14 17:08:44 -04:00
Omar Khan
db17bb1c57 implement Autofill Transaction (#1574)
Implements autofill() and setTransactionFlagsToNumber() to allow a Client to autofill fields in a Transaction.
2021-09-14 17:08:44 -04:00
Nathan Nichols
2ca737391d Adds @xrplf prettier config (#1598)
* build: new prettier config
2021-09-14 17:08:38 -04:00
Mayukha Vadari
e9f2bc5c7d Lints test/models (#1578) 2021-09-14 17:05:13 -04:00
Mayukha Vadari
b051b4c59b Lints test/utils (#1575)
* rename model tests

* rename util tests

* turn off `any` complaints in linter

* other linter changes

* fix xrp <-> drops methods

* lint generateAddress

* fix rest of tests
2021-09-14 17:02:40 -04:00
Mayukha Vadari
89e319fe0a Lints src/models (#1572)
* resolve src/models/methods

* PaymentTransaction => Payment, remove empty returns

* fix common, method signatures

* fix checkCash

* handle complexity complaints

* fix jsdocs

* handle magic numbers

* finish models/transactions

* fix models/utils

* fix models/ledger

* fix ts issues

* fix tests

* fix modifiedoffercreatetransaction

* remove comments, fix additional TODO
2021-09-14 17:02:40 -04:00
Nathan Nichols
6742e2048a 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-09-14 17:00:46 -04:00
Mukul Jangid
1baccd6c57 refactor: define typescript type for SetRegularKey transaction (#1548)
* refactor: define typescript type for SetRegularKey transaction
2021-09-14 16:56:36 -04:00
Nathan Nichols
4842a06f8a refactor: Define PaymentChannelFund transaction model (#1535)
refactor: Define PaymentChannelFund transaction model (#1535)
2021-09-14 16:56:36 -04:00
Nathan Nichols
2509a2906a refactor: Define EscrowCreate transaction model (#1530)
refactor: Define EscrowCreate transaction model (#1530)
2021-09-14 16:56:36 -04:00
Nathan Nichols
7499ae7460 refactor: Define PaymentChannelClaim transaction model (#1536)
refactor: Define PaymentChannelClaim transaction model (#1536)
2021-09-14 16:56:36 -04:00
Nathan Nichols
3997227b3c refactor: Define PaymentChannelCreate transaction (#1533)
refactor: Define PaymentChannelCreate transaction model (#1533)
2021-09-14 16:56:36 -04:00
Omar Khan
250ebc5a99 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-09-14 16:56:36 -04:00
Nathan Nichols
18cce5a50a refactor: Define EscrowFinish transaction model (#1531)
refactor: Define EscrowFinish transaction model (#1531)
2021-09-14 16:56:36 -04:00
Nathan Nichols
becf3a4f00 refactor: define models for EscrowCancel (#1511)
refactor: define models for EscrowCancel (#1511)
2021-09-14 16:56:35 -04:00
Omar Khan
9e16327676 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-09-14 16:56:35 -04:00
Omar Khan
f7b93c54ff 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-09-14 16:56:35 -04:00
Omar Khan
1010183d2e 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-09-14 16:56:35 -04:00
Mukul Jangid
f1c35a81b4 refactor: define typescript type for AccountDelete transaction (#1537)
* refactor: define typescript type for AccountDelete transaction
2021-09-14 16:56:35 -04:00
Mukul Jangid
cfab859a20 fix: resolve OfferCancel merge issues (#1546)
* fix: resolve OfferCancel git issues
2021-09-14 16:56:35 -04:00
Mukul Jangid
e9d0d40db5 refactor: define typescript type for AccountSet transaction (#1515)
* define typescript type for AccountSet transaction
2021-09-14 16:56:35 -04:00
Mukul Jangid
b2d03363a6 refactor: define typescript types for OfferCancel Transaction Model (#1512)
* define typescript types for OfferCancel Transaction Model
2021-09-14 16:56:35 -04:00
Mukul Jangid
1cc23c6ba9 refactor: define SignerListSet model and tests (#1538)
* define typescript type for SignerListSet transaction
2021-09-14 16:56:35 -04:00
Mayukha Vadari
e27e1ec368 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-09-14 16:56:33 -04:00
Mukul Jangid
94066da224 refactor: define typescript types for CheckCash Transaction Model (#1522)
* Define Typescript types for CheckCash Transaction Model
2021-09-14 16:55:45 -04:00
Mukul Jangid
61a8923e2a 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-09-14 16:55:45 -04:00
Mukul Jangid
c328bb9620 refactor: define typescript types for CheckCreate Transaction Model (#1524)
* feat: define checkCreate model

* test: add tests
2021-09-14 16:55:45 -04:00
Nathan Nichols
6cf8738598 refactor: Define typescript definition for OfferCreate (#1508)
* refactor: Define OfferCreate transaction type
2021-09-14 16:55:45 -04:00
Nathan Nichols
a4207a552b refactor: Add common transaction fields Typescript definition (#1507)
refactor: Add common transaction fields Typescript definition (#1507)
2021-09-14 16:55:43 -04:00