Commit Graph

50 Commits

Author SHA1 Message Date
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
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
c5fc25efc2 release: 3.0.0-beta.0 (#2533) 2024-02-01 13:53:39 -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
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
Jackson Mills
99dd0eb44c Release xrpl.js 2.11.0 (#2591)
Update HISTORY.md + Run docgen
2023-11-30 15:27:12 -06: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
62cea624f8 2.12 release (#2488)
* update HISTORY

* docgen

* update HISTORY again

* update package.json files
2023-09-27 11:50:21 -04: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
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
Omar Khan
37fbc03584 2.11 release (#2442)
* update HISTORY

* update docgen

* update package versions
2023-08-24 13:44:29 -04:00
Jackson Mills
49447a9beb ci: Add a script to generate changes to ci-config (#2431)
* Add basic lookup for amendments
2023-08-18 15:24:48 -07:00
Jackson Mills
c4097935a9 release: Update HISTORY.md (#2424)
* Update HISTORY.md

* Run docgen
2023-08-07 14:31:24 -07:00
pdp2121
5ec6729c61 release 2.9.1 (#2391) 2023-07-18 15:29:32 -05:00
Caleb Kniffen
c523a7c80b release: xrpl@2.9.0 and ripple-binary-codec@1.7.0 (#2380) 2023-07-12 16:52:06 -05:00
Jackson Mills
3791c6292c 2.8.0 release (#2343) 2023-06-13 14:15:08 -07:00
Mayukha Vadari
82c5b3598a feat: support npm v9 (#2318)
* add support for npm v9

* Update package-lock.json

* Update nodejs.yml

* update changelogs

* update PR template
2023-05-25 16:01:42 -04:00
Jackson Mills
0c6ea2afe2 feat: modifiable definitions.json values at runtime via encode/decode parameter (#2127) 2023-03-16 10:35:50 -07:00
Jackson Mills
b3d3bc2f99 Release xrpl.js 2.7.0 (#2240) 2023-03-08 15:05:00 -08:00
justinr1234
5fe480ece4 feat: Jest Test Runner (#2170) 2023-02-03 17:03:07 -06:00
Omar Khan
aff6988f09 Release xrpl packages (#2028)
* update package and package-lock json

* update HISTORY files
2022-06-27 21:11:07 -04:00
Jackson Mills
89240eae62 Handle edge cases for standard currency code signing (#2009)
* Allow decoding symbols + lowercase standard codes
* Standardize the treatment of standard codes and hex codes for verifying transaction equivalence
2022-06-17 14:27:47 -07:00
Jackson Mills
4fddd8f41d Release xrpl packages (#2021)
* Update HISTORY.md for release
* Run docgen
2022-06-02 11:03:56 -07:00
Jackson Mills
c994ac7b65 Add better error for trying to encode invalid transactions (#2001) 2022-05-24 15:57:08 -07:00
Omar Khan
9d94f4a8ab rename XLS-20 fields (#1966)
* rename TokenTaxon -> NFTokenTaxon

* rename MintedTokens -> MintedNFTokens

* rename BurnedTokens -> BurnedNFTokens

* update binary for NFTokenID rename

* rename TokenID -> NFTokenID

* rename TokenOffers -> NFTokenOffers

* rename BrokerFee -> NFTokenBrokerFee

* rename Minter -> NFTokenMinter

* rename NonFungibleToken -> NFToken

* rename NonFungibleTokens -> NFTokens

* rename BuyOffer -> NFTokenBuyOffer

* rename SellOffer -> NFTokenSellOffer

* rename OfferNode -> NFTokenOfferNode

* fix binary for serialize tests

* Add missing MintedNFTokens def + fix tests

* nftokenid -> nft_id

* asfAuthorizedMinter -> asfAuthorizedNFTokenMinter

* Update tec/tem error codes

* Add new definitions

* Update HISTORY.md

* Change to 1.4.0 for binary-codec

* Docgen

* Update HISTORY.md

Co-authored-by: Jackson Mills <jmills@ripple.com>
2022-04-19 10:02:18 -07:00
Elliot Lee
1e30b4cb43 [ripple-binary-codec] Update HISTORY - 1.3.2 (#1924)
Co-authored-by: Mayukha Vadari <mvadari@ripple.com>
2022-02-08 11:00:48 -08:00
Elliot Lee
cbdbfe5b8e Merge branch 'main' into ripple-binary-codec-1.3.1 2022-02-02 17:50:39 -08:00
Jackson Mills
b0e0f9f329 Remove exception from decoding issued currencies which evaluate to 'XRP' (#1920)
* Remove throw and revise tests

* Update chai dependency

* Disabling linter error about extraneous import

* Fix typo in test description

* Revert unnecessary test changes

* Remove unnecessary comments

* Revert chai change

* Add HISTORY.md

* Revert chai change in package-lock as well

* Fix typo

* Check the result of the decoding

* Update tests with correct expected behavior.

* Fix tests and update currency.js

* Update currency.ts
2022-02-02 18:05:42 -05:00
Omar Khan
8f79c51c7c [ripple-binary-codec] fix ISO when parsing currency code (#1921) 2022-02-02 17:52:08 -05:00
Elliot Lee
e4c7923bf3 Release ripple-binary-codec@1.3.1 2022-01-28 14:36:23 -08:00
ledhed2222
46a8adcac9 feat: NFT support (#1829)
* add NFTokenBurn and NFTokenMint

* add NFTokenCreateOffer

* add NFTokenCancelOffer

* add NFTokenAcceptOffer

* add requests and responses

* make a beta 2.1.0

* rename TokenIDs to TokenOffers

* add validations and fixup docs

* add tests

* add missing error codes to binary codec

* adds history changes
2021-12-17 18:26:47 -05:00
Jackson Mills
c0a19a8417 Move UNLModify fix to proper package history (#1862) 2021-12-07 14:32:46 -08:00
Mayukha Vadari
4e0a093677 chore: update HISTORY for rbc release (#1858) 2021-12-02 14:52:08 -05:00
Jackson Mills
0eb64b1447 Update history for all codecs and xrpl.js (#1849)
* Update xrpl.js history.md

* Update ripple-address-codec history

* Add comment about npm < 7 for all codecs
2021-12-01 15:20:59 -08:00
Greg Weisbrod
f522d3f418 add HISTORY for monorepo updates and update CONTRIBUTING.md for publication 2021-11-15 21:03:42 -05:00
Nathan Nichols
5fb61c470e chore: prepare for 1.1.3 release (#136)
* chore: prepare for 1.1.3 release
2021-06-14 09:06:37 -07:00
Nathan Nichols
c354c392a9 build: Release 1.1.2 (#123)
* build: Release 1.1.2
2021-03-10 16:53:47 -06:00
Nathan Nichols
9bd9ebfc09 chore: update HISTORY.md and version (#119) 2021-02-12 16:03:41 -06:00
Elliot Lee
c29de82e86 Release 1.1.0 2020-12-03 20:40:39 -08:00
Nathan Nichols
b197897227 Encode any 3 character ASCII currency code (#106)
* Encode all 3 character ASCII codes
2020-09-14 13:09:38 -05:00
Nathan Nichols
a5559825ae Filter undefined values (#105)
filter out fields with undefined values
2020-09-08 17:17:14 -05:00
Nathan Nichols
2c99932c3c Release 1.0.0 (#104)
Update history and package version
2020-08-31 13:58:11 -05:00
Nathan Nichols
1c273ce427 Publish 1.0.0-rc1 (#93)
* Prepare to release rc1 of ripple-binary-codec v1.0.0
2020-08-18 12:56:43 -05:00
Nathan Nichols
1ca8be159b Update HISTORY.md (#92)
* Update HISTORY.md for release 0.3.0-rc1
2020-08-17 16:28:29 -05:00
Elliot Lee
0d8b202a74 Release 0.2.6 2019-12-31 13:17:52 -08:00
Elliot Lee
eb06de5344 v0.2.5 2019-12-14 22:37:12 -08:00
Elliot Lee
edc95f78f1 v0.2.3 2019-08-29 18:00:24 -07:00
Elliot Lee
67d00491eb Release 0.2.2 2019-07-26 17:24:44 -07:00
Elliot Lee
2696a9e138 Update HISTORY.md 2019-07-26 17:17:10 -07:00
Elliot Lee
6324c727a9 Remove codecov.io 2019-07-26 17:14:21 -07:00