Commit Graph

4646 Commits

Author SHA1 Message Date
dependabot[bot]
bdb3ad7f3e build(deps-dev): bump @types/lodash from 4.14.202 to 4.17.0 (#2663)
Bumps [@types/lodash](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash) from 4.14.202 to 4.17.0.
- [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-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-18 15:50:06 -07:00
dependabot[bot]
1fdbf85d47 build(deps): bump @noble/hashes from 1.3.3 to 1.4.0 (#2665)
Bumps [@noble/hashes](https://github.com/paulmillr/noble-hashes) from 1.3.3 to 1.4.0.
- [Release notes](https://github.com/paulmillr/noble-hashes/releases)
- [Commits](https://github.com/paulmillr/noble-hashes/compare/1.3.3...1.4.0)

---
updated-dependencies:
- dependency-name: "@noble/hashes"
  dependency-type: direct:production
  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>
2024-03-18 15:38:57 -07:00
zgrguric
3e3911464f Update APPLICATIONS.md - Add XRPLWin to the list (#2619)
Update APPLICATIONS.md

Co-authored-by: Jackson Mills <jmills@ripple.com>
Co-authored-by: Caleb Kniffen <ckniffen@ripple.com>
Co-authored-by: Chenna Keshava B S <21219765+ckeshava@users.noreply.github.com>
2024-03-14 17:14:01 -04:00
Jackson Mills
be732a4a6b Update docs for Channel, ClientOptions, and ConnectionUserOptions (#2630)
* Update docs for three objects

* Fix my updated Channel type

* Fix docs wording in client

* Export channel again

* Update HISTORY.md

* Lint
2024-02-26 17:37:58 -05:00
dependabot[bot]
e505843dc6 build(deps-dev): bump ip from 2.0.0 to 2.0.1 (#2652) 2024-02-21 17:08:35 +00:00
dependabot[bot]
ff9489ba10 build(deps-dev): bump webpack from 5.90.1 to 5.90.3 (#2651) 2024-02-20 17:29:34 +00:00
Mayukha Vadari
365763d6f7 fix: get client.requestAll to handle filters better (#2649)
* fix requestAll issue

* update changelog

* fix typo
2024-02-15 19:20:22 -05:00
dependabot[bot]
9349a6ba1a build(deps-dev): bump webpack from 5.90.0 to 5.90.1 (#2646)
Bumps [webpack](https://github.com/webpack/webpack) from 5.90.0 to 5.90.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.90.0...v5.90.1)

---
updated-dependencies:
- dependency-name: webpack
  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>
2024-02-12 13:21:28 -05:00
dependabot[bot]
34f35a5912 build(deps): bump ws from 8.14.2 to 8.16.0 (#2638)
Bumps [ws](https://github.com/websockets/ws) from 8.14.2 to 8.16.0.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/8.14.2...8.16.0)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: direct:production
  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>
2024-02-12 13:14:56 -05:00
dependabot[bot]
05f16068ff build(deps-dev): bump karma-webpack from 5.0.0 to 5.0.1 (#2644)
Bumps [karma-webpack](https://github.com/webpack-contrib/karma-webpack) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/webpack-contrib/karma-webpack/releases)
- [Changelog](https://github.com/codymikol/karma-webpack/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/karma-webpack/compare/v5.0.0...v5.0.1)

---
updated-dependencies:
- dependency-name: karma-webpack
  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: Omar Khan <khancodegt@gmail.com>
2024-02-12 12:42:08 -05:00
Jackson Mills
ddda7f4552 Fix: Migration guide package version formatting (#2635)
Update MIGRATION.md with better formatting on package versions

Co-authored-by: Omar Khan <khancodegt@gmail.com>
2024-02-12 12:29:00 -05:00
dependabot[bot]
38406212c3 build(deps-dev): bump @types/jest from 29.5.11 to 29.5.12 (#2641)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 29.5.11 to 29.5.12.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

---
updated-dependencies:
- 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>
2024-02-12 12:17:39 -05:00
dependabot[bot]
62a0d39ac3 build(deps): bump @scure/bip39 from 1.2.1 to 1.2.2 (#2640)
Bumps [@scure/bip39](https://github.com/paulmillr/scure-bip39) from 1.2.1 to 1.2.2.
- [Release notes](https://github.com/paulmillr/scure-bip39/releases)
- [Commits](https://github.com/paulmillr/scure-bip39/compare/1.2.1...1.2.2)

---
updated-dependencies:
- dependency-name: "@scure/bip39"
  dependency-type: direct:production
  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>
2024-02-12 12:07:13 -05:00
dependabot[bot]
0e6ab4e4ee build(deps): bump @scure/bip32 from 1.3.2 to 1.3.3 (#2639)
Bumps [@scure/bip32](https://github.com/paulmillr/scure-bip32) from 1.3.2 to 1.3.3.
- [Release notes](https://github.com/paulmillr/scure-bip32/releases)
- [Commits](https://github.com/paulmillr/scure-bip32/compare/1.3.2...1.3.3)

---
updated-dependencies:
- dependency-name: "@scure/bip32"
  dependency-type: direct:production
  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>
2024-02-12 11:56:04 -05:00
Caleb Kniffen
a09084289b release: xrpl.js 3.0 (#2633)
- @xrplf/isomorphic@1.0.0
 - ripple-address-codec@5.0.0
 - ripple-binary-codec@2.0.0
 - ripple-keypairs@2.0.0
 - @xrplf/secret-numbers@1.0.0
 - xrpl@3.0.0
xrpl@3.0.0 @xrplf/secret-numbers@1.0.0 ripple-keypairs@2.0.0 ripple-binary-codec@2.0.0 ripple-address-codec@5.0.0 @xrplf/isomorphic@1.0.0
2024-02-01 15:48:48 -06:00
Caleb Kniffen
a58bf2663b fix: package-lock.json after rebase with main (#2632)
Rebasing with a package-lock.json can be hard and two entries were
missed, `ws` and `node-releases`.
2024-02-01 14:08:59 -06:00
Jackson Mills
59f0b64372 Update migration guide (#2626)
* List removed polyfills

* Indicate `xrpToDrops` is unchanged

* Add note that these may still be required.
2024-02-01 13:54:13 -06:00
Caleb Kniffen
1cdef42d6d docs: 3.0 migration guide (#2606)
Add a migration guide which explains both why to migrate, and what those changes are.
---------

Co-authored-by: JST5000 <aim4math@gmail.com>
2024-02-01 13:54:13 -06:00
Caleb Kniffen
e9b80e79a3 docs: remove Buffer polyfill for react-native (#2595)
React native no longer needs a polyfill after `xrpl@3.0.0-beta.1`
2024-02-01 13:54:13 -06:00
Caleb Kniffen
63c71a162d release: xrpl@3.0.0-beta.1 and friends (#2592)
Release beta versions of all the packages and fix history file version numbers for first beta.
2024-02-01 13:54:11 -06:00
Caleb Kniffen
38b385969b feat: remove Buffer support and bundle polyfill (#2526)
- Removes need for bundlers to polyfill the `Buffer` class. `UInt8Array` are used instead which are native to the browser and node.
- Reduces bundle size 7.1kb gzipped and eliminates 4 runtime dependencies: `base-x`, `base64-js`, `buffer`, and `ieee754`.

BREAKING CHANGE: All methods that previously took a `Buffer` now accept a `UInt8Array`.

---------

Co-authored-by: Jackson Mills <jmills@ripple.com>
2024-02-01 13:53:41 -06:00
Mayukha Vadari
eefb52a9cb fix: add support for pseudo-transactions to hashSignedTx (#2588)
* add support for pseudo-transactions to hashSignedTx

* update changelog

* fix tests

* fix linter + tests
2024-02-01 13:53:41 -06:00
Caleb Kniffen
9cdb60e26a docs: update react-native setup guide (#2575)
docs: update react-native setup guide

With 3.0 less polyfill work is required and after Buffer is removed as a
dependency there will be even less.

In the future we may add `react-native` entries to `@xrpl/isomorphic`
`package.json` files which might remove the need for these extra steps.
2024-02-01 13:53:40 -06:00
Caleb Kniffen
e2433101cb test: run binary-codec tests in the browser (#2566)
- Convert tests to typescript
- Update type definitions causing errors in tests
  - `makeParser` to accept a `Buffer` in addition to `string`
  - `SerializedType` constructor allows not passing in a byte array
  - `Comparable` is now a generic type so that it allows `compareTo`
methods to take more that the type itself. Example: `Uint64.compareTo`
can accept `number`
- Update tests to use jasmine compatible functions
  - Switching from `test` to `it`.
  - Updated test checking if coretypes all implement SerializedType
  - Import fixtures directly instead of using `loadFixture` utility
- Remove importing of `buffer/` explicitly.  It was throwing off type
checking in tests.  Buffer is going away in a future PR anyway.
- Fixed `npm run clean` not clearing `.tsbuildinfo` files for keypairs
- Remove unused account-tx-transactions.db. It was likely used in the
past to test historical ledgers.
2024-02-01 13:53:40 -06:00
Caleb Kniffen
4c7f46c111 feat: getXrpBalance and dropsToXRP return number (#2574)
BREAKING CHANGE: `dropsToXRP` and `Client.getXrpBalance` now return a `number` instead of a `string`
2024-02-01 13:53:40 -06:00
Caleb Kniffen
960182ecc3 feat: add unit tests for collection utils (#2564)
Closes #2406
2024-02-01 13:53:40 -06:00
Caleb Kniffen
134924c395 feat: remove assert library as a testing dep (#2563)
Right now we have 5 testing library dependencies. This eliminates
`assert`. `jest`, `jasmine`, `chai` and `karma` are the remaining ones.
2024-02-01 13:53:40 -06:00
Caleb Kniffen
e8f89db00c test: run ripple-keypairs tests in the browser (#2558)
- Update tests to use jasmine compatible functions. This means removing `toThrowErrorMatchingInlineSnapshot` and manually removing indention to compare some of the complexly formatted error messages.
- Remove usages of `assert` library in keypairs tests.
2024-02-01 13:53:40 -06:00
Caleb Kniffen
88d8a7b73e fix: faucet errors not showing returned body (#2452)
fetch only lets you read the body once so we need to save the variable

Before it would throw TypeError: body used already for: https://faucet.devnet.rippletest.net/accounts
2024-02-01 13:53:40 -06:00
Caleb Kniffen
83b9780b5b refactor: remove import * where able (#2550)
refactor: remove `import *` where able to

BREAKING CHANGE: Moved all methods that were on `Utils` in
`@xrplf/secret-numbers` are now individually exported. This affects:
- Utils.randomEntropy,
- Utils.randomSecret
- Utils.entropyToSecret
- Utils.secretToEntropy
- Utils.calculateChecksum
- Utils.checkChecksum
- Utils.parseSecretString
2024-02-01 13:53:40 -06:00
Caleb Kniffen
3f1739895a refactor: type Transaction to include all tx (#2547)
refactor: type Transaction to include all tx

BREAKING CHANGE: `Transaction` type has been redefined to include all
transactions and `SubmittableTransaction` was created to define the old
value. The following functions which only handle transactions to be
submitted now use `SubmittableTransaction`:
  * `Client.autofill`
  * `Client.submit`
  * `Client.submitAndWait`
  * `Client.prepareTransaction`
  * `getSignedTx`
  * `isAccountDelete`
2024-02-01 13:53:40 -06:00
Caleb Kniffen
fa4eabef0e chore(lint): apply prettier to secret-numbers (#2549)
The config was not applied when it was moved to the monorepo
2024-02-01 13:53:40 -06:00
Caleb Kniffen
c5fc25efc2 release: 3.0.0-beta.0 (#2533) 2024-02-01 13:53:39 -06:00
Caleb Kniffen
294509cf79 feat: isomorphic sockets and use eventemitter3 (#2514)
Reduces filesize by 3kb minified and gzipped or 2.8% and reduces bundler
config steps.

- Move `WSWrapper` to `@xrpl/isomorphic` to remove the need to add
mapping of `ws` to `WSWrapper` file in bundler configs
- Switch to `eventemitter3` which is smaller than `events` by almost
1kb and will not require a mapping to node's `events` in `vite`
bundling. `webpack` always automatically maps it.
    - max listeners is not a thing for `eventemitter3` so we do not
need to set it to `Infinity`. `ws` uses the native event emitter which
does still need that to be set.
- Remove `eventemitter2` which was only used in tests and was replaced
with `eventemitter3`

BREAKING CHANGE: Config for frontend bundlers has changed for `ws`.
2024-02-01 13:52:15 -06:00
Caleb Kniffen
3c8a990e6a docs: End of Life ripple-lib (#2433)
With `xrpl@3.0` coming out we are fully ending support for ripple-lib
2024-02-01 13:50:22 -06:00
Nicholas Dudfield
217b111ef2 feat: use @noble and @scure libraries for cryptography (#2273)
Switch to using `@noble/hashes`, `@noble/curves`, `@scure/base`,
`@scure/bip32`, and `@scure/bip39`. This replaces `crypto` polyfills
(such as `crypto-browserify`), `create-hash`, `elliptic`, `hash.js`,
`bn.js` (both versions), and their many dependencies.  This also means
there are 33 less dependencies downloaded when running a fresh
`npm install` and will make the project much easier to maintain.

This reduces the bundle size by 44% (82kb minified and gzipped) over
the current 3.0 branch as well as reducing the amount of configuration
required to bundle.

Closes #1814, #1817, #2272, and #2306

Co-authored-by: Caleb Kniffen <ckniffen@ripple.com>
2024-02-01 13:50:19 -06:00
Caleb Kniffen
5607320ce2 cleanup: remove dupe tests, update lock and docs (#2505)
- Remove tests from `ripple-keypairs` that exclusively tested
`rippled-address-codec`. The tests in `codec.test.ts` and
`xrp-codec.test.ts` are all present and accounted for in
`packages/ripple-address-codec/test/xrp-codec.test.ts`.
- Update `package-lock.json` after the rebase with main
- Remove references to `decimal.js` in the documentation
* add missing entry for `bignumber.js` to `ripple-binary-codec`

This will clean up the diff for #2273
2024-02-01 13:45:11 -06:00
Caleb Kniffen
c143dc3e99 test: run address-codec tests in the browser (#2466)
Update tests to use jasmine compatible functions.

This means changing `test` to `it`, `toStrictEqual` to `toEqual` (which
is still strict), `toThrowError` to `toError`, and updating the param
for toError to pass an `Error` object.

Remove the need to specify --single-run.
2024-02-01 13:45:11 -06:00
Caleb Kniffen
83870acbfb fix: remove need to --force builds + cleanup (#2468)
This is done by properly deleting all build files.

Package-lock was due to it not reflecting the license of
@xrplf/secret-numbers.  This was fixed by running `npm i`.
2024-02-01 13:45:11 -06:00
tequ
83442b18ba Add nftoken_id, nftoken_ids, offer_id to meta fields (#2450)
Add type for metadata for specific transactions(`Payment`, `NFTokenMint`, `NFTokenCreateOffer`, `NFTokenAcceptOffer`, `NFTokenCancelOffer`)

Closes #2316
2024-02-01 13:45:11 -06:00
Caleb Kniffen
1a83997e49 feat: add xrpl-secret-numbers to the monorepo (#2445)
- Add `xrpl-secret-numbers` by @WietseWind  to the mono repo.
- `unpkg` and `jsdelivr` support was simplified by adding fields to package.json.
- Unit tests run in a browser and node.

BREAKING CHANGES:
- `xrpl-secret-numbers` is now `@xrplf/secret-numbers`.
- Changed the bundled file produced changed from  `dist/browerified.js` to `build/xrplf-secret-numbers-latest.js`.
- Bundle variable is `xrplf_secret_numbers` instead of using browserify's loader.
- If using CDN instructions in README will need to update to `https://cdn.jsdelivr.net/npm/@xrplf/secret-numbers`

Making this library part of the monorepo was discussed in #1788.  This solves several problems with the upcoming `xrpl.js@3.0`.

`xrpl-secret-numbers` has a dependency of `ripple-keypairs` and `xrpl` has a depenendecy on `xrpl-secret-numbers`.  This means that any change would require a separate release of `ripple-keypairs`, then a release of `xrpl-secret-numbers`, followed by `xrpl`.  Now they can be released all at once

In 3.0 we eliminated the need for many polyfills like `util`, `assert`, and soon to be `buffer` (after noble libs PR is merged).  `xrpl-secret-numbers` still needs those.  This will also eliminate them and anytime similar changes in the future will be much easier.  This further reduces the bundle size of 3.0 branch by over 10% as well as reducing bundler setup.
2024-02-01 13:45:11 -06:00
Caleb Kniffen
3d86318195 test: update address-codec tests to typescript (#2447)
- Switch files to typescript
- Add missing types in test files
- Change how the codec functions were imported. They now count towards the "% Funcs" calculation, increasing it from 75% to 100%.
- Lint test files
2024-02-01 13:45:11 -06:00
Jackson Mills
9676b218b7 Re-add the walletFromSecretNumbers custom algorithm test (#2437)
Re-add test
2024-02-01 13:45:11 -06:00
Caleb Kniffen
cddb048588 feat: remove util polyfill and fix HISTORY.md (#2432)
- Remove `util` from bundle by switching `inspect` to `JSON.stringify`
- Update `HISTORY.md` with latest 3.0 changes
2024-02-01 13:45:09 -06:00
justinr1234
3b70a3b919 fix: make docs not output confusing information in xrpl client (#2337)
* fix: make docs not output confusing information in xrpl client

---------

Co-authored-by: Jackson Mills <jmills@ripple.com>
Co-authored-by: Caleb Kniffen <ckniffen@ripple.com>
2024-02-01 13:43:55 -06:00
Caleb Kniffen
21c2423bac test: remove extra polyfills only for testing (#2428)
Removes the testing polyfills by using jasmine and not jest in the
browser. We were already using jasmine but where overriding those
methods with jest versions which was not needed.

The previous karma setup also used a single entrypoint which meant that
not all integration tests were running because all files were not
imported in integrations/index.ts.

This also eliminates 79 dev dependencies.
2024-02-01 13:43:55 -06:00
Jackson Mills
a0e53ac9e1 fix: Fix invariant assertion in binary-codec (#2429)
* Fix assertion

* Add a test
2024-02-01 13:43:55 -06:00
Jackson Mills
041055082a BREAKING CHANGE(fix): deriveKeypair ignoring a manual algorithm being specified (#2376) 2024-02-01 13:43:55 -06:00
Caleb Kniffen
07afcea97d feat: remove BroadcastClient (#2408)
BREAKING CHANGE: `BroadcastClient` was removed. It was deprecated in 2.2
2024-02-01 13:43:55 -06:00
Caleb Kniffen
328987a0a3 feat(deps): remove assert-browserify (#2389)
Use if statements and manually error throwing to save 20kb gzipped.

BREAKING CHANGE: If you were catching AssertionError you need to change to Error.
2024-02-01 13:43:55 -06:00