Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge XRPLF/xrpl.js 4.0.0 #19

Draft
wants to merge 324 commits into
base: transia-hooks
Choose a base branch
from

Conversation

tequdev
Copy link

@tequdev tequdev commented Aug 16, 2024

The diff from XRPLF/xrpl.js can be seen here.

High Level Overview of Change

Context of Change

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking change that only restructures code)
  • Tests (You added tests for code that already exists, or your new feature included in this PR)
  • Documentation Updates
  • Release

Did you update HISTORY.md?

  • Yes
  • No, this change does not impact library users

Test Plan

ckniffen and others added 30 commits July 12, 2023 16:52
Custom binary codec fixes xrpl.js#2361 - missed param def
* fix: escrow finish and cancel integration

* add docs
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](jonschlinkert/word-wrap@1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add Clawback transaction
* Account flag lsfAllowTrustLineClawback
* Support bitwise flag checking of 64 bit flags
Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 9.4.2 to 9.4.4.
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/main/CHANGELOG.md)
- [Commits](TypeStrong/ts-loader@v9.4.2...v9.4.4)

---
updated-dependencies:
- dependency-name: ts-loader
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [url](https://github.com/defunctzombie/node-url) from 0.11.0 to 0.11.1.
- [Commits](defunctzombie/node-url@v0.11.0...v0.11.1)

---
updated-dependencies:
- dependency-name: url
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [jest](https://github.com/facebook/jest/tree/HEAD/packages/jest) and [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest). These dependencies needed to be updated together.

Updates `jest` from 29.5.0 to 29.6.1
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v29.6.1/packages/jest)

Updates `@types/jest` from 29.5.1 to 29.5.3
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

---
updated-dependencies:
- dependency-name: jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
- dependency-name: "@types/jest"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Caleb Kniffen <ckniffen@ripple.com>
nyc is not a direct dependency any more and nested lock files are unused
…LF#2415)

Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.27.5 to 2.28.0.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](import-js/eslint-plugin-import@v2.27.5...v2.28.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-import
  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>
Bumps [webpack-cli](https://github.com/webpack/webpack-cli) from 5.1.1 to 5.1.4.
- [Release notes](https://github.com/webpack/webpack-cli/releases)
- [Changelog](https://github.com/webpack/webpack-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-cli/compare/webpack-cli@5.1.1...webpack-cli@5.1.4)

---
updated-dependencies:
- dependency-name: webpack-cli
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…2414)

Bumps [@types/lodash](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash) from 4.14.195 to 4.14.196.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash)

---
updated-dependencies:
- dependency-name: "@types/lodash"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Update HISTORY.md

* Run docgen
Bumps [eslint](https://github.com/eslint/eslint) from 8.41.0 to 8.46.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](eslint/eslint@v8.41.0...v8.46.0)

---
updated-dependencies:
- dependency-name: eslint
  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>
* add the possibility to create a wallet from Secret Numbers

* Move it off the Wallet class
- 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.
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'
```
* 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>
dependabot bot and others added 23 commits June 25, 2024 13:59
…utofill method (XRPLF#2689)


Co-authored-by: Omar Khan <khancodegt@gmail.com>
* add apiVersion support to requests and AccountInfoResponse v1/v2 types

* fix submitAndWait signature

* update docker container README

* update tests

* fix apiVersion param in wrong position of Client.request

* add integ tests

* update HISTORY.md

* fix request.api_version

* update RIPPLED_DOCKER_IMAGE to use v2.1.0

* refactor Client.request signature

* update rippled docker image

* fix Client.requestAll

* update rippled docker image to use v2.1.1

* update README

* use import type

* fix faucet; unrelated to PR

* add api_version v2 support and set as default while providing support for v1

* refactor: add apiVersion to Client

* resolve errors

* use DeliverMax for isPartialPayment check

* update fixtures

* resolve lint errors

* add API v1 support for isPartialPayment

* update CONTRIBUTING

* update accountTx JSDoc

* revert deleted JSDoc comments in accountTx

* update JSDoc for account_info response

* only use client.apiVersion in Client.request()

* add ledger_hash

* remove API v1 comment from v2 model

* update meta_blob JSDoc

* delete second AccountTxRequest matching

* add close_time_iso

* set close_time_iso as optional field

* add meta_blob to BaseResponse

* Revert "add meta_blob to BaseResponse"

This reverts commit 89794c6.

* use DEFAULT_API_VERSION throughout call stack

* improve JSDoc explanation of ledger_index

* remove this.apiVersion from getLedgerIndex

* refactor Client.request()

* refactor RequestManger.resolve()

* add TODO to fix TxResponse type assertion

* use @category ResponsesV1 for API v1 types

* refactor accountTxHasPartialPayment()

* remove TODO
Bumps [typedoc](https://github.com/TypeStrong/TypeDoc) from 0.26.2 to 0.26.3.
- [Release notes](https://github.com/TypeStrong/TypeDoc/releases)
- [Changelog](https://github.com/TypeStrong/typedoc/blob/master/CHANGELOG.md)
- [Commits](TypeStrong/typedoc@v0.26.2...v0.26.3)

---
updated-dependencies:
- dependency-name: typedoc
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@types/lodash](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash) from 4.17.4 to 4.17.6.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash)

---
updated-dependencies:
- dependency-name: "@types/lodash"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* add support for fixPreviousTxnID

* update history
* add feature RPC

* export, add tests

* update history

* fix test

* update models

* update feature models to correctly handle both cases

* fix models/tests

* fix test, improve type

* undo type change

* fix test
* add transaction hash to ledger command response

* Update packages/xrpl/src/models/ledger/Ledger.ts

* Update HISTORY.md

* delete unnesessary space
)

* feat: Upgrade to Node 18 and remove cross-fetch (XRPLF#2678)

BREAKING CHANGE: fetch now relies on the native javascript environment in browsers and node.js

Co-authored-by: justinr1234 <justinr1234@gmail.com>
* update HISTORY

* update package.json
@dangell7
Copy link
Member

dangell7 commented Aug 19, 2024

I have a patch that will update all the imports... I see you already did that though. Was trying to think of a good way to do this...

@tequdev
Copy link
Author

tequdev commented Aug 20, 2024

Currently the test of validate function for transactions available only in XRPL, such as AMM transactions, is failing and can be resolved if the commits contained in the following PR are available for inclusion.

XRPLF#2683

Once this PR is merged into transia-hooks and made available to toolkit-ts, it should be possible to use toolkit-ts on the front-end side without polyfill.

- ignore AMM, XChain,DID, Oracle, Clawback transactions
- BreakingChanges for getFeeEstimateXrp
@tequdev
Copy link
Author

tequdev commented Sep 11, 2024

I have a patch that will update all the imports... I see you already did that though. Was trying to think of a good way to do this...

By using the alias in npm dependencies, it has been prevented from causing a diff in the import of the ts file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.