Caleb Kniffen
cfb64c3f88
feat: remove lodash as a dependency ( #2378 )
...
This will reduce the bundle size by ~23%(117kb).
Only 4 methods were used `flatten`, `flatMap`, `omitBy`, and `groupBy`.
`omitBy and `groupBy` were recreated while the es2019 implementations of
`flatten` and `flatMap` are used.
`lodash` is still used in the tests which is fine because it makes the
tests cleaner.
Closes #2118
2024-02-01 13:43:52 -06:00
Caleb Kniffen
30bbc3f837
feat: remove node 14 support ( #2386 )
2024-02-01 13:41:52 -06:00
Caleb Kniffen
9f8502d522
feat: bump typescript to 5.x ( #2387 )
2024-02-01 13:41:51 -06:00
Caleb Kniffen
f7d0cfb93a
release xrpl 2.14.1 ( #2631 )
2024-02-01 12:58:20 -06:00
Omar Khan
b2c96714a8
fix AMM ledger object's LPTokenBalance type to IssuedCurrencyAmount ( #2621 )
2024-01-21 20:50:47 -05:00
Jackson Mills
99dd0eb44c
Release xrpl.js 2.11.0 ( #2591 )
...
Update HISTORY.md + Run docgen
2023-11-30 15:27:12 -06:00
Jackson Mills
98abafbf12
feat: Add optional CTID field to Tx ( #2477 )
...
* Add optional CTID field to Tx
* Update HISTORY.md
* Update TxRequest
* Update comment to remove incorrect statement
---------
Co-authored-by: Caleb Kniffen <ckniffen@ripple.com >
2023-11-30 07:23:12 -08:00
Ildar Gumirov
9a85aaa109
fix: nftoken taxon calculation ( #2590 )
...
Fix taxon calculation for NFTokenID
### Context of Change
If NFToken taxon or serial is too big to be handled as number it could be calculated wrong.
2023-11-29 13:27:36 -06:00
Caleb Kniffen
b555f39e40
feat: remove AMM devnet ( #2587 )
...
The AMM dev network will be decommissioned on the 12/8
2023-11-28 15:03:41 -06:00
Mayukha Vadari
740210d9a2
fix: add DID ledger object + ledger_entry support ( #2576 )
...
* add ledger_entry support for DID
* add DID ledger object
* add empty DID validation
2023-11-17 10:54:32 -05:00
Mayukha Vadari
c8f25a6347
feat: add support for XLS-40d + add script to auto-generate models from rippled code ( #2491 )
...
Add support for XLS-40 and adds a script to automatically
generate transaction models from rippled source code.
### Context of Change
https://github.com/XRPLF/XRPL-Standards/pull/136
https://github.com/XRPLF/rippled/pull/4636
2023-11-15 16:19:50 -06:00
Omar Khan
b47bb39682
test: add AMM integration tests ( #2471 )
2023-11-03 18:23:27 -04:00
Mayukha Vadari
14f40f1f62
feat: add support for server_definitions RPC ( #2535 )
...
Add support for new command added in XRPLF/rippled#4703
2023-10-31 18:57:30 -05:00
Mayukha Vadari
bff4144fbf
fix: update door account for bridge snippet ( #2551 )
...
update door account
2023-10-26 14:06:39 -04:00
Mayukha Vadari
68beac73d1
test: add integration tests for sidechain transactions ( #2301 )
...
* add XChainCreateBridge integration test
* add XChainCreateClaimID integration test
* add XChainCommit integration test
* add XChainAccountCreateCommit integration test
* simplify tests
* add XChainModifyBridge integration test
* add XChainAddAccountCreateAttestation integration test
* add XChainAddClaimAttestation integration test
* improve SignerListSet integration test
* rename variable to match
* add XChainClaim integration test
* clean up
* add IOU attestation test
* fix integration tests issues
* minor refactors
* fix bug
* [WIP] switch to one bridge for all integration tests
* clean up
* fix tests
* fix + clean up tests
2023-10-25 10:08:58 -04:00
Mayukha Vadari
a11924b8fc
chore: fix sidechain networks ( #2548 )
...
* fix snippet
* clean up faucet code
* use correct bridge info
* remove unneeded console.log
2023-10-24 19:30:30 -04:00
Mayukha Vadari
c47aa58354
chore: switch to rippleci Docker container ( #2534 )
...
* fix docker container
* fix attempt
* use fix for browser tests too
* update contributing
* fix tests
* fix integration tests issues
* use variable for docker image
2023-10-24 14:50:52 -04:00
Mayukha Vadari
e09d84f2a2
fix: switch snippet back to working bridge ( #2536 )
...
switch snippet back
2023-10-23 11:01:48 -05:00
Caleb Kniffen
29c5a70ebc
release: 2.13.0 and pin typedoc@0.25.0 ( #2531 )
...
`typedoc@0.25 .1` has breaking changes if you aren not using
`typescript@^5.2`
2023-10-18 11:11:07 -05:00
Caleb Kniffen
8b78147945
fix: copy root README during xrpl publish ( #2530 )
...
The `xrpl` package had a less than helpful docs when viewed on the npm
website. The fix is a workaround that copies the root `README` over
to `packages/xrpl/README.md` during the `prepare` lifecycle phase.
2023-10-18 10:38:00 -05:00
Caleb Kniffen
65bf5d40ea
fix: tx fields for accounts allowing empty string ( #2525 )
...
Fields that were encoded as STAccounts were turning '' into rrrrrrrrrrrrrrrrrrrrrhoLvTp the ACCOUNT_ZERO account. They will now throw a ValidationError.
Invalid addresses on a transaction now throws a ValidationError when submitting a transaction instead of Error('checksum_invalid').
This change updates some error messages for fields a few fields that aren't accounts, DestinationTag or NFTokenID. They will still be of type ValidationError.
Fixes : #2517 and #2475
---------
Co-authored-by: Elliot Lee <github.public@intelliot.com >
2023-10-18 10:25:57 -05:00
Mayukha Vadari
8e929c5a57
chore: remove sidechain-devnet faucet ( #2518 )
...
Removes faucet support for the sidechain devnet since the bridge has been moved to Devnet, which already has a faucet.
2023-10-17 12:30:52 -05:00
Mayukha Vadari
032b5b7c5a
fix: add type param to ledger & ledger_data ( #2503 )
...
- Add missing `type` param
- Clean up typing of `type` param and the response property
`account_objects` of the `account_objects` request
- Create interfaces `HasPreviousTxnID` and `MissingPreviousTxnID`. This
helps clean up type checking with regard to the presence of
`PreviousTxnID` and `MissingPreviousTxnID`
Co-authored-by: Mayukha Vadari <mvadari@ripple.com >
Co-authored-by: Caleb Kniffen <ckniffen@ripple.com >
2023-10-16 09:44:54 -05:00
pdp2121
8b03c995b0
fix: pseudo-transactions for ledger and tx ( #2515 )
...
* Add pseudo transactions as types returned by `tx` and `ledger`
* Make` LedgerEntryResponse` generic to allow custom ledger entries
* Update UNLModify to extend BaseTransaction
* Create type `PseudoTransaction`
Co-authored-by: Caleb Kniffen <ckniffen@ripple.com >
2023-10-13 15:58:10 -05:00
Mayukha Vadari
e51526ae8c
fix: move a tool and remove a lodash dependency ( #2492 )
...
This PR moves createValidateTests.js to xrpl/tools instead of being in the top-level tools folder, and fixes an isString import (changes it from lodash to the in-package version).
2023-10-04 17:30:25 -05:00
Caleb Kniffen
ec72f9ac8e
fix: allow flag maps when submitting NFToken txs ( #2490 )
...
You can now `NFTokenMint` and `NFTokenCreateOffer` transactions with
`Flags` set to a map like other transactions with flags do.
ex. `{ tfSellNFToken: true }`
2023-10-04 16:37:56 -05:00
Jackson Mills
60b600faea
docs: update keywords for all packages ( #2502 )
...
Update keywords for all packages to make the easier to find
2023-10-04 16:19:51 -05:00
Omar Khan
62cea624f8
2.12 release ( #2488 )
...
* update HISTORY
* docgen
* update HISTORY again
* update package.json files
2023-09-27 11:50:21 -04:00
Caleb Kniffen
b9ef0de2df
fix: rename AMMAccount to Account on AMM ( #2487 )
...
The `AMM` ledger object had the wrong property name
2023-09-26 16:02:07 -05:00
Mayukha Vadari
91e7369f1b
feat: add support for current sidechain design ( #2039 )
...
* Update definitions.json
* add new st types
* add tests
* add XChainClaim tx
* add XChainCommit tx
* add XChainCreateBridge tx
* add XChainCreateClaimID tx
* update definitions.json
* rename Bridge -> XChainBridge in binary codec, fix tests
* rename Bridge -> XChainBridge in models
* add codec support for XChainAddAttestation
* add XChainAddAttestation model
* undo debugging change
* fix linting issues
* update definitions.json for new rippled code, add new tests/update old tests
* add/update models
* update history
* update binary-codec
* add XChainModifyBridge model
* update RPCs
* update to latest rippled
* more fixes
* fix definitions.json
* fix spacing
* update definitions.json to avoid conflict with amm
* update definitions.json to resolve amm conflicts
* audit code
* more updates
* update rpcs
* switch to beta version
* add destination tag to XChainClaim
* rename IssuedCurrency -> Issue to match rippled
* update Issue form
* fix account object filters
* fix issue from typing
* fix LedgerEntry types
* fix attestation destination type
* Update definitions.json
* rename XChainAddAttestation -> XChainAddAttestationBatch
* add XChainAddClaimAttestation
* add XChainAddAccountCreateAttestation
* remove XChainAddAttestationBatch
* update definitions
* fix attestation txns
* fix attestation object
* add validate for new txs
* add Bridge ledger object
* add XChainOwnedClaimID ledger object
* add XChainOwnedCreateAccountClaimID ledger object
* update account_objects
* update models to latest rippled
* fix minor issues
* fix bridge ledger_entry
* add XChainModifyBridge flag
* Update definitions.json
* add rbc tests for the new txs
* update validateXChainModifyBridge
* add validate methods to other xchain txs
* fix isXChainBridge
* fix isIssue typing
* fix model types
* update changelog
* switch prepare to prepublishOnly
* add docs
* fix AccountObjectsType filter
* export common types
* fix account_objects filter
* update LedgerEntry
* add sidechain faucet info
* add snippet
* improve snippet
* fix spacing issues
* update ledger_entry
* remove AMMDelete tests for now
* Update definitions.json
* fix unit tests
* convert createValidate script to JS
* remove unneeded linter ignores
* respond to comments
* more snippet fixes
* make validate functions more readable
* add getXChainClaimID method to parse metadata
* re-add linter rules
* clean up common
* fix getXChainClaimID test
* return undefined for failed tx
* test: add model tests for new sidechain transactions (#2059 )
* add XChainAddAttestation tests, fix model
* add XChainClaim model tests
* add XChainCommit model tests, fix typo
* add XChainCreateBridge model tests
* add XChainCreateClaimID model tests
* add XChainModifyBridge tests
* update to most recent version of code
* remove XChainAddAttestationBatch tests
* add more validation tests
* switch createValidateTests to JS
2023-09-26 10:01:21 -04:00
Jackson Mills
cad0a2a163
feat: Add ports field to server_info RPC ( #2476 )
2023-09-15 13:52:38 -07:00
tequ
7679df4551
fix: paychan utils arguments name ( #2463 )
2023-09-15 13:39:07 -05:00
Mayukha Vadari
556addff64
fix: fix escrow OfferSequence validation ( #2474 )
...
* Fix escrow validation
* update .nvmrc
* fix tests
* fix EscrowFinish too
* fix test
* update HISTORY
* fix validation
* fix linter issues
* forgot to save
* change test string
2023-09-14 17:21:18 -04:00
Omar Khan
f6f5f6b09a
fix: request model fields related to AMM ( #2473 )
...
* fix AuthAccount model
* fix AuctionSlot.Price field to be IssuedCurrencyAmount
* fix AMMBid BidMin & BidMan to IssuedCurrencyAmount
* update HISTORY
2023-09-11 17:18:03 -04:00
Jackson Mills
87da37a0db
docs: Remove TODO with rippled version check ( #2469 )
...
Remove TODO
2023-09-08 09:24:53 -07:00
Omar Khan
e52b27e097
fix: add AMM to BaseLedgerEntry and AccountObject types ( #2449 )
...
- Add AMM to BaseLedgerEntry and AccountObject types.
- Add amm_account to amm_info request
- Add AMMID to AccountRoot
Co-authored-by: Caleb Kniffen <ckniffen@ripple.com >
2023-09-07 16:35:15 -05:00
Caleb Kniffen
8e5aa9df99
doc: update HISTORY.md with source-map fix ( #2467 )
...
This was missed when I did #2435 which led to `ripple-address-codec` and
`ripple-keypairs` not being released.
2023-09-06 17:26:59 -05:00
dependabot[bot]
ca60b76939
build(deps-dev): bump typedoc from 0.24.8 to 0.25.0 ( #2460 )
...
Bumps [typedoc](https://github.com/TypeStrong/TypeDoc ) from 0.24.8 to 0.25.0.
- [Release notes](https://github.com/TypeStrong/TypeDoc/releases )
- [Changelog](https://github.com/TypeStrong/typedoc/blob/master/CHANGELOG.md )
- [Commits](https://github.com/TypeStrong/TypeDoc/compare/v0.24.8...v0.25.0 )
---
updated-dependencies:
- dependency-name: typedoc
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-01 14:44:37 -05:00
Jackson Mills
c912abeede
fix: Avoid casting when using Currency type for AMM objects ( #2451 )
...
Set issuer to never
2023-08-29 15:48:44 -07:00
Omar Khan
37fbc03584
2.11 release ( #2442 )
...
* update HISTORY
* update docgen
* update package versions
2023-08-24 13:44:29 -04:00
Omar Khan
5581474627
feat: add AMM support ( #2071 )
...
* update definitions.json
* add AMMInstanceCreate
* renamed LPTokens to LPToken in definitions.json
* update HISTORY.md
* add amm_info RPC command
* add AMMDeposit
* use null check for missing fields
* add AMMWithdraw
* add AMMVote
* fix lint error
* add max trading fee check to AMMVote
* refactor MAX_TRADING_FEE to be in one place
* add AMMBid
* add AuthAccount interface to AMMBid
* refactor tests
* add AMMID to AMMInfoResponse
* update amm_info docstrings
* fix EPrice type to be Amount
* update EPrice validation error message and add missing tests
* update definitions to fix AMM in LEDGER_ENTRY_TYPES
* add missing test case Asset1In and Asset2In valid
* add missing test case Asset1Out and Asset2Out valid
* add negative FeeVal check
* update HISTORY.md to specify XLS-30
* update wording on AMMDeposit & AMMWithdraw validation errors
* add negative TradingFee check
* fix ammInfo response
* add AMMID as optional param in ammInfo response
* fix EPrice validation checks in AMMDeposit & AMMWithdraw
* add VoteSlots as optional param in AMMInfoResponse
* update VoteEntry interface
* fix deposit and withdraw tests
* fix AMMBid ValidationError
* update definitions.json with different AuthAccounts number
* Change amm_info asset parameters to Currency type
* API name changes with updated definitions.json
* rename amm_info param asset1 -> asset
* fix typo
* change AMM_MAX_TRADING_FEE to 1%
* Use Asset/Asset2 instead of AMMID for Deposit/Withdraw/Bid/Vote
* add Deposit/Withdraw flags
* rename FeeVal -> TradingFee in VoteEntry
* rename MinBidPrice -> BidMin and MaxBidPrice -> BidMax
* update definitions to change Asset & Asset2 nth values to 3 & 4
* update definitions
* add Issue type and tests for Asset/Asset2
* remove AMMID from amm_info and use Issue type
* update amm_info fields
* fix lint errors
* update unit tests
* add AMM codec-fixtures
* update Issue type
* add one asset and withdraw all tests
* refactor amm_info response fields to match AMMDevnet
* update definitions.json with refactored error codes
* update ammInfo.ts response model
* remove invalid fields from ammInfo.ts response model
* update time_interval description
* rename test model names and fix lint errors
* add Owner Reserve Fee for AMMCreate transaction
* add missing asset_frozen field
* replace Issue with IssuedCurrency
* refactor: convert flags to number
* update asset pair to use Currency type
* refactor isIssue to isCurrency
* add AMM ledger entry object, lsfAMM flag, amm fields to LedgerEntryRequest
* update definitions.json
* WIP defintions
* update codec-fixtures
* fix definitions test
* update DiscountedFee definition
* update definitions
* update codec-fixtures
* update definitions
* update unit tests
* update amm_info response
* sort imports/exports
* update jsdoc
* update amm_info jsdoc
* update jsdoc
* convert caution to all caps
* add validation for AuthAccounts
* refactor and export interfaces
* use Currency type
* update definitions
* add AMMDelete
* rename Issue to Currency in error message
* mark asset frozen as optional fields
* refactor isAuthAccounts
* add AMMDelete jsdoc
* rename to validateAuthAccounts
* fix typo
* fix typo in unit test
---------
Co-authored-by: Caleb Kniffen <ckniffen@ripple.com >
2023-08-17 22:42:32 -04:00
Caleb Kniffen
2192e11267
fix: source-maps find their designated source ( #2435 )
...
fix: source-maps find their designate source
We weren't including the `src` folder in the files published too npm.
This caused errors such as the following seen in the sandbox and by
users on discord.
```
WARNING in ./node_modules/xrpl/dist/npm/utils/xrpConversion.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/sandbox/node_modules/xrpl/src/utils/xrpConversion.ts' file: Error: ENOENT: no such file or directory, open '/sandbox/node_modules/xrpl/src/utils/xrpConversion.ts'
```
2023-08-15 10:37:05 -05:00
Caleb Kniffen
352abae003
chore: remove extra files for git, nyc, and mocha ( #2422 )
...
- Remove `.gitignore` from individual packages.
- Remove `nyc.config.js` and `.nycrc` since `nyc` is no longer in use
- Remove `.mocharc` and `localIntegrationRunner.html` since `mocha` is
no longer in use.
2023-08-15 10:19:15 -05:00
Daniel
aa75806f2f
[Feature] Generate Wallet from secret numbers ( #1799 )
...
* add the possibility to create a wallet from Secret Numbers
* Move it off the Wallet class
2023-08-14 17:39:35 -07:00
Mo Morsi
6856dec466
docs: Fix typo in documentation: on('transactions') -> on('transaction') ( #2430 )
2023-08-09 13:42:54 -07:00
Jackson Mills
002ec77218
release: Update package.json files ( #2425 )
...
Update package.json files
2023-08-07 14:50:14 -07:00
Jackson Mills
c4097935a9
release: Update HISTORY.md ( #2424 )
...
* Update HISTORY.md
* Run docgen
2023-08-07 14:31:24 -07:00
Caleb Kniffen
f760b2e56f
chore: remove extra lock files and nyc ( #2403 )
...
nyc is not a direct dependency any more and nested lock files are unused
2023-07-20 15:03:17 -05:00
Shawn Xie
63ea6e8c9b
feat: add Clawback amendment support ( #2353 )
...
* Add Clawback transaction
* Account flag lsfAllowTrustLineClawback
* Support bitwise flag checking of 64 bit flags
2023-07-19 14:39:48 -05:00
pdp2121
5ec6729c61
release 2.9.1 ( #2391 )
2023-07-18 15:29:32 -05:00