Compare commits

..

576 Commits

Author SHA1 Message Date
Greg Weisbrod
f96f38d0d9 Publish
- ripple-address-codec@4.2.0
 - ripple-binary-codec@1.2.0
 - ripple-keypairs@1.1.0
 - xrpl@2.0.2
2021-11-15 20:23:58 -05:00
ledhed2222
81dbc2ed87 Merge pull request #1800 from XRPLF/develop
monorepo conversion and ripple-binary-codec v1.2.0
2021-11-15 20:11:38 -05:00
ledhed2222
7cb38591ac add support for nfts in binary codec (#1797) 2021-11-15 17:08:37 -05:00
ledhed2222
be99161e89 Merge pull request #1796 from XRPLF/gw/prettier 2021-11-12 14:06:09 -05:00
Greg Weisbrod
afd6aadaf1 run prettier on all packages 2021-11-12 02:41:28 -05:00
ledhed2222
3b523d7e37 Merge pull request #1786 from XRPLF/gw/monorepo
monorepo conversion
2021-11-11 12:45:08 -05:00
ledhed2222
1902a2d885 Merge branch 'develop' into gw/monorepo 2021-11-08 18:32:16 -05:00
Greg Weisbrod
f1c5f1d10d fix docgen setup 2021-11-08 18:19:45 -05:00
Greg Weisbrod
b90710ffa5 clean up docs 2021-11-08 18:19:45 -05:00
Greg Weisbrod
0d6e723a7e fix inter-repo dependencies and remove now-redundant package-locks within packages
fix linter again
2021-11-08 18:19:45 -05:00
Greg Weisbrod
b5beeb6668 migrate ripple-address-codec tests back to javascript for now - jest and mocha cannot be used in the same typescript project due to type name conflicts 2021-11-08 18:19:45 -05:00
Greg Weisbrod
9f19d771d2 fix linting and devdeps issues by using eslint for ripple-address-codec and removing the misc plugins used by ripple-keypairs
run 'npx lerna link convert' to hoist common devDependencies to top
2021-11-08 18:19:45 -05:00
Greg Weisbrod
43b55ab598 run 'npx lerna link convert' to hoist common devDependencies to top 2021-11-08 18:19:45 -05:00
Greg Weisbrod
99c817ca8a fix all errors resulting from running 'npx lerna bootstrap', hoist github actions to top, hoist vscode config to top 2021-11-08 18:19:44 -05:00
Jackson Mills
7dd842f995 Update readme with websocket url (#1785) 2021-11-05 12:26:01 -07:00
dependabot[bot]
1106ad1405 build(deps-dev): bump @types/node from 16.11.1 to 16.11.4 (#375)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 16.11.1 to 16.11.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
2021-10-27 12:11:56 -04:00
dependabot[bot]
3973d0f5c5 build(deps-dev): bump ts-node from 10.3.0 to 10.4.0 (#373)
Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 10.3.0 to 10.4.0.
- [Release notes](https://github.com/TypeStrong/ts-node/releases)
- [Commits](https://github.com/TypeStrong/ts-node/compare/v10.3.0...v10.4.0)
2021-10-27 11:40:38 -04:00
dependabot[bot]
906ee4c55e build(deps-dev): bump typescript from 4.4.3 to 4.4.4 (#371)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.4.3 to 4.4.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.4.3...v4.4.4)
2021-10-18 12:23:08 -04:00
dependabot[bot]
7c0ac278b1 build(deps-dev): bump eslint-plugin-import from 2.24.2 to 2.25.2 (#370)
Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.24.2 to 2.25.2.
- [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](https://github.com/import-js/eslint-plugin-import/compare/v2.24.2...v2.25.2)
2021-10-18 12:22:29 -04:00
dependabot[bot]
e2141da07c build(deps-dev): bump ts-node from 10.2.1 to 10.3.0 (#369)
Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 10.2.1 to 10.3.0.
- [Release notes](https://github.com/TypeStrong/ts-node/releases)
- [Commits](https://github.com/TypeStrong/ts-node/compare/v10.2.1...v10.3.0)
2021-10-18 12:22:08 -04:00
dependabot[bot]
555b3fe44d build(deps-dev): bump mocha from 9.1.1 to 9.1.3 (#367)
Bumps [mocha](https://github.com/mochajs/mocha) from 9.1.1 to 9.1.3.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v9.1.1...v9.1.3)
2021-10-18 12:21:48 -04:00
dependabot[bot]
f1e6858ec8 build(deps-dev): bump @types/node from 16.10.3 to 16.11.1 (#366)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 16.10.3 to 16.11.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
2021-10-18 11:37:22 -04:00
dependabot[bot]
356b285681 build(deps-dev): bump @types/node from 16.10.2 to 16.10.3 (#364)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 16.10.2 to 16.10.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
2021-10-11 11:25:03 -04:00
dependabot[bot]
f5f1534f12 build(deps-dev): bump @types/node from 16.9.4 to 16.10.2 (#360)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 16.9.4 to 16.10.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
2021-10-04 13:44:12 -04:00
dependabot[bot]
6e2db6db20 build(deps-dev): bump eslint-plugin-mocha from 6.3.0 to 9.0.0 (#351)
Bumps [eslint-plugin-mocha](https://github.com/lo1tuma/eslint-plugin-mocha) from 6.3.0 to 9.0.0.
- [Release notes](https://github.com/lo1tuma/eslint-plugin-mocha/releases)
- [Changelog](https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/lo1tuma/eslint-plugin-mocha/compare/6.3.0...9.0.0)
2021-09-21 09:12:16 -04:00
dependabot[bot]
d08a62b9a1 build(deps-dev): bump @types/node from 16.9.1 to 16.9.4 (#355)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 16.9.1 to 16.9.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
2021-09-21 09:11:19 -04:00
dependabot[bot]
7669304fbe build(deps-dev): bump eslint-plugin-prettier from 3.4.1 to 4.0.0 (#352)
Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 3.4.1 to 4.0.0.
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/commits/v4.0.0)
2021-09-21 09:09:06 -04:00
dependabot[bot]
575892d044 build(deps-dev): bump prettier from 2.4.0 to 2.4.1 (#350)
Bumps [prettier](https://github.com/prettier/prettier) from 2.4.0 to 2.4.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.4.0...2.4.1)
2021-09-20 18:57:14 -04:00
dependabot[bot]
f58a938bb8 build(deps-dev): bump typescript from 4.4.2 to 4.4.3 (#348)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.4.2 to 4.4.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.4.2...v4.4.3)
2021-09-14 12:46:39 -04:00
dependabot[bot]
83d04bea77 build(deps-dev): bump prettier from 2.3.2 to 2.4.0 (#347)
Bumps [prettier](https://github.com/prettier/prettier) from 2.3.2 to 2.4.0.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.3.2...2.4.0)
2021-09-14 12:46:14 -04:00
dependabot[bot]
43dbaf6b61 build(deps-dev): bump @types/node from 16.7.10 to 16.9.1 (#346)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 16.7.10 to 16.9.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
2021-09-14 12:37:37 -04:00
dependabot[bot]
845d70fefc build(deps-dev): bump source-map-support from 0.5.19 to 0.5.20 (#345)
Bumps [source-map-support](https://github.com/evanw/node-source-map-support) from 0.5.19 to 0.5.20.
- [Release notes](https://github.com/evanw/node-source-map-support/releases)
- [Commits](https://github.com/evanw/node-source-map-support/compare/v0.5.19...v0.5.20)
2021-09-14 12:37:21 -04:00
dependabot[bot]
0b1064fead build(deps-dev): bump eslint from 6.8.0 to 7.32.0
Bumps [eslint](https://github.com/eslint/eslint) from 6.8.0 to 7.32.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v6.8.0...v7.32.0)
2021-09-06 15:01:09 +00:00
dependabot[bot]
9d77ea0161 build(deps-dev): bump mocha from 8.3.2 to 9.1.1
Bumps [mocha](https://github.com/mochajs/mocha) from 8.3.2 to 9.1.1.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v8.3.2...v9.1.1)
2021-09-02 19:01:32 +00:00
dependabot[bot]
283c2edb10 build(deps-dev): bump ts-node from 9.1.1 to 10.2.1
Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 9.1.1 to 10.2.1.
- [Release notes](https://github.com/TypeStrong/ts-node/releases)
- [Commits](https://github.com/TypeStrong/ts-node/compare/v9.1.1...v10.2.1)
2021-09-02 15:55:10 +00:00
dependabot[bot]
c41f4520b3 build(deps-dev): bump @types/mocha from 8.2.2 to 9.0.0
Bumps [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) from 8.2.2 to 9.0.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha)
2021-09-02 15:54:56 +00:00
ledhed2222
569c75103c refactor: switch to npm (#343)
* allow tests to be run manually
2021-09-02 11:54:05 -04:00
dependabot[bot]
79a2c8f8f3 build(deps): bump path-parse from 1.0.6 to 1.0.7 (#331)
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)
2021-08-24 22:37:30 -07:00
dependabot[bot]
bf84b66b72 build(deps-dev): bump @types/node from 16.4.3 to 16.7.1 (#334)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 16.4.3 to 16.7.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
2021-08-24 22:37:19 -07:00
dependabot[bot]
af95916e79 build(deps-dev): bump eslint-plugin-prettier from 3.4.0 to 3.4.1 (#336)
Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 3.4.0 to 3.4.1.
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/commits)
2021-08-24 22:37:04 -07:00
dependabot[bot]
6acbf3ef43 build(deps-dev): bump eslint-plugin-import from 2.23.4 to 2.24.1 (#337)
Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.23.4 to 2.24.1.
- [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](https://github.com/import-js/eslint-plugin-import/compare/v2.23.4...v2.24.1)
2021-08-24 22:36:54 -07:00
dependabot[bot]
c93617defd build(deps-dev): bump prettier from 2.3.1 to 2.3.2 (#314)
Bumps [prettier](https://github.com/prettier/prettier) from 2.3.1 to 2.3.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.3.1...2.3.2)
2021-07-28 22:50:14 -07:00
dependabot[bot]
5436b55db0 build(deps-dev): bump typescript from 4.3.2 to 4.3.5 (#316)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.3.2 to 4.3.5.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.3.2...v4.3.5)
2021-07-28 22:50:06 -07:00
dependabot[bot]
af176c54e6 build(deps-dev): bump codecov from 3.8.2 to 3.8.3 (#324)
Bumps [codecov](https://github.com/codecov/codecov-node) from 3.8.2 to 3.8.3.
- [Release notes](https://github.com/codecov/codecov-node/releases)
- [Changelog](https://github.com/codecov/codecov-node/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-node/compare/v3.8.2...v3.8.3)
2021-07-28 22:49:50 -07:00
dependabot[bot]
2ffb774eb2 build(deps-dev): bump @types/node from 15.12.2 to 16.4.3 (#326)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 15.12.2 to 16.4.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
2021-07-28 22:49:38 -07:00
dependabot[bot]
3700004d1f build(deps-dev): bump codecov from 3.8.1 to 3.8.2 (#291)
Bumps [codecov](https://github.com/codecov/codecov-node) from 3.8.1 to 3.8.2.
- [Release notes](https://github.com/codecov/codecov-node/releases)
- [Changelog](https://github.com/codecov/codecov-node/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-node/compare/v3.8.1...v3.8.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-15 23:45:03 -07:00
dependabot[bot]
aa9dc9e992 build(deps): bump lodash from 4.17.20 to 4.17.21 (#295)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.20...4.17.21)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-15 23:44:54 -07:00
dependabot[bot]
c1af170a18 build(deps): bump hosted-git-info from 2.8.8 to 2.8.9 (#296)
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-15 23:44:47 -07:00
dependabot[bot]
41256eedeb build(deps): bump ripple-address-codec from 4.1.2 to 4.1.3 (#299)
Bumps [ripple-address-codec](https://github.com/ripple/ripple-address-codec) from 4.1.2 to 4.1.3.
- [Release notes](https://github.com/ripple/ripple-address-codec/releases)
- [Changelog](https://github.com/ripple/ripple-address-codec/blob/master/HISTORY.md)
- [Commits](https://github.com/ripple/ripple-address-codec/compare/4.1.2...4.1.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-15 23:44:40 -07:00
dependabot[bot]
ce332e14a0 build(deps-dev): bump eslint-plugin-import from 2.22.1 to 2.23.4 (#303)
Bumps [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) from 2.22.1 to 2.23.4.
- [Release notes](https://github.com/benmosher/eslint-plugin-import/releases)
- [Changelog](https://github.com/benmosher/eslint-plugin-import/blob/master/CHANGELOG.md)
- [Commits](https://github.com/benmosher/eslint-plugin-import/compare/v2.22.1...v2.23.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-15 23:44:32 -07:00
dependabot[bot]
00991caf43 build(deps-dev): bump typescript from 4.2.4 to 4.3.2 (#304)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.2.4 to 4.3.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.2.4...v4.3.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-15 23:44:24 -07:00
dependabot[bot]
534772b9b0 build(deps-dev): bump prettier from 2.2.1 to 2.3.1 (#307)
Bumps [prettier](https://github.com/prettier/prettier) from 2.2.1 to 2.3.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.2.1...2.3.1)
2021-06-15 23:44:14 -07:00
dependabot[bot]
fc0b39022e build(deps): bump glob-parent from 5.1.1 to 5.1.2 (#308)
Bumps [glob-parent](https://github.com/gulpjs/glob-parent) from 5.1.1 to 5.1.2.
- [Release notes](https://github.com/gulpjs/glob-parent/releases)
- [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gulpjs/glob-parent/compare/v5.1.1...v5.1.2)
2021-06-15 23:44:06 -07:00
dependabot[bot]
b3bcfeee20 build(deps-dev): bump @types/node from 14.14.41 to 15.12.2 (#310)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.41 to 15.12.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
2021-06-15 23:43:57 -07:00
dependabot-preview[bot]
8797ee2f65 Upgrade to GitHub-native Dependabot (#288)
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-04-28 16:36:44 -07:00
dependabot-preview[bot]
23dd7b16f4 build(deps-dev): bump eslint-plugin-prettier from 3.3.1 to 3.4.0 (#287)
Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 3.3.1 to 3.4.0.
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-04-28 16:36:35 -07:00
dependabot-preview[bot]
6e9e2e390f build(deps-dev): bump @types/node from 14.14.37 to 14.14.41 (#286)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.37 to 14.14.41.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-04-28 16:36:27 -07:00
dependabot-preview[bot]
7c6791e55f build(deps-dev): bump typescript from 4.2.3 to 4.2.4 (#284)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.2.3 to 4.2.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.2.3...v4.2.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-04-28 16:36:19 -07:00
dependabot-preview[bot]
5a2225751a build(deps): bump bn.js from 5.1.3 to 5.2.0 (#274)
Bumps [bn.js](https://github.com/indutny/bn.js) from 5.1.3 to 5.2.0.
- [Release notes](https://github.com/indutny/bn.js/releases)
- [Changelog](https://github.com/indutny/bn.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/indutny/bn.js/compare/v5.1.3...v5.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-04-01 12:14:43 -07:00
dependabot-preview[bot]
ed6ca70053 build(deps-dev): bump typescript from 4.1.5 to 4.2.3 (#277)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.1.5 to 4.2.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.1.5...v4.2.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-04-01 12:14:33 -07:00
dependabot-preview[bot]
a47e5794ae build(deps-dev): bump mocha from 8.3.0 to 8.3.2 (#279)
Bumps [mocha](https://github.com/mochajs/mocha) from 8.3.0 to 8.3.2.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v8.3.0...v8.3.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-04-01 12:14:24 -07:00
dependabot-preview[bot]
bd2e4629ca build(deps-dev): bump @types/mocha from 8.2.1 to 8.2.2 (#280)
Bumps [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) from 8.2.1 to 8.2.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-04-01 12:14:16 -07:00
dependabot-preview[bot]
b57104adc1 build(deps-dev): bump @types/node from 14.14.31 to 14.14.37 (#282)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.31 to 14.14.37.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-04-01 12:14:05 -07:00
dependabot-preview[bot]
bc19366328 build(deps): [security] bump y18n from 4.0.0 to 4.0.1 (#283)
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1. **This update includes a security fix.**
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-04-01 12:13:56 -07:00
dependabot-preview[bot]
c81ed7af2f Bump mocha from 8.2.1 to 8.3.0 (#268)
Bumps [mocha](https://github.com/mochajs/mocha) from 8.2.1 to 8.3.0.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v8.2.1...v8.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-02-25 10:16:18 -08:00
dependabot-preview[bot]
3c09e442f2 Bump typescript from 4.1.3 to 4.1.5 (#269)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.1.3 to 4.1.5.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.1.3...v4.1.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-02-25 10:16:08 -08:00
Elliot Lee
937dfa9664 chore: require elliptic ^6.5.4 2021-02-22 22:26:37 -08:00
Elliot Lee
8983782562 Create codeql-analysis.yml 2021-02-22 20:59:00 -08:00
Elliot Lee
37e95b8394 Create SECURITY.md 2021-02-22 20:58:26 -08:00
Elliot Lee
3d3f50ad05 release: update history for 1.0.3 2021-02-22 14:50:36 -08:00
Elliot Lee
70e6976d7a release: ripple-keypairs 1.0.3 2021-02-22 14:08:08 -08:00
Elliot Lee
4b228842df style: run eslint formatter 2021-02-22 14:09:14 -08:00
dependabot-preview[bot]
9fafdf1449 Bump @types/mocha from 8.2.0 to 8.2.1 (#271)
Bumps [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) from 8.2.0 to 8.2.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-02-22 11:14:15 -08:00
dependabot-preview[bot]
c32afaf587 Bump @types/node from 14.14.19 to 14.14.31 (#272)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.19 to 14.14.31.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-02-22 11:12:50 -08:00
dependabot-preview[bot]
ef50cb8933 Bump ripple-address-codec from 4.1.1 to 4.1.2 (#263)
Bumps [ripple-address-codec](https://github.com/ripple/ripple-address-codec) from 4.1.1 to 4.1.2.
- [Release notes](https://github.com/ripple/ripple-address-codec/releases)
- [Changelog](https://github.com/ripple/ripple-address-codec/blob/master/HISTORY.md)
- [Commits](https://github.com/ripple/ripple-address-codec/compare/4.1.1...4.1.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-02-22 11:12:03 -08:00
dependabot-preview[bot]
440c12acc7 Bump eslint-plugin-prettier from 3.3.0 to 3.3.1 (#260)
Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 3.3.0 to 3.3.1.
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v3.3.0...v3.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-02-22 11:10:31 -08:00
dependabot-preview[bot]
430b799de5 Bump elliptic from 6.5.3 to 6.5.4 (#267)
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.4.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.3...v6.5.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-02-22 11:10:14 -08:00
dependabot-preview[bot]
2aa6551693 Bump mocha from 8.1.3 to 8.2.1 (#239)
Bumps [mocha](https://github.com/mochajs/mocha) from 8.1.3 to 8.2.1.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v8.1.3...v8.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Elliot Lee <github.public@intelliot.com>
2021-01-10 21:13:58 -08:00
dependabot-preview[bot]
a6d1151290 Bump prettier from 2.2.0 to 2.2.1 (#249)
Bumps [prettier](https://github.com/prettier/prettier) from 2.2.0 to 2.2.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.2.0...2.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-01-10 21:13:49 -08:00
dependabot-preview[bot]
d115aa357b Bump ts-node from 9.0.0 to 9.1.1 (#251)
Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 9.0.0 to 9.1.1.
- [Release notes](https://github.com/TypeStrong/ts-node/releases)
- [Commits](https://github.com/TypeStrong/ts-node/compare/v9.0.0...v9.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-01-10 21:13:34 -08:00
dependabot-preview[bot]
6e3321cfef Bump eslint-plugin-prettier from 3.1.4 to 3.3.0 (#254)
Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 3.1.4 to 3.3.0.
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v3.1.4...v3.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-01-10 21:13:25 -08:00
dependabot-preview[bot]
0cbca4b876 Bump @types/mocha from 8.0.4 to 8.2.0 (#255)
Bumps [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) from 8.0.4 to 8.2.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-01-10 21:13:17 -08:00
dependabot-preview[bot]
ef31c1882c Bump typescript from 4.1.2 to 4.1.3 (#256)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.1.2 to 4.1.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-01-10 21:13:08 -08:00
dependabot-preview[bot]
1db47d3da3 Bump @types/node from 14.14.9 to 14.14.19 (#259)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.9 to 14.14.19.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-01-10 21:12:58 -08:00
dependabot-preview[bot]
b7dcb4202e Bump eslint-config-prettier from 6.12.0 to 6.15.0 (#236)
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 6.12.0 to 6.15.0.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v6.12.0...v6.15.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-24 13:11:30 -08:00
dependabot-preview[bot]
6879af37db Bump eslint-config-airbnb-base from 14.2.0 to 14.2.1 (#240)
Bumps [eslint-config-airbnb-base](https://github.com/airbnb/javascript) from 14.2.0 to 14.2.1.
- [Release notes](https://github.com/airbnb/javascript/releases)
- [Commits](https://github.com/airbnb/javascript/compare/eslint-config-airbnb-base-v14.2.0...eslint-config-airbnb-base-v14.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-24 13:11:16 -08:00
dependabot-preview[bot]
50a3f5a064 Bump codecov from 3.7.2 to 3.8.1 (#241)
Bumps [codecov](https://github.com/codecov/codecov-node) from 3.7.2 to 3.8.1.
- [Release notes](https://github.com/codecov/codecov-node/releases)
- [Changelog](https://github.com/codecov/codecov-node/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-node/compare/v3.7.2...v3.8.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-24 13:11:07 -08:00
dependabot-preview[bot]
42aa9a53fa Bump @types/mocha from 8.0.3 to 8.0.4 (#244)
Bumps [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) from 8.0.3 to 8.0.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-24 13:10:56 -08:00
dependabot-preview[bot]
70266cb05c Bump prettier from 2.1.2 to 2.2.0 (#245)
Bumps [prettier](https://github.com/prettier/prettier) from 2.1.2 to 2.2.0.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.1.2...2.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-24 13:10:48 -08:00
dependabot-preview[bot]
8a57b616c8 Bump typescript from 4.0.3 to 4.1.2 (#246)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.0.3 to 4.1.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.0.3...v4.1.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-24 13:10:31 -08:00
dependabot-preview[bot]
2b60c27653 Bump @types/node from 14.11.2 to 14.14.9 (#247)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.11.2 to 14.14.9.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-24 13:10:19 -08:00
dependabot-preview[bot]
2f45bac39a Bump eslint-plugin-import from 2.22.0 to 2.22.1 (#226)
Bumps [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) from 2.22.0 to 2.22.1.
- [Release notes](https://github.com/benmosher/eslint-plugin-import/releases)
- [Changelog](https://github.com/benmosher/eslint-plugin-import/blob/master/CHANGELOG.md)
- [Commits](https://github.com/benmosher/eslint-plugin-import/compare/v2.22.0...v2.22.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-29 13:30:56 -07:00
dependabot-preview[bot]
745afc6fef Bump @types/node from 14.11.1 to 14.11.2 (#227)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.11.1 to 14.11.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-29 13:30:46 -07:00
dependabot-preview[bot]
12a7213ebb Bump eslint-config-prettier from 6.11.0 to 6.12.0 (#228)
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 6.11.0 to 6.12.0.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v6.11.0...v6.12.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-29 13:30:37 -07:00
dependabot-preview[bot]
9a51f76a24 Bump typescript from 3.9.5 to 4.0.3 (#224)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.9.5 to 4.0.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v3.9.5...v4.0.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-18 20:37:37 -07:00
dependabot-preview[bot]
504c968d6d Bump prettier from 2.0.5 to 2.1.2 (#223)
Bumps [prettier](https://github.com/prettier/prettier) from 2.0.5 to 2.1.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.0.5...2.1.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-18 20:37:22 -07:00
dependabot-preview[bot]
044a46b433 Bump codecov from 3.7.1 to 3.7.2 (#222)
Bumps [codecov](https://github.com/codecov/codecov-node) from 3.7.1 to 3.7.2.
- [Release notes](https://github.com/codecov/codecov-node/releases)
- [Changelog](https://github.com/codecov/codecov-node/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-node/compare/v3.7.1...v3.7.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-18 20:37:11 -07:00
dependabot-preview[bot]
0accba9a55 Bump @types/node from 14.0.14 to 14.11.1 (#225)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.0.14 to 14.11.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-18 20:36:54 -07:00
dependabot-preview[bot]
29eeb7ee4e Bump ts-node from 8.10.2 to 9.0.0 (#211)
Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 8.10.2 to 9.0.0.
- [Release notes](https://github.com/TypeStrong/ts-node/releases)
- [Commits](https://github.com/TypeStrong/ts-node/compare/v8.10.2...v9.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-18 17:48:44 -07:00
dependabot-preview[bot]
cf1f15b300 Bump bn.js from 5.1.2 to 5.1.3 (#209)
Bumps [bn.js](https://github.com/indutny/bn.js) from 5.1.2 to 5.1.3.
- [Release notes](https://github.com/indutny/bn.js/releases)
- [Changelog](https://github.com/indutny/bn.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/indutny/bn.js/compare/v5.1.2...v5.1.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-18 17:32:34 -07:00
Elliot Lee
68761d4fbd Release 1.0.2 2020-09-12 23:25:38 -07:00
dependabot-preview[bot]
7f353f6da5 [Security] Bump lodash from 4.17.15 to 4.17.20 (#207)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.20. **This update includes security fixes.**
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.20)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-12 23:18:39 -07:00
Elliot Lee
a735899d56 Add GitHub Actions CI (#221) 2020-09-12 23:17:13 -07:00
dependabot-preview[bot]
0bcc478444 Bump mocha from 8.0.1 to 8.1.3 (#215)
Bumps [mocha](https://github.com/mochajs/mocha) from 8.0.1 to 8.1.3.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v8.0.1...v8.1.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-12 23:01:13 -07:00
dependabot-preview[bot]
cee2dfdcaa Bump @types/mocha from 7.0.2 to 8.0.3 (#212)
Bumps [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) from 7.0.2 to 8.0.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-12 23:01:05 -07:00
dependabot-preview[bot]
2aae25b458 [Security] Bump node-fetch from 2.6.0 to 2.6.1 (#219)
Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1. **This update includes a security fix.**
- [Release notes](https://github.com/bitinn/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/bitinn/node-fetch/compare/v2.6.0...v2.6.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-12 23:00:29 -07:00
dependabot-preview[bot]
5249e5a418 Bump codecov from 3.7.0 to 3.7.1 (#200)
Bumps [codecov](https://github.com/codecov/codecov-node) from 3.7.0 to 3.7.1.
- [Release notes](https://github.com/codecov/codecov-node/releases)
- [Commits](https://github.com/codecov/codecov-node/compare/v3.7.0...v3.7.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-12 22:58:10 -07:00
dependabot[bot]
3f834d5d98 Bump lodash from 4.17.15 to 4.17.19 (#197)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-12 22:57:29 -07:00
dependabot-preview[bot]
4a59644b74 Bump elliptic from 6.5.2 to 6.5.3 (#190)
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.2...v6.5.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-12 22:56:38 -07:00
dependabot-preview[bot]
8cd87dd804 Bump eslint-config-airbnb-base from 14.1.0 to 14.2.0 (#191)
Bumps [eslint-config-airbnb-base](https://github.com/airbnb/javascript) from 14.1.0 to 14.2.0.
- [Release notes](https://github.com/airbnb/javascript/releases)
- [Commits](https://github.com/airbnb/javascript/compare/eslint-config-airbnb-base-v14.1.0...eslint-config-airbnb-base-v14.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-29 15:55:49 -07:00
dependabot-preview[bot]
e6f9e7d51c Bump @types/node from 14.0.13 to 14.0.14 (#192)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.0.13 to 14.0.14.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-29 15:55:38 -07:00
dependabot-preview[bot]
13f249a236 Bump eslint-plugin-import from 2.21.2 to 2.22.0 (#193)
Bumps [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) from 2.21.2 to 2.22.0.
- [Release notes](https://github.com/benmosher/eslint-plugin-import/releases)
- [Changelog](https://github.com/benmosher/eslint-plugin-import/blob/master/CHANGELOG.md)
- [Commits](https://github.com/benmosher/eslint-plugin-import/compare/v2.21.2...v2.22.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-29 15:55:19 -07:00
dependabot-preview[bot]
e7c02d584e Bump eslint-plugin-import from 2.20.2 to 2.21.2 (#189)
Bumps [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) from 2.20.2 to 2.21.2.
- [Release notes](https://github.com/benmosher/eslint-plugin-import/releases)
- [Changelog](https://github.com/benmosher/eslint-plugin-import/blob/master/CHANGELOG.md)
- [Commits](https://github.com/benmosher/eslint-plugin-import/compare/v2.20.2...v2.21.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-27 23:19:13 -07:00
dependabot-preview[bot]
544ec4f80d Bump mocha from 7.1.2 to 8.0.1 (#188)
Bumps [mocha](https://github.com/mochajs/mocha) from 7.1.2 to 8.0.1.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v7.1.2...v8.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-23 11:03:58 -07:00
dependabot-preview[bot]
70a9998e1d Bump eslint-plugin-prettier from 3.1.3 to 3.1.4 (#187)
Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 3.1.3 to 3.1.4.
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v3.1.3...v3.1.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-23 11:03:44 -07:00
dependabot-preview[bot]
c28a3940e5 Bump @types/node from 14.0.1 to 14.0.13 (#186)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.0.1 to 14.0.13.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-23 11:03:35 -07:00
dependabot-preview[bot]
bbaed08e91 Bump typescript from 3.9.2 to 3.9.5 (#185)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.9.2 to 3.9.5.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v3.9.2...v3.9.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-23 11:03:23 -07:00
dependabot-preview[bot]
c8b8e89e20 Bump ts-node from 8.10.1 to 8.10.2 (#181)
Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 8.10.1 to 8.10.2.
- [Release notes](https://github.com/TypeStrong/ts-node/releases)
- [Commits](https://github.com/TypeStrong/ts-node/compare/v8.10.1...v8.10.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-23 11:03:13 -07:00
dependabot-preview[bot]
02c6ae28dc Bump nyc from 15.0.1 to 15.1.0 (#180)
Bumps [nyc](https://github.com/istanbuljs/nyc) from 15.0.1 to 15.1.0.
- [Release notes](https://github.com/istanbuljs/nyc/releases)
- [Changelog](https://github.com/istanbuljs/nyc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/istanbuljs/nyc/compare/v15.0.1...v15.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-23 11:03:03 -07:00
dependabot-preview[bot]
3f703db480 Bump @typescript-eslint/parser from 2.33.0 to 2.34.0 (#179)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.33.0 to 2.34.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.34.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-23 11:02:50 -07:00
dependabot-preview[bot]
e7dc49e222 Bump bn.js from 5.1.1 to 5.1.2 (#177)
Bumps [bn.js](https://github.com/indutny/bn.js) from 5.1.1 to 5.1.2.
- [Release notes](https://github.com/indutny/bn.js/releases)
- [Changelog](https://github.com/indutny/bn.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/indutny/bn.js/compare/v5.1.1...v5.1.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-23 11:02:35 -07:00
dependabot-preview[bot]
9f3a286639 Bump @typescript-eslint/eslint-plugin from 2.33.0 to 2.34.0 (#175)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.33.0 to 2.34.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.34.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-23 11:02:18 -07:00
dependabot-preview[bot]
1063ff024d Bump codecov from 3.6.5 to 3.7.0 (#172)
Bumps [codecov](https://github.com/codecov/codecov-node) from 3.6.5 to 3.7.0.
- [Release notes](https://github.com/codecov/codecov-node/releases)
- [Commits](https://github.com/codecov/codecov-node/compare/v3.6.5...v3.7.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-18 12:04:05 -07:00
dependabot-preview[bot]
5e4a685f2c Bump @types/node from 13.13.5 to 14.0.1 (#173)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.13.5 to 14.0.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-18 12:03:56 -07:00
dependabot-preview[bot]
076d02cceb Bump prettier from 1.19.1 to 2.0.5 (#163)
Bumps [prettier](https://github.com/prettier/prettier) from 1.19.1 to 2.0.5.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/1.19.1...2.0.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-12 23:07:38 -07:00
Elliot Lee
36105d9dc5 Update nyc and yarn.lock dependencies (#170) 2020-05-12 22:58:13 -07:00
Elliot Lee
df4c413d83 Drop support for Node.js version 8 (#171)
Node.js 8 reached End-of-Life on 31st December 2019. If you are still using Node.js 8, we recommend upgrading to version 10 or higher as soon as possible.

https://nodejs.org/en/about/releases/
2020-05-12 22:04:22 -07:00
Elliot Lee
63f4aa2b8d Release 1.0.1 2020-05-12 21:49:08 -07:00
dependabot-preview[bot]
186968b5b5 Bump mocha from 7.1.0 to 7.1.2 (#158)
Bumps [mocha](https://github.com/mochajs/mocha) from 7.1.0 to 7.1.2.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v7.1.0...v7.1.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-12 15:10:08 -07:00
dependabot-preview[bot]
ed3995abf1 Bump ts-node from 8.8.1 to 8.10.1 (#164)
Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 8.8.1 to 8.10.1.
- [Release notes](https://github.com/TypeStrong/ts-node/releases)
- [Commits](https://github.com/TypeStrong/ts-node/compare/v8.8.1...v8.10.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-12 15:09:51 -07:00
dependabot-preview[bot]
26c33d614f Bump nyc from 15.0.0 to 15.0.1 (#148)
Bumps [nyc](https://github.com/istanbuljs/nyc) from 15.0.0 to 15.0.1.
- [Release notes](https://github.com/istanbuljs/nyc/releases)
- [Changelog](https://github.com/istanbuljs/nyc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/istanbuljs/nyc/compare/v15.0.0...v15.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-12 10:24:50 -07:00
dependabot-preview[bot]
8cbb09b5fe Bump eslint-plugin-import from 2.20.1 to 2.20.2 (#144)
Bumps [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) from 2.20.1 to 2.20.2.
- [Release notes](https://github.com/benmosher/eslint-plugin-import/releases)
- [Changelog](https://github.com/benmosher/eslint-plugin-import/blob/master/CHANGELOG.md)
- [Commits](https://github.com/benmosher/eslint-plugin-import/compare/v2.20.1...v2.20.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-12 10:24:40 -07:00
dependabot-preview[bot]
004db42d98 Bump eslint-config-airbnb-base from 14.0.0 to 14.1.0 (#128)
Bumps [eslint-config-airbnb-base](https://github.com/airbnb/javascript) from 14.0.0 to 14.1.0.
- [Release notes](https://github.com/airbnb/javascript/releases)
- [Commits](https://github.com/airbnb/javascript/compare/eslint-config-airbnb-base-v14.0.0...eslint-config-airbnb-base-v14.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-12 10:24:28 -07:00
dependabot-preview[bot]
ccad0c66e5 Bump @typescript-eslint/eslint-plugin from 2.24.0 to 2.31.0 (#166)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.24.0 to 2.31.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.31.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-12 10:24:00 -07:00
dependabot-preview[bot]
6cccbb434e Bump @types/node from 13.13.0 to 13.13.5 (#167)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.13.0 to 13.13.5.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-12 10:23:48 -07:00
dependabot-preview[bot]
a8db527131 Bump @types/node from 13.9.3 to 13.13.0 (#156)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.9.3 to 13.13.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-20 11:45:00 -04:00
dependabot-preview[bot]
070e9afc3d Bump @typescript-eslint/parser from 2.24.0 to 2.28.0 (#155)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.24.0 to 2.28.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.28.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-20 11:22:12 -04:00
dependabot-preview[bot]
f34991c550 Bump @types/node from 13.7.7 to 13.9.3 (#134)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.7.7 to 13.9.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-26 16:05:46 -07:00
dependabot-preview[bot]
336829efe4 Bump ts-node from 8.6.2 to 8.8.1 (#135)
Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 8.6.2 to 8.8.1.
- [Release notes](https://github.com/TypeStrong/ts-node/releases)
- [Commits](https://github.com/TypeStrong/ts-node/compare/v8.6.2...v8.8.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-26 16:05:25 -07:00
dependabot-preview[bot]
3828e22906 Bump eslint-config-prettier from 6.10.0 to 6.10.1 (#136)
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 6.10.0 to 6.10.1.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v6.10.0...v6.10.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-26 16:05:15 -07:00
dependabot-preview[bot]
c0d2a9a9e3 Bump @typescript-eslint/parser from 2.22.0 to 2.24.0 (#137)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.22.0 to 2.24.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.24.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-26 16:05:06 -07:00
dependabot-preview[bot]
030b9213a7 Bump @typescript-eslint/eslint-plugin from 2.22.0 to 2.24.0 (#138)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.22.0 to 2.24.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.24.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-26 16:04:55 -07:00
dependabot-preview[bot]
1aca11d4c1 [Security] Bump acorn from 7.1.0 to 7.1.1 (#127)
Bumps [acorn](https://github.com/acornjs/acorn) from 7.1.0 to 7.1.1. **This update includes a security fix.**
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/7.1.0...7.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-16 09:04:45 -04:00
dependabot-preview[bot]
19f9054590 Bump @types/mocha from 7.0.1 to 7.0.2 (#125)
Bumps [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) from 7.0.1 to 7.0.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-04 11:29:54 -05:00
dependabot-preview[bot]
7f4ababba1 Bump @typescript-eslint/eslint-plugin from 2.21.0 to 2.22.0 (#124)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.21.0 to 2.22.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.22.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-04 10:13:22 -05:00
dependabot-preview[bot]
6d8c2db253 Bump @typescript-eslint/parser from 2.21.0 to 2.22.0 (#123)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.21.0 to 2.22.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.22.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-04 10:13:12 -05:00
dependabot-preview[bot]
bb91364c03 Bump @types/node from 13.7.6 to 13.7.7 (#122)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.7.6 to 13.7.7.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-02 09:13:23 -05:00
dependabot-preview[bot]
b3023292c5 Bump typescript from 3.8.2 to 3.8.3 (#121)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.8.2 to 3.8.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v3.8.2...v3.8.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-02 09:13:16 -05:00
dependabot-preview[bot]
97413d0d1b Bump @types/node from 13.7.4 to 13.7.6 (#119)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.7.4 to 13.7.6.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-26 10:04:57 -05:00
dependabot-preview[bot]
7d2e957bb5 Bump mocha from 7.0.1 to 7.1.0 (#120)
Bumps [mocha](https://github.com/mochajs/mocha) from 7.0.1 to 7.1.0.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v7.0.1...v7.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-26 10:04:49 -05:00
dependabot-preview[bot]
17f88fed3b Bump @typescript-eslint/eslint-plugin from 2.20.0 to 2.21.0 (#117)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.20.0 to 2.21.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.21.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-25 10:21:19 -05:00
dependabot-preview[bot]
af69197e53 Bump @typescript-eslint/parser from 2.20.0 to 2.21.0 (#118)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.20.0 to 2.21.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.21.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-25 10:21:12 -05:00
dependabot-preview[bot]
dd9a8e4b25 Bump @types/node from 13.7.2 to 13.7.4 (#115)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.7.2 to 13.7.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-22 15:43:32 -08:00
dependabot-preview[bot]
f138a07436 Bump typescript from 3.7.5 to 3.8.2 (#116)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.7.5 to 3.8.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-22 15:43:17 -08:00
dependabot-preview[bot]
7a7450d02f Bump @typescript-eslint/parser from 2.19.2 to 2.20.0 (#111)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.19.2 to 2.20.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.20.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-19 08:04:02 -08:00
dependabot-preview[bot]
74e0e9540c Bump @typescript-eslint/eslint-plugin from 2.19.2 to 2.20.0 (#112)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.19.2 to 2.20.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.20.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-19 08:03:51 -08:00
dependabot-preview[bot]
7469836815 Bump eslint-plugin-mocha from 6.2.2 to 6.3.0 (#113)
Bumps [eslint-plugin-mocha](https://github.com/lo1tuma/eslint-plugin-mocha) from 6.2.2 to 6.3.0.
- [Release notes](https://github.com/lo1tuma/eslint-plugin-mocha/releases)
- [Changelog](https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/lo1tuma/eslint-plugin-mocha/compare/6.2.2...6.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-19 08:03:39 -08:00
dependabot-preview[bot]
6a8bf232a1 Bump @types/node from 13.7.0 to 13.7.2 (#114)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.7.0 to 13.7.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-19 08:03:07 -08:00
dependabot-preview[bot]
9f09a4615e Bump @typescript-eslint/parser from 2.19.0 to 2.19.2 (#108)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.19.0 to 2.19.2.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.19.2/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-11 21:52:28 -08:00
Elliot Lee
a2200a1d96 Upgrade @typescript-eslint/eslint-plugin to 2.19.0
per https://github.com/ripple/ripple-keypairs/pull/106
2020-02-10 19:32:15 -08:00
dependabot-preview[bot]
34dab51e2f Bump eslint-config-airbnb-typescript from 6.3.1 to 7.0.0 (#106)
Bumps [eslint-config-airbnb-typescript](https://github.com/iamturns/eslint-config-airbnb-typescript) from 6.3.1 to 7.0.0.
- [Release notes](https://github.com/iamturns/eslint-config-airbnb-typescript/releases)
- [Changelog](https://github.com/iamturns/eslint-config-airbnb-typescript/blob/master/CHANGELOG.md)
- [Commits](https://github.com/iamturns/eslint-config-airbnb-typescript/compare/v6.3.1...v7.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-10 19:30:13 -08:00
dependabot-preview[bot]
d3218906a3 Bump codecov from 3.6.4 to 3.6.5 (#107)
Bumps [codecov](https://github.com/codecov/codecov-node) from 3.6.4 to 3.6.5.
- [Release notes](https://github.com/codecov/codecov-node/releases)
- [Commits](https://github.com/codecov/codecov-node/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-10 19:28:30 -08:00
dependabot-preview[bot]
476401adea Bump codecov from 3.6.2 to 3.6.4 (#105)
Bumps [codecov](https://github.com/codecov/codecov-node) from 3.6.2 to 3.6.4.
- [Release notes](https://github.com/codecov/codecov-node/releases)
- [Commits](https://github.com/codecov/codecov-node/compare/v3.6.2...v3.6.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-08 01:03:32 -08:00
Elliot Lee
01e94ad4d6 Release 1.0.0 (#94)
* Add some types
* Add prepublish script
* Ignore linting certain files
  * In the future we should add types and re-enable linting
* Use export = syntax
* Allow consumers to use `import keypairs from 'ripple-keypairs'`
  * See: https://www.typescriptlang.org/docs/handbook/modules.html#export--and-import--require
2020-02-05 16:34:53 -08:00
Hans Bergren
4d0c280996 Upload coverage reports to Codecov (#92)
* Add coverage badge to README
2020-02-05 18:53:59 -05:00
Hans Bergren
adaa75d180 Update Mocha and NYC test configuration (#102)
- Add TSNode to get proper coverage on TS files
- Tell Mocha to look for tests in subdirectories
- Configure NYC to look for coverage on all src files
- Move `source-map-support` to being a dev dependency
- Ensure NYC keeps us at 100% code coverage
2020-02-05 13:19:47 -05:00
dependabot-preview[bot]
e199878ea4 Bump @typescript-eslint/parser from 2.18.0 to 2.19.0 (#101)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.18.0 to 2.19.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.19.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-04 10:52:48 -05:00
dependabot-preview[bot]
11ff184438 Bump @typescript-eslint/eslint-plugin from 2.18.0 to 2.19.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.18.0 to 2.19.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.19.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-04 13:54:29 +00:00
dependabot-preview[bot]
4d3b5a294c Bump eslint-plugin-import from 2.20.0 to 2.20.1 (#98)
Bumps [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) from 2.20.0 to 2.20.1.
- [Release notes](https://github.com/benmosher/eslint-plugin-import/releases)
- [Changelog](https://github.com/benmosher/eslint-plugin-import/blob/master/CHANGELOG.md)
- [Commits](https://github.com/benmosher/eslint-plugin-import/compare/v2.20.0...v2.20.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-03 09:38:16 -08:00
dependabot-preview[bot]
edd35ea9e2 Bump @types/node from 13.5.3 to 13.7.0 (#99)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.5.3 to 13.7.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-03 09:38:02 -08:00
dependabot-preview[bot]
5ec22b4bc8 Bump @types/node from 13.5.2 to 13.5.3 (#97)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.5.2 to 13.5.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-31 09:33:39 -05:00
dependabot-preview[bot]
9b298e0037 Bump @types/node from 13.5.1 to 13.5.2 (#95)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.5.1 to 13.5.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-30 08:51:44 -05:00
dependabot-preview[bot]
963017ab78 Bump @types/mocha from 5.2.7 to 7.0.1 (#96)
Bumps [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) from 5.2.7 to 7.0.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-30 08:51:37 -05:00
dependabot-preview[bot]
2c9da17fa9 Bump @types/node from 13.5.0 to 13.5.1 (#93)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.5.0 to 13.5.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-29 09:32:25 -05:00
Elliot Lee
550102ac26 v1.0.0-beta.2 2020-01-28 02:11:50 -08:00
Elliot Lee
0382e75f82 Release 1.0.0-beta.1 2020-01-28 02:07:41 -08:00
Elliot Lee
5bca020945 Remove Babel (#33)
Fix #32
2020-01-28 01:31:19 -08:00
dependabot-preview[bot]
3595f92dfc Bump mocha from 7.0.0 to 7.0.1 (#91)
Bumps [mocha](https://github.com/mochajs/mocha) from 7.0.0 to 7.0.1.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v7.0.0...v7.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-27 08:49:12 -05:00
Hans Bergren
d97e15f5c3 Update code comment (#90) 2020-01-24 10:00:03 -05:00
Hans Bergren
41d9b0b660 Update TSConfig to produce type definitions (#79)
* Update TSConfig to produce type definitions

Also, add some stricter type-checking, and remove settings that were set
to the same value as the default for that setting.

I also reorganized the sections into the sections that TypeScript itself
generates when you boot up a `tsconfig.json` using their CLI.

* Downgrade target to ES6 for Node 8 support

* Add engines specification to package.json

Make it clear that we support Node 8 and above.
2020-01-24 09:07:56 -05:00
Hans Bergren
d2859382fe Update elliptic dependency (#88) 2020-01-24 09:07:12 -05:00
Hans Bergren
fb3f42751c Add code comment for impossible error (#86) 2020-01-24 09:06:53 -05:00
dependabot-preview[bot]
45911b7190 Bump @types/node from 13.1.8 to 13.5.0 (#89)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.1.8 to 13.5.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-24 09:06:43 -05:00
dependabot-preview[bot]
2af4340392 Bump ripple-address-codec from 4.0.0 to 4.1.0 (#87)
Bumps [ripple-address-codec](https://github.com/ripple/ripple-address-codec) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/ripple/ripple-address-codec/releases)
- [Changelog](https://github.com/ripple/ripple-address-codec/blob/master/HISTORY.md)
- [Commits](https://github.com/ripple/ripple-address-codec/compare/4.0.0...4.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-23 08:46:08 -05:00
Elliot Lee
a7bfc2f4ae Update README.md 2020-01-22 17:57:21 -08:00
Hans Bergren
f8e80f7132 Skip coverage for untestable code (#83)
This way we can get to 100% code coverage. 100% coverage is great
because it gives a clear indicator when there has been a coverage
regression, and it makes explicit which code you are choosing not to
test (through inline coverage disable comments) rather than implicit
(in lower percentages of coverage in the report).
2020-01-22 17:40:43 -05:00
dependabot-preview[bot]
03b68e8a53 Bump hash.js from 1.1.5 to 1.1.7 (#39)
Bumps [hash.js](https://github.com/indutny/hash.js) from 1.1.5 to 1.1.7.
- [Release notes](https://github.com/indutny/hash.js/releases)
- [Commits](https://github.com/indutny/hash.js/compare/v1.1.5...v1.1.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-22 09:48:43 -08:00
Elliot Lee
65ff85ade1 Add tests for validator keypairs (#82) 2020-01-22 09:42:15 -08:00
Elliot Lee
f1a4af4170 Remove seedFromPhrase (unused) (#81) 2020-01-21 13:47:46 -08:00
Elliot Lee
92d6da321c Update gitignore for nyc and npm (#80) 2020-01-21 12:39:52 -08:00
Hans Bergren
a2280e74e1 Update Mocha & Istanbul (#68)
We were on a really old version of Mocha, and standard practice for JS
code coverage is to use `nyc` now. This switches our code coverage tool
to `nyc`, and gets us on the latest version of Mocha.

Our code coverage did not appear to be working before either,
now it does.

Additionally, Mocha now supports `.mocharc.js` files which let us have
inline comments for configuration. `.mocha.opts` is deprecated, so I
have switched our Mocha configuration to the new format.

If we had configuration that was equal to the default, I have removed it
2020-01-21 15:36:00 -05:00
Nicholas Dudfield
dee3a24739 fix: add type of discriminator (#74) 2020-01-22 00:19:20 +07:00
dependabot-preview[bot]
47b0b1de8d Bump @types/node from 13.1.7 to 13.1.8 (#75)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.1.7 to 13.1.8.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-21 10:42:53 -05:00
dependabot-preview[bot]
5b8109b5f9 Bump @typescript-eslint/parser from 2.16.0 to 2.17.0 (#76)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.16.0 to 2.17.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.17.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-21 10:42:42 -05:00
dependabot-preview[bot]
6a110fe1b8 Bump @typescript-eslint/eslint-plugin from 2.16.0 to 2.17.0 (#77)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.16.0 to 2.17.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.17.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-21 10:42:35 -05:00
Hans Bergren
a6b4308a49 Replace TSLint with ESLint + Prettier (#71)
* Replace TSLint with ESLint + Prettier

TSLint is deprecated, and ESLint is now officially supported by
TypeScript.

Additionally, Prettier is the industry standard for auto-formatting
JS/TS code. That lets code reviews be about content rather than style.

The `.eslintrc.js` file contains comments for the reasoning behind every
configuration, so feel free to take a look at that as well.

* Run src/ through Prettier

* Add Mocha support for ESLint

We do not actually lint Mocha files right now because they aren't in TS,
but moving forward, this will give us better linting rules for our tests
2020-01-17 15:55:05 -05:00
dependabot-preview[bot]
2f17688fa5 Bump typescript from 3.7.4 to 3.7.5 (#73)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.7.4 to 3.7.5.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v3.7.4...v3.7.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-17 10:03:37 -05:00
dependabot-preview[bot]
42fe725da6 Bump typescript from 3.1.3 to 3.7.4 (#46)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.1.3 to 3.7.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-15 10:14:11 -05:00
dependabot-preview[bot]
994fce1c35 Bump @types/node from 13.1.5 to 13.1.7 (#66)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.1.5 to 13.1.7.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-15 09:37:36 -05:00
Hans Bergren
53e332f42e Update bn.js (#63)
- ripple-binary-codec uses v5.1.1, so now we match that
2020-01-15 09:10:57 -05:00
Justin Kook
5229342fc4 Remove src/ripple-address-codec and use npm published (#58)
* Remove src/ripple-address-codec and use npm published
* Remove 4 failing old dist/ripple-address-codec tests
* Update yarn.lock with npm ripple-address-codec package
2020-01-14 15:24:48 -05:00
Hans Bergren
c3dadd0fbb Clean dependencies (#61)
* Remove unused dev dependencies

* Remove codecov.io as dependency and from README

Unused at the moment, and that dependency is not the modern way to use
codecov.io in a JS project.
2020-01-14 13:27:36 -05:00
dependabot-preview[bot]
9dba3a275f Bump eslint from 6.5.1 to 6.8.0 (#57)
Bumps [eslint](https://github.com/eslint/eslint) from 6.5.1 to 6.8.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v6.5.1...v6.8.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-13 14:55:47 -05:00
Elliot Lee
bc4ae8742c Travis: remove node 6 and add 13 (#59) 2020-01-13 10:41:35 -08:00
dependabot-preview[bot]
037d30f3b3 Bump @types/node from 10.12.0 to 13.1.5 (#56)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 10.12.0 to 13.1.5.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-09 17:38:03 -08:00
Elliot Lee
07775656a9 Add larger npm badge 2020-01-09 00:19:51 -08:00
Elliot Lee
968caa1f1f Update istanbul 2019-10-17 17:07:10 -07:00
Elliot Lee
b9fd996547 Update babel 2019-10-17 17:06:23 -07:00
Elliot Lee
e5fad4a521 Update HISTORY.md 2019-10-17 17:03:01 -07:00
Elliot Lee
2fe8162c26 Update yarn.lock and .travis.yml 2019-10-17 17:00:12 -07:00
Elliot Lee
7cfce53423 Do not publish test files to npm 2019-10-17 16:46:17 -07:00
dependabot[bot]
c3d5d95488 Bump eslint from 2.7.0 to 6.5.1 (#31)
Bumps [eslint](https://github.com/eslint/eslint) from 2.7.0 to 6.5.1.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v2.7.0...v6.5.1)

Signed-off-by: dependabot[bot] <support@github.com>
2019-10-17 16:43:31 -07:00
Elliot Lee
e9a3e1ab35 Refactor and use TypeScript:
- Migrate to TypeScript and TSLint
- Vendor ripple-address-codec (move dependency into this project)
- Add support for Travis CI (.travis.yml)
- Use "dist/*" for distribution files
- Bump version to 1.0.0-beta.0
- Add yarn.lock
2019-01-22 23:23:13 -08:00
Elliot Lee
765bee5f81 Update package.json
... node_modules/codecov.io/lib/getConfiguration.js:27
      throw new Error("unknown service. could not get configuration");
      ^

Error: unknown service. could not get configuration
    at module.exports ...
2018-10-23 23:26:05 -07:00
Elliot Lee
bb9870271d Update package.json 2018-10-23 23:19:55 -07:00
Paul V Puey
6bbf610b91 Upgrade elliptic
Fixes usage within a React Native environment.
2018-09-24 22:40:05 -07:00
Elliot Lee
e18c33d532 Add LICENSE
Close #23
2017-12-03 14:05:33 -08:00
Elliot Lee
d22ca7f263 Remove extra semicolon 2017-11-10 15:06:15 -08:00
Elliot Lee
7304ee46d6 Bump version to 0.10.1 and add HISTORY.md 2017-11-10 15:05:04 -08:00
Elliot Lee
119dfa8d9f Verify that generated keypair correctly signs message 2017-09-20 10:15:09 -07:00
Elliot Lee
30400e6e92 Fix eslint errors
This was done by:
- updating some devDependencies
- running:
    node_modules/.bin/eslint -c ./eslintrc --fix src/ test/
- adding where necessary:
    // eslint-disable-line strict
2017-09-08 11:38:44 -07:00
Chris Clark
98c42c200b Specify messages as hex and fix bug in ed25519 signing 2015-10-14 12:17:55 -07:00
Chris Clark
1b44bb068b Improve explanation of key format in README 2015-10-06 16:35:05 -07:00
Nicholas Dudfield
bdb749d198 Add codecov 2015-10-02 16:06:03 +07:00
Chris Clark
bcfea3c920 Fix error in README 2015-09-23 14:40:56 -07:00
Chris Clark
de8ea104d9 Switch to new API 2015-09-21 15:09:54 -07:00
Nicholas Dudfield
5198a98736 s/sublimator/ripple/ 2015-09-17 10:06:11 +07:00
Chris Clark
7308a84c52 Add simplified API 2015-08-24 13:34:42 -07:00
Nicholas Dudfield
aca6cb96b7 Update to eslint 1.2.1 2015-08-24 13:40:01 +07:00
Nicholas Dudfield
b79bb53b10 Disable coveralls as need a new repo token 2015-08-20 18:48:20 +07:00
Nicholas Dudfield
3080eef253 Update eslint to 1.2.0 2015-08-20 16:01:25 +07:00
Nicholas Dudfield
921e4c1d81 Bump version: 0.8.0 2015-08-14 08:49:07 +07:00
Nicholas Dudfield
6499489bdc Rename dist folder distrib 2015-08-14 08:48:15 +07:00
Nicholas Dudfield
84bca71328 Rename randGen param to random 2015-08-14 08:47:59 +07:00
Nicholas Dudfield
f38011340a Allow KeyPair.fromSeed/walletFromSeed to accept arrays for seed 2015-08-11 16:32:34 +07:00
Nicholas Dudfield
05240e143b Add (wallet|validatorKeys)FromPhrase functions 2015-08-11 15:54:49 +07:00
Nicholas Dudfield
abe8d54401 Bump version: 0.7.3 2015-08-08 12:03:34 +07:00
Nicholas Dudfield
443d8a3b18 Update eslint to version 1.1 2015-08-08 09:07:25 +07:00
Nicholas Dudfield
8d8ec0010f Include --optional runtime when babel compiles 2015-08-08 08:57:42 +07:00
Nicholas Dudfield
fc12114830 Remove stale comment 2015-08-07 08:36:40 +07:00
Nicholas Dudfield
d26bca3208 Use es7 decorator syntax for cached methods 2015-08-05 19:07:18 +07:00
Nicholas Dudfield
bcde54d258 Put badges on header line 2015-08-04 14:48:20 +07:00
Nicholas Dudfield
828737f3bc Extract Sha512 to own file 2015-08-04 13:54:26 +07:00
Nicholas Dudfield
71d62fd58c Tweak method definition order 2015-08-04 13:49:31 +07:00
Nicholas Dudfield
6bacd66d1a Bump version: 0.7.2 2015-08-04 09:20:46 +07:00
Nicholas Dudfield
1cad004359 Use cleaner syntax for cachedProperty 2015-08-04 09:04:46 +07:00
Nicholas Dudfield
5daeecfb0e Bump version: 0.7.1 2015-07-31 18:00:05 +07:00
Nicholas Dudfield
bf64b6fbe0 Tweak README and accountPublicFromPublicGenerator 2015-07-31 17:49:21 +07:00
Nicholas Dudfield
a927f7d38b Try and keep coveralls happy 2015-07-31 17:46:13 +07:00
Nicholas Dudfield
4d1917ebd5 Bump version: 0.7.0 2015-07-31 17:40:12 +07:00
Nicholas Dudfield
09be6e372e Add nodePublicAccountID 2015-07-31 17:39:50 +07:00
Nicholas Dudfield
a68a2e50e6 Move assert to correct place 2015-07-31 17:18:21 +07:00
Nicholas Dudfield
3028379538 Bump version: 0.6.0 2015-07-31 16:48:59 +07:00
Nicholas Dudfield
4b36832b5a Update ripple-address-codec dependency 2015-07-31 16:46:55 +07:00
Nicholas Dudfield
4ff18d28d8 Misc cleanups 2015-07-31 11:36:33 +07:00
Nicholas Dudfield
c6c92b18cc Break up index.js into logical files 2015-07-31 11:23:34 +07:00
Nicholas Dudfield
00191fc5b3 Bump version: 0.5.1 2015-07-30 20:24:02 +07:00
Nicholas Dudfield
be865a09a7 Add coveralls to travis 2015-07-30 19:12:45 +07:00
Nicholas Dudfield
a1c6f91cf2 Add travis badge 2015-07-30 18:13:55 +07:00
Nicholas Dudfield
9e42c6bdf1 Bump version: 0.5.0 2015-07-30 17:12:21 +07:00
Nicholas Dudfield
831a792ac6 Bump version: 0.4.0 2015-07-28 13:22:12 +07:00
Nicholas Dudfield
72b1ad6670 Update README 2015-07-22 14:38:03 +07:00
Nicholas Dudfield
848c65e43a Updates: * Add Pair#fromPublic(canonicalPubBytes) enabling verification only * Add generateValidatorKeys, validatorKeysFromSeed * Add seedBytes member to Pair 2015-07-22 14:20:00 +07:00
Nicholas Dudfield
f43a2e1201 Update README with transaction signing example 2015-07-20 12:14:22 +07:00
Nicholas Dudfield
7623f3d926 Add README 2015-07-20 11:39:10 +07:00
Nicholas Dudfield
205682235a Add generateWallet, walletFromSeed 2015-07-20 11:17:48 +07:00
Nicholas Dudfield
7fbd83ceaa Update ripple-address-codec dependency 2015-07-20 10:57:41 +07:00
Nicholas Dudfield
e6a278f0f6 Use elliptic Point#encodeCompressed api 2015-07-20 10:50:17 +07:00
Nicholas Dudfield
cd14b16997 Bump version: 0.3.0 2015-07-20 10:38:27 +07:00
Nicholas Dudfield
c4701b8ae6 Update dependencies 2015-07-20 10:36:32 +07:00
Nicholas Dudfield
fd6df49f55 Updates: * Expose abstract KeyPair * Update ripple-address-codec dependency * Add keyPairFromSeed method, which can handle ed25519 seeds 2015-07-16 20:23:19 +08:00
Nicholas Dudfield
5c8be46b64 Update dependencies/version 2015-07-11 16:47:49 +08:00
Nicholas Dudfield
a898b501b5 Update version 2015-07-03 17:30:29 +07:00
Nicholas Dudfield
916bf029e4 Update dependency 2015-07-03 17:29:53 +07:00
Nicholas Dudfield
770d292543 User better name 2015-06-29 18:06:41 +07:00
Nicholas Dudfield
e2e0be689e Update dependencies/tests 2015-06-25 15:33:14 +07:00
Nicholas Dudfield
b9c8fefc87 Fix signature tests 2015-06-19 17:04:32 +08:00
Nicholas Dudfield
295f99ba75 Add missing elliptic to package.json 2015-06-17 20:17:11 +07:00
Nicholas Dudfield
0198b2603f Initial import 2015-06-17 19:57:21 +07:00
ledhed2222
869e6e2553 migrate from yarn to npm (#148)
* migrate from yarn to npm

* fix unrelated prettier error
2021-10-13 16:11:55 -04:00
dependabot[bot]
ba7594c51f Bump tmpl from 1.0.4 to 1.0.5 (#144)
Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/daaku/nodejs-tmpl/releases)
- [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5)
2021-09-21 21:13:27 -04:00
dependabot[bot]
bdbbb3e846 Bump path-parse from 1.0.6 to 1.0.7 (#138)
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)
2021-08-31 15:56:40 -07:00
Mayukha Vadari
332102a523 use null instead of undefined 2021-06-30 14:43:13 -04:00
Mayukha Vadari
7448142ee4 only first byte is 0 2021-06-30 14:41:48 -04:00
Mayukha Vadari
a23ba65322 fix code to pass tests 2021-06-25 11:22:26 -04:00
Mayukha Vadari
5520b81038 attempted test fix 2021-06-25 10:59:47 -04:00
Mayukha Vadari
51bd22e34a add test 2021-06-25 10:51:59 -04:00
Mayukha Vadari
8cc6f40c6f fix typo 2021-06-25 10:27:13 -04:00
Mayukha Vadari
32dcd3070a clean up code 2021-06-24 17:36:19 -04:00
Mayukha Vadari
f25aecd853 fix encoding problems 2021-06-24 17:35:49 -04: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
dependabot[bot]
93c1ade74e Bump glob-parent from 5.1.1 to 5.1.2 (#134)
Bumps [glob-parent](https://github.com/gulpjs/glob-parent) from 5.1.1 to 5.1.2.
- [Release notes](https://github.com/gulpjs/glob-parent/releases)
- [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gulpjs/glob-parent/compare/v5.1.1...v5.1.2)
2021-06-11 11:12:29 -07:00
dependabot[bot]
9d7e7a94f5 Bump ws from 7.3.1 to 7.4.6 (#131)
Bumps [ws](https://github.com/websockets/ws) from 7.3.1 to 7.4.6.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/7.3.1...7.4.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-11 11:12:13 -07:00
dependabot-preview[bot]
f81fe0a106 [Security] Bump hosted-git-info from 2.8.8 to 2.8.9 (#129)
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9. **This update includes a security fix.**
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-06-11 11:12:01 -07:00
dependabot-preview[bot]
2dbbf2c74b [Security] Bump lodash from 4.17.20 to 4.17.21 (#128)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21. **This update includes a security fix.**
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.20...4.17.21)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-06-11 11:11:47 -07:00
Nathan Nichols
c149ec87ea fix: allow lowercase hex in Uint64 (#135) 2021-06-11 10:58:15 -07:00
Nathan Nichols
7e7f47cc20 fix: change sfValidatorToReEnable to field code 21 (#130) 2021-06-08 16:41:01 -07:00
Nathan Nichols
c63c235a05 fix: Encode hex strings length <16 to match rippled (#133) 2021-06-08 16:40:48 -07:00
dependabot-preview[bot]
1daf1be49b [Security] Bump y18n from 4.0.0 to 4.0.1 (#124)
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1. **This update includes a security fix.**
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-03-30 10:40:00 -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
761121eba2 fix: Order HopObject (#122)
* fix: orders HopObject fields correctly
2021-03-10 16:53:27 -06:00
Nathan Nichols
53c72b7045 fix: edge case constructing from string '0' (#121)
* fix: edge case constructing from string '0'
2021-03-10 11:36:01 -06:00
Nathan Nichols
9bd9ebfc09 chore: update HISTORY.md and version (#119) 2021-02-12 16:03:41 -06:00
Nathan Nichols
6c537c0dc3 X-Address Encoding in Issued Currencies (#113)
* feat(account): allow issued currency to use x-address
2021-02-04 14:24:34 -06:00
dependabot-preview[bot]
fb52bbb3ed [Security] Bump node-notifier from 8.0.0 to 8.0.1 (#115)
Bumps [node-notifier](https://github.com/mikaelbr/node-notifier) from 8.0.0 to 8.0.1. **This update includes a security fix.**
- [Release notes](https://github.com/mikaelbr/node-notifier/releases)
- [Changelog](https://github.com/mikaelbr/node-notifier/blob/v8.0.1/CHANGELOG.md)
- [Commits](https://github.com/mikaelbr/node-notifier/compare/v8.0.0...v8.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-02-04 14:24:08 -06:00
golobitch
b1f78b7bea fix(path-set): do not return undefined values in toJSON function (#118) 2021-01-28 18:41:23 +01:00
Andrey Rezvov
b59c5002ed fix typo in the text of exception (#114) 2020-12-10 20:21:28 +03:00
Elliot Lee
c29de82e86 Release 1.1.0 2020-12-03 20:40:39 -08:00
Nathan Nichols
5a711afb7e fix: polyfill Buffer for browser compatibility (#112)
* Polyfill with "buffer" and "assert" for browser environments
* Instead of relying on webpack to make this library browser compatible, we now use a buffer library that provides a polyfill when used in the browser
2020-12-03 21:38:57 -06:00
elmurci
b023e9b35b fix(tickets): Field codes for TicketCount and TicketSequence (#111)
* fix(tickets): Field codes for TicketCount and TicketSequence
BeginLedgerSeq was taking the place of TicketCount (40) in definitions.
From a8d481c2a5/src/ripple/protocol/impl/SField.cpp
TicketCount should be 40 and TicketSequence 41.
BeginLedgerSeq doesn't seem to be used, so removing it

* fix(ci): fix tests ci
2020-11-23 21:51:03 +01:00
elmurci
479ade8a76 Tickets support (#110)
* feat(tickets): add TicketCount definition

* feat(tickets): add TicketSequence definition

* fix(tests): unit tests
2020-11-17 17:33:20 +01:00
Nathan Nichols
b43e79a9af Browser Compatibility Updates (#107)
* BigInt -> big-integer to support older browsers
* Buffer read/write BigUInt64 removed for browser compatibility.
2020-10-22 15:36:45 -05: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
b14f055c6c Linter config lints test directory (#99)
Modify eslint config to lint ./test/
2020-08-21 17:04:14 -05:00
Elliot Lee
7438640753 CI: Build and test using .nvmrc node version (#101)
Use the node version specified in .nvmrc

We specify node version 10.22.0 so that CI will let us know if we break our minimum node version with any later changes, even if there are future updates to the 10.x release line.

In other words, this ensures that the minimum version in package.json is always tested by CI, as well as the latest 10.x version.

For example, if a new feature is added in 10.23 and we use it, we want CI to fail so that we know to update the minimum in
package.json.

Co-authored-by: Nathan Nichols <natenichols@cox.net>
2020-08-21 14:52:12 -07:00
Elliot Lee
e2cc829313 Set minimum node version to 10.22; specify v12 for nvm (#100)
- Using older versions of node can result in this error:

    TypeError: buf.writeBigUInt64BE is not a function

- nvm can automatically use the version specified in .nvmrc. Use node
  version 12 because it is currently recommended for most users
2020-08-21 13:21:33 -07:00
Nathan Nichols
440e9922d7 X-address compatibility (#90)
ripple-binary-codec can encode transactions with X-Addresses
2020-08-21 14:06:09 -05:00
Nathan Nichols
d1b23a8b2d Add tests for parsing lower-case hex-strings (#97)
Add one test suite to verify that ripple-binary-codec could handle lower-case hex-strings.
2020-08-20 17:30:50 -05:00
Nathan Nichols
34d2d2c9ed Update default export (#98)
Updated default exports to by changing `export` to `export =`
2020-08-20 12:37:12 -05:00
Nathan Nichols
e9d5ae0d35 Order objects consistent with 0.2.6 (#96)
Changed object order so 1.0.0 is consistent with 0.2.6.
2020-08-19 13:44:53 -05:00
Elliot Lee
0be93e7533 Configure Prettier with semi: true (#95) 2020-08-18 11:56:22 -07:00
Nathan Nichols
e55cdb2c73 version to 1.0.0-rc2 2020-08-18 13:40:54 -05:00
Nathan Nichols
d3064920f1 API typed as object (#94)
encode, encode for signing, and decode ledger are all typed as `object`. linter error disabled.
2020-08-18 13:33:23 -05:00
Nathan Nichols
d136a4e4a8 version to 1.0.0-rc1 2020-08-18 13:05:41 -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
Nathan Nichols
de277dcf73 Add API and Test section to README.md (#91)
Update README.md to describe ripple-binary-codec API
2020-08-17 09:45:27 -05:00
Nathan Nichols
30ff63e653 Support encoding and decoding of NegativeUNL pseudo-transactions (#89)
* Support encoding and decoding of NegativeUNL pseudo-transactions
2020-08-13 12:20:12 -05:00
Nathan Nichols
2e6c68ba73 ripple-binary-codec refactor (#88)
Refactored all components in ripple-binary-codec /src
2020-07-31 09:14:11 -05:00
Nathan Nichols
383ab88d62 refactored src/types (#86)
Final refactor of the src/types directory. Refactored Amount and STObject classes, and finalized SerializedType and Comparable classes.
2020-07-20 11:02:59 -05:00
Nathan Nichols
2bfb8fc191 Refactored STArray Class (#85)
Refactored STArray and pushed end-byte computations into the STArray and STObject classes.
2020-07-16 12:15:00 -05:00
Nathan Nichols
51ad4e36fc refactored ./src/types/path-set (#84)
Refactored PathSet, Path, and Hop types. Constructing these types with Buffers, and using class instead of makeClass.
2020-07-13 16:35:08 -05:00
Nathan Nichols
ba04ea5f1f Refactored UInt and Derived Classes (#83)
Refactored UInt and Derived classes to be constructed from Buffers, and swapped out BN.js in favor of BigInt to reduce dependencies.
2020-07-10 15:24:49 -05:00
Nathan Nichols
2b8fba0c8a Refactor ./src/types Hash and derived types (#82)
Refactored Hash and derived types.
2020-07-09 16:04:29 -05:00
Nathan Nichols
8ac03699aa Check field_code and type_code when readFieldOrdinal() is called (#81)
Added verification that nth and type are valid when read from BinaryParser
2020-07-07 13:58:24 -05:00
Nathan Nichols
485ec4e924 Refactored ./src/serdes (#79)
Refactored `serdes` to use TypeScript Classes and documented functionality.
2020-07-06 16:16:32 -05:00
Elliot Lee
7da60d30b5 Improve documentation of definitions.json (#80)
* Add documentation about type_code

* Clarify "nth"

Co-authored-by: Nathan Nichols <natenichols@cox.net>
2020-07-04 12:58:17 -07:00
Nathan Nichols
cd0eb2b623 Refactor ./src/enums (#73)
* rewrote enums in TS
* changed folder name to src/definitions
2020-06-30 14:29:29 -07:00
Nathan Nichols
ede5b254e3 Added Linting with ESLint (#72)
* added linting, but currently the linting will fail on all files that have not been refactored.
2020-06-26 07:14:31 -07:00
Nathan Nichols
a930b9413c Initial change from Babel/JS to TypeScript (#70)
* will compile as typescript

* migrated test suite to use JestJS

* Migrated to Jest testing framework and typescript source files

* updated deps

* updated prepublish

* resolved 1 failing test

* changed decimal .0 on four tests, it appears that these were the only four tests expecting integer values to have '.0'

* added linter

* added package-lock

* removed tslint in favor of eslint

* changed yarn to npm

* updated version 2.6->3.0

* removing package lock

* updated node version in nvmrc and jest version in package

* removed nvmrc

* removed some unused functions

* replaced data driven with file from master

* commitint yarn.lock

* removing babel as a dependency in favor of typescript compiling to es5

* removing babel deps

* resolved testing issues by migrating helper function

* added partial linting functionality for test suite

* updated imports for decodeLedgerData

* updated test

* updated yarn.lock

* removed a console.log

* added eslint-jest-plugin to package

* reverting to old linting, will add linting in next PR

* removed comments in shamap

* re-adding .nvmrc

* npm -> yarn

* added . to .eslintrc

* added .eslintrc

* removing linting for this PR

* Changed linting to print a message so that linting doesnt fail in CI

* changing back

* added newline so diff wont show

* removed eslint deps, since linting will be dealt with in a later PR

* changed function calls to describe(...)
2020-06-24 09:00:28 -07:00
dependabot-preview[bot]
16b1b91a76 Bump eslint from 4.18.2 to 7.0.0 (#60)
* Bump eslint from 4.18.2 to 7.0.0

Bumps [eslint](https://github.com/eslint/eslint) from 4.18.2 to 7.0.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v4.18.2...v7.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Fix linting

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Elliot Lee <github.public@intelliot.com>
2020-05-19 11:49:10 -07:00
dependabot-preview[bot]
e9b86ed23a [Security] Bump handlebars from 4.5.3 to 4.7.6 (#62)
Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.5.3 to 4.7.6. **This update includes a security fix.**
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/handlebars-lang/handlebars.js/blob/master/release-notes.md)
- [Commits](https://github.com/wycats/handlebars.js/compare/v4.5.3...v4.7.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-14 14:30:18 -07:00
dependabot-preview[bot]
1c266c658e Bump mocha from 6.2.2 to 7.1.2 (#58)
Bumps [mocha](https://github.com/mochajs/mocha) from 6.2.2 to 7.1.2.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v6.2.2...v7.1.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-14 10:53:37 -07:00
dependabot-preview[bot]
55f36cf466 Bump fs-extra from 8.1.0 to 9.0.0 (#55)
Bumps [fs-extra](https://github.com/jprichardson/node-fs-extra) from 8.1.0 to 9.0.0.
- [Release notes](https://github.com/jprichardson/node-fs-extra/releases)
- [Changelog](https://github.com/jprichardson/node-fs-extra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jprichardson/node-fs-extra/compare/8.1.0...9.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-14 10:53:19 -07:00
Elliot Lee
9479e692f6 Delete circle.yml 2020-05-13 17:36:25 -07:00
dependabot-preview[bot]
549a0f6829 Bump babel-eslint from 10.0.3 to 10.1.0 (#52)
Bumps [babel-eslint](https://github.com/babel/babel-eslint) from 10.0.3 to 10.1.0.
- [Release notes](https://github.com/babel/babel-eslint/releases)
- [Commits](https://github.com/babel/babel-eslint/compare/v10.0.3...v10.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-13 17:10:43 -07:00
knoxcard2
98c1cddc91 Bump dependencies including babel-runtime (#50) 2020-05-13 17:10:30 -07:00
Elliot Lee
3e574909ca Add GitHub CI (#61) 2020-05-13 17:04:35 -07:00
dependabot-preview[bot]
75e498c151 Bump ripple-address-codec from 4.0.0 to 4.1.0 (#48)
Bumps [ripple-address-codec](https://github.com/ripple/ripple-address-codec) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/ripple/ripple-address-codec/releases)
- [Changelog](https://github.com/ripple/ripple-address-codec/blob/master/HISTORY.md)
- [Commits](https://github.com/ripple/ripple-address-codec/compare/4.0.0...4.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-23 08:41:15 -05:00
Elliot Lee
0d8b202a74 Release 0.2.6 2019-12-31 13:17:52 -08:00
dependabot-preview[bot]
fbf880b1c4 Bump ripple-address-codec from 3.0.4 to 4.0.0 (#42)
Bumps [ripple-address-codec](https://github.com/ripple/ripple-address-codec) from 3.0.4 to 4.0.0.
- [Release notes](https://github.com/ripple/ripple-address-codec/releases)
- [Changelog](https://github.com/ripple/ripple-address-codec/blob/master/HISTORY.md)
- [Commits](https://github.com/ripple/ripple-address-codec/compare/3.0.4...4.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-31 13:15:22 -08:00
dependabot-preview[bot]
142bc0c3b7 Bump babel-eslint from 10.0.2 to 10.0.3 (#44)
Bumps [babel-eslint](https://github.com/babel/babel-eslint) from 10.0.2 to 10.0.3.
- [Release notes](https://github.com/babel/babel-eslint/releases)
- [Commits](https://github.com/babel/babel-eslint/compare/v10.0.2...v10.0.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-31 13:14:00 -08:00
dependabot-preview[bot]
3eae92175a Bump bn.js from 4.11.8 to 5.1.1 (#45)
Bumps [bn.js](https://github.com/indutny/bn.js) from 4.11.8 to 5.1.1.
- [Release notes](https://github.com/indutny/bn.js/releases)
- [Changelog](https://github.com/indutny/bn.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/indutny/bn.js/compare/v4.11.8...v5.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-31 10:28:13 -08:00
dependabot-preview[bot]
91e5e67a70 [Security] Bump handlebars from 4.1.2 to 4.5.3 (#46)
Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.1.2 to 4.5.3. **This update includes a security fix.**
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/wycats/handlebars.js/blob/master/release-notes.md)
- [Commits](https://github.com/wycats/handlebars.js/compare/v4.1.2...v4.5.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-31 10:21:25 -08:00
dependabot-preview[bot]
4b976bebba Bump mocha from 6.2.0 to 6.2.2 (#40)
Bumps [mocha](https://github.com/mochajs/mocha) from 6.2.0 to 6.2.2.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v6.2.0...v6.2.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-31 10:18:12 -08:00
dependabot-preview[bot]
6ddf2a7bc0 Bump fs-extra from 0.30.0 to 8.1.0 (#39)
Bumps [fs-extra](https://github.com/jprichardson/node-fs-extra) from 0.30.0 to 8.1.0.
- [Release notes](https://github.com/jprichardson/node-fs-extra/releases)
- [Changelog](https://github.com/jprichardson/node-fs-extra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jprichardson/node-fs-extra/compare/0.30.0...8.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-31 10:16:14 -08:00
dependabot-preview[bot]
53fee90554 Bump decimal.js from 5.0.8 to 10.2.0 (#38)
Bumps [decimal.js](https://github.com/MikeMcl/decimal.js) from 5.0.8 to 10.2.0.
- [Release notes](https://github.com/MikeMcl/decimal.js/releases)
- [Changelog](https://github.com/MikeMcl/decimal.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/MikeMcl/decimal.js/compare/v5.0.8...v10.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-23 00:34:18 -08:00
Elliot Lee
eb06de5344 v0.2.5 2019-12-14 22:37:12 -08:00
Elliot Lee
e1ec2f79e5 Support AccountDelete (#37)
- Fix https://github.com/ripple/ripple-binary-codec/issues/36
- Re-number transaction result codes
- Link reference for transaction types
2019-12-14 22:34:14 -08:00
Elliot Lee
c6d01e4ce0 Remove unused 'signing' code (#34)
Use ripple-keypairs library for signing
2019-10-15 09:15:25 -07:00
Elliot Lee
eec36765f2 v0.2.4 2019-09-04 00:06:20 -07:00
Elliot Lee
55aef2e74e Upgrade ripple-address-codec to 3.0.4 2019-09-04 00:05:37 -07:00
Elliot Lee
edc95f78f1 v0.2.3 2019-08-29 18:00:24 -07:00
Elliot Lee
63149f4b5d Remove ecmaFeatures from eslintrc
(node:6931) DeprecationWarning: [eslint] The 'ecmaFeatures' config file
property is deprecated, and has no effect. (found in ./eslintrc)
2019-08-29 17:57:18 -07:00
William Swanson
0a55ba64fa Fix node 12 compatibility (#33)
The unit tests were comparing things of different types, which failed under the stricter checks.
2019-08-29 17:54:42 -07:00
Elliot Lee
67d00491eb Release 0.2.2 2019-07-26 17:24:44 -07:00
Elliot Lee
bf90bbe595 Increase minimum lodash version 2019-07-26 17:18:59 -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
Elliot Lee
b53f336a2a Update mocha
- Update mocha.opts to use --require

When updating to Babel v7, this may need to be changed. For details,
see: https://github.com/mochajs/mocha/wiki/compilers-deprecation
2019-07-26 17:08:29 -07:00
Elliot Lee
da5edb0b3b Throw an error when Amount or Fee contains a decimal (Fix #31)
Thanks to @jwbusch for review
2019-07-26 16:53:25 -07:00
Elliot Lee
b775a6f3c8 Disable lint rule on 2 lines in test file 2019-07-17 00:40:06 -07:00
Elliot Lee
dc4de56a00 Shorten unit test names 2019-07-16 18:00:00 -07:00
dependabot[bot]
db91892086 Bump eslint from 2.13.1 to 4.18.2
Bumps [eslint](https://github.com/eslint/eslint) from 2.13.1 to 4.18.2.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v2.13.1...v4.18.2)

Signed-off-by: dependabot[bot] <support@github.com>
2019-07-17 07:36:53 +00:00
Elliot Lee
d3b29945ea Restrict to node version 10
Many unit tests fail under node 12. It is possible that some of these
are caused by issues in node that will be fixed in the future.

This also removes the dependency on 'assert-diff' since it is not
necessary. It can easily be re-added in the future, if needed.
2019-07-16 21:55:42 -07:00
John Freeman
a49b31aab9 v0.2.1 2019-03-23 11:18:29 -05:00
John Freeman
b580450c20 Add tecKILLED from amendment fix1578 2019-03-23 11:04:44 -05:00
Elliot Lee
9645855105 README: Add npm badge 2018-10-17 16:28:14 -07:00
Elliot Lee
16705c6bb0 v0.2.0 2018-10-17 16:25:55 -07:00
Matthew Fettig
e99031d6af add DepositPreauth fields 2018-09-28 14:45:22 -05:00
Matthew Fettig
e0a6473814 fix style and bump version 2018-09-05 09:01:16 -05:00
Matthew Fettig
b1eecd7e93 dont validate amounts coming from binary parser 2018-06-06 16:44:20 -05:00
Matthew Fettig
cda8197ee6 bump version 2018-02-21 12:59:18 -08:00
Elliot Lee
cce552c711 Update README.md 2018-02-21 12:25:07 -08:00
Elliot Lee
b1e900f1ae Add some basic info about the serialization fields 2018-02-16 18:32:29 -08:00
Elliot Lee
75a117701c Add ConsensusHash and CheckID 2018-02-16 17:34:33 -08:00
Elliot Lee
5672594ab5 Add tecINVARIANT_FAILED and tecEXPIRED
Changed ordering of tec* results to match rippled's TER.h:
eaff9a0e6a/src/ripple/protocol/TER.h (L185-L218)
2018-02-16 16:16:46 -08:00
Elliot Lee
a963d862e9 Add Check, CheckCreate, CheckCash, CheckCancel
LEDGER_ENTRY_TYPES from:
eaff9a0e6a/src/ripple/protocol/LedgerFormats.h (L36)

TRANSACTION_TYPES from:
eaff9a0e6a/src/ripple/protocol/TxFormats.h (L33)
2018-02-15 10:54:59 -08:00
Matthew Fettig
63a2e9ab67 0.1.12 2017-11-16 22:10:50 -08:00
Matthew Fettig
eb7301b4f6 add DestinationNode definition 2017-11-16 22:10:25 -08:00
Matthew Fettig
91722b18ee 0.1.11 2017-08-23 12:34:22 -07:00
wilsonianb
d528331a37 Decode binary ledger header data 2017-08-16 15:29:23 -05:00
Matthew Fettig
de6e86a3ea 0.1.10 2017-04-13 16:32:19 -07:00
Ben Sharafian
8d0d772835 Add claim encoding for payment channels 2017-03-30 19:18:09 +02:00
Matthew Fettig
e0aa8b6db3 0.1.9 2017-03-30 14:39:54 -07:00
wilsonianb
fd4e2f69e3 Add tecCRYPTOCONDITION_ERROR and MasterSignature
Fixes #17
2017-03-28 13:53:55 -07:00
Matthew Fettig
d14b8100ac 0.1.8 2017-03-23 11:56:42 -07:00
Matthew Fettig
4359446101 add TickSize support 2017-03-22 12:15:19 -07:00
wilsonianb
9ddb6498b0 Add escrow support 2017-03-20 15:30:48 -07:00
Ben Sharafian
e897daf443 0.1.7 2017-03-03 17:42:15 +01:00
Ben Sharafian
6604c717b7 fix: Signature is a non-signing field 2017-02-28 18:29:13 +01:00
Ben Sharafian
90189a0596 0.1.6 2017-02-24 11:08:08 +01:00
Ben Sharafian
5cf4301fd0 Add support for PaymentChannel transactions 2017-02-17 16:29:17 +01:00
Chris Clark
c516ed4972 0.1.5 2016-11-30 14:20:44 -08:00
Nicholas Dudfield
27e44658c4 [FOLD] Add own eslintrc 2016-11-26 15:14:42 +07:00
Nicholas Dudfield
a1a938e895 Enforce proper bounds of Amounts 2016-11-15 18:23:47 +10:00
Matthew Fettig
f9ee5aa029 add support for SignerListID and bump version to 0.1.4 2016-09-22 12:35:40 -07:00
Chris Clark
3080121b59 0.1.3 2016-05-11 13:27:02 -07:00
Nicholas Dudfield
bfd022786c Update enum definitions and dependencies * Remove redundant bytes from field definitions * Remove "date-generated" given hand editing * Remove ripple-lib test dependency * Fix linting errors introduced by updated eslint/eslintrc * Ensure STObject.toJSON returns a plain object 2016-05-09 18:46:51 +07:00
Chris Clark
3680303256 Update eslint dependency 2016-02-04 17:09:55 -08:00
Ivan Tivonenko
51e031323b Bump version to 0.1.2 2016-02-05 01:15:42 +02:00
Ivan Tivonenko
76e18fd30e make code uglify-compatible - do not use Function.name 2016-02-04 05:48:19 +02:00
Chris Clark
a0776a77b6 Bump version to 0.1.1 2015-12-10 13:41:57 -08:00
Chris Clark
0d1ae3bfc6 Add support for DeliverMin 2015-12-10 13:41:34 -08:00
Chris Clark
5775554d9d Bump version to 0.1.0 2015-11-19 11:57:09 -08:00
Chris Clark
4dee6a4493 Bump version to 0.0.7 2015-11-17 10:33:26 -08:00
Ivan Tivonenko
4a8313ed1c Add fields that was added with Suspended payment feature 3f0eacf5e7 2015-11-17 04:01:09 +02:00
Ivan Tivonenko
fd75b18582 Add SuspendedPayment feature make it same as in rippled 3f0eacf5e7 2015-11-13 01:19:41 +02:00
Chris Clark
9e3c037491 Remove "type" from PathSet JSON format 2015-10-13 15:15:21 -07:00
Chris Clark
3c3e7ca2eb Fix dependencies 2015-10-08 13:53:41 -07:00
Chris Clark
2877d1a280 Merge coretypes repo 2015-10-07 10:57:21 -07:00
Nicholas Dudfield
ef0d1f5679 Add tests for encodeFor*Signing 2015-10-07 17:48:46 +07:00
Nicholas Dudfield
77abd3e188 Add encodeQuality/decodeQuality 2015-10-07 16:26:39 +07:00
Nicholas Dudfield
ab9ced8344 Add encodeForSigning 2015-10-02 10:49:37 +07:00
Nicholas Dudfield
d6805e597b Bump version: 0.0.2 2015-10-01 18:33:23 +07:00
Nicholas Dudfield
8a49bec48b Use encode/decode 2015-10-01 06:55:23 +07:00
Nicholas Dudfield
65987a83fd Initial import 2015-09-30 16:28:01 +07:00
dependabot[bot]
7fe8cd541a Bump base-x from 3.0.8 to 3.0.9
Bumps [base-x](https://github.com/cryptocoinjs/base-x) from 3.0.8 to 3.0.9.
- [Release notes](https://github.com/cryptocoinjs/base-x/releases)
- [Commits](https://github.com/cryptocoinjs/base-x/compare/v3.0.8...v3.0.9)
2021-10-25 15:02:26 +00:00
dependabot[bot]
bd281f6599 Bump @types/node from 16.11.1 to 16.11.4
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 16.11.1 to 16.11.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
2021-10-25 15:02:19 +00:00
dependabot[bot]
aba9bb8c51 Bump typescript from 3.9.9 to 4.4.4
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.9.9 to 4.4.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v3.9.9...v4.4.4)
2021-10-18 15:01:46 +00:00
dependabot[bot]
09fca0f660 Bump @types/node from 16.7.10 to 16.11.1
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 16.7.10 to 16.11.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
2021-10-18 15:01:34 +00:00
dependabot[bot]
50cd90c8cf Bump @types/jest from 26.0.24 to 27.0.2
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.24 to 27.0.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)
2021-10-14 19:46:49 +00:00
ledhed2222
457c840abb switch to npm (#196)
* allow tests to be run manually
2021-10-14 15:46:02 -04:00
dependabot[bot]
418a791604 Bump @types/node from 16.10.2 to 16.10.3
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 16.10.2 to 16.10.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
2021-10-11 15:01:51 +00:00
dependabot[bot]
e6706f59c7 Bump @types/node from 16.9.4 to 16.10.2
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 16.9.4 to 16.10.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
2021-10-04 15:01:56 +00:00
dependabot[bot]
42a37a5375 Bump ansi-regex from 5.0.0 to 5.0.1
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v5.0.0...v5.0.1)
2021-09-23 05:04:04 +00:00
dependabot[bot]
ed56963cbc Bump typescript from 4.4.2 to 4.4.3 (#199)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.4.2 to 4.4.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.4.2...v4.4.3)
2021-09-22 22:03:36 -07:00
dependabot[bot]
dcbcf22535 Bump tmpl from 1.0.4 to 1.0.5
Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/daaku/nodejs-tmpl/releases)
- [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5)
2021-09-21 13:22:25 +00:00
dependabot[bot]
1d7e98fab2 Bump @types/node from 16.7.6 to 16.9.4
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 16.7.6 to 16.9.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
2021-09-20 15:02:24 +00:00
dependabot[bot]
2d0a425c7a Bump path-parse from 1.0.6 to 1.0.7 (#190)
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)
2021-08-30 09:07:59 -07:00
dependabot[bot]
6f75c014f0 Bump @types/node from 16.4.3 to 16.7.6 (#194)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 16.4.3 to 16.7.6.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
2021-08-30 09:07:46 -07:00
dependabot[bot]
a6a9fe3300 Bump typescript from 4.3.5 to 4.4.2 (#195)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.3.5 to 4.4.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.3.5...v4.4.2)
2021-08-30 09:07:35 -07:00
dependabot[bot]
8d11362a06 Bump typescript from 4.3.2 to 4.3.5 (#182)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.3.2 to 4.3.5.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.3.2...v4.3.5)
2021-07-26 13:20:45 -07:00
dependabot[bot]
0241c82b34 Bump @types/jest from 26.0.23 to 26.0.24 (#184)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.23 to 26.0.24.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)
2021-07-26 13:20:39 -07:00
dependabot[bot]
551ff135fd Bump @types/node from 15.12.1 to 16.4.3 (#187)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 15.12.1 to 16.4.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
2021-07-26 13:20:31 -07:00
dependabot[bot]
6ddfa1739d Bump ws from 7.4.2 to 7.4.6 (#174)
Bumps [ws](https://github.com/websockets/ws) from 7.4.2 to 7.4.6.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/7.4.2...7.4.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-07 09:10:09 -07:00
dependabot[bot]
92b0a43595 Bump typescript from 4.2.4 to 4.3.2 (#175)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.2.4 to 4.3.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.2.4...v4.3.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-07 09:04:38 -07:00
dependabot[bot]
5a020fc40e Bump @types/node from 15.0.2 to 15.12.1 (#177)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 15.0.2 to 15.12.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
2021-06-07 09:02:20 -07:00
Elliot Lee
1d23dd9d7b release: 4.1.3 2021-05-10 14:06:40 -07:00
dependabot-preview[bot]
dd3bc5a279 Upgrade to GitHub-native Dependabot (#166)
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-05-10 14:01:49 -07:00
dependabot-preview[bot]
db47a8221d Bump typescript from 4.2.3 to 4.2.4 (#162)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.2.3 to 4.2.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.2.3...v4.2.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-05-10 14:01:41 -07:00
dependabot-preview[bot]
0b7890061d Bump @types/jest from 26.0.22 to 26.0.23 (#165)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.22 to 26.0.23.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-05-10 14:01:33 -07:00
dependabot-preview[bot]
42f8ee658b [Security] Bump lodash from 4.17.20 to 4.17.21 (#168)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21. **This update includes a security fix.**
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.20...4.17.21)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-05-10 14:01:13 -07:00
dependabot-preview[bot]
38c5452b94 [Security] Bump hosted-git-info from 2.8.8 to 2.8.9 (#169)
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9. **This update includes a security fix.**
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-05-10 14:01:05 -07:00
dependabot-preview[bot]
4d5d6ce18f Bump ts-jest from 26.5.4 to 26.5.6 (#170)
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 26.5.4 to 26.5.6.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v26.5.4...v26.5.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-05-10 14:00:56 -07:00
dependabot-preview[bot]
b99179d12c Bump @types/node from 14.14.37 to 15.0.2 (#171)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.37 to 15.0.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-05-10 14:00:47 -07:00
dependabot-preview[bot]
98e427c0f4 [Security] Bump y18n from 4.0.0 to 4.0.1 (#161)
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1. **This update includes a security fix.**
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-04-05 23:27:40 -07:00
dependabot-preview[bot]
5bea5bb72f Bump @types/jest from 26.0.21 to 26.0.22 (#160)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.21 to 26.0.22.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-03-30 14:26:46 -07:00
dependabot-preview[bot]
fbe75d2694 Bump @types/node from 14.14.35 to 14.14.37 (#159)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.35 to 14.14.37.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-03-30 14:26:36 -07:00
dependabot-preview[bot]
f37a4001e0 Bump ts-jest from 26.5.3 to 26.5.4 (#156)
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 26.5.3 to 26.5.4.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v26.5.3...v26.5.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-03-23 15:31:35 -07:00
dependabot-preview[bot]
e884ab2720 Bump @types/node from 14.14.34 to 14.14.35 (#157)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.34 to 14.14.35.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-03-23 15:31:28 -07:00
dependabot-preview[bot]
8a157169c5 Bump @types/jest from 26.0.20 to 26.0.21 (#158)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.20 to 26.0.21.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-03-23 15:31:21 -07:00
dependabot-preview[bot]
fa71ed950d Bump typescript from 4.1.5 to 4.2.3 (#153)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.1.5 to 4.2.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.1.5...v4.2.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-03-15 23:09:56 -07:00
dependabot-preview[bot]
c44e311843 Bump ts-jest from 26.5.1 to 26.5.3 (#154)
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 26.5.1 to 26.5.3.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v26.5.1...v26.5.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-03-15 23:09:49 -07:00
dependabot-preview[bot]
e8d83954df Bump @types/node from 14.14.31 to 14.14.34 (#155)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.31 to 14.14.34.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-03-15 23:09:41 -07:00
dependabot-preview[bot]
31395fd684 Bump @types/node from 14.14.22 to 14.14.31 (#149)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.22 to 14.14.31.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-02-25 10:13:08 -08:00
dependabot-preview[bot]
ac69cc0e5f Bump ts-jest from 26.4.4 to 26.5.1 (#148)
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 26.4.4 to 26.5.1.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v26.4.4...v26.5.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-02-25 10:12:59 -08:00
dependabot-preview[bot]
0837e0ecc0 Bump typescript from 4.1.3 to 4.1.5 (#146)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.1.3 to 4.1.5.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.1.3...v4.1.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-02-25 10:12:51 -08:00
dependabot-preview[bot]
1abe7387f2 Bump @types/node from 14.14.20 to 14.14.22 (#143)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.20 to 14.14.22.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-01-28 15:10:23 -08:00
Elliot Lee
6b807ffab0 release: 4.1.2 2021-01-11 09:47:46 -08:00
Elliot Lee
d94d0962c1 chore: update dependencies
Fixes a potential moderate severity vuln in node-notifier
2021-01-11 09:45:34 -08:00
dependabot-preview[bot]
cd4230c06a Bump @types/node from 14.14.19 to 14.14.20 (#140)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.19 to 14.14.20.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-01-11 09:31:16 -08:00
dependabot-preview[bot]
e672b877a0 Bump @types/jest from 26.0.19 to 26.0.20 (#141)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.19 to 26.0.20.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-01-11 09:31:07 -08:00
dependabot-preview[bot]
4b8b243f21 Bump @types/jest from 26.0.15 to 26.0.19 (#134)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.15 to 26.0.19.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-01-04 11:38:51 -08:00
Stanislav Otovchits
fc3c544268 Add LICENSE (#138)
Co-authored-by: Elliot Lee <github.public@intelliot.com>
2021-01-05 02:38:37 +07:00
dependabot-preview[bot]
586e689042 Bump @types/node from 14.14.7 to 14.14.19 (#139)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.7 to 14.14.19.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-01-04 11:34:31 -08:00
dependabot-preview[bot]
6cef63f977 Bump @types/node from 14.14.6 to 14.14.7 (#130)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.6 to 14.14.7.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-20 10:27:21 -08:00
dependabot-preview[bot]
39a9db1261 Bump @types/node from 14.11.11 to 14.14.6 (#129)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.11.11 to 14.14.6.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-09 14:03:52 -08:00
dependabot-preview[bot]
1151607a7c Bump ts-jest from 25.4.0 to 25.5.1 (#83)
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 25.4.0 to 25.5.1.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v25.4.0...v25.5.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-10-23 13:33:25 -07:00
dependabot-preview[bot]
a4bbe92519 Bump @types/node from 14.11.2 to 14.11.11 (#126)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.11.2 to 14.11.11.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-10-23 13:33:14 -07:00
dependabot-preview[bot]
06043d5bef Bump @types/jest from 25.2.1 to 26.0.15 (#127)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 25.2.1 to 26.0.15.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-10-23 13:33:02 -07:00
dependabot-preview[bot]
68abb68964 [Security] Bump lodash from 4.17.15 to 4.17.20 (#111)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.20. **This update includes security fixes.**
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.20)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-22 00:12:20 -07:00
dependabot-preview[bot]
28e7c7e594 Bump typescript from 3.8.3 to 3.9.7 (#103)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.8.3 to 3.9.7.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v3.8.3...v3.9.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-22 00:12:09 -07:00
Elliot Lee
e838f543f6 README: Add badges (#120) 2020-09-22 00:11:06 -07:00
dependabot-preview[bot]
36ad7e9717 Bump @types/node from 13.13.1 to 14.11.2 (#123)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.13.1 to 14.11.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-22 00:10:41 -07:00
Elliot Lee
40e966e9ee Fix linting by reducing line length 2020-08-20 16:52:48 -07:00
Elliot Lee
fb902c3b5b Add GitHub CI (#115)
Used as reference: https://github.com/ripple/ripple-binary-codec/pull/61
2020-08-20 15:33:58 -07:00
Elliot Lee
5b416a8862 Fix docs for xAddressToClassicAddress when there is no tag (#114)
Add a redundant test to ensure the behavior is abundantly clear
2020-08-20 15:33:36 -07:00
dependabot[bot]
1660e819ee Bump lodash from 4.17.15 to 4.17.19 (#102)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-19 22:27:50 -07:00
dependabot-preview[bot]
28072d2a44 Bump jest from 25.4.0 to 25.5.4 (#82)
Bumps [jest](https://github.com/facebook/jest) from 25.4.0 to 25.5.4.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v25.4.0...v25.5.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-27 00:00:24 -07:00
dependabot-preview[bot]
a0655a6737 Bump base-x from 3.0.7 to 3.0.8 (#58)
Bumps [base-x](https://github.com/cryptocoinjs/base-x) from 3.0.7 to 3.0.8.
- [Release notes](https://github.com/cryptocoinjs/base-x/releases)
- [Commits](https://github.com/cryptocoinjs/base-x/compare/v3.0.7...v3.0.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-27 00:00:13 -07:00
dependabot-preview[bot]
e5f771fa2c Bump @types/node from 13.13.0 to 13.13.1 (#80)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.13.0 to 13.13.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-21 14:37:32 -07:00
dependabot-preview[bot]
0afd6a3628 Bump jest from 25.3.0 to 25.4.0 (#79)
Bumps [jest](https://github.com/facebook/jest) from 25.3.0 to 25.4.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v25.3.0...v25.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-21 14:37:18 -07:00
dependabot-preview[bot]
1f7c06e5e4 Bump ts-jest from 25.3.1 to 25.4.0 (#78)
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 25.3.1 to 25.4.0.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v25.3.1...v25.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-21 14:25:06 -07:00
dependabot-preview[bot]
4964927b2d Bump @types/node from 13.11.1 to 13.13.0 (#77)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.11.1 to 13.13.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-21 14:24:57 -07:00
dependabot-preview[bot]
106394e94e Bump @types/jest from 25.1.5 to 25.2.1 (#74)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 25.1.5 to 25.2.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-21 14:24:44 -07:00
Elliot Lee
14f9a3952f README: Document functions (#73) 2020-04-13 23:41:32 -07:00
dependabot-preview[bot]
bf2dc45f9e Bump jest from 25.2.7 to 25.3.0 (#75)
Bumps [jest](https://github.com/facebook/jest) from 25.2.7 to 25.3.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v25.2.7...v25.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-13 23:41:05 -07:00
dependabot-preview[bot]
10080aa6aa Bump @types/node from 13.11.0 to 13.11.1 (#76)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.11.0 to 13.11.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-13 23:40:55 -07:00
Elliot Lee
9572e5d1a5 README example: encode test address 2020-04-03 14:10:31 -07:00
Elliot Lee
fcb288ce19 Release 4.1.1 2020-04-03 12:01:36 -07:00
Elliot Lee
90c4d49055 Update dependencies in yarn.lock 2020-04-03 10:26:36 -07:00
Elliot Lee
e889cc96c3 Update jest to 25.2.7 2020-04-03 10:24:24 -07:00
dependabot-preview[bot]
7a310e185b Bump typescript from 3.7.5 to 3.8.3 (#61)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.7.5 to 3.8.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v3.7.5...v3.8.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-02 09:13:01 -05:00
dependabot-preview[bot]
df976567bd Bump @types/node from 13.7.6 to 13.7.7 (#60)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.7.6 to 13.7.7.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-02 09:12:39 -05:00
dependabot-preview[bot]
9a091f14b1 Bump @types/node from 13.7.0 to 13.7.6 (#59)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.7.0 to 13.7.6.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-26 10:05:06 -05:00
dependabot-preview[bot]
bef3c6b864 Bump @types/node from 13.5.1 to 13.7.0 (#49)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.5.1 to 13.7.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-10 19:36:46 -08:00
dependabot-preview[bot]
824abda14d Bump ts-jest from 25.0.0 to 25.2.0 (#50)
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 25.0.0 to 25.2.0.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v25.0.0...v25.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-10 19:36:35 -08:00
dependabot-preview[bot]
1fe03a5b2c Bump @types/jest from 25.1.0 to 25.1.2 (#51)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 25.1.0 to 25.1.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-10 19:36:16 -08:00
dependabot-preview[bot]
00031bdc90 Bump @types/jest from 24.9.0 to 25.1.0 (#43)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 24.9.0 to 25.1.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-29 09:17:32 -08:00
dependabot-preview[bot]
4f8dabc52d Bump jest and ts-jest (#40)
Bumps [jest](https://github.com/facebook/jest) and [ts-jest](https://github.com/kulshekhar/ts-jest). These dependencies needed to be updated together.

Updates `jest` from 24.9.0 to 25.1.0
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v24.9.0...v25.1.0)

Updates `ts-jest` from 24.3.0 to 25.0.0
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v24.3.0...v25.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-29 09:09:04 -08:00
dependabot-preview[bot]
1647fa4744 Bump @types/node from 13.5.0 to 13.5.1 (#44)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.5.0 to 13.5.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-29 09:32:35 -05:00
Elliot Lee
c0a3b97edf Require node v10+ 2020-01-28 22:54:54 -08:00
Elliot Lee
ae26db0a9d Drop node 6 and add node 13 2020-01-28 22:42:16 -08:00
dependabot-preview[bot]
79610ab660 Bump @types/node from 13.1.8 to 13.5.0 (#42)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 13.1.8 to 13.5.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-28 22:38:29 -08:00
Elliot Lee
4889a0305c Update README.md
Add larger npm badge
2020-01-28 20:29:27 -08:00
Elliot Lee
0d75a62551 Release 4.1.0 2020-01-22 13:23:39 -08:00
dependabot-preview[bot]
b7b9c7f549 Bump ts-jest from 24.1.0 to 24.3.0 (#30)
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 24.1.0 to 24.3.0.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v24.1.0...v24.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-22 10:42:21 -08:00
Elliot Lee
a57c71beb8 Add support for Account Public Key data type (#35)
Per https://xrpl.org/base58-encodings.html
2020-01-22 10:42:07 -08:00
dependabot-preview[bot]
5be66ab646 Bump @types/jest from 24.0.25 to 24.9.0 (#37)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 24.0.25 to 24.9.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-22 10:41:37 -08:00
dependabot-preview[bot]
2ea5e6cad3 Bump @types/node from 10.14.19 to 13.1.8 (#39)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 10.14.19 to 13.1.8.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-22 10:41:22 -08:00
dependabot-preview[bot]
11ad1205fd Bump typescript from 3.7.4 to 3.7.5 (#38)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.7.4 to 3.7.5.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v3.7.4...v3.7.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-17 10:02:46 -05:00
dependabot-preview[bot]
638e6ea96c Bump @types/jest from 24.0.18 to 24.0.25 (#26)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 24.0.18 to 24.0.25.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-09 00:28:01 -08:00
dependabot-preview[bot]
30ab98a03d Bump tslint from 5.20.0 to 5.20.1 (#24)
Bumps [tslint](https://github.com/palantir/tslint) from 5.20.0 to 5.20.1.
- [Release notes](https://github.com/palantir/tslint/releases)
- [Changelog](https://github.com/palantir/tslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/palantir/tslint/compare/5.20.0...5.20.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-08 17:21:01 -08:00
Elliot Lee
79a0d83e2a Bump typescript from 3.6.3 to 3.7.4 2020-01-08 16:21:16 -08:00
Hans Bergren
fdebbcb386 Upgrade base-x from 3.0.4 to 3.0.7 (#31)
On installing `ripple-lib`, a warning is thrown for @types/base-x@3.0.6
since base-x now has types included. By upgrading base-x to at least
3.0.6, we no longer need the stub types.

If we don't want to upgrade this dependency, an alternative approach
would be to version lock `@types/base-x` to 3.0.4.
2020-01-08 18:32:28 -05:00
RareData
90793562fa Correct X-address to classic address example (#15) 2019-12-16 18:42:52 +01:00
Elliot Lee
a72adaeb91 Release 4.0.0 2019-10-08 16:58:00 -07:00
Elliot Lee
1949614d86 Add test cases for addresses/tags used in ripple-lib tests 2019-10-08 16:53:35 -07:00
Elliot Lee
7521ff8b85 Add X-address support (#14)
* Update test coverage

* Fix #7

* Add support for test addresses (T...)

* Add classic address <> X-address conversion methods

* Rename isValidAddress to isValidClassicAddress
2019-10-08 16:51:52 -07:00
Elliot Lee
7f9efe9e71 Migrate unit tests to TypeScript (#12)
* Add type information for utils
* Enable "strictNullChecks" and "noImplicitAny"
* Replace mocha with jest
* Fix #11
* Refactor and add tests for 100% code coverage
* Mention --coverage option in README
* Travis: remove node v9 and add node v10 and v12
* Improvements per review by @keefertaylor

Node.js v6 throws "Invalid hex string" if the hex string has an odd number
of characters (two hex characters per byte means the string should
have an even length). This changed in later versions of Node.js.
2019-09-24 15:33:30 -07:00
Elliot Lee
d97f9de122 v3.0.4 2019-09-03 12:57:14 -07:00
Elliot Lee
212baebfd0 v3.0.3 2019-09-03 12:20:59 -07:00
Elliot Lee
d3f5952b61 v3.0.2 2019-09-03 12:19:16 -07:00
Elliot Lee
a97bf0fbef v3.0.1 2019-09-03 12:14:18 -07:00
Elliot Lee
2de0e186e8 Fix error TS2683
> 'this' implicitly has type 'any' because it does not have a type annotation.
2019-09-03 11:16:32 -07:00
Elliot Lee
14564051fa Provide types for TypeScript projects using this library 2019-09-03 11:10:34 -07:00
Elliot Lee
86d485869a Use Buffer.from() 2019-09-03 11:03:54 -07:00
Elliot Lee
558710978f Upgrade tslint@latest 2019-09-03 10:58:30 -07:00
Elliot Lee
f36008425f Remove codecov.io, coveralls, eslint for now
Given that eslint is adding TypeScript support, we can migrate back to
ESLint in the future.
2019-09-03 10:56:07 -07:00
Elliot Lee
e387261d52 Remove istanbul for now 2019-09-03 10:53:41 -07:00
Elliot Lee
0c8d997958 Refactor and simplify code (#8)
* Remove dependency on x-address-codec

* Version 3.0.0
2019-09-03 10:51:10 -07:00
Keefer Taylor
1eae464868 Update README.md (#10) 2019-08-08 16:52:02 -04:00
Elliot Lee
920b0bf429 Update eslint and mocha; apply code style (#6) 2018-03-27 22:52:46 -07:00
Nicholas Dudfield
852465bd85 Add codecov 2015-10-03 13:23:58 +07:00
Nicholas Dudfield
3152d884cc Use create-hash 2015-10-01 18:53:28 +07:00
Nicholas Dudfield
a63619b40d s/sublimator/ripple/ 2015-09-17 10:41:43 +07:00
Nicholas Dudfield
49d7029f9a Bump version: 2.0.0 2015-08-26 11:22:20 +07:00
Nicholas Dudfield
9bf5bb04e6 Use updated x-address-codec. Add *Address and isValid* 2015-08-26 11:21:57 +07:00
Nicholas Dudfield
4597b323d2 Use coveralls badge instead of inaccessible shields.io 2015-07-31 18:14:56 +07:00
Nicholas Dudfield
f8cfded176 Bump version: 1.6.0 2015-07-31 16:38:26 +07:00
Nicholas Dudfield
8a2ce17676 Update x-address-codec dependency and add eslint 2015-07-31 16:36:33 +07:00
Nicholas Dudfield
f79ca12a12 Bump version: 1.5.2 2015-07-31 11:58:49 +07:00
Nicholas Dudfield
e6972ea7fc Use shields.io service for badges 2015-07-31 11:57:47 +07:00
Nicholas Dudfield
b03486eb73 Bump version: 1.5.1 2015-07-30 20:23:34 +07:00
Nicholas Dudfield
43b7c376c3 Add coveralls to travis 2015-07-30 19:34:26 +07:00
Nicholas Dudfield
4c6f7ae344 Add travis badge 2015-07-30 18:13:03 +07:00
Nicholas Dudfield
68a6ebaf12 Bump version: 1.5.0 2015-07-30 16:42:36 +07:00
Nicholas Dudfield
78ae2adc28 Bump version: 1.4.0 2015-07-28 13:40:44 +07:00
Nicholas Dudfield
df2bbcadf3 Bump version: 1.3.1 2015-07-28 13:21:32 +07:00
Nicholas Dudfield
ad45b4d341 Add test for node public keys 2015-07-22 13:15:40 +07:00
Nicholas Dudfield
93236f4795 Bump version: 1.3.0 2015-07-20 10:54:53 +07:00
Nicholas Dudfield
2b1062865d Use better names for seed types 2015-07-20 10:54:33 +07:00
Nicholas Dudfield
71edb1e145 Bump version: 1.2.2 2015-07-17 16:39:15 +08:00
Nicholas Dudfield
78269ed420 Add exemplary README 2015-07-17 16:18:13 +08:00
Nicholas Dudfield
53b3e6f4ee Bump version: 1.2.1 2015-07-17 14:49:29 +08:00
Nicholas Dudfield
1ad928dfd7 Update x-address-codec dependency 2015-07-16 21:04:24 +08:00
Nicholas Dudfield
f9c51b05a6 Add Ed25519 seeds and tests 2015-07-16 19:33:59 +08:00
Nicholas Dudfield
079484b651 Update dependency 2015-07-03 17:29:02 +07:00
Nicholas Dudfield
21e41622cd Update x-address-codec dependency 2015-06-29 19:41:57 +07:00
sublimator
516e7730c6 Update package.json 2015-06-20 00:50:05 +08:00
Nicholas Dudfield
58bfec05cb Rename symbol -> operation 2015-06-19 17:36:23 +08:00
Nicholas Dudfield
85eee0e651 Initial import 2015-06-17 19:58:42 +07:00
Greg Weisbrod
2b42427634 convert existing xrpl library into a lerna monorepo 2021-11-04 23:18:23 -04:00
633 changed files with 39157 additions and 2993 deletions

View File

@@ -23,9 +23,10 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run lint
- run: npm install -g npm@7
- run: npm ci
- run: npm run build
- run: npm run lint
unit:
runs-on: ubuntu-latest
@@ -41,7 +42,9 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install --ignore-engines
- run: npm install -g npm@7
- run: npm ci
- run: npm run build
- run: npm test
integration:
@@ -65,7 +68,9 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install --ignore-engines
- run: npm install -g npm@7
- run: npm ci
- run: npm run build
- run: npm run test:integration
env:
HOST: localhost
@@ -92,5 +97,7 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm install -g npm@7
- run: npm ci
- run: npm run build
- run: npm run test:browser

3
.gitignore vendored
View File

@@ -71,3 +71,6 @@ scripts/cache
# browser tests
testCompiledForWeb
# lerna debug
lerna-debug.log

View File

@@ -1,9 +0,0 @@
language: node_js
node_js:
- 10
- 12
- 13
script:
- npm test
- npm build
- npm lint

View File

@@ -1,5 +1,8 @@
{
"editor.tabSize": 2,
"cSpell.words": [
"secp256k1"
],
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true

View File

@@ -2,14 +2,29 @@
## Set up your dev environment
We use Node v14 for development - that is the version that our linters require.
### Requirements
We use Node v14 for development - that is the version that our linters require.
You must also use `npm` v7. You can check your `npm` version with:
```bash
npm -v
```
If your `npm` version is too old, use this command to update it:
```bash
npm -g i npm@7
```
### Set up
To set up the repository:
1. Clone the repository
2. `cd` into the repository
3. Install dependencies with `npm install`
To build the library:
### Build
```bash
npm run build
```
@@ -18,17 +33,18 @@ npm run build
```bash
npm install
npm run build
npm run lint
```
## Running Tests
For integration and browser tests, we use a `rippled` node in standalone mode to test xrpl.js code against. To set this up, you can either run `rippled` locally, or set up the Docker container `natenichols/rippled-standalone:latest` for this purpose. The latter will require you to [install Docker](https://docs.docker.com/get-docker/).
### Unit Tests
```bash
npm install
npm run build
npm test
```
@@ -38,6 +54,7 @@ npm test
npm install
# sets up the rippled standalone Docker container - you can skip this step if you already have it set up
docker run -p 6006:6006 -it natenichols/rippled-standalone:latest
npm run build
npm run test:integration
```
@@ -50,7 +67,7 @@ One is in the browser - run `npm run build:browserTests` and open `test/localInt
The other is in the command line (this is what we use for CI) -
```bash
npm run build:browserTests
npm run build
# sets up the rippled standalone Docker container - you can skip this step if you already have it set up
docker run -p 6006:6006 -it natenichols/rippled-standalone:latest
npm run test:browser
@@ -64,6 +81,37 @@ You can see the complete reference documentation at [`xrpl.js` docs](js.xrpl.org
npm run docgen
```
## Adding and removing packages
`xrpl.js` uses `lerna` and `npm`'s workspaces features to manage a monorepo.
Adding and removing packages requires a slightly different process than normal
as a result.
### Adding or removing development dependencies
`xrpl.js` strives to use the same development dependencies in all packages.
You may add and remove dev dependencies like normal:
```bash
### adding a new dependency
npm install --save-dev abbrev
### removing a dependency
npm uninstall --save-dev abbrev
```
### Adding or removing runtime dependencies
You need to specify which package is changing using the `-w` flag:
```bash
### adding a new dependency to `xrpl`
npm install abbrev -w xrpl
### adding a new dependency to `ripple-keypairs`
npm install abbrev -w ripple-keypairs
### removing a dependency
npm uninstall abbrev -w xrpl
```
## Release process
### Editing the Code
@@ -79,7 +127,7 @@ npm run docgen
1. Ensure that all tests passed on the last CI that ran on `develop`.
2. Open a PR to update the docs if docs were modified.
3. Create a branch off `develop` that properly increments the version in `package.json` and ensures that `HISTORY.md` is updated appropriately. We follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
3. Create a branch off `develop` that ensures that `HISTORY.md` is updated appropriately for each package.
* Use `shasum -a 256 build/*` to get the SHA-256 checksums. Add these to `HISTORY.md` as well.
4. Merge this branch into `develop`.
5. If this is not a beta release: Merge `develop` into `master` (`--ff-only`) and push to github. This is important because we have docs telling developers to use master to get the latest release.

1617
HISTORY.md

File diff suppressed because it is too large Load Diff

View File

@@ -26,14 +26,19 @@ What is `xrpl.js` used for? The applications on the list linked above use `xrpl.
### Requirements
+ **[Node.js v14](https://nodejs.org/)** is recommended. We also support v12 and v16. Other versions may work but are not frequently tested.
+ **[npm](https://www.npmjs.com/)** is recommended. `yarn` may work but we use `package-lock.json`.
## Getting Started
In an existing project (with `package.json`), install `xrpl.js`:
```
$ npm install xrpl
$ npm install --save xrpl
```
Or with `yarn`:
```
$ yarn add xrpl
```
Example usage:
@@ -41,7 +46,7 @@ Example usage:
```js
const xrpl = require("xrpl")
async function main() {
const client = new xrpl.Client("https://s.altnet.rippletest.net:51234/")
const client = new xrpl.Client("wss://s.altnet.rippletest.net:51233")
await client.connect()
const response = await client.request({
@@ -122,7 +127,7 @@ import xrpl from 'https://dev.jspm.io/npm:xrpl';
+ [Get Started in Node.js](https://xrpl.org/get-started-using-node-js.html)
+ [Full Reference Documentation](https://js.xrpl.org)
+ [Code Samples](https://github.com/XRPLF/xrpl.js/tree/develop/snippets/src)
+ [Code Samples](https://github.com/XRPLF/xrpl.js/tree/develop/packages/xrpl/snippets/src)
### Mailing Lists

5
lerna.json Normal file
View File

@@ -0,0 +1,5 @@
{
"version": "independent",
"useWorkspaces": true,
"npmClient": "npm"
}

19736
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,36 +1,20 @@
{
"name": "xrpl",
"version": "2.0.1",
"license": "ISC",
"description": "A TypeScript/JavaScript API for interacting with the XRP Ledger in Node.js and the browser",
"files": [
"dist/npm/*",
"build/xrpl-latest-min.js",
"build/xrpl-latest.js"
],
"main": "dist/npm/",
"unpkg": "build/xrpl-latest-min.js",
"jsdelivr": "build/xrpl-latest-min.js",
"types": "dist/npm/index.d.ts",
"directories": {
"test": "test"
},
"browser": {
"ws": "./dist/npm/client/WSWrapper.js"
"name": "xrpl.js",
"private": true,
"scripts": {
"test": "lerna run test --stream",
"test:browser": "lerna run test:browser --stream",
"test:integration": "lerna run test:integration --stream",
"lint": "lerna run lint --stream",
"clean": "lerna run clean --stream",
"build": "lerna run build --stream",
"docgen": "lerna run docgen --stream"
},
"dependencies": {
"bignumber.js": "^9.0.0",
"bip32": "^2.0.6",
"bip39": "^3.0.4",
"https-proxy-agent": "^5.0.0",
"lodash": "^4.17.4",
"ripple-address-codec": "^4.1.1",
"ripple-binary-codec": "^1.1.3",
"ripple-keypairs": "^1.0.3",
"ws": "^8.2.2"
},
"resolutions": {
"elliptic": "^6.5.4"
"ripple-address-codec": "file:packages/ripple-address-codec",
"ripple-binary-codec": "file:packages/ripple-binary-codec",
"ripple-keypairs": "file:packages/ripple-keypairs",
"xrpl": "file:packages/xrpl"
},
"devDependencies": {
"@types/chai": "^4.2.21",
@@ -41,7 +25,7 @@
"@types/ws": "^8.2.0",
"@typescript-eslint/eslint-plugin": "^4.30.0",
"@typescript-eslint/parser": "^4.0.0",
"@xrplf/eslint-config": "^1.5.0",
"@xrplf/eslint-config": "^1.6.0",
"@xrplf/prettier-config": "^1.5.0",
"assert": "^2.0.0",
"buffer": "^6.0.2",
@@ -60,6 +44,8 @@
"eslint-plugin-tsdoc": "^0.2.14",
"eventemitter2": "^6.0.0",
"https-browserify": "^1.0.0",
"jest": "^26.0.1",
"lerna": "^4.0.0",
"mocha": "^9",
"npm-run-all": "^4.1.5",
"nyc": "^15",
@@ -67,8 +53,10 @@
"prettier": "^2.3.2",
"process": "^0.11.10",
"puppeteer": "10.4.0",
"source-map-support": "^0.5.16",
"stream-browserify": "^3.0.0",
"stream-http": "3.2.0",
"ts-jest": "^26.4.4",
"ts-loader": "^9.2.5",
"ts-node": "^10.2.1",
"typedoc": "^0.22.5",
@@ -78,36 +66,11 @@
"webpack-bundle-analyzer": "^4.1.0",
"webpack-cli": "^4.2.0"
},
"scripts": {
"build": "run-s build:lib build:snippets build:web",
"build:snippets": "tsc --build ./snippets/tsconfig.json",
"build:lib": "tsc --build tsconfig.build.json",
"build:web": "webpack",
"build:browserTests": "webpack --config ./test/webpack.config.js",
"analyze": "run-s build:web --analyze",
"watch": "run-s build:lib --watch",
"clean": "rm -rf dist",
"docgen": "typedoc && echo js.xrpl.org >> ./docs/CNAME",
"prepublish": "run-s clean build",
"test": "nyc mocha --config=test/.mocharc.json --exit",
"test:integration": "TS_NODE_PROJECT=tsconfig.build.json nyc mocha ./test/integration/**/*.ts ./test/integration/*.ts",
"test:browser": "npm run build:browserTests && TS_NODE_PROJECT=tsconfig.build.json nyc mocha ./test/browser/*.ts",
"test:watch": "TS_NODE_PROJECT=src/tsconfig.json mocha --config=test/.mocharc.json --watch --reporter dot",
"format": "prettier --write '{src,test}/**/*.ts'",
"lint": "eslint . --ext .ts --max-warnings 0",
"perf": "./scripts/perf_test.sh",
"compile:snippets": "tsc -p snippets/tsconfig.json",
"start:snippet": "npm run compile:snippets && node",
"inspect:snippet": "npm run compile:snippets && node inspect"
},
"prettier": "@xrplf/prettier-config",
"repository": {
"type": "git",
"url": "git@github.com:XRPLF/xrpl.js.git"
},
"readmeFilename": "README.md",
"workspaces": [
"packages/*"
],
"engines": {
"node": ">=10.13.0",
"npm": ">=7.14.0 <8.0.0"
"node": ">=10.0.0",
"npm": ">=7.0.0 < 8.0.0"
}
}

View File

@@ -0,0 +1,12 @@
# Don't ever lint node_modules
node_modules
# Don't lint build output
dist
# don't lint nyc coverage output
coverage
.nyc_output
# Don't lint NYC configuration
nyc.config.js

View File

@@ -0,0 +1,85 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser', // Make ESLint compatible with TypeScript
parserOptions: {
// Enable linting rules with type information from our tsconfig
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
sourceType: 'module', // Allow the use of imports / ES modules
ecmaFeatures: {
impliedStrict: true, // Enable global strict mode
},
},
// Specify global variables that are predefined
env: {
browser: true, // Enable browser global variables
node: true, // Enable node global variables & Node.js scoping
es2020: true, // Add all ECMAScript 2020 globals and automatically set the ecmaVersion parser option to ES2020
},
plugins: [],
extends: ['@xrplf/eslint-config/base'],
rules: {
// ** TODO **
// all of the below are turned off for now during the migration to a
// monorepo. They need to actually be addressed!
// **
'@typescript-eslint/no-for-in-array': 'off',
'@typescript-eslint/consistent-type-assertions': 'off',
'@typescript-eslint/no-unnecessary-condition': 'off',
'@typescript-eslint/prefer-for-of': 'off',
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-magic-numbers': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/promise-function-async': 'off',
'@typescript-eslint/prefer-nullish-coalescing': 'off',
'@typescript-eslint/naming-convention': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/array-type': 'off',
'@typescript-eslint/restrict-plus-operands': 'off',
'@typescript-eslint/no-unnecessary-type-assertion': 'off',
'jsdoc/require-returns': 'off',
'jsdoc/check-param-names': 'off',
'jsdoc/require-throws': 'off',
'jsdoc/require-hyphen-before-param-description': 'off',
'jsdoc/require-jsdoc': 'off',
'jsdoc/require-description-complete-sentence': 'off',
'jsdoc/require-param': 'off',
'jsdoc/no-types': 'off',
'tsdoc/syntax': 'off',
'import/no-commonjs': 'off',
'import/order': 'off',
'no-restricted-syntax': 'off',
'guard-for-in': 'off',
'object-shorthand': 'off',
'no-negated-condition': 'off',
'no-loop-func': 'off',
'id-length': 'off',
'no-inline-comments': 'off',
'max-lines-per-function': 'off',
'max-len': 'off',
'no-nested-ternary': 'off',
'no-param-reassign': 'off',
'no-bitwise': 'off',
'multiline-comment-style': 'off',
'id-blacklist': 'off',
'func-names': 'off',
'max-params': 'off',
'prefer-template': 'off',
'no-else-return': 'off',
},
}

View File

@@ -0,0 +1,61 @@
# .gitignore
# Ignore vim swap files.
*.swp
# Ignore SCons support files.
.sconsign.dblite
# Ignore python compiled files.
*.pyc
# Ignore Macintosh Desktop Services Store files.
.DS_Store
# Ignore backup/temps
*~
# Ignore object files.
*.o
build/
tags
bin/rippled
Debug/*.*
Release/*.*
# Ignore locally installed node_modules
node_modules
!test/node_modules
# Ignore tmp directory.
tmp
# Ignore database directory.
db/*.db
db/*.db-*
# Ignore customized configs
rippled.cfg
validators.txt
test/config.js
# Ignore coverage files
/lib-cov
/src-cov
/coverage.html
/coverage
# Ignore IntelliJ files
.idea
# Ignore npm-debug
npm-debug.log
# Ignore dist folder
dist/
# Ignore flow output directory
out/
# Ignore perf test cache
scripts/cache

View File

@@ -0,0 +1,64 @@
# ripple-address-cod
## 4.1.3 (2021-05-10)
* Update dependencies
* Add `build` script as an alias for `compile`
* Update README
## 4.1.2 (2021-01-11)
* Internal dependencies
* Update jest, ts-jest, typescript, lodash
* Fix potential moderate severity vulnerabilities
* Update @types/node, @types/jest, base-x
* Docs
* Update example for encoding test address
* Document functions (#73)
* xAddressToClassicAddress when there is no tag (#114)
* Add README badges (#120)
* Add LICENSE (#138)
* Cleanup and polish
* Add GitHub CI (#115)
* Fix linting
## 4.1.1 (2020-04-03)
* Require node v10+
* CI: Drop node 6 & 8 and add node 13
* Update dependencies
* Bump @types/node to 13.7.7 (#60)
* Bump jest and ts-jest (#40)
* Bump @types/jest to 25.1.2 (#51)
* Bump ts-jest from 25.0.0 to 25.2.0 (#50)
* Bump typescript from 3.7.5 to 3.8.3 (#61)
* Update all dependencies in yarn.lock
## 4.1.0 (2020-01-22)
* Throwable 'unexpected_payload_length' error: The message has been expanded with ' Ensure that the bytes are a Buffer.'
* Docs (readme): Correct X-address to classic address example (#15) (thanks @RareData)
### New Features
* `encodeAccountPublic` - Encode a public key, as for payment channels
* `decodeAccountPublic` - Decode a public key, as for payment channels
* Internal
* Update dependencies: ts-jest, @types/jest, @types/node, typescript, tslint,
base-x
## 4.0.0 (2019-10-08)
### Breaking Changes
* `decodeAddress` has been renamed to `decodeAccountID`
* `isValidAddress` has been renamed to `isValidClassicAddress`
### New Features
* `classicAddressToXAddress` - Derive X-address from classic address, tag, and network ID
* `encodeXAddress` - Encode account ID, tag, and network ID as an X-address
* `xAddressToClassicAddress` - Decode an X-address to account ID, tag, and network ID
* `decodeXAddress` - Convert X-address to classic address, tag, and network ID
* `isValidXAddress` - Check whether an X-address (X...) is valid

View File

@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2020 Ripple Labs Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@@ -0,0 +1,196 @@
# ripple-address-codec
[![NPM Version][npm-version-image]][npm-url]
[![NPM Downloads][npm-downloads-image]][npm-url]
[![Build Status][travis-image]][travis-url]
[![Test Coverage][coveralls-image]][coveralls-url]
Functions for encoding and decoding XRP Ledger addresses and seeds.
Also includes support for encoding/decoding [rippled validator (node) public keys](https://xrpl.org/run-rippled-as-a-validator.html).
[![NPM](https://nodei.co/npm/ripple-address-codec.png)](https://www.npmjs.org/package/ripple-address-codec)
## X-address Conversion
All tools and apps in the XRP Ledger ecosystem are encouraged to adopt support for the X-address format. The X-address format is a single Base58 string that encodes an 'Account ID', a (destination) tag, and whether the address is intended for a test network. This prevents users from unintentionally omitting the destination tag when sending and receiving payments and other transactions.
## API
### classicAddressToXAddress(classicAddress: string, tag: number | false, test: boolean): string
Convert a classic address and (optional) tag to an X-address. If `tag` is `false`, the returned X-address explicitly indicates that the recipient does not want a tag to be used. If `test` is `true`, consumers of the address will know that the address is intended for use on test network(s) and the address will start with `T`.
```js
> const api = require('ripple-address-codec')
> api.classicAddressToXAddress('rGWrZyQqhTp9Xu7G5Pkayo7bXjH4k4QYpf', 4294967295)
'XVLhHMPHU98es4dbozjVtdWzVrDjtV18pX8yuPT7y4xaEHi'
```
Encode a test address e.g. for use with [Testnet or Devnet](https://xrpl.org/xrp-testnet-faucet.html):
```js
> const api = require('ripple-address-codec')
> api.classicAddressToXAddress('r3SVzk8ApofDJuVBPKdmbbLjWGCCXpBQ2g', 123, true)
'T7oKJ3q7s94kDH6tpkBowhetT1JKfcfdSCmAXbS75iATyLD'
```
### xAddressToClassicAddress(xAddress: string): {classicAddress: string, tag: number | false, test: boolean}
Convert an X-address to a classic address and tag. If the X-address did not have a tag, the returned object's `tag` will be `false`. (Since `0` is a valid tag, instead of `if (tag)`, use `if (tag !== false)` if you want to check for a tag.) If the X-address is intended for use on test network(s), `test` will be `true`; if it is intended for use on the main network (mainnet), `test` will be `false`.
```js
> const api = require('ripple-address-codec')
> api.xAddressToClassicAddress('XVLhHMPHU98es4dbozjVtdWzVrDjtV18pX8yuPT7y4xaEHi')
{
classicAddress: 'rGWrZyQqhTp9Xu7G5Pkayo7bXjH4k4QYpf',
tag: 4294967295,
test: false
}
```
### isValidXAddress(xAddress: string): boolean
Returns `true` if the provided X-address is valid, or `false` otherwise.
```js
> const api = require('ripple-address-codec')
> api.isValidXAddress('XVLhHMPHU98es4dbozjVtdWzVrDjtV18pX8yuPT7y4xaEHi')
true
```
Returns `false` for classic addresses (starting with `r`). To validate a classic address, use `isValidClassicAddress`.
### isValidClassicAddress(address: string): boolean
Check whether a classic address (starting with `r`...) is valid.
Returns `false` for X-addresses (extended addresses). To validate an X-address, use `isValidXAddress`.
### encodeSeed(entropy: Buffer, type: 'ed25519' | 'secp256k1'): string
Encode the given entropy as an XRP Ledger seed (secret). The entropy must be exactly 16 bytes (128 bits). The encoding includes which elliptic curve digital signature algorithm (ECDSA) the seed is intended to be used with. The seed is used to produce the private key.
### decodeSeed(seed: string): object
Decode a seed into an object with its version, type, and bytes.
Return object type:
```
{
version: number[],
bytes: Buffer,
type: string | null
}
```
### encodeAccountID(bytes: Buffer): string
Encode bytes as a classic address (starting with `r`...).
### decodeAccountID(accountId: string): Buffer
Decode a classic address (starting with `r`...) to its raw bytes.
### encodeNodePublic(bytes: Buffer): string
Encode bytes to the XRP Ledger "node public key" format (base58).
This is useful for rippled validators.
### decodeNodePublic(base58string: string): Buffer
Decode an XRP Ledger "node public key" (in base58 format) into its raw bytes.
### encodeAccountPublic(bytes: Buffer): string
Encode a public key, as for payment channels.
### decodeAccountPublic(base58string: string): Buffer
Decode a public key, as for payment channels.
### encodeXAddress(accountId: Buffer, tag: number | false, test: boolean): string
Encode account ID, tag, and network ID to X-address.
`accountId` must be 20 bytes because it is a RIPEMD160 hash, which is 160 bits (160 bits = 20 bytes).
At this time, `tag` must be <= MAX_32_BIT_UNSIGNED_INT (4294967295) as the XRP Ledger only supports 32-bit tags.
If `test` is `true`, this address is intended for use with a test network such as Testnet or Devnet.
### decodeXAddress(xAddress: string): {accountId: Buffer, tag: number | false, test: boolean}
Convert an X-address to its classic address, tag, and network ID.
### Other functions
```js
> var api = require('ripple-address-codec');
> api.decodeSeed('sEdTM1uX8pu2do5XvTnutH6HsouMaM2')
{ version: [ 1, 225, 75 ],
bytes: [ 76, 58, 29, 33, 63, 189, 251, 20, 199, 194, 141, 96, 148, 105, 179, 65 ],
type: 'ed25519' }
> api.decodeSeed('sn259rEFXrQrWyx3Q7XneWcwV6dfL')
{ version: 33,
bytes: [ 207, 45, 227, 120, 251, 221, 126, 46, 232, 125, 72, 109, 251, 90, 123, 255 ],
type: 'secp256k1' }
> api.decodeAccountID('rJrRMgiRgrU6hDF4pgu5DXQdWyPbY35ErN')
[ 186,
142,
120,
98,
110,
228,
44,
65,
180,
109,
70,
195,
4,
141,
243,
161,
195,
200,
112,
114 ]
```
## Tests
Run unit tests with:
npm test
Use `--watch` to run in watch mode, so that when you modify the tests, they are automatically re-run:
npm test -- --watch
Use `--coverage` to generate and display code coverage information:
npm test -- --coverage
This tells jest to output code coverage info in the `./coverage` directory, in addition to showing it on the command line.
## Releases
Use the [ripple-lib release checklist](https://github.com/ripple/ripple-lib/wiki/Release-Checklist), but just use `master` instead of `develop` as this project does not use a develop branch.
## Acknowledgements
This library references and adopts code and standards from the following sources:
- [XLS-5d Standard for Tagged Addresses](https://github.com/xrp-community/standards-drafts/issues/6) by @nbougalis
- [XRPL Tagged Address Codec](https://github.com/xrp-community/xrpl-tagged-address-codec) by @WietseWind
- [X-Address transaction functions](https://github.com/codetsunami/xrpl-tools/tree/master/xaddress-functions) by @codetsunami
[coveralls-image]: https://badgen.net/coveralls/c/github/ripple/ripple-address-codec/master
[coveralls-url]: https://coveralls.io/r/ripple/ripple-address/codec?branch=master
[npm-downloads-image]: https://badgen.net/npm/dm/ripple-address-codec
[npm-url]: https://npmjs.org/package/ripple-address-codec
[npm-version-image]: https://badgen.net/npm/v/ripple-address-codec
[travis-image]: https://badgen.net/travis/ripple/ripple-address-codec/master
[travis-url]: https://travis-ci.org/github/ripple/ripple-address-codec

View File

@@ -0,0 +1,10 @@
var api = require('../');
var pubVersion = [0x04, 0x88, 0xB2, 0x1E];
var options = {version: pubVersion, alphabet: 'bitcoin'};
var key = 'xpub661MyMwAqRbcEYS8w7XLSVeEsBXy79zSzH1J8vCdxAZningWLdN3zgtU6LBpB85b3D2yc8sfvZU521AAwdZafEz7mnzBBsz4wKY5e4cp9LB';
var decoded = api.decode(key, options);
var reencoded = api.encode(decoded, options);
console.log(key);
// 'xpub661MyMwAqRbcEYS8w7XLSVeEsBXy79zSzH1J8vCdxAZningWLdN3zgtU6LBpB85b3D2yc8sfvZU521AAwdZafEz7mnzBBsz4wKY5e4cp9LB'
console.log(reencoded);
// 'xpub661MyMwAqRbcEYS8w7XLSVeEsBXy79zSzH1J8vCdxAZningWLdN3zgtU6LBpB85b3D2yc8sfvZU521AAwdZafEz7mnzBBsz4wKY5e4cp9LB'

View File

@@ -0,0 +1,8 @@
module.exports = {
"roots": [
"<rootDir>/src"
],
"transform": {
"^.+\\.tsx?$": "ts-jest"
},
}

View File

@@ -0,0 +1,33 @@
{
"name": "ripple-address-codec",
"version": "4.2.0",
"description": "encodes/decodes base58 encoded XRP Ledger identifiers",
"files": [
"dist/*",
"build/*"
],
"main": "dist/index.js",
"types": "dist/index.d.ts",
"license": "ISC",
"dependencies": {
"base-x": "3.0.9",
"create-hash": "^1.1.2"
},
"repository": {
"type": "git",
"url": "git@github.com:XRPLF/xrpl.js.git"
},
"prepublish": "tsc -b",
"prepublishOnly": "tslint -b ./ && jest",
"scripts": {
"build": "tsc -b",
"test": "jest",
"lint": "eslint . --ext .ts",
"clean": "rm -rf ./dist && rm -rf tsconfig.tsbuildinfo"
},
"prettier": "@xrplf/prettier-config",
"engines": {
"node": ">= 10",
"npm": ">=7.0.0"
}
}

View File

@@ -0,0 +1,259 @@
const {
classicAddressToXAddress,
xAddressToClassicAddress,
isValidXAddress,
encodeXAddress
} = require('./index')
const testCases = [
[
'r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59',
false,
'X7AcgcsBL6XDcUb289X4mJ8djcdyKaB5hJDWMArnXr61cqZ',
'T719a5UwUCnEs54UsxG9CJYYDhwmFCqkr7wxCcNcfZ6p5GZ'
],
[
'r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59',
1,
'X7AcgcsBL6XDcUb289X4mJ8djcdyKaGZMhc9YTE92ehJ2Fu',
'T719a5UwUCnEs54UsxG9CJYYDhwmFCvbJNZbi37gBGkRkbE'
],
[
'r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59',
14,
'X7AcgcsBL6XDcUb289X4mJ8djcdyKaGo2K5VpXpmCqbV2gS',
'T719a5UwUCnEs54UsxG9CJYYDhwmFCvqXVCALUGJGSbNV3x'
],
[
'r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59',
11747,
'X7AcgcsBL6XDcUb289X4mJ8djcdyKaLFuhLRuNXPrDeJd9A',
'T719a5UwUCnEs54UsxG9CJYYDhwmFCziiNHtUukubF2Mg6t'
],
[
'rLczgQHxPhWtjkaQqn3Q6UM8AbRbbRvs5K',
false,
'XVZVpQj8YSVpNyiwXYSqvQoQqgBttTxAZwMcuJd4xteQHyt',
'TVVrSWtmQQssgVcmoMBcFQZKKf56QscyWLKnUyiuZW8ALU4'
],
[
'rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo',
false,
'X7YenJqxv3L66CwhBSfd3N8RzGXxYqPopMGMsCcpho79rex',
'T77wVQzA8ntj9wvCTNiQpNYLT5hmhRsFyXDoMLqYC4BzQtV'
],
[
'rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo',
58,
'X7YenJqxv3L66CwhBSfd3N8RzGXxYqV56ZkTCa9UCzgaao1',
'T77wVQzA8ntj9wvCTNiQpNYLT5hmhR9kej6uxm4jGcQD7rZ'
],
[
'rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW',
23480,
'X7d3eHCXzwBeWrZec1yT24iZerQjYL8m8zCJ16ACxu1BrBY',
'T7YChPFWifjCAXLEtg5N74c7fSAYsvSokwcmBPBUZWhxH5P'
],
[
'rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW',
11747,
'X7d3eHCXzwBeWrZec1yT24iZerQjYLo2CJf8oVC5CMWey5m',
'T7YChPFWifjCAXLEtg5N74c7fSAYsvTcc7nEfwuEEvn5Q4w'
],
[
'rGWrZyQqhTp9Xu7G5Pkayo7bXjH4k4QYpf',
false,
'XVLhHMPHU98es4dbozjVtdWzVrDjtV5fdx1mHp98tDMoQXb',
'TVE26TYGhfLC7tQDno7G8dGtxSkYQn49b3qD26PK7FcGSKE'
],
[
'rGWrZyQqhTp9Xu7G5Pkayo7bXjH4k4QYpf',
0,
'XVLhHMPHU98es4dbozjVtdWzVrDjtV8AqEL4xcZj5whKbmc',
'TVE26TYGhfLC7tQDno7G8dGtxSkYQnSy8RHqGHoGJ59spi2'
],
[
'rGWrZyQqhTp9Xu7G5Pkayo7bXjH4k4QYpf',
1,
'XVLhHMPHU98es4dbozjVtdWzVrDjtV8xvjGQTYPiAx6gwDC',
'TVE26TYGhfLC7tQDno7G8dGtxSkYQnSz1uDimDdPYXzSpyw'
],
[
'rGWrZyQqhTp9Xu7G5Pkayo7bXjH4k4QYpf',
2,
'XVLhHMPHU98es4dbozjVtdWzVrDjtV8zpDURx7DzBCkrQE7',
'TVE26TYGhfLC7tQDno7G8dGtxSkYQnTryP9tG9TW8GeMBmd'
],
[
'rGWrZyQqhTp9Xu7G5Pkayo7bXjH4k4QYpf',
32,
'XVLhHMPHU98es4dbozjVtdWzVrDjtVoYiC9UvKfjKar4LJe',
'TVE26TYGhfLC7tQDno7G8dGtxSkYQnT2oqaCDzMEuCDAj1j'
],
[
'rGWrZyQqhTp9Xu7G5Pkayo7bXjH4k4QYpf',
276,
'XVLhHMPHU98es4dbozjVtdWzVrDjtVoKj3MnFGMXEFMnvJV',
'TVE26TYGhfLC7tQDno7G8dGtxSkYQnTMgJJYfAbsiPsc6Zg'
],
[
'rGWrZyQqhTp9Xu7G5Pkayo7bXjH4k4QYpf',
65591,
'XVLhHMPHU98es4dbozjVtdWzVrDjtVozpjdhPQVdt3ghaWw',
'TVE26TYGhfLC7tQDno7G8dGtxSkYQn7ryu2W6njw7mT1jmS'
],
[
'rGWrZyQqhTp9Xu7G5Pkayo7bXjH4k4QYpf',
16781933,
'XVLhHMPHU98es4dbozjVtdWzVrDjtVqrDUk2vDpkTjPsY73',
'TVE26TYGhfLC7tQDno7G8dGtxSkYQnVsw45sDtGHhLi27Qa'
],
[
'rGWrZyQqhTp9Xu7G5Pkayo7bXjH4k4QYpf',
4294967294,
'XVLhHMPHU98es4dbozjVtdWzVrDjtV1kAsixQTdMjbWi39u',
'TVE26TYGhfLC7tQDno7G8dGtxSkYQnX8tDFQ53itLNqs6vU'
],
[
'rGWrZyQqhTp9Xu7G5Pkayo7bXjH4k4QYpf',
4294967295,
'XVLhHMPHU98es4dbozjVtdWzVrDjtV18pX8yuPT7y4xaEHi',
'TVE26TYGhfLC7tQDno7G8dGtxSkYQnXoy6kSDh6rZzApc69'
],
[
'rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY',
false,
'XV5sbjUmgPpvXv4ixFWZ5ptAYZ6PD2gYsjNFQLKYW33DzBm',
'TVd2rqMkYL2AyS97NdELcpeiprNBjwLZzuUG5rZnaewsahi'
],
[
'rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY',
0,
'XV5sbjUmgPpvXv4ixFWZ5ptAYZ6PD2m4Er6SnvjVLpMWPjR',
'TVd2rqMkYL2AyS97NdELcpeiprNBjwRQUBetPbyrvXSTuxU'
],
[
'rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY',
13371337,
'XV5sbjUmgPpvXv4ixFWZ5ptAYZ6PD2qwGkhgc48zzcx6Gkr',
'TVd2rqMkYL2AyS97NdELcpeiprNBjwVUDvp3vhpXbNhLwJi'
]
]
;[false, true].forEach(isTestAddress => {
const MAX_32_BIT_UNSIGNED_INT = 4294967295
const network = isTestAddress ? ' (test)' : ' (main)'
for (const i in testCases) {
const testCase = testCases[i]
const classicAddress = testCase[0]
const tag = testCase[1] !== false ? testCase[1] : false
const xAddress = isTestAddress ? testCase[3] : testCase[2]
test(`Converts ${classicAddress}${tag ? ':' + tag : ''} to ${xAddress}${network}`, () => {
expect(classicAddressToXAddress(classicAddress, tag, isTestAddress)).toBe(xAddress)
const myClassicAddress = xAddressToClassicAddress(xAddress)
expect(myClassicAddress).toEqual({
classicAddress,
tag,
test: isTestAddress
})
expect(isValidXAddress(xAddress)).toBe(true)
})
}
{
const classicAddress = 'rGWrZyQqhTp9Xu7G5Pkayo7bXjH4k4QYpf'
const tag = MAX_32_BIT_UNSIGNED_INT + 1
test(`Converting ${classicAddress}:${tag}${network} throws`, () => {
expect(() => {
classicAddressToXAddress(classicAddress, tag, isTestAddress)
}).toThrowError(new Error('Invalid tag'))
})
}
{
const classicAddress = 'r'
test(`Invalid classic address: Converting ${classicAddress}${network} throws`, () => {
expect(() => {
classicAddressToXAddress(classicAddress, false, isTestAddress)
}).toThrowError(new Error('invalid_input_size: decoded data must have length >= 5'))
})
}
{
const highAndLowAccounts = [
Buffer.from('00'.repeat(20), 'hex'),
Buffer.from('00'.repeat(19) + '01', 'hex'),
Buffer.from('01'.repeat(20), 'hex'),
Buffer.from('FF'.repeat(20), 'hex')
]
highAndLowAccounts.forEach(accountId => {
[false, 0, 1, MAX_32_BIT_UNSIGNED_INT].forEach(t => {
const tag = (t | false)
const xAddress = encodeXAddress(accountId, tag, isTestAddress)
test(`Encoding ${accountId.toString('hex')}${tag ? ':' + tag : ''} to ${xAddress} has expected length`, () => {
expect(xAddress.length).toBe(47)
})
})
})
}
})
{
const xAddress = 'XVLhHMPHU98es4dbozjVtdWzVrDjtV5fdx1mHp98tDMoQXa'
test(`Invalid X-address (bad checksum): Converting ${xAddress} throws`, () => {
expect(() => {
xAddressToClassicAddress(xAddress)
}).toThrowError(new Error('checksum_invalid'))
})
}
{
const xAddress = 'dGzKGt8CVpWoa8aWL1k18tAdy9Won3PxynvbbpkAqp3V47g'
test(`Invalid X-address (bad prefix): Converting ${xAddress} throws`, () => {
expect(() => {
xAddressToClassicAddress(xAddress)
}).toThrowError(new Error('Invalid X-address: bad prefix'))
})
}
test(`Invalid X-address (64-bit tag) throws`, () => {
expect(() => {
// Encoded from:
// {
// classicAddress: 'rGWrZyQqhTp9Xu7G5Pkayo7bXjH4k4QYpf',
// tag: MAX_32_BIT_UNSIGNED_INT + 1
// }
xAddressToClassicAddress('XVLhHMPHU98es4dbozjVtdWzVrDjtV18pX8zeUygYrCgrPh')
}).toThrowError('Unsupported X-address')
})
test(`Invalid Account ID throws`, () => {
expect(() => {
encodeXAddress(Buffer.from('00'.repeat(19), 'hex'), false, false)
}).toThrowError('Account ID must be 20 bytes')
})
test(`isValidXAddress returns false for invalid X-address`, () => {
expect(isValidXAddress('XVLhHMPHU98es4dbozjVtdWzVrDjtV18pX8zeUygYrCgrPh')).toBe(false)
})
test(`Converts X7AcgcsBL6XDcUb... to r9cZA1mLK5R5A... and tag: false`, () => {
const classicAddress = 'r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59'
const tag = false
const xAddress = 'X7AcgcsBL6XDcUb289X4mJ8djcdyKaB5hJDWMArnXr61cqZ'
const isTestAddress = false
expect(classicAddressToXAddress(classicAddress, tag, isTestAddress)).toBe(xAddress)
const myClassicAddress = xAddressToClassicAddress(xAddress)
expect(myClassicAddress).toEqual({
classicAddress,
tag,
test: isTestAddress
})
expect(isValidXAddress(xAddress)).toBe(true)
// Notice that converting an X-address to a classic address has `result.tag === false` (not undefined)
expect(myClassicAddress.tag).toEqual(false)
})

View File

@@ -0,0 +1,149 @@
import {
codec,
encodeSeed,
decodeSeed,
encodeAccountID,
decodeAccountID,
encodeNodePublic,
decodeNodePublic,
encodeAccountPublic,
decodeAccountPublic,
isValidClassicAddress,
} from './xrp-codec'
import * as assert from 'assert'
const PREFIX_BYTES = {
MAIN: Buffer.from([0x05, 0x44]), // 5, 68
TEST: Buffer.from([0x04, 0x93]), // 4, 147
}
function classicAddressToXAddress(
classicAddress: string,
tag: number | false,
test: boolean,
): string {
const accountId = decodeAccountID(classicAddress)
return encodeXAddress(accountId, tag, test)
}
function encodeXAddress(
accountId: Buffer,
tag: number | false,
test: boolean,
): string {
if (accountId.length !== 20) {
// RIPEMD160 is 160 bits = 20 bytes
throw new Error('Account ID must be 20 bytes')
}
const MAX_32_BIT_UNSIGNED_INT = 4294967295
const flag = tag === false ? 0 : tag <= MAX_32_BIT_UNSIGNED_INT ? 1 : 2
if (flag === 2) {
throw new Error('Invalid tag')
}
if (tag === false) {
tag = 0
}
const bytes = Buffer.concat([
test ? PREFIX_BYTES.TEST : PREFIX_BYTES.MAIN,
accountId,
Buffer.from([
flag, // 0x00 if no tag, 0x01 if 32-bit tag
tag & 0xff, // first byte
(tag >> 8) & 0xff, // second byte
(tag >> 16) & 0xff, // third byte
(tag >> 24) & 0xff, // fourth byte
0,
0,
0,
0, // four zero bytes (reserved for 64-bit tags)
]),
])
const xAddress = codec.encodeChecked(bytes)
return xAddress
}
function xAddressToClassicAddress(xAddress: string): {
classicAddress: string
tag: number | false
test: boolean
} {
const { accountId, tag, test } = decodeXAddress(xAddress)
const classicAddress = encodeAccountID(accountId)
return {
classicAddress,
tag,
test,
}
}
function decodeXAddress(xAddress: string): {
accountId: Buffer
tag: number | false
test: boolean
} {
const decoded = codec.decodeChecked(xAddress)
const test = isBufferForTestAddress(decoded)
const accountId = decoded.slice(2, 22)
const tag = tagFromBuffer(decoded)
return {
accountId,
tag,
test,
}
}
function isBufferForTestAddress(buf: Buffer): boolean {
const decodedPrefix = buf.slice(0, 2)
if (PREFIX_BYTES.MAIN.equals(decodedPrefix)) {
return false
} else if (PREFIX_BYTES.TEST.equals(decodedPrefix)) {
return true
} else {
throw new Error('Invalid X-address: bad prefix')
}
}
function tagFromBuffer(buf: Buffer): number | false {
const flag = buf[22]
if (flag >= 2) {
// No support for 64-bit tags at this time
throw new Error('Unsupported X-address')
}
if (flag === 1) {
// Little-endian to big-endian
return buf[23] + buf[24] * 0x100 + buf[25] * 0x10000 + buf[26] * 0x1000000
}
assert.strictEqual(flag, 0, 'flag must be zero to indicate no tag')
assert.ok(
Buffer.from('0000000000000000', 'hex').equals(buf.slice(23, 23 + 8)),
'remaining bytes must be zero',
)
return false
}
function isValidXAddress(xAddress: string): boolean {
try {
decodeXAddress(xAddress)
} catch (e) {
return false
}
return true
}
export {
codec, // Codec with XRP alphabet
encodeSeed, // Encode entropy as a "seed"
decodeSeed, // Decode a seed into an object with its version, type, and bytes
encodeAccountID, // Encode bytes as a classic address (r...)
decodeAccountID, // Decode a classic address to its raw bytes
encodeNodePublic, // Encode bytes to XRP Ledger node public key format
decodeNodePublic, // Decode an XRP Ledger node public key into its raw bytes
encodeAccountPublic, // Encode a public key, as for payment channels
decodeAccountPublic, // Decode a public key, as for payment channels
isValidClassicAddress, // Check whether a classic address (r...) is valid
classicAddressToXAddress, // Derive X-address from classic address, tag, and network ID
encodeXAddress, // Encode account ID, tag, and network ID to X-address
xAddressToClassicAddress, // Decode X-address to account ID, tag, and network ID
decodeXAddress, // Convert X-address to classic address, tag, and network ID
isValidXAddress, // Check whether an X-address (X...) is valid
}

View File

@@ -0,0 +1,40 @@
const {seqEqual, concatArgs} = require('./utils')
test('two sequences are equal', () => {
expect(seqEqual([1, 2, 3], [1, 2, 3])).toBe(true)
})
test('elements must be in the same order', () => {
expect(seqEqual([3, 2, 1], [1, 2, 3])).toBe(false)
})
test('sequences do not need to be the same type', () => {
expect(seqEqual(Buffer.from([1, 2, 3]), [1, 2, 3])).toBe(true)
expect(seqEqual(Buffer.from([1, 2, 3]), new Uint8Array([1, 2, 3]))).toBe(true)
})
test('sequences with a single element', () => {
expect(seqEqual(Buffer.from([1]), [1])).toBe(true)
expect(seqEqual(Buffer.from([1]), new Uint8Array([1]))).toBe(true)
})
test('empty sequences', () => {
expect(seqEqual(Buffer.from([]), [])).toBe(true)
expect(seqEqual(Buffer.from([]), new Uint8Array([]))).toBe(true)
})
test('plain numbers are concatenated', () => {
expect(concatArgs(10, 20, 30, 40)).toStrictEqual([10, 20, 30, 40])
})
test('a variety of values are concatenated', () => {
expect(concatArgs(1, [2, 3], Buffer.from([4,5]), new Uint8Array([6, 7]))).toStrictEqual([1,2,3,4,5,6,7])
})
test('a single value is returned as an array', () => {
expect(concatArgs(Buffer.from([7]))).toStrictEqual([7])
})
test('no arguments returns an empty array', () => {
expect(concatArgs()).toStrictEqual([])
})

View File

@@ -0,0 +1,54 @@
type Sequence = number[] | Buffer | Uint8Array
/**
* Check whether two sequences (e.g. arrays of numbers) are equal.
*
* @param arr1 One of the arrays to compare.
* @param arr2 The other array to compare.
*/
export function seqEqual(arr1: Sequence, arr2: Sequence): boolean {
if (arr1.length !== arr2.length) {
return false
}
for (let i = 0; i < arr1.length; i++) {
if (arr1[i] !== arr2[i]) {
return false
}
}
return true
}
/**
* Check whether a value is a sequence (e.g. array of numbers).
*
* @param val The value to check.
*/
function isSequence(val: Sequence | number): val is Sequence {
return (val as Sequence).length !== undefined
}
/**
* Concatenate all `arguments` into a single array. Each argument can be either
* a single element or a sequence, which has a `length` property and supports
* element retrieval via sequence[ix].
*
* > concatArgs(1, [2, 3], Buffer.from([4,5]), new Uint8Array([6, 7]));
* [1,2,3,4,5,6,7]
*
* @returns {number[]} Array of concatenated arguments
*/
export function concatArgs(...args: (number | Sequence)[]): number[] {
const ret: number[] = []
args.forEach(function (arg) {
if (isSequence(arg)) {
for (let j = 0; j < arg.length; j++) {
ret.push(arg[j])
}
} else {
ret.push(arg)
}
})
return ret
}

View File

@@ -0,0 +1,246 @@
const api = require('./xrp-codec')
function toHex(bytes) {
return Buffer.from(bytes).toString('hex').toUpperCase()
}
function toBytes(hex) {
return Buffer.from(hex, 'hex')
}
/**
* Create a test case for encoding data and a test case for decoding data.
*
* @param encoder Encoder function to test
* @param decoder Decoder function to test
* @param base58 Base58-encoded string to decode
* @param hex Hexadecimal representation of expected decoded data
*/
function makeEncodeDecodeTest(encoder, decoder, base58, hex) {
test(`can translate between ${hex} and ${base58}`, function() {
const actual = encoder(toBytes(hex))
expect(actual).toBe(base58)
})
test(`can translate between ${base58} and ${hex})`, function() {
const buf = decoder(base58)
expect(toHex(buf)).toBe(hex)
})
}
makeEncodeDecodeTest(api.encodeAccountID, api.decodeAccountID, 'rJrRMgiRgrU6hDF4pgu5DXQdWyPbY35ErN',
'BA8E78626EE42C41B46D46C3048DF3A1C3C87072')
makeEncodeDecodeTest(api.encodeNodePublic, api.decodeNodePublic,
'n9MXXueo837zYH36DvMc13BwHcqtfAWNJY5czWVbp7uYTj7x17TH',
'0388E5BA87A000CB807240DF8C848EB0B5FFA5C8E5A521BC8E105C0F0A44217828')
makeEncodeDecodeTest(api.encodeAccountPublic, api.decodeAccountPublic,
'aB44YfzW24VDEJQ2UuLPV2PvqcPCSoLnL7y5M1EzhdW4LnK5xMS3',
'023693F15967AE357D0327974AD46FE3C127113B1110D6044FD41E723689F81CC6')
test('can decode arbitrary seeds', function() {
const decoded = api.decodeSeed('sEdTM1uX8pu2do5XvTnutH6HsouMaM2')
expect(toHex(decoded.bytes)).toBe('4C3A1D213FBDFB14C7C28D609469B341')
expect(decoded.type).toBe('ed25519')
const decoded2 = api.decodeSeed('sn259rEFXrQrWyx3Q7XneWcwV6dfL')
expect(toHex(decoded2.bytes)).toBe('CF2DE378FBDD7E2EE87D486DFB5A7BFF')
expect(decoded2.type).toBe('secp256k1')
})
test('can pass a type as second arg to encodeSeed', function() {
const edSeed = 'sEdTM1uX8pu2do5XvTnutH6HsouMaM2'
const decoded = api.decodeSeed(edSeed)
const type = 'ed25519'
expect(toHex(decoded.bytes)).toBe('4C3A1D213FBDFB14C7C28D609469B341')
expect(decoded.type).toBe(type)
expect(api.encodeSeed(decoded.bytes, type)).toBe(edSeed)
})
test('isValidClassicAddress - secp256k1 address valid', function() {
expect(api.isValidClassicAddress('rU6K7V3Po4snVhBBaU29sesqs2qTQJWDw1')).toBe(true)
})
test('isValidClassicAddress - ed25519 address valid', function() {
expect(api.isValidClassicAddress('rLUEXYuLiQptky37CqLcm9USQpPiz5rkpD')).toBe(true)
})
test('isValidClassicAddress - invalid', function() {
expect(api.isValidClassicAddress('rU6K7V3Po4snVhBBaU29sesqs2qTQJWDw2')).toBe(false)
})
test('isValidClassicAddress - empty', function() {
expect(api.isValidClassicAddress('')).toBe(false)
})
describe('encodeSeed', function() {
it('encodes a secp256k1 seed', function() {
const result = api.encodeSeed(Buffer.from('CF2DE378FBDD7E2EE87D486DFB5A7BFF', 'hex'), 'secp256k1')
expect(result).toBe('sn259rEFXrQrWyx3Q7XneWcwV6dfL')
})
it('encodes low secp256k1 seed', function() {
const result = api.encodeSeed(Buffer.from('00000000000000000000000000000000', 'hex'), 'secp256k1')
expect(result).toBe('sp6JS7f14BuwFY8Mw6bTtLKWauoUs')
})
it('encodes high secp256k1 seed', function() {
const result = api.encodeSeed(Buffer.from('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF', 'hex'), 'secp256k1')
expect(result).toBe('saGwBRReqUNKuWNLpUAq8i8NkXEPN')
})
it('encodes an ed25519 seed', function() {
const result = api.encodeSeed(Buffer.from('4C3A1D213FBDFB14C7C28D609469B341', 'hex'), 'ed25519')
expect(result).toBe('sEdTM1uX8pu2do5XvTnutH6HsouMaM2')
})
it('encodes low ed25519 seed', function() {
const result = api.encodeSeed(Buffer.from('00000000000000000000000000000000', 'hex'), 'ed25519')
expect(result).toBe('sEdSJHS4oiAdz7w2X2ni1gFiqtbJHqE')
})
it('encodes high ed25519 seed', function() {
const result = api.encodeSeed(Buffer.from('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF', 'hex'), 'ed25519')
expect(result).toBe('sEdV19BLfeQeKdEXyYA4NhjPJe6XBfG')
})
test('attempting to encode a seed with less than 16 bytes of entropy throws', function() {
expect(() => {
api.encodeSeed(Buffer.from('CF2DE378FBDD7E2EE87D486DFB5A7B', 'hex'), 'secp256k1')
}).toThrow('entropy must have length 16')
})
test('attempting to encode a seed with more than 16 bytes of entropy throws', function() {
expect(() => {
api.encodeSeed(Buffer.from('CF2DE378FBDD7E2EE87D486DFB5A7BFFFF', 'hex'), 'secp256k1')
}).toThrow('entropy must have length 16')
})
})
describe('decodeSeed', function() {
it('can decode an Ed25519 seed', function() {
const decoded = api.decodeSeed('sEdTM1uX8pu2do5XvTnutH6HsouMaM2')
expect(toHex(decoded.bytes)).toBe('4C3A1D213FBDFB14C7C28D609469B341')
expect(decoded.type).toBe('ed25519')
})
it('can decode a secp256k1 seed', function() {
const decoded = api.decodeSeed('sn259rEFXrQrWyx3Q7XneWcwV6dfL')
expect(toHex(decoded.bytes)).toBe('CF2DE378FBDD7E2EE87D486DFB5A7BFF')
expect(decoded.type).toBe('secp256k1')
})
})
describe('encodeAccountID', function() {
it('can encode an AccountID', function() {
const encoded = api.encodeAccountID(Buffer.from('BA8E78626EE42C41B46D46C3048DF3A1C3C87072', 'hex'))
expect(encoded).toBe('rJrRMgiRgrU6hDF4pgu5DXQdWyPbY35ErN')
})
test('unexpected length should throw', function() {
expect(() => {
api.encodeAccountID(Buffer.from('ABCDEF', 'hex'))
}).toThrow(
'unexpected_payload_length: bytes.length does not match expectedLength'
)
})
})
describe('decodeNodePublic', function() {
it('can decode a NodePublic', function() {
const decoded = api.decodeNodePublic('n9MXXueo837zYH36DvMc13BwHcqtfAWNJY5czWVbp7uYTj7x17TH')
expect(toHex(decoded)).toBe('0388E5BA87A000CB807240DF8C848EB0B5FFA5C8E5A521BC8E105C0F0A44217828')
})
})
test('encodes 123456789 with version byte of 0', () => {
expect(api.codec.encode(Buffer.from('123456789'), {
versions: [0],
expectedLength: 9
})).toBe('rnaC7gW34M77Kneb78s')
})
test('multiple versions with no expected length should throw', () => {
expect(() => {
api.codec.decode('rnaC7gW34M77Kneb78s', {
versions: [0, 1]
})
}).toThrow('expectedLength is required because there are >= 2 possible versions')
})
test('attempting to decode data with length < 5 should throw', () => {
expect(() => {
api.codec.decode('1234', {
versions: [0]
})
}).toThrow('invalid_input_size: decoded data must have length >= 5')
})
test('attempting to decode data with unexpected version should throw', () => {
expect(() => {
api.codec.decode('rnaC7gW34M77Kneb78s', {
versions: [2]
})
}).toThrow('version_invalid: version bytes do not match any of the provided version(s)')
})
test('invalid checksum should throw', () => {
expect(() => {
api.codec.decode('123456789', {
versions: [0, 1]
})
}).toThrow('checksum_invalid')
})
test('empty payload should throw', () => {
expect(() => {
api.codec.decode('', {
versions: [0, 1]
})
}).toThrow('invalid_input_size: decoded data must have length >= 5')
})
test('decode data', () => {
expect(api.codec.decode('rnaC7gW34M77Kneb78s', {
versions: [0]
})).toStrictEqual({
version: [0],
bytes: Buffer.from('123456789'),
type: null
})
})
test('decode data with expected length', function() {
expect(api.codec.decode('rnaC7gW34M77Kneb78s', {
versions: [0],
expectedLength: 9
})
).toStrictEqual({
version: [0],
bytes: Buffer.from('123456789'),
type: null
})
})
test('decode data with wrong expected length should throw', function() {
expect(() => {
api.codec.decode('rnaC7gW34M77Kneb78s', {
versions: [0],
expectedLength: 8
})
}).toThrow(
'version_invalid: version bytes do not match any of the provided version(s)'
)
expect(() => {
api.codec.decode('rnaC7gW34M77Kneb78s', {
versions: [0],
expectedLength: 10
})
}).toThrow(
'version_invalid: version bytes do not match any of the provided version(s)'
)
})

View File

@@ -0,0 +1,241 @@
/**
* Codec class
*/
import * as baseCodec from 'base-x'
import { seqEqual, concatArgs } from './utils'
class Codec {
sha256: (bytes: Uint8Array) => Buffer
alphabet: string
codec: any
base: number
constructor(options: {
sha256: (bytes: Uint8Array) => Buffer
alphabet: string
}) {
this.sha256 = options.sha256
this.alphabet = options.alphabet
this.codec = baseCodec(this.alphabet)
this.base = this.alphabet.length
}
/**
* Encoder.
*
* @param bytes Buffer of data to encode.
* @param opts Options object including the version bytes and the expected length of the data to encode.
*/
encode(
bytes: Buffer,
opts: {
versions: number[]
expectedLength: number
},
): string {
const versions = opts.versions
return this.encodeVersioned(bytes, versions, opts.expectedLength)
}
encodeVersioned(
bytes: Buffer,
versions: number[],
expectedLength: number,
): string {
if (expectedLength && bytes.length !== expectedLength) {
throw new Error(
'unexpected_payload_length: bytes.length does not match expectedLength.' +
' Ensure that the bytes are a Buffer.',
)
}
return this.encodeChecked(Buffer.from(concatArgs(versions, bytes)))
}
encodeChecked(buffer: Buffer): string {
const check = this.sha256(this.sha256(buffer)).slice(0, 4)
return this.encodeRaw(Buffer.from(concatArgs(buffer, check)))
}
encodeRaw(bytes: Buffer): string {
return this.codec.encode(bytes)
}
/**
* Decoder.
*
* @param base58string Base58Check-encoded string to decode.
* @param opts Options object including the version byte(s) and the expected length of the data after decoding.
*/
decode(
base58string: string,
opts: {
versions: (number | number[])[]
expectedLength?: number
versionTypes?: ['ed25519', 'secp256k1']
},
): {
version: number[]
bytes: Buffer
type: string | null
} {
const versions = opts.versions
const types = opts.versionTypes
const withoutSum = this.decodeChecked(base58string)
if (versions.length > 1 && !opts.expectedLength) {
throw new Error(
'expectedLength is required because there are >= 2 possible versions',
)
}
const versionLengthGuess =
typeof versions[0] === 'number' ? 1 : (versions[0] as number[]).length
const payloadLength =
opts.expectedLength || withoutSum.length - versionLengthGuess
const versionBytes = withoutSum.slice(0, -payloadLength)
const payload = withoutSum.slice(-payloadLength)
for (let i = 0; i < versions.length; i++) {
const version: number[] = Array.isArray(versions[i])
? (versions[i] as number[])
: [versions[i] as number]
if (seqEqual(versionBytes, version)) {
return {
version,
bytes: payload,
type: types ? types[i] : null,
}
}
}
throw new Error(
'version_invalid: version bytes do not match any of the provided version(s)',
)
}
decodeChecked(base58string: string): Buffer {
const buffer = this.decodeRaw(base58string)
if (buffer.length < 5) {
throw new Error('invalid_input_size: decoded data must have length >= 5')
}
if (!this.verifyCheckSum(buffer)) {
throw new Error('checksum_invalid')
}
return buffer.slice(0, -4)
}
decodeRaw(base58string: string): Buffer {
return this.codec.decode(base58string)
}
verifyCheckSum(bytes: Buffer): boolean {
const computed = this.sha256(this.sha256(bytes.slice(0, -4))).slice(0, 4)
const checksum = bytes.slice(-4)
return seqEqual(computed, checksum)
}
}
/**
* XRP codec
*/
// Pure JavaScript hash functions in the browser, native hash functions in Node.js
const createHash = require('create-hash')
// base58 encodings: https://xrpl.org/base58-encodings.html
const ACCOUNT_ID = 0 // Account address (20 bytes)
const ACCOUNT_PUBLIC_KEY = 0x23 // Account public key (33 bytes)
const FAMILY_SEED = 0x21 // 33; Seed value (for secret keys) (16 bytes)
const NODE_PUBLIC = 0x1c // 28; Validation public key (33 bytes)
const ED25519_SEED = [0x01, 0xe1, 0x4b] // [1, 225, 75]
const codecOptions = {
sha256: function (bytes: Uint8Array) {
return createHash('sha256').update(Buffer.from(bytes)).digest()
},
alphabet: 'rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz',
}
const codecWithXrpAlphabet = new Codec(codecOptions)
export const codec = codecWithXrpAlphabet
// entropy is a Buffer of size 16
// type is 'ed25519' or 'secp256k1'
export function encodeSeed(
entropy: Buffer,
type: 'ed25519' | 'secp256k1',
): string {
if (entropy.length !== 16) {
throw new Error('entropy must have length 16')
}
const opts = {
expectedLength: 16,
// for secp256k1, use `FAMILY_SEED`
versions: type === 'ed25519' ? ED25519_SEED : [FAMILY_SEED],
}
// prefixes entropy with version bytes
return codecWithXrpAlphabet.encode(entropy, opts)
}
export function decodeSeed(
seed: string,
opts: {
versionTypes: ['ed25519', 'secp256k1']
versions: (number | number[])[]
expectedLength: number
} = {
versionTypes: ['ed25519', 'secp256k1'],
versions: [ED25519_SEED, FAMILY_SEED],
expectedLength: 16,
},
) {
return codecWithXrpAlphabet.decode(seed, opts)
}
export function encodeAccountID(bytes: Buffer): string {
const opts = { versions: [ACCOUNT_ID], expectedLength: 20 }
return codecWithXrpAlphabet.encode(bytes, opts)
}
export const encodeAddress = encodeAccountID
export function decodeAccountID(accountId: string): Buffer {
const opts = { versions: [ACCOUNT_ID], expectedLength: 20 }
return codecWithXrpAlphabet.decode(accountId, opts).bytes
}
export const decodeAddress = decodeAccountID
export function decodeNodePublic(base58string: string): Buffer {
const opts = { versions: [NODE_PUBLIC], expectedLength: 33 }
return codecWithXrpAlphabet.decode(base58string, opts).bytes
}
export function encodeNodePublic(bytes: Buffer): string {
const opts = { versions: [NODE_PUBLIC], expectedLength: 33 }
return codecWithXrpAlphabet.encode(bytes, opts)
}
export function encodeAccountPublic(bytes: Buffer): string {
const opts = { versions: [ACCOUNT_PUBLIC_KEY], expectedLength: 33 }
return codecWithXrpAlphabet.encode(bytes, opts)
}
export function decodeAccountPublic(base58string: string): Buffer {
const opts = { versions: [ACCOUNT_PUBLIC_KEY], expectedLength: 33 }
return codecWithXrpAlphabet.decode(base58string, opts).bytes
}
export function isValidClassicAddress(address: string): boolean {
try {
decodeAccountID(address)
} catch (e) {
return false
}
return true
}

View File

@@ -0,0 +1,19 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"target": "es6",
"lib": [
"es2017"
],
"rootDir": "./src",
"outDir": "./dist",
"noUnusedLocals": true,
"noUnusedParameters": true,
"removeComments": false,
"preserveConstEnums": false,
"suppressImplicitAnyIndexErrors": false,
"skipLibCheck": true,
"declaration": true
},
"include": ["src/**/*.ts"]
}

View File

@@ -0,0 +1,4 @@
node_modules
dist
.github
coverage

View File

@@ -0,0 +1,124 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser', // Make ESLint compatible with TypeScript
parserOptions: {
// Enable linting rules with type information from our tsconfig
tsconfigRootDir: __dirname,
project: ['./tsconfig.eslint.json'],
sourceType: 'module', // Allow the use of imports / ES modules
ecmaFeatures: {
impliedStrict: true, // Enable global strict mode
},
},
// Specify global variables that are predefined
env: {
browser: true, // Enable browser global variables
node: true, // Enable node global variables & Node.js scoping
es2020: true, // Add all ECMAScript 2020 globals and automatically set the ecmaVersion parser option to ES2020
jest: true, // Add Mocha testing global variables
},
plugins: [],
extends: ['@xrplf/eslint-config/base'],
rules: {
// ** TODO **
// all of the below are turned off for now during the migration to a
// monorepo. They need to actually be addressed!
// **
'@typescript-eslint/naming-convention': 'off',
'@typescript-eslint/prefer-readonly': 'off',
'@typescript-eslint/no-parameter-properties': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/restrict-plus-operands': 'off',
'@typescript-eslint/unbound-method': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/no-base-to-string': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/promise-function-async': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/array-type': 'off',
'@typescript-eslint/no-magic-numbers': 'off',
'@typescript-eslint/no-useless-constructor': 'off',
'@typescript-eslint/no-unnecessary-condition': 'off',
'@typescript-eslint/consistent-type-assertions': 'off',
'@typescript-eslint/prefer-for-of': 'off',
'@typescript-eslint/prefer-nullish-coalescing': 'off',
'@typescript-eslint/require-array-sort-compare': 'off',
'@typescript-eslint/prefer-includes': 'off',
'@typescript-eslint/dot-notation': 'off',
'@typescript-eslint/consistent-type-definitions': 'off',
'@typescript-eslint/no-type-alias': 'off',
'@typescript-eslint/member-ordering': 'off',
'@typescript-eslint/prefer-string-starts-ends-with': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-extraneous-class': 'off',
'@typescript-eslint/consistent-type-assertions': 'off',
'import/unambiguous': 'off',
'import/extensions': 'off',
'import/prefer-default-export': 'off',
'import/no-useless-path-segments': 'off',
'import/no-unused-modules': 'off',
'import/no-cycle': 'off',
'import/order': 'off',
'import/no-commonjs': 'off',
'import/newline-after-import': 'off',
'node/global-require': 'off',
'consistent-default-export-name/default-import-match-filename': 'off',
'jsdoc/require-throws': 'off',
'jsdoc/require-description-complete-sentence': 'off',
'jsdoc/require-jsdoc': 'off',
'jsdoc/check-tag-names': 'off',
'jsdoc/require-returns': 'off',
'jsdoc/require-hyphen-before-param-description': 'off',
'jsdoc/require-description': 'off',
'jsdoc/require-param': 'off',
'jsdoc/check-param-names': 'off',
'jsdoc/newline-after-description': 'off',
'jsdoc/require-returns-check': 'off',
'tsdoc/syntax': 'off',
'eslint-comments/require-description': 'off',
'eslint-comments/no-unused-disable': 'off',
'prefer-const': 'off',
'global-require': 'off',
'id-length': 'off',
'no-shadow': 'off',
'no-bitwise': 'off',
'spaced-comment': 'off',
'prefer-template': 'off',
'prefer-object-spread': 'off',
'no-inline-comments': 'off',
'no-plusplus': 'off',
'new-cap': 'off',
'id-blacklist': 'off',
'max-lines-per-function': 'off',
'require-unicode-regexp': 'off',
'no-undef-init': 'off',
'curly': 'off',
'eqeqeq': 'off',
'no-console': 'off',
'max-classes-per-file': 'off',
'operator-assignment': 'off',
'class-methods-use-this': 'off',
'no-else-return': 'off',
'yoda': 'off',
'max-depth': 'off',
'multiline-comment-style': 'off',
'one-var': 'off',
'no-negated-condition': 'off',
'radix': 'off',
'no-nested-ternary': 'off',
'no-useless-concat': 'off',
'object-shorthand': 'off',
'no-param-reassign': 'off',
},
}

64
packages/ripple-binary-codec/.gitignore vendored Normal file
View File

@@ -0,0 +1,64 @@
# .gitignore
# Ignore vim swap files.
*.swp
# Ignore SCons support files.
.sconsign.dblite
# Ignore python compiled files.
*.pyc
# Ignore Macintosh Desktop Services Store files.
.DS_Store
# Ignore backup/temps
*~
# Ignore object files.
*.o
build/
distrib/
tags
bin/rippled
Debug/*.*
Release/*.*
# Ignore locally installed node_modules
node_modules
!test/node_modules
# Ignore tmp directory.
tmp
# Ignore database directory.
db/*.db
db/*.db-*
# Ignore customized configs
rippled.cfg
validators.txt
test/config.js
# Ignore coverage files
/lib-cov
/src-cov
/coverage.html
/coverage
# Ignore IntelliJ files
.idea
# Ignore npm-debug
npm-debug.log
# Ignore dist folder, build for bower
dist/
# Ignore flow output directory
out/
# Ignore perf test cache
scripts/cache
eslintrc

View File

@@ -0,0 +1 @@
10.22.0

View File

@@ -0,0 +1,90 @@
# ripple-binary-codec Release History
## 1.1.3 (2021-06-11)
- Fix for case UInt64.from string allowing lowercase hex (#135)
- Fix for `ValidatorToReEnable` field code (#130)
## 1.1.2 (2021-03-10)
- Fix for case UInt64.from string '0' due to changes in rippled 1.7.0
## 1.1.1 (2021-02-12)
- PathSet.toJSON() does not return undefined values
- Add support for X-Addresses in Issued Currency Amounts
- Fix STArray error message
## 1.1.0 (2020-12-03)
- Add support for Tickets (TicketBatch amendment)
- Fix web browser compatibility
## 1.0.2 (2020-09-11)
- Allow currencies to be encoded from any 3 character ASCII code
## 1.0.1 (2020-09-08)
- Filter out fields with undefined values
## 1.0.0 (2020-08-17)
- Migrate to TypeScript
- Javascript classes used
- Generics for constructing core types
- Reduced dependencies
- Dependent on create-hash, decimal.js, ripple-address-codec
- Migrate testing to Jest and added tests
- Tests for pseudo-transactions
- Added support for NegativeUNL pseudo-transactions
## 0.2.6 (2019-12-31)
- Update dependencies
- decimal.js, fs-extra, mocha, handlebars, bn.js, babel-eslint, ripple-address-codec
## 0.2.5 (2019-12-14)
- Add support for AccountDelete (#37)
## 0.2.4 (2019-09-04)
- Update ripple-address-codec to 3.0.4
## 0.2.3 (2019-08-29)
- Expand node version compatibility (#32, #33)
## 0.2.2 (2019-07-26)
- Input validation - Amount and Fee should not allow fractional XRP drops ([#31](https://github.com/ripple/ripple-binary-codec/issues/31))
- Fix lint errors
- Update dependencies (including lodash and mocha)
- Require node 10 (.nvmrc)
- Remove assert-diff
- Remove codecov.io as it did not appear to work. The `package.json` script was:
- `"codecov": "cat ./coverage/coverage.json | ./node_modules/codecov.io/bin/codecov.io.js"`
## 0.2.1
- Add tecKILLED from amendment fix1578 (PR #27 fixes #25)
## 0.2.0
- Add DepositPreauth fields
- https://developers.ripple.com/depositauth.html
## 0.1.14
- Skip amount validation when deserializing f72c115
## 0.1.13
- Add Check, CheckCreate, CheckCash, CheckCancel
## 0.1.11
- Add ledger header decode function
## 0.1.8
## 0.1.7
## 0.1.6
## 0.1.3

View File

@@ -0,0 +1,13 @@
Copyright (c) 2015 Ripple Labs Inc.
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

View File

@@ -0,0 +1,107 @@
# ripple-binary-codec [![NPM](https://img.shields.io/npm/v/ripple-binary-codec.svg)](https://npmjs.org/package/ripple-binary-codec)
Functions to encode/decode to/from the ripple [binary serialization format](https://xrpl.org/serialization.html)
[![NPM](https://nodei.co/npm/ripple-binary-codec.png)](https://www.npmjs.org/package/ripple-binary-codec)
## API
```js
> const api = require('ripple-binary-codec')
```
### decode(binary: string): object
Decode a hex-string into a transaction object.
```js
> api.decode('1100612200000000240000000125000000072D0000000055DF530FB14C5304852F20080B0A8EEF3A6BDD044F41F4EBBD68B8B321145FE4FF6240000002540BE4008114D0F5430B66E06498D4CEEC816C7B3337F9982337')
{
LedgerEntryType: 'AccountRoot',
Flags: 0,
Sequence: 1,
PreviousTxnLgrSeq: 7,
OwnerCount: 0,
PreviousTxnID: 'DF530FB14C5304852F20080B0A8EEF3A6BDD044F41F4EBBD68B8B321145FE4FF',
Balance: '10000000000',
Account: 'rLs1MzkFWCxTbuAHgjeTZK4fcCDDnf2KRv'
}
```
### encode(json: object): string
Encode a transaction object into a hex-string. Note that encode filters out fields with undefined values.
```js
> api.encode({
LedgerEntryType: 'AccountRoot',
Flags: 0,
Sequence: 1,
PreviousTxnLgrSeq: 7,
OwnerCount: 0,
PreviousTxnID: 'DF530FB14C5304852F20080B0A8EEF3A6BDD044F41F4EBBD68B8B321145FE4FF',
Balance: '10000000000',
Account: 'rLs1MzkFWCxTbuAHgjeTZK4fcCDDnf2KRv'
})
'1100612200000000240000000125000000072D0000000055DF530FB14C5304852F20080B0A8EEF3A6BDD044F41F4EBBD68B8B321145FE4FF6240000002540BE4008114D0F5430B66E06498D4CEEC816C7B3337F9982337'
```
#### X-Address Compatibility
* ripple-binary-codec handles X-addresses by looking for a few specific files (Account/SourceTag, Destination/DestinationTag).
* If other fields (in the future) must to support X-addresses with tags, this library will need to be updated.
* When decoding rippled binary, the output will always output classic address + tag, with no X-addresses. X-address support only applies when encoding to binary.
#### Encoding Currency Codes
* The standard format for currency codes is a three-letter string such as `USD`. This is intended for use with ISO 4217 Currency Codes.
* Currency codes must be exactly 3 ASCII characters in length and there are [a few other rules](https://xrpl.org/currency-formats.html#currency-codes).
* ripple-binary-codec allows any 3-character ASCII string to be encoded as a currency code, although rippled may enforce tighter restrictions.
* When _decoding_, if a currency code is three uppercase letters or numbers (`/^[A-Z0-9]{3}$/`), then it will be decoded into that string. For example,`0000000000000000000000004142430000000000` decodes as `ABC`.
* When decoding, if a currency code is does not match the regex, then it is not considered to be an ISO 4217 or pseudo-ISO currency. ripple-binary-codec will return a 160-bit hex-string (40 hex characters). For example, `0000000000000000000000006142430000000000` (`aBC`) decodes as `0000000000000000000000006142430000000000` because it contains a lowercase letter.
### encodeForSigning(json: object): string
Encode the transaction object for signing.
### encodeForSigningClaim(json: object): string
Encode the transaction object for payment channel claim.
### encodeForMultisigning(json: object, signer: string): string
Encode the transaction object for multi-signing.
### encodeQuality(value: string): string
```js
> api.encodeQuality('195796912.5171664')
'5D06F4C3362FE1D0'
```
### decodeQuality(value: string): string
```js
> api.decodeQuality('5D06F4C3362FE1D0')
'195796912.5171664'
```
### decodeLedgerData(binary: string): object
```js
> api.decodeLedgerData("01E91435016340767BF1C4A3EACEB081770D8ADE216C85445DD6FB002C6B5A2930F2DECE006DA18150CB18F6DD33F6F0990754C962A7CCE62F332FF9C13939B03B864117F0BDA86B6E9B4F873B5C3E520634D343EF5D9D9A4246643D64DAD278BA95DC0EAC6EB5350CF970D521276CDE21276CE60A00")
{
ledger_index: 32052277,
total_coins: '99994494362043555',
parent_hash: 'EACEB081770D8ADE216C85445DD6FB002C6B5A2930F2DECE006DA18150CB18F6',
transaction_hash: 'DD33F6F0990754C962A7CCE62F332FF9C13939B03B864117F0BDA86B6E9B4F87',
account_hash: '3B5C3E520634D343EF5D9D9A4246643D64DAD278BA95DC0EAC6EB5350CF970D5',
parent_close_time: 556231902,
close_time: 556231910,
close_time_resolution: 10,
close_flags: 0
}
```
## Tests
Run unit tests with:
npm test
Use `--coverage` to generate and display code coverage information:
npm test --coverage
This tells jest to output code coverage info in the `./coverage` directory, in addition to showing it on the command line.

View File

@@ -0,0 +1,44 @@
{
"name": "ripple-binary-codec",
"version": "1.2.0",
"description": "XRP Ledger binary codec",
"files": [
"dist/*",
"bin/*",
"test/*"
],
"main": "dist/",
"directories": {
"test": "test"
},
"dependencies": {
"assert": "^2.0.0",
"big-integer": "^1.6.48",
"buffer": "5.6.0",
"create-hash": "^1.2.0",
"decimal.js": "^10.2.0",
"ripple-address-codec": "^4.2.0"
},
"scripts": {
"build": "tsc -b && cp ./src/enums/definitions.json ./dist/enums",
"clean": "rm -rf ./dist && rm -rf tsconfig.tsbuildinfo",
"prepare": "npm run build && npm test",
"test": "jest",
"lint": "eslint . --ext .ts --ext .test.js"
},
"repository": {
"type": "git",
"url": "git@github.com:XRPLF/xrpl.js.git"
},
"bugs": {
"url": "https://github.com/XRPLF/xrpl.js/issues"
},
"homepage": "https://github.com/XRPLF/xrpl.js/packages/ripple-binary-codec#readme",
"license": "ISC",
"readmeFilename": "README.md",
"prettier": "@xrplf/prettier-config",
"engines": {
"node": ">=10.22.0",
"npm": ">=7.0.0"
}
}

View File

@@ -0,0 +1,3 @@
# ripple-binary-codec
Serialize and deserialize transactions according to the XRP Ledger protocol.

View File

@@ -0,0 +1,154 @@
/* eslint-disable func-style */
import { coreTypes } from './types'
import { BinaryParser } from './serdes/binary-parser'
import { AccountID } from './types/account-id'
import { HashPrefix } from './hash-prefixes'
import { BinarySerializer, BytesList } from './serdes/binary-serializer'
import { sha512Half, transactionID } from './hashes'
import { FieldInstance } from './enums'
import { STObject } from './types/st-object'
import { JsonObject } from './types/serialized-type'
import { Buffer } from 'buffer/'
import * as bigInt from 'big-integer'
/**
* Construct a BinaryParser
*
* @param bytes hex-string to construct BinaryParser from
* @returns A BinaryParser
*/
const makeParser = (bytes: string): BinaryParser => new BinaryParser(bytes)
/**
* Parse BinaryParser into JSON
*
* @param parser BinaryParser object
* @returns JSON for the bytes in the BinaryParser
*/
const readJSON = (parser: BinaryParser): JsonObject =>
(parser.readType(coreTypes.STObject) as STObject).toJSON()
/**
* Parse a hex-string into its JSON interpretation
*
* @param bytes hex-string to parse into JSON
* @returns JSON
*/
const binaryToJSON = (bytes: string): JsonObject => readJSON(makeParser(bytes))
/**
* Interface for passing parameters to SerializeObject
*
* @field set signingFieldOnly to true if you want to serialize only signing fields
*/
interface OptionObject {
prefix?: Buffer
suffix?: Buffer
signingFieldsOnly?: boolean
}
/**
* Function to serialize JSON object representing a transaction
*
* @param object JSON object to serialize
* @param opts options for serializing, including optional prefix, suffix, and signingFieldOnly
* @returns A Buffer containing the serialized object
*/
function serializeObject(object: JsonObject, opts: OptionObject = {}): Buffer {
const { prefix, suffix, signingFieldsOnly = false } = opts
const bytesList = new BytesList()
if (prefix) {
bytesList.put(prefix)
}
const filter = signingFieldsOnly
? (f: FieldInstance): boolean => f.isSigningField
: undefined
coreTypes.STObject.from(object, filter).toBytesSink(bytesList)
if (suffix) {
bytesList.put(suffix)
}
return bytesList.toBytes()
}
/**
* Serialize an object for signing
*
* @param transaction Transaction to serialize
* @param prefix Prefix bytes to put before the serialized object
* @returns A Buffer with the serialized object
*/
function signingData(
transaction: JsonObject,
prefix: Buffer = HashPrefix.transactionSig,
): Buffer {
return serializeObject(transaction, { prefix, signingFieldsOnly: true })
}
/**
* Interface describing fields required for a Claim
*/
interface ClaimObject extends JsonObject {
channel: string
amount: string | number
}
/**
* Serialize a signingClaim
*
* @param claim A claim object to serialize
* @returns the serialized object with appropriate prefix
*/
function signingClaimData(claim: ClaimObject): Buffer {
const num = bigInt(String(claim.amount))
const prefix = HashPrefix.paymentChannelClaim
const channel = coreTypes.Hash256.from(claim.channel).toBytes()
const amount = coreTypes.UInt64.from(num).toBytes()
const bytesList = new BytesList()
bytesList.put(prefix)
bytesList.put(channel)
bytesList.put(amount)
return bytesList.toBytes()
}
/**
* Serialize a transaction object for multiSigning
*
* @param transaction transaction to serialize
* @param signingAccount Account to sign the transaction with
* @returns serialized transaction with appropriate prefix and suffix
*/
function multiSigningData(
transaction: JsonObject,
signingAccount: string | AccountID,
): Buffer {
const prefix = HashPrefix.transactionMultiSig
const suffix = coreTypes.AccountID.from(signingAccount).toBytes()
return serializeObject(transaction, {
prefix,
suffix,
signingFieldsOnly: true,
})
}
export {
BinaryParser,
BinarySerializer,
BytesList,
ClaimObject,
makeParser,
serializeObject,
readJSON,
multiSigningData,
signingData,
signingClaimData,
binaryToJSON,
sha512Half,
transactionID,
}

View File

@@ -0,0 +1,29 @@
import {
Field,
TransactionType,
LedgerEntryType,
Type,
TransactionResult,
} from './enums'
import * as types from './types'
import * as binary from './binary'
import { ShaMap } from './shamap'
import * as ledgerHashes from './ledger-hashes'
import * as hashes from './hashes'
import { quality } from './quality'
import { HashPrefix } from './hash-prefixes'
export {
hashes,
binary,
ledgerHashes,
Field,
TransactionType,
LedgerEntryType,
Type,
TransactionResult,
quality,
HashPrefix,
ShaMap,
types,
}

View File

@@ -0,0 +1,60 @@
# Definitions
## Types
These are the [types](https://xrpl.org/serialization.html#type-list) associated with a given Serialization Field. Each type has an arbitrary [type_code](https://xrpl.org/serialization.html#type-codes), with lower codes sorting first.
## Ledger Entry Types
Each ledger's state tree contain [ledger objects](https://xrpl.org/ledger-object-types.html), which represent all settings, balances, and relationships in the shared ledger.
## Fields
These are Serialization Fields (`sf`) [defined in rippled's SField.cpp](https://github.com/ripple/rippled/blob/develop/src/ripple/protocol/impl/SField.cpp). Fields with undefined values are omitted before encoding.
### Key
The key is the string defined in the rippled source code, such as "LedgerEntry", "Transaction", etc.
### nth
`nth` is the sort code, meaning "nth of type." It is is combined with the type code in order to construct the Field ID of this field. The Field ID is only used for sorting the fields. Since there are multiple fields with the same data type, the `nth` is used to deterministically order each field among other fields of the same data type.
Each field has a Field ID, which is used to sort fields that have the same type as one another with lower codes sorting first.
- [Field definitions](https://github.com/ripple/rippled/blob/72e6005f562a8f0818bc94803d222ac9345e1e40/src/ripple/protocol/impl/SField.cpp#L72-L266)
- [Constructing the `SField` field codes](https://github.com/ripple/rippled/blob/eaff9a0e6aec0ad077f118501791c7684debcfd5/src/ripple/protocol/SField.h#L95-L98)
For example, the `Account` field has sort code (nth) `1`, so it comes before the `Destination` field which has sort code `3`.
Sort code numbers are reused for fields of different types, but different fields of the same type never have the same sort code. When you combine the type code with the sort code, you get the field's unique _Field ID_.
The unique [Field ID](https://xrpl.org/serialization.html#field-ids) is prefixed before the field in the final serialized blob. The size of the Field ID is one to three bytes depending on the type code and the field codes it combines.
### isVLEncoded
If true, the field is Variable Length encoded and [length-prefixed](https://xrpl.org/serialization.html#length-prefixing). The variable-length encoded fields are `STI_VL`/`Blob`, `STI_ACCOUNT`/`AccountID`, and `STI_VECTOR256`/`Vector256`.
### isSerialized
Fields are serialized if they are not [one of these](https://github.com/ripple/rippled/blob/eaff9a0e6aec0ad077f118501791c7684debcfd5/src/ripple/protocol/impl/SField.cpp#L71-L78) or if they are not an SField.
- https://github.com/ripple/ripple-binary-codec/blob/14e76e68ead7e4bcd83c942dbdc9064d5a66869b/src/enums/definitions.json#L832
- https://github.com/ripple/rippled/search?utf8=%E2%9C%93&q=taker_gets_funded&type=
### isSigningField
True unless the field is [specified with `SField::notSigning`](https://github.com/ripple/rippled/blob/eaff9a0e6aec0ad077f118501791c7684debcfd5/src/ripple/protocol/impl/SField.cpp#L198).
## Transaction Results
See:
- https://github.com/ripple/rippled/blob/develop/src/ripple/protocol/TER.h
- https://xrpl.org/transaction-results.html
TODO: Write a script to read rippled's source file and generate the necessary mapping.
## Transaction Types
See https://github.com/ripple/rippled/blob/develop/src/ripple/protocol/TxFormats.h

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,156 @@
import * as enums from './definitions.json'
import { SerializedType } from '../types/serialized-type'
import { Buffer } from 'buffer/'
const TYPE_WIDTH = 2
const LEDGER_ENTRY_WIDTH = 2
const TRANSACTION_TYPE_WIDTH = 2
const TRANSACTION_RESULT_WIDTH = 1
/*
* @brief: Serialize a field based on type_code and Field.nth
*/
function fieldHeader(type: number, nth: number): Buffer {
const header: Array<number> = []
if (type < 16) {
if (nth < 16) {
header.push((type << 4) | nth)
} else {
header.push(type << 4, nth)
}
} else if (nth < 16) {
header.push(nth, type)
} else {
header.push(0, type, nth)
}
return Buffer.from(header)
}
/*
* @brief: Bytes, name, and ordinal representing one type, ledger_type, transaction type, or result
*/
class Bytes {
readonly bytes: Uint8Array
constructor(
readonly name: string,
readonly ordinal: number,
readonly ordinalWidth: number,
) {
this.bytes = Buffer.alloc(ordinalWidth)
for (let i = 0; i < ordinalWidth; i++) {
this.bytes[ordinalWidth - i - 1] = (ordinal >>> (i * 8)) & 0xff
}
}
toJSON(): string {
return this.name
}
toBytesSink(sink): void {
sink.put(this.bytes)
}
toBytes(): Uint8Array {
return this.bytes
}
}
/*
* @brief: Collection of Bytes objects, mapping bidirectionally
*/
class BytesLookup {
constructor(types: Record<string, number>, readonly ordinalWidth: number) {
Object.entries(types).forEach(([k, v]) => {
this[k] = new Bytes(k, v, ordinalWidth)
this[v.toString()] = this[k]
})
}
from(value: Bytes | string): Bytes {
return value instanceof Bytes ? value : (this[value] as Bytes)
}
fromParser(parser): Bytes {
return this.from(parser.readUIntN(this.ordinalWidth).toString())
}
}
/*
* type FieldInfo is the type of the objects containing information about each field in definitions.json
*/
interface FieldInfo {
nth: number
isVLEncoded: boolean
isSerialized: boolean
isSigningField: boolean
type: string
}
interface FieldInstance {
readonly nth: number
readonly isVariableLengthEncoded: boolean
readonly isSerialized: boolean
readonly isSigningField: boolean
readonly type: Bytes
readonly ordinal: number
readonly name: string
readonly header: Buffer
readonly associatedType: typeof SerializedType
}
function buildField([name, info]: [string, FieldInfo]): FieldInstance {
const typeOrdinal = enums.TYPES[info.type]
const field = fieldHeader(typeOrdinal, info.nth)
return {
name: name,
nth: info.nth,
isVariableLengthEncoded: info.isVLEncoded,
isSerialized: info.isSerialized,
isSigningField: info.isSigningField,
ordinal: (typeOrdinal << 16) | info.nth,
type: new Bytes(info.type, typeOrdinal, TYPE_WIDTH),
header: field,
associatedType: SerializedType, // For later assignment in ./types/index.js
}
}
/*
* @brief: The collection of all fields as defined in definitions.json
*/
class FieldLookup {
constructor(fields: Array<[string, FieldInfo]>) {
fields.forEach(([k, v]) => {
this[k] = buildField([k, v])
this[this[k].ordinal.toString()] = this[k]
})
}
fromString(value: string): FieldInstance {
return this[value] as FieldInstance
}
}
const Type = new BytesLookup(enums.TYPES, TYPE_WIDTH)
const LedgerEntryType = new BytesLookup(
enums.LEDGER_ENTRY_TYPES,
LEDGER_ENTRY_WIDTH,
)
const TransactionType = new BytesLookup(
enums.TRANSACTION_TYPES,
TRANSACTION_TYPE_WIDTH,
)
const TransactionResult = new BytesLookup(
enums.TRANSACTION_RESULTS,
TRANSACTION_RESULT_WIDTH,
)
const Field = new FieldLookup(enums.FIELDS as Array<[string, FieldInfo]>)
export {
Field,
FieldInstance,
Type,
LedgerEntryType,
TransactionResult,
TransactionType,
}

View File

@@ -0,0 +1,134 @@
/**
* Quick script to re-number values
*/
const input = {
temBAD_SEND_XRP_PATHS: -283,
temBAD_SEQUENCE: -282,
temBAD_SIGNATURE: -281,
temBAD_SRC_ACCOUNT: -280,
temBAD_TRANSFER_RATE: -279,
temDST_IS_SRC: -278,
temDST_NEEDED: -277,
temINVALID: -276,
temINVALID_FLAG: -275,
temREDUNDANT: -274,
temRIPPLE_EMPTY: -273,
temDISABLED: -272,
temBAD_SIGNER: -271,
temBAD_QUORUM: -270,
temBAD_WEIGHT: -269,
temBAD_TICK_SIZE: -268,
temINVALID_ACCOUNT_ID: -267,
temCANNOT_PREAUTH_SELF: -266,
temUNCERTAIN: -265,
temUNKNOWN: -264,
tefFAILURE: -199,
tefALREADY: -198,
tefBAD_ADD_AUTH: -197,
tefBAD_AUTH: -196,
tefBAD_LEDGER: -195,
tefCREATED: -194,
tefEXCEPTION: -193,
tefINTERNAL: -192,
tefNO_AUTH_REQUIRED: -191,
tefPAST_SEQ: -190,
tefWRONG_PRIOR: -189,
tefMASTER_DISABLED: -188,
tefMAX_LEDGER: -187,
tefBAD_SIGNATURE: -186,
tefBAD_QUORUM: -185,
tefNOT_MULTI_SIGNING: -184,
tefBAD_AUTH_MASTER: -183,
tefINVARIANT_FAILED: -182,
tefTOO_BIG: -181,
terRETRY: -99,
terFUNDS_SPENT: -98,
terINSUF_FEE_B: -97,
terNO_ACCOUNT: -96,
terNO_AUTH: -95,
terNO_LINE: -94,
terOWNERS: -93,
terPRE_SEQ: -92,
terLAST: -91,
terNO_RIPPLE: -90,
terQUEUED: -89,
tesSUCCESS: 0,
tecCLAIM: 100,
tecPATH_PARTIAL: 101,
tecUNFUNDED_ADD: 102,
tecUNFUNDED_OFFER: 103,
tecUNFUNDED_PAYMENT: 104,
tecFAILED_PROCESSING: 105,
tecDIR_FULL: 121,
tecINSUF_RESERVE_LINE: 122,
tecINSUF_RESERVE_OFFER: 123,
tecNO_DST: 124,
tecNO_DST_INSUF_XRP: 125,
tecNO_LINE_INSUF_RESERVE: 126,
tecNO_LINE_REDUNDANT: 127,
tecPATH_DRY: 128,
tecUNFUNDED: 129,
tecNO_ALTERNATIVE_KEY: 130,
tecNO_REGULAR_KEY: 131,
tecOWNERS: 132,
tecNO_ISSUER: 133,
tecNO_AUTH: 134,
tecNO_LINE: 135,
tecINSUFF_FEE: 136,
tecFROZEN: 137,
tecNO_TARGET: 138,
tecNO_PERMISSION: 139,
tecNO_ENTRY: 140,
tecINSUFFICIENT_RESERVE: 141,
tecNEED_MASTER_KEY: 142,
tecDST_TAG_NEEDED: 143,
tecINTERNAL: 144,
tecOVERSIZE: 145,
tecCRYPTOCONDITION_ERROR: 146,
tecINVARIANT_FAILED: 147,
tecEXPIRED: 148,
tecDUPLICATE: 149,
tecKILLED: 150,
tecHAS_OBLIGATIONS: 151,
tecTOO_SOON: 152,
}
let startingFromTemBADSENDXRPPATHS = -284
let startingFromTefFAILURE = -199
let startingFromTerRETRY = -99
const tesSUCCESS = 0
let startingFromTecCLAIM = 100
const startingFromTecDIRFULL = 121
let previousKey = 'tem'
Object.keys(input).forEach((key) => {
if (key.substring(0, 3) !== previousKey.substring(0, 3)) {
console.log()
previousKey = key
}
if (key.substring(0, 3) === 'tem') {
console.log(` "${key}": ${startingFromTemBADSENDXRPPATHS++},`)
} else if (key.substring(0, 3) === 'tef') {
console.log(` "${key}": ${startingFromTefFAILURE++},`)
} else if (key.substring(0, 3) === 'ter') {
console.log(` "${key}": ${startingFromTerRETRY++},`)
} else if (key.substring(0, 3) === 'tes') {
console.log(` "${key}": ${tesSUCCESS},`)
} else if (key.substring(0, 3) === 'tec') {
if (key === 'tecDIR_FULL') {
startingFromTecCLAIM = startingFromTecDIRFULL
}
console.log(` "${key}": ${startingFromTecCLAIM++},`)
}
})

View File

@@ -0,0 +1,40 @@
import { Buffer } from 'buffer/'
/**
* Write a 32 bit integer to a Buffer
*
* @param uint32 32 bit integer to write to buffer
* @returns a buffer with the bytes representation of uint32
*/
function bytes(uint32: number): Buffer {
const result = Buffer.alloc(4)
result.writeUInt32BE(uint32, 0)
return result
}
/**
* Maps HashPrefix names to their byte representation
*/
const HashPrefix: Record<string, Buffer> = {
transactionID: bytes(0x54584e00),
// transaction plus metadata
transaction: bytes(0x534e4400),
// account state
accountStateEntry: bytes(0x4d4c4e00),
// inner node in tree
innerNode: bytes(0x4d494e00),
// ledger master data for signing
ledgerHeader: bytes(0x4c575200),
// inner transaction to sign
transactionSig: bytes(0x53545800),
// inner transaction to sign
transactionMultiSig: bytes(0x534d5400),
// validation for signing
validation: bytes(0x56414c00),
// proposal for signing
proposal: bytes(0x50525000),
// payment channel claim
paymentChannelClaim: bytes(0x434c4d00),
}
export { HashPrefix }

View File

@@ -0,0 +1,77 @@
import { HashPrefix } from './hash-prefixes'
import * as createHash from 'create-hash'
import { Hash256 } from './types/hash-256'
import { BytesList } from './serdes/binary-serializer'
import { Buffer } from 'buffer/'
/**
* Class for hashing with SHA512
* @extends BytesList So SerializedTypes can write bytes to a Sha512Half
*/
class Sha512Half extends BytesList {
private hash: createHash = createHash('sha512')
/**
* Construct a new Sha512Hash and write bytes this.hash
*
* @param bytes bytes to write to this.hash
* @returns the new Sha512Hash object
*/
static put(bytes: Buffer): Sha512Half {
return new Sha512Half().put(bytes)
}
/**
* Write bytes to an existing Sha512Hash
*
* @param bytes bytes to write to object
* @returns the Sha512 object
*/
put(bytes: Buffer): Sha512Half {
this.hash.update(bytes)
return this
}
/**
* Compute SHA512 hash and slice in half
*
* @returns half of a SHA512 hash
*/
finish256(): Buffer {
const bytes: Buffer = this.hash.digest()
return bytes.slice(0, 32)
}
/**
* Constructs a Hash256 from the Sha512Half object
*
* @returns a Hash256 object
*/
finish(): Hash256 {
return new Hash256(this.finish256())
}
}
/**
* compute SHA512 hash of a list of bytes
*
* @param args zero or more arguments to hash
* @returns the sha512half hash of the arguments.
*/
function sha512Half(...args: Buffer[]): Buffer {
const hash = new Sha512Half()
args.forEach((a) => hash.put(a))
return hash.finish256()
}
/**
* Construct a transactionID from a Serialized Transaction
*
* @param serialized bytes to hash
* @returns a Hash256 object
*/
function transactionID(serialized: Buffer): Hash256 {
return new Hash256(sha512Half(HashPrefix.transactionID, serialized))
}
export { Sha512Half, sha512Half, transactionID }

View File

@@ -0,0 +1,112 @@
import * as assert from 'assert'
import { quality, binary } from './coretypes'
import { decodeLedgerData } from './ledger-hashes'
import { ClaimObject } from './binary'
import { JsonObject } from './types/serialized-type'
const {
signingData,
signingClaimData,
multiSigningData,
binaryToJSON,
serializeObject,
} = binary
/**
* Decode a transaction
*
* @param binary hex-string of the encoded transaction
* @returns the JSON representation of the transaction
*/
function decode(binary: string): JsonObject {
assert.ok(typeof binary === 'string', 'binary must be a hex string')
return binaryToJSON(binary)
}
/**
* Encode a transaction
*
* @param json The JSON representation of a transaction
* @returns A hex-string of the encoded transaction
*/
function encode(json: object): string {
assert.ok(typeof json === 'object')
return serializeObject(json as JsonObject)
.toString('hex')
.toUpperCase()
}
/**
* Encode a transaction and prepare for signing
*
* @param json JSON object representing the transaction
* @param signer string representing the account to sign the transaction with
* @returns a hex string of the encoded transaction
*/
function encodeForSigning(json: object): string {
assert.ok(typeof json === 'object')
return signingData(json as JsonObject)
.toString('hex')
.toUpperCase()
}
/**
* Encode a transaction and prepare for signing with a claim
*
* @param json JSON object representing the transaction
* @param signer string representing the account to sign the transaction with
* @returns a hex string of the encoded transaction
*/
function encodeForSigningClaim(json: object): string {
assert.ok(typeof json === 'object')
return signingClaimData(json as ClaimObject)
.toString('hex')
.toUpperCase()
}
/**
* Encode a transaction and prepare for multi-signing
*
* @param json JSON object representing the transaction
* @param signer string representing the account to sign the transaction with
* @returns a hex string of the encoded transaction
*/
function encodeForMultisigning(json: object, signer: string): string {
assert.ok(typeof json === 'object')
assert.equal(json['SigningPubKey'], '')
return multiSigningData(json as JsonObject, signer)
.toString('hex')
.toUpperCase()
}
/**
* Encode a quality value
*
* @param value string representation of a number
* @returns a hex-string representing the quality
*/
function encodeQuality(value: string): string {
assert.ok(typeof value === 'string')
return quality.encode(value).toString('hex').toUpperCase()
}
/**
* Decode a quality value
*
* @param value hex-string of a quality
* @returns a string representing the quality
*/
function decodeQuality(value: string): string {
assert.ok(typeof value === 'string')
return quality.decode(value).toString()
}
export = {
decode,
encode,
encodeForSigning,
encodeForSigningClaim,
encodeForMultisigning,
encodeQuality,
decodeQuality,
decodeLedgerData,
}

View File

@@ -0,0 +1,181 @@
import * as assert from 'assert'
import { ShaMap, ShaMapNode, ShaMapLeaf } from './shamap'
import { HashPrefix } from './hash-prefixes'
import { Sha512Half } from './hashes'
import { BinarySerializer, serializeObject } from './binary'
import { Hash256 } from './types/hash-256'
import { STObject } from './types/st-object'
import { UInt64 } from './types/uint-64'
import { UInt32 } from './types/uint-32'
import { UInt8 } from './types/uint-8'
import { BinaryParser } from './serdes/binary-parser'
import { JsonObject } from './types/serialized-type'
import * as bigInt from 'big-integer'
/**
* Computes the hash of a list of objects
*
* @param itemizer Converts an item into a format that can be added to SHAMap
* @param itemsJson Array of items to add to a SHAMap
* @returns the hash of the SHAMap
*/
function computeHash(
itemizer: (item: JsonObject) => [Hash256?, ShaMapNode?, ShaMapLeaf?],
itemsJson: Array<JsonObject>,
): Hash256 {
const map = new ShaMap()
itemsJson.forEach((item) => map.addItem(...itemizer(item)))
return map.hash()
}
/**
* Interface describing a transaction item
*/
interface transactionItemObject extends JsonObject {
hash: string
metaData: JsonObject
}
/**
* Convert a transaction into an index and an item
*
* @param json transaction with metadata
* @returns a tuple of index and item to be added to SHAMap
*/
function transactionItemizer(
json: transactionItemObject,
): [Hash256, ShaMapNode, undefined] {
assert.ok(json.hash)
const index = Hash256.from(json.hash)
const item = {
hashPrefix() {
return HashPrefix.transaction
},
toBytesSink(sink) {
const serializer = new BinarySerializer(sink)
serializer.writeLengthEncoded(STObject.from(json))
serializer.writeLengthEncoded(STObject.from(json.metaData))
},
} as ShaMapNode
return [index, item, undefined]
}
/**
* Interface describing an entry item
*/
interface entryItemObject extends JsonObject {
index: string
}
/**
* Convert an entry to a pair Hash256 and ShaMapNode
*
* @param json JSON describing a ledger entry item
* @returns a tuple of index and item to be added to SHAMap
*/
function entryItemizer(
json: entryItemObject,
): [Hash256, ShaMapNode, undefined] {
const index = Hash256.from(json.index)
const bytes = serializeObject(json)
const item = {
hashPrefix() {
return HashPrefix.accountStateEntry
},
toBytesSink(sink) {
sink.put(bytes)
},
} as ShaMapNode
return [index, item, undefined]
}
/**
* Function computing the hash of a transaction tree
*
* @param param An array of transaction objects to hash
* @returns A Hash256 object
*/
function transactionTreeHash(param: Array<JsonObject>): Hash256 {
const itemizer = transactionItemizer as (
json: JsonObject,
) => [Hash256, ShaMapNode, undefined]
return computeHash(itemizer, param)
}
/**
* Function computing the hash of accountState
*
* @param param A list of accountStates hash
* @returns A Hash256 object
*/
function accountStateHash(param: Array<JsonObject>): Hash256 {
const itemizer = entryItemizer as (
json: JsonObject,
) => [Hash256, ShaMapNode, undefined]
return computeHash(itemizer, param)
}
/**
* Interface describing a ledger header
*/
interface ledgerObject {
ledger_index: number
total_coins: string | number | bigInt.BigInteger
parent_hash: string
transaction_hash: string
account_hash: string
parent_close_time: number
close_time: number
close_time_resolution: number
close_flags: number
}
/**
* Serialize and hash a ledger header
*
* @param header a ledger header
* @returns the hash of header
*/
function ledgerHash(header: ledgerObject): Hash256 {
const hash = new Sha512Half()
hash.put(HashPrefix.ledgerHeader)
assert.ok(header.parent_close_time !== undefined)
assert.ok(header.close_flags !== undefined)
UInt32.from<number>(header.ledger_index).toBytesSink(hash)
UInt64.from<bigInt.BigInteger>(
bigInt(String(header.total_coins)),
).toBytesSink(hash)
Hash256.from<string>(header.parent_hash).toBytesSink(hash)
Hash256.from<string>(header.transaction_hash).toBytesSink(hash)
Hash256.from<string>(header.account_hash).toBytesSink(hash)
UInt32.from<number>(header.parent_close_time).toBytesSink(hash)
UInt32.from<number>(header.close_time).toBytesSink(hash)
UInt8.from<number>(header.close_time_resolution).toBytesSink(hash)
UInt8.from<number>(header.close_flags).toBytesSink(hash)
return hash.finish()
}
/**
* Decodes a serialized ledger header
*
* @param binary A serialized ledger header
* @returns A JSON object describing a ledger header
*/
function decodeLedgerData(binary: string): object {
assert.ok(typeof binary === 'string', 'binary must be a hex string')
const parser = new BinaryParser(binary)
return {
ledger_index: parser.readUInt32(),
total_coins: parser.readType(UInt64).valueOf().toString(),
parent_hash: parser.readType(Hash256).toHex(),
transaction_hash: parser.readType(Hash256).toHex(),
account_hash: parser.readType(Hash256).toHex(),
parent_close_time: parser.readUInt32(),
close_time: parser.readUInt32(),
close_time_resolution: parser.readUInt8(),
close_flags: parser.readUInt8(),
}
}
export { accountStateHash, transactionTreeHash, ledgerHash, decodeLedgerData }

View File

@@ -0,0 +1,39 @@
import { coreTypes } from './types'
import { Decimal } from 'decimal.js'
import * as bigInt from 'big-integer'
import { Buffer } from 'buffer/'
/**
* class for encoding and decoding quality
*/
class quality {
/**
* Encode quality amount
*
* @param arg string representation of an amount
* @returns Serialized quality
*/
static encode(quality: string): Buffer {
const decimal = new Decimal(quality)
const exponent = decimal.e - 15
const qualityString = decimal.times(`1e${-exponent}`).abs().toString()
const bytes = coreTypes.UInt64.from(bigInt(qualityString)).toBytes()
bytes[0] = exponent + 100
return bytes
}
/**
* Decode quality amount
*
* @param arg hex-string denoting serialized quality
* @returns deserialized quality
*/
static decode(quality: string): Decimal {
const bytes = Buffer.from(quality, 'hex').slice(-8)
const exponent = bytes[0] - 100
const mantissa = new Decimal(`0x${bytes.slice(1).toString('hex')}`)
return mantissa.times(`1e${exponent}`)
}
}
export { quality }

View File

@@ -0,0 +1,206 @@
import * as assert from 'assert'
import { Field, FieldInstance } from '../enums'
import { SerializedType } from '../types/serialized-type'
import { Buffer } from 'buffer/'
/**
* BinaryParser is used to compute fields and values from a HexString
*/
class BinaryParser {
private bytes: Buffer
/**
* Initialize bytes to a hex string
*
* @param hexBytes a hex string
*/
constructor(hexBytes: string) {
this.bytes = Buffer.from(hexBytes, 'hex')
}
/**
* Peek the first byte of the BinaryParser
*
* @returns The first byte of the BinaryParser
*/
peek(): number {
assert.ok(this.bytes.byteLength !== 0)
return this.bytes[0]
}
/**
* Consume the first n bytes of the BinaryParser
*
* @param n the number of bytes to skip
*/
skip(n: number): void {
assert.ok(n <= this.bytes.byteLength)
this.bytes = this.bytes.slice(n)
}
/**
* read the first n bytes from the BinaryParser
*
* @param n The number of bytes to read
* @return The bytes
*/
read(n: number): Buffer {
assert.ok(n <= this.bytes.byteLength)
const slice = this.bytes.slice(0, n)
this.skip(n)
return slice
}
/**
* Read an integer of given size
*
* @param n The number of bytes to read
* @return The number represented by those bytes
*/
readUIntN(n: number): number {
assert.ok(0 < n && n <= 4, 'invalid n')
return this.read(n).reduce((a, b) => (a << 8) | b) >>> 0
}
readUInt8(): number {
return this.readUIntN(1)
}
readUInt16(): number {
return this.readUIntN(2)
}
readUInt32(): number {
return this.readUIntN(4)
}
size(): number {
return this.bytes.byteLength
}
end(customEnd?: number): boolean {
const length = this.bytes.byteLength
return length === 0 || (customEnd !== undefined && length <= customEnd)
}
/**
* Reads variable length encoded bytes
*
* @return The variable length bytes
*/
readVariableLength(): Buffer {
return this.read(this.readVariableLengthLength())
}
/**
* Reads the length of the variable length encoded bytes
*
* @return The length of the variable length encoded bytes
*/
readVariableLengthLength(): number {
const b1 = this.readUInt8()
if (b1 <= 192) {
return b1
} else if (b1 <= 240) {
const b2 = this.readUInt8()
return 193 + (b1 - 193) * 256 + b2
} else if (b1 <= 254) {
const b2 = this.readUInt8()
const b3 = this.readUInt8()
return 12481 + (b1 - 241) * 65536 + b2 * 256 + b3
}
throw new Error('Invalid variable length indicator')
}
/**
* Reads the field ordinal from the BinaryParser
*
* @return Field ordinal
*/
readFieldOrdinal(): number {
let type = this.readUInt8()
let nth = type & 15
type >>= 4
if (type === 0) {
type = this.readUInt8()
if (type === 0 || type < 16) {
throw new Error('Cannot read FieldOrdinal, type_code out of range')
}
}
if (nth === 0) {
nth = this.readUInt8()
if (nth === 0 || nth < 16) {
throw new Error('Cannot read FieldOrdinal, field_code out of range')
}
}
return (type << 16) | nth
}
/**
* Read the field from the BinaryParser
*
* @return The field represented by the bytes at the head of the BinaryParser
*/
readField(): FieldInstance {
return Field.fromString(this.readFieldOrdinal().toString())
}
/**
* Read a given type from the BinaryParser
*
* @param type The type that you want to read from the BinaryParser
* @return The instance of that type read from the BinaryParser
*/
readType(type: typeof SerializedType): SerializedType {
return type.fromParser(this)
}
/**
* Get the type associated with a given field
*
* @param field The field that you wan to get the type of
* @return The type associated with the given field
*/
typeForField(field: FieldInstance): typeof SerializedType {
return field.associatedType
}
/**
* Read value of the type specified by field from the BinaryParser
*
* @param field The field that you want to get the associated value for
* @return The value associated with the given field
*/
readFieldValue(field: FieldInstance): SerializedType {
const type = this.typeForField(field)
if (!type) {
throw new Error(`unsupported: (${field.name}, ${field.type.name})`)
}
const sizeHint = field.isVariableLengthEncoded
? this.readVariableLengthLength()
: undefined
const value = type.fromParser(this, sizeHint)
if (value === undefined) {
throw new Error(
`fromParser for (${field.name}, ${field.type.name}) -> undefined `,
)
}
return value
}
/**
* Get the next field and value from the BinaryParser
*
* @return The field and value
*/
readFieldAndValue(): [FieldInstance, SerializedType] {
const field = this.readField()
return [field, this.readFieldValue(field)]
}
}
export { BinaryParser }

View File

@@ -0,0 +1,156 @@
import * as assert from 'assert'
import { FieldInstance } from '../enums'
import { SerializedType } from '../types/serialized-type'
import { Buffer } from 'buffer/'
/**
* Bytes list is a collection of buffer objects
*/
class BytesList {
private bytesArray: Array<Buffer> = []
/**
* Get the total number of bytes in the BytesList
*
* @return the number of bytes
*/
public getLength(): number {
return Buffer.concat(this.bytesArray).byteLength
}
/**
* Put bytes in the BytesList
*
* @param bytesArg A Buffer
* @return this BytesList
*/
public put(bytesArg: Buffer): BytesList {
const bytes = Buffer.from(bytesArg) // Temporary, to catch instances of Uint8Array being passed in
this.bytesArray.push(bytes)
return this
}
/**
* Write this BytesList to the back of another bytes list
*
* @param list The BytesList to write to
*/
public toBytesSink(list: BytesList): void {
list.put(this.toBytes())
}
public toBytes(): Buffer {
return Buffer.concat(this.bytesArray)
}
toHex(): string {
return this.toBytes().toString('hex').toUpperCase()
}
}
/**
* BinarySerializer is used to write fields and values to buffers
*/
class BinarySerializer {
private sink: BytesList = new BytesList()
constructor(sink: BytesList) {
this.sink = sink
}
/**
* Write a value to this BinarySerializer
*
* @param value a SerializedType value
*/
write(value: SerializedType): void {
value.toBytesSink(this.sink)
}
/**
* Write bytes to this BinarySerializer
*
* @param bytes the bytes to write
*/
put(bytes: Buffer): void {
this.sink.put(bytes)
}
/**
* Write a value of a given type to this BinarySerializer
*
* @param type the type to write
* @param value a value of that type
*/
writeType(type: typeof SerializedType, value: SerializedType): void {
this.write(type.from(value))
}
/**
* Write BytesList to this BinarySerializer
*
* @param bl BytesList to write to BinarySerializer
*/
writeBytesList(bl: BytesList): void {
bl.toBytesSink(this.sink)
}
/**
* Calculate the header of Variable Length encoded bytes
*
* @param length the length of the bytes
*/
private encodeVariableLength(length: number): Buffer {
const lenBytes = Buffer.alloc(3)
if (length <= 192) {
lenBytes[0] = length
return lenBytes.slice(0, 1)
} else if (length <= 12480) {
length -= 193
lenBytes[0] = 193 + (length >>> 8)
lenBytes[1] = length & 0xff
return lenBytes.slice(0, 2)
} else if (length <= 918744) {
length -= 12481
lenBytes[0] = 241 + (length >>> 16)
lenBytes[1] = (length >> 8) & 0xff
lenBytes[2] = length & 0xff
return lenBytes.slice(0, 3)
}
throw new Error('Overflow error')
}
/**
* Write field and value to BinarySerializer
*
* @param field field to write to BinarySerializer
* @param value value to write to BinarySerializer
*/
writeFieldAndValue(field: FieldInstance, value: SerializedType): void {
const associatedValue = field.associatedType.from(value)
assert.ok(associatedValue.toBytesSink !== undefined)
assert.ok(field.name !== undefined)
this.sink.put(field.header)
if (field.isVariableLengthEncoded) {
this.writeLengthEncoded(associatedValue)
} else {
associatedValue.toBytesSink(this.sink)
}
}
/**
* Write a variable length encoded value to the BinarySerializer
*
* @param value length encoded value to write to BytesList
*/
public writeLengthEncoded(value: SerializedType): void {
const bytes = new BytesList()
value.toBytesSink(bytes)
this.put(this.encodeVariableLength(bytes.getLength()))
this.writeBytesList(bytes)
}
}
export { BytesList, BinarySerializer }

View File

@@ -0,0 +1,182 @@
import { strict as assert } from 'assert'
import { coreTypes } from './types'
import { HashPrefix } from './hash-prefixes'
import { Sha512Half } from './hashes'
import { Hash256 } from './types/hash-256'
import { BytesList } from './serdes/binary-serializer'
import { Buffer } from 'buffer/'
/**
* Abstract class describing a SHAMapNode
*/
abstract class ShaMapNode {
abstract hashPrefix(): Buffer
abstract isLeaf(): boolean
abstract isInner(): boolean
abstract toBytesSink(list: BytesList): void
abstract hash(): Hash256
}
/**
* Class describing a Leaf of SHAMap
*/
class ShaMapLeaf extends ShaMapNode {
constructor(public index: Hash256, public item?: ShaMapNode) {
super()
}
/**
* @returns true as ShaMapLeaf is a leaf node
*/
isLeaf(): boolean {
return true
}
/**
* @returns false as ShaMapLeaf is not an inner node
*/
isInner(): boolean {
return false
}
/**
* Get the prefix of the this.item
*
* @returns The hash prefix, unless this.item is undefined, then it returns an empty Buffer
*/
hashPrefix(): Buffer {
return this.item === undefined ? Buffer.alloc(0) : this.item.hashPrefix()
}
/**
* Hash the bytes representation of this
*
* @returns hash of this.item concatenated with this.index
*/
hash(): Hash256 {
const hash = Sha512Half.put(this.hashPrefix())
this.toBytesSink(hash)
return hash.finish()
}
/**
* Write the bytes representation of this to a BytesList
* @param list BytesList to write bytes to
*/
toBytesSink(list: BytesList): void {
if (this.item !== undefined) {
this.item.toBytesSink(list)
}
this.index.toBytesSink(list)
}
}
/**
* Class defining an Inner Node of a SHAMap
*/
class ShaMapInner extends ShaMapNode {
private slotBits = 0
private branches: Array<ShaMapNode> = Array(16)
constructor(private depth: number = 0) {
super()
}
/**
* @returns true as ShaMapInner is an inner node
*/
isInner(): boolean {
return true
}
/**
* @returns false as ShaMapInner is not a leaf node
*/
isLeaf(): boolean {
return false
}
/**
* Get the hash prefix for this node
*
* @returns hash prefix describing an inner node
*/
hashPrefix(): Buffer {
return HashPrefix.innerNode
}
/**
* Set a branch of this node to be another node
*
* @param slot Slot to add branch to this.branches
* @param branch Branch to add
*/
setBranch(slot: number, branch: ShaMapNode): void {
this.slotBits = this.slotBits | (1 << slot)
this.branches[slot] = branch
}
/**
* @returns true if node is empty
*/
empty(): boolean {
return this.slotBits === 0
}
/**
* Compute the hash of this node
*
* @returns The hash of this node
*/
hash(): Hash256 {
if (this.empty()) {
return coreTypes.Hash256.ZERO_256
}
const hash = Sha512Half.put(this.hashPrefix())
this.toBytesSink(hash)
return hash.finish()
}
/**
* Writes the bytes representation of this node to a BytesList
*
* @param list BytesList to write bytes to
*/
toBytesSink(list: BytesList): void {
for (let i = 0; i < this.branches.length; i++) {
const branch = this.branches[i]
const hash = branch ? branch.hash() : coreTypes.Hash256.ZERO_256
hash.toBytesSink(list)
}
}
/**
* Add item to the SHAMap
*
* @param index Hash of the index of the item being inserted
* @param item Item to insert in the map
* @param leaf Leaf node to insert when branch doesn't exist
*/
addItem(index?: Hash256, item?: ShaMapNode, leaf?: ShaMapLeaf): void {
assert.ok(index !== undefined)
const nibble = index.nibblet(this.depth)
const existing = this.branches[nibble]
if (existing === undefined) {
this.setBranch(nibble, leaf || new ShaMapLeaf(index, item))
} else if (existing instanceof ShaMapLeaf) {
const newInner = new ShaMapInner(this.depth + 1)
newInner.addItem(existing.index, undefined, existing)
newInner.addItem(index, item, leaf)
this.setBranch(nibble, newInner)
} else if (existing instanceof ShaMapInner) {
existing.addItem(index, item, leaf)
} else {
throw new Error('invalid ShaMap.addItem call')
}
}
}
class ShaMap extends ShaMapInner {}
export { ShaMap, ShaMapNode, ShaMapLeaf }

View File

@@ -0,0 +1,86 @@
import {
decodeAccountID,
encodeAccountID,
isValidXAddress,
xAddressToClassicAddress,
} from 'ripple-address-codec'
import { Hash160 } from './hash-160'
import { Buffer } from 'buffer/'
const HEX_REGEX = /^[A-F0-9]{40}$/
/**
* Class defining how to encode and decode an AccountID
*/
class AccountID extends Hash160 {
static readonly defaultAccountID: AccountID = new AccountID(Buffer.alloc(20))
constructor(bytes?: Buffer) {
super(bytes ?? AccountID.defaultAccountID.bytes)
}
/**
* Defines how to construct an AccountID
*
* @param value either an existing AccountID, a hex-string, or a base58 r-Address
* @returns an AccountID object
*/
static from<T extends Hash160 | string>(value: T): AccountID {
if (value instanceof AccountID) {
return value
}
if (typeof value === 'string') {
if (value === '') {
return new AccountID()
}
return HEX_REGEX.test(value)
? new AccountID(Buffer.from(value, 'hex'))
: this.fromBase58(value)
}
throw new Error('Cannot construct AccountID from value given')
}
/**
* Defines how to build an AccountID from a base58 r-Address
*
* @param value a base58 r-Address
* @returns an AccountID object
*/
static fromBase58(value: string): AccountID {
if (isValidXAddress(value)) {
const classic = xAddressToClassicAddress(value)
if (classic.tag !== false)
throw new Error('Only allowed to have tag on Account or Destination')
value = classic.classicAddress
}
return new AccountID(Buffer.from(decodeAccountID(value)))
}
/**
* Overload of toJSON
*
* @returns the base58 string for this AccountID
*/
toJSON(): string {
return this.toBase58()
}
/**
* Defines how to encode AccountID into a base58 address
*
* @returns the base58 string defined by this.bytes
*/
toBase58(): string {
/* eslint-disable @typescript-eslint/no-explicit-any */
return encodeAccountID(this.bytes as any)
/* eslint-enable @typescript-eslint/no-explicit-any */
}
}
export { AccountID }

View File

@@ -0,0 +1,256 @@
import { Decimal } from 'decimal.js'
import { BinaryParser } from '../serdes/binary-parser'
import { AccountID } from './account-id'
import { Currency } from './currency'
import { JsonObject, SerializedType } from './serialized-type'
import * as bigInt from 'big-integer'
import { Buffer } from 'buffer/'
/**
* Constants for validating amounts
*/
const MIN_IOU_EXPONENT = -96
const MAX_IOU_EXPONENT = 80
const MAX_IOU_PRECISION = 16
const MAX_DROPS = new Decimal('1e17')
const MIN_XRP = new Decimal('1e-6')
const mask = bigInt(0x00000000ffffffff)
/**
* decimal.js configuration for Amount IOUs
*/
Decimal.config({
toExpPos: MAX_IOU_EXPONENT + MAX_IOU_PRECISION,
toExpNeg: MIN_IOU_EXPONENT - MAX_IOU_PRECISION,
})
/**
* Interface for JSON objects that represent amounts
*/
interface AmountObject extends JsonObject {
value: string
currency: string
issuer: string
}
/**
* Type guard for AmountObject
*/
function isAmountObject(arg): arg is AmountObject {
const keys = Object.keys(arg).sort()
return (
keys.length === 3 &&
keys[0] === 'currency' &&
keys[1] === 'issuer' &&
keys[2] === 'value'
)
}
/**
* Class for serializing/Deserializing Amounts
*/
class Amount extends SerializedType {
static defaultAmount: Amount = new Amount(
Buffer.from('4000000000000000', 'hex'),
)
constructor(bytes: Buffer) {
super(bytes ?? Amount.defaultAmount.bytes)
}
/**
* Construct an amount from an IOU or string amount
*
* @param value An Amount, object representing an IOU, or a string
* representing an integer amount
* @returns An Amount object
*/
static from<T extends Amount | AmountObject | string>(value: T): Amount {
if (value instanceof Amount) {
return value
}
let amount = Buffer.alloc(8)
if (typeof value === 'string') {
Amount.assertXrpIsValid(value)
const number = bigInt(value)
const intBuf = [Buffer.alloc(4), Buffer.alloc(4)]
intBuf[0].writeUInt32BE(Number(number.shiftRight(32)), 0)
intBuf[1].writeUInt32BE(Number(number.and(mask)), 0)
amount = Buffer.concat(intBuf)
amount[0] |= 0x40
return new Amount(amount)
}
if (isAmountObject(value)) {
const number = new Decimal(value.value)
Amount.assertIouIsValid(number)
if (number.isZero()) {
amount[0] |= 0x80
} else {
const integerNumberString = number
.times(`1e${-(number.e - 15)}`)
.abs()
.toString()
const num = bigInt(integerNumberString)
const intBuf = [Buffer.alloc(4), Buffer.alloc(4)]
intBuf[0].writeUInt32BE(Number(num.shiftRight(32)), 0)
intBuf[1].writeUInt32BE(Number(num.and(mask)), 0)
amount = Buffer.concat(intBuf)
amount[0] |= 0x80
if (number.gt(new Decimal(0))) {
amount[0] |= 0x40
}
const exponent = number.e - 15
const exponentByte = 97 + exponent
amount[0] |= exponentByte >>> 2
amount[1] |= (exponentByte & 0x03) << 6
}
const currency = Currency.from(value.currency).toBytes()
const issuer = AccountID.from(value.issuer).toBytes()
return new Amount(Buffer.concat([amount, currency, issuer]))
}
throw new Error('Invalid type to construct an Amount')
}
/**
* Read an amount from a BinaryParser
*
* @param parser BinaryParser to read the Amount from
* @returns An Amount object
*/
static fromParser(parser: BinaryParser): Amount {
const isXRP = parser.peek() & 0x80
const numBytes = isXRP ? 48 : 8
return new Amount(parser.read(numBytes))
}
/**
* Get the JSON representation of this Amount
*
* @returns the JSON interpretation of this.bytes
*/
toJSON(): AmountObject | string {
if (this.isNative()) {
const bytes = this.bytes
const isPositive = bytes[0] & 0x40
const sign = isPositive ? '' : '-'
bytes[0] &= 0x3f
const msb = bigInt(bytes.slice(0, 4).readUInt32BE(0))
const lsb = bigInt(bytes.slice(4).readUInt32BE(0))
const num = msb.shiftLeft(32).or(lsb)
return `${sign}${num.toString()}`
} else {
const parser = new BinaryParser(this.toString())
const mantissa = parser.read(8)
const currency = Currency.fromParser(parser) as Currency
const issuer = AccountID.fromParser(parser) as AccountID
const b1 = mantissa[0]
const b2 = mantissa[1]
const isPositive = b1 & 0x40
const sign = isPositive ? '' : '-'
const exponent = ((b1 & 0x3f) << 2) + ((b2 & 0xff) >> 6) - 97
mantissa[0] = 0
mantissa[1] &= 0x3f
const value = new Decimal(`${sign}0x${mantissa.toString('hex')}`).times(
`1e${exponent}`,
)
Amount.assertIouIsValid(value)
return {
value: value.toString(),
currency: currency.toJSON(),
issuer: issuer.toJSON(),
}
}
}
/**
* Validate XRP amount
*
* @param amount String representing XRP amount
* @returns void, but will throw if invalid amount
*/
private static assertXrpIsValid(amount: string): void {
if (amount.indexOf('.') !== -1) {
throw new Error(`${amount.toString()} is an illegal amount`)
}
const decimal = new Decimal(amount)
if (!decimal.isZero()) {
if (decimal.lt(MIN_XRP) || decimal.gt(MAX_DROPS)) {
throw new Error(`${amount.toString()} is an illegal amount`)
}
}
}
/**
* Validate IOU.value amount
*
* @param decimal Decimal.js object representing IOU.value
* @returns void, but will throw if invalid amount
*/
private static assertIouIsValid(decimal: Decimal): void {
if (!decimal.isZero()) {
const p = decimal.precision()
const e = decimal.e - 15
if (
p > MAX_IOU_PRECISION ||
e > MAX_IOU_EXPONENT ||
e < MIN_IOU_EXPONENT
) {
throw new Error('Decimal precision out of range')
}
this.verifyNoDecimal(decimal)
}
}
/**
* Ensure that the value after being multiplied by the exponent does not
* contain a decimal.
*
* @param decimal a Decimal object
* @returns a string of the object without a decimal
*/
private static verifyNoDecimal(decimal: Decimal): void {
const integerNumberString = decimal
.times(`1e${-(decimal.e - 15)}`)
.abs()
.toString()
if (integerNumberString.indexOf('.') !== -1) {
throw new Error('Decimal place found in integerNumberString')
}
}
/**
* Test if this amount is in units of Native Currency(XRP)
*
* @returns true if Native (XRP)
*/
private isNative(): boolean {
return (this.bytes[0] & 0x80) === 0
}
}
export { Amount, AmountObject }

View File

@@ -0,0 +1,43 @@
import { SerializedType } from './serialized-type'
import { BinaryParser } from '../serdes/binary-parser'
import { Buffer } from 'buffer/'
/**
* Variable length encoded type
*/
class Blob extends SerializedType {
constructor(bytes: Buffer) {
super(bytes)
}
/**
* Defines how to read a Blob from a BinaryParser
*
* @param parser The binary parser to read the Blob from
* @param hint The length of the blob, computed by readVariableLengthLength() and passed in
* @returns A Blob object
*/
static fromParser(parser: BinaryParser, hint: number): Blob {
return new Blob(parser.read(hint))
}
/**
* Create a Blob object from a hex-string
*
* @param value existing Blob object or a hex-string
* @returns A Blob object
*/
static from<T extends Blob | string>(value: T): Blob {
if (value instanceof Blob) {
return value
}
if (typeof value === 'string') {
return new Blob(Buffer.from(value, 'hex'))
}
throw new Error('Cannot construct Blob from value given')
}
}
export { Blob }

View File

@@ -0,0 +1,139 @@
import { Hash160 } from './hash-160'
import { Buffer } from 'buffer/'
const ISO_REGEX = /^[A-Z0-9]{3}$/
const HEX_REGEX = /^[A-F0-9]{40}$/
/**
* Convert an ISO code to a currency bytes representation
*/
function isoToBytes(iso: string): Buffer {
const bytes = Buffer.alloc(20)
if (iso !== 'XRP') {
const isoBytes = iso.split('').map((c) => c.charCodeAt(0))
bytes.set(isoBytes, 12)
}
return bytes
}
/**
* Tests if ISO is a valid iso code
*/
function isIsoCode(iso: string): boolean {
return ISO_REGEX.test(iso)
}
function isoCodeFromHex(code: Buffer): string | null {
const iso = code.toString()
if (iso === 'XRP') {
throw new Error(
'Disallowed currency code: to indicate the currency XRP you must use 20 bytes of 0s',
)
}
if (isIsoCode(iso)) {
return iso
}
return null
}
/**
* Tests if hex is a valid hex-string
*/
function isHex(hex: string): boolean {
return HEX_REGEX.test(hex)
}
/**
* Tests if a string is a valid representation of a currency
*/
function isStringRepresentation(input: string): boolean {
return input.length === 3 || isHex(input)
}
/**
* Tests if a Buffer is a valid representation of a currency
*/
function isBytesArray(bytes: Buffer): boolean {
return bytes.byteLength === 20
}
/**
* Ensures that a value is a valid representation of a currency
*/
function isValidRepresentation(input: Buffer | string): boolean {
return input instanceof Buffer
? isBytesArray(input)
: isStringRepresentation(input)
}
/**
* Generate bytes from a string or buffer representation of a currency
*/
function bytesFromRepresentation(input: string): Buffer {
if (!isValidRepresentation(input)) {
throw new Error(`Unsupported Currency representation: ${input}`)
}
return input.length === 3 ? isoToBytes(input) : Buffer.from(input, 'hex')
}
/**
* Class defining how to encode and decode Currencies
*/
class Currency extends Hash160 {
static readonly XRP = new Currency(Buffer.alloc(20))
private readonly _iso: string | null
constructor(byteBuf: Buffer) {
super(byteBuf ?? Currency.XRP.bytes)
const code = this.bytes.slice(12, 15)
if (this.bytes[0] !== 0) {
this._iso = null
} else if (code.toString('hex') === '000000') {
this._iso = 'XRP'
} else {
this._iso = isoCodeFromHex(code)
}
}
/**
* Return the ISO code of this currency
*
* @returns ISO code if it exists, else null
*/
iso(): string | null {
return this._iso
}
/**
* Constructs a Currency object
*
* @param val Currency object or a string representation of a currency
*/
static from<T extends Hash160 | string>(value: T): Currency {
if (value instanceof Currency) {
return value
}
if (typeof value === 'string') {
return new Currency(bytesFromRepresentation(value))
}
throw new Error('Cannot construct Currency from value given')
}
/**
* Gets the JSON representation of a currency
*
* @returns JSON representation
*/
toJSON(): string {
const iso = this.iso()
if (iso !== null) {
return iso
}
return this.bytes.toString('hex').toUpperCase()
}
}
export { Currency }

View File

@@ -0,0 +1,16 @@
import { Hash } from './hash'
import { Buffer } from 'buffer/'
/**
* Hash with a width of 128 bits
*/
class Hash128 extends Hash {
static readonly width = 16
static readonly ZERO_128: Hash128 = new Hash128(Buffer.alloc(Hash128.width))
constructor(bytes: Buffer) {
super(bytes ?? Hash128.ZERO_128.bytes)
}
}
export { Hash128 }

View File

@@ -0,0 +1,20 @@
import { Hash } from './hash'
import { Buffer } from 'buffer/'
/**
* Hash with a width of 160 bits
*/
class Hash160 extends Hash {
static readonly width = 20
static readonly ZERO_160: Hash160 = new Hash160(Buffer.alloc(Hash160.width))
constructor(bytes?: Buffer) {
if (bytes && bytes.byteLength === 0) {
bytes = Hash160.ZERO_160.bytes
}
super(bytes ?? Hash160.ZERO_160.bytes)
}
}
export { Hash160 }

View File

@@ -0,0 +1,16 @@
import { Hash } from './hash'
import { Buffer } from 'buffer/'
/**
* Hash with a width of 256 bits
*/
class Hash256 extends Hash {
static readonly width = 32
static readonly ZERO_256 = new Hash256(Buffer.alloc(Hash256.width))
constructor(bytes: Buffer) {
super(bytes ?? Hash256.ZERO_256.bytes)
}
}
export { Hash256 }

View File

@@ -0,0 +1,81 @@
import { Comparable } from './serialized-type'
import { BinaryParser } from '../serdes/binary-parser'
import { Buffer } from 'buffer/'
/**
* Base class defining how to encode and decode hashes
*/
class Hash extends Comparable {
static readonly width: number
constructor(bytes: Buffer) {
super(bytes)
if (this.bytes.byteLength !== (this.constructor as typeof Hash).width) {
throw new Error(`Invalid Hash length ${this.bytes.byteLength}`)
}
}
/**
* Construct a Hash object from an existing Hash object or a hex-string
*
* @param value A hash object or hex-string of a hash
*/
static from<T extends Hash | string>(value: T): Hash {
if (value instanceof this) {
return value
}
if (typeof value === 'string') {
return new this(Buffer.from(value, 'hex'))
}
throw new Error('Cannot construct Hash from given value')
}
/**
* Read a Hash object from a BinaryParser
*
* @param parser BinaryParser to read the hash from
* @param hint length of the bytes to read, optional
*/
static fromParser(parser: BinaryParser, hint?: number): Hash {
return new this(parser.read(hint ?? this.width))
}
/**
* Overloaded operator for comparing two hash objects
*
* @param other The Hash to compare this to
*/
compareTo(other: Hash): number {
return this.bytes.compare(
(this.constructor as typeof Hash).from(other).bytes,
)
}
/**
* @returns the hex-string representation of this Hash
*/
toString(): string {
return this.toHex()
}
/**
* Returns four bits at the specified depth within a hash
*
* @param depth The depth of the four bits
* @returns The number represented by the four bits
*/
nibblet(depth: number): number {
const byteIx = depth > 0 ? (depth / 2) | 0 : 0
let b = this.bytes[byteIx]
if (depth % 2 === 0) {
b = (b & 0xf0) >>> 4
} else {
b = b & 0x0f
}
return b
}
}
export { Hash }

View File

@@ -0,0 +1,49 @@
import {
Field,
TransactionResult,
TransactionType,
LedgerEntryType,
} from '../enums'
import { AccountID } from './account-id'
import { Amount } from './amount'
import { Blob } from './blob'
import { Currency } from './currency'
import { Hash128 } from './hash-128'
import { Hash160 } from './hash-160'
import { Hash256 } from './hash-256'
import { PathSet } from './path-set'
import { STArray } from './st-array'
import { STObject } from './st-object'
import { UInt16 } from './uint-16'
import { UInt32 } from './uint-32'
import { UInt64 } from './uint-64'
import { UInt8 } from './uint-8'
import { Vector256 } from './vector-256'
const coreTypes = {
AccountID,
Amount,
Blob,
Currency,
Hash128,
Hash160,
Hash256,
PathSet,
STArray,
STObject,
UInt8,
UInt16,
UInt32,
UInt64,
Vector256,
}
Object.values(Field).forEach((field) => {
field.associatedType = coreTypes[field.type.name]
})
Field['TransactionType'].associatedType = TransactionType
Field['TransactionResult'].associatedType = TransactionResult
Field['LedgerEntryType'].associatedType = LedgerEntryType
export { coreTypes }

View File

@@ -0,0 +1,290 @@
import { AccountID } from './account-id'
import { Currency } from './currency'
import { BinaryParser } from '../serdes/binary-parser'
import { SerializedType, JsonObject } from './serialized-type'
import { Buffer } from 'buffer/'
/**
* Constants for separating Paths in a PathSet
*/
const PATHSET_END_BYTE = 0x00
const PATH_SEPARATOR_BYTE = 0xff
/**
* Constant for masking types of a Hop
*/
const TYPE_ACCOUNT = 0x01
const TYPE_CURRENCY = 0x10
const TYPE_ISSUER = 0x20
/**
* The object representation of a Hop, an issuer AccountID, an account AccountID, and a Currency
*/
interface HopObject extends JsonObject {
issuer?: string
account?: string
currency?: string
}
/**
* TypeGuard for HopObject
*/
function isHopObject(arg): arg is HopObject {
return (
arg.issuer !== undefined ||
arg.account !== undefined ||
arg.currency !== undefined
)
}
/**
* TypeGuard for PathSet
*/
function isPathSet(arg): arg is Array<Array<HopObject>> {
return (
(Array.isArray(arg) && arg.length === 0) ||
(Array.isArray(arg) && Array.isArray(arg[0]) && arg[0].length === 0) ||
(Array.isArray(arg) && Array.isArray(arg[0]) && isHopObject(arg[0][0]))
)
}
/**
* Serialize and Deserialize a Hop
*/
class Hop extends SerializedType {
/**
* Create a Hop from a HopObject
*
* @param value Either a hop or HopObject to create a hop with
* @returns a Hop
*/
static from(value: Hop | HopObject): Hop {
if (value instanceof Hop) {
return value
}
const bytes: Array<Buffer> = [Buffer.from([0])]
if (value.account) {
bytes.push(AccountID.from(value.account).toBytes())
bytes[0][0] |= TYPE_ACCOUNT
}
if (value.currency) {
bytes.push(Currency.from(value.currency).toBytes())
bytes[0][0] |= TYPE_CURRENCY
}
if (value.issuer) {
bytes.push(AccountID.from(value.issuer).toBytes())
bytes[0][0] |= TYPE_ISSUER
}
return new Hop(Buffer.concat(bytes))
}
/**
* Construct a Hop from a BinaryParser
*
* @param parser BinaryParser to read the Hop from
* @returns a Hop
*/
static fromParser(parser: BinaryParser): Hop {
const type = parser.readUInt8()
const bytes: Array<Buffer> = [Buffer.from([type])]
if (type & TYPE_ACCOUNT) {
bytes.push(parser.read(AccountID.width))
}
if (type & TYPE_CURRENCY) {
bytes.push(parser.read(Currency.width))
}
if (type & TYPE_ISSUER) {
bytes.push(parser.read(AccountID.width))
}
return new Hop(Buffer.concat(bytes))
}
/**
* Get the JSON interpretation of this hop
*
* @returns a HopObject, an JS object with optional account, issuer, and currency
*/
toJSON(): HopObject {
const hopParser = new BinaryParser(this.bytes.toString('hex'))
const type = hopParser.readUInt8()
let account, currency, issuer
if (type & TYPE_ACCOUNT) {
account = (AccountID.fromParser(hopParser) as AccountID).toJSON()
}
if (type & TYPE_CURRENCY) {
currency = (Currency.fromParser(hopParser) as Currency).toJSON()
}
if (type & TYPE_ISSUER) {
issuer = (AccountID.fromParser(hopParser) as AccountID).toJSON()
}
const result: HopObject = {}
if (account) {
result.account = account
}
if (issuer) {
result.issuer = issuer
}
if (currency) {
result.currency = currency
}
return result
}
/**
* get a number representing the type of this hop
*
* @returns a number to be bitwise and-ed with TYPE_ constants to describe the types in the hop
*/
type(): number {
return this.bytes[0]
}
}
/**
* Class for serializing/deserializing Paths
*/
class Path extends SerializedType {
/**
* construct a Path from an array of Hops
*
* @param value Path or array of HopObjects to construct a Path
* @returns the Path
*/
static from(value: Path | Array<HopObject>): Path {
if (value instanceof Path) {
return value
}
const bytes: Array<Buffer> = []
value.forEach((hop: HopObject) => {
bytes.push(Hop.from(hop).toBytes())
})
return new Path(Buffer.concat(bytes))
}
/**
* Read a Path from a BinaryParser
*
* @param parser BinaryParser to read Path from
* @returns the Path represented by the bytes read from the BinaryParser
*/
static fromParser(parser: BinaryParser): Path {
const bytes: Array<Buffer> = []
while (!parser.end()) {
bytes.push(Hop.fromParser(parser).toBytes())
if (
parser.peek() === PATHSET_END_BYTE ||
parser.peek() === PATH_SEPARATOR_BYTE
) {
break
}
}
return new Path(Buffer.concat(bytes))
}
/**
* Get the JSON representation of this Path
*
* @returns an Array of HopObject constructed from this.bytes
*/
toJSON(): Array<HopObject> {
const json: Array<HopObject> = []
const pathParser = new BinaryParser(this.toString())
while (!pathParser.end()) {
json.push(Hop.fromParser(pathParser).toJSON())
}
return json
}
}
/**
* Deserialize and Serialize the PathSet type
*/
class PathSet extends SerializedType {
/**
* Construct a PathSet from an Array of Arrays representing paths
*
* @param value A PathSet or Array of Array of HopObjects
* @returns the PathSet constructed from value
*/
static from<T extends PathSet | Array<Array<HopObject>>>(value: T): PathSet {
if (value instanceof PathSet) {
return value
}
if (isPathSet(value)) {
const bytes: Array<Buffer> = []
value.forEach((path: Array<HopObject>) => {
bytes.push(Path.from(path).toBytes())
bytes.push(Buffer.from([PATH_SEPARATOR_BYTE]))
})
bytes[bytes.length - 1] = Buffer.from([PATHSET_END_BYTE])
return new PathSet(Buffer.concat(bytes))
}
throw new Error('Cannot construct PathSet from given value')
}
/**
* Construct a PathSet from a BinaryParser
*
* @param parser A BinaryParser to read PathSet from
* @returns the PathSet read from parser
*/
static fromParser(parser: BinaryParser): PathSet {
const bytes: Array<Buffer> = []
while (!parser.end()) {
bytes.push(Path.fromParser(parser).toBytes())
bytes.push(parser.read(1))
if (bytes[bytes.length - 1][0] == PATHSET_END_BYTE) {
break
}
}
return new PathSet(Buffer.concat(bytes))
}
/**
* Get the JSON representation of this PathSet
*
* @returns an Array of Array of HopObjects, representing this PathSet
*/
toJSON(): Array<Array<HopObject>> {
const json: Array<Array<HopObject>> = []
const pathParser = new BinaryParser(this.toString())
while (!pathParser.end()) {
json.push(Path.fromParser(pathParser).toJSON())
pathParser.skip(1)
}
return json
}
}
export { PathSet }

View File

@@ -0,0 +1,116 @@
import { BytesList } from '../serdes/binary-serializer'
import { BinaryParser } from '../serdes/binary-parser'
import * as bigInt from 'big-integer'
import { Buffer } from 'buffer/'
type JSON = string | number | boolean | null | undefined | JSON[] | JsonObject
type JsonObject = { [key: string]: JSON }
/**
* The base class for all binary-codec types
*/
class SerializedType {
protected readonly bytes: Buffer = Buffer.alloc(0)
constructor(bytes: Buffer) {
this.bytes = bytes ?? Buffer.alloc(0)
}
static fromParser(parser: BinaryParser, hint?: number): SerializedType {
throw new Error('fromParser not implemented')
return this.fromParser(parser, hint)
}
static from(
value: SerializedType | JSON | bigInt.BigInteger,
): SerializedType {
throw new Error('from not implemented')
return this.from(value)
}
/**
* Write the bytes representation of a SerializedType to a BytesList
*
* @param list The BytesList to write SerializedType bytes to
*/
toBytesSink(list: BytesList): void {
list.put(this.bytes)
}
/**
* Get the hex representation of a SerializedType's bytes
*
* @returns hex String of this.bytes
*/
toHex(): string {
return this.toBytes().toString('hex').toUpperCase()
}
/**
* Get the bytes representation of a SerializedType
*
* @returns A buffer of the bytes
*/
toBytes(): Buffer {
if (this.bytes) {
return this.bytes
}
const bytes = new BytesList()
this.toBytesSink(bytes)
return bytes.toBytes()
}
/**
* Return the JSON representation of a SerializedType
*
* @returns any type, if not overloaded returns hexString representation of bytes
*/
toJSON(): JSON {
return this.toHex()
}
/**
* @returns hexString representation of this.bytes
*/
toString(): string {
return this.toHex()
}
}
/**
* Base class for SerializedTypes that are comparable
*/
class Comparable extends SerializedType {
lt(other: Comparable): boolean {
return this.compareTo(other) < 0
}
eq(other: Comparable): boolean {
return this.compareTo(other) === 0
}
gt(other: Comparable): boolean {
return this.compareTo(other) > 0
}
gte(other: Comparable): boolean {
return this.compareTo(other) > -1
}
lte(other: Comparable): boolean {
return this.compareTo(other) < 1
}
/**
* Overload this method to define how two Comparable SerializedTypes are compared
*
* @param other The comparable object to compare this to
* @returns A number denoting the relationship of this and other
*/
compareTo(other: Comparable): number {
throw new Error(`cannot compare ${this.toString()} and ${other.toString()}`)
}
}
export { SerializedType, Comparable, JSON, JsonObject }

View File

@@ -0,0 +1,99 @@
import { SerializedType, JsonObject } from './serialized-type'
import { STObject } from './st-object'
import { BinaryParser } from '../serdes/binary-parser'
import { Buffer } from 'buffer/'
const ARRAY_END_MARKER = Buffer.from([0xf1])
const ARRAY_END_MARKER_NAME = 'ArrayEndMarker'
const OBJECT_END_MARKER = Buffer.from([0xe1])
/**
* TypeGuard for Array<JsonObject>
*/
function isObjects(args): args is Array<JsonObject> {
return (
Array.isArray(args) && (args.length === 0 || typeof args[0] === 'object')
)
}
/**
* Class for serializing and deserializing Arrays of Objects
*/
class STArray extends SerializedType {
/**
* Construct an STArray from a BinaryParser
*
* @param parser BinaryParser to parse an STArray from
* @returns An STArray Object
*/
static fromParser(parser: BinaryParser): STArray {
const bytes: Array<Buffer> = []
while (!parser.end()) {
const field = parser.readField()
if (field.name === ARRAY_END_MARKER_NAME) {
break
}
bytes.push(
field.header,
parser.readFieldValue(field).toBytes(),
OBJECT_END_MARKER,
)
}
bytes.push(ARRAY_END_MARKER)
return new STArray(Buffer.concat(bytes))
}
/**
* Construct an STArray from an Array of JSON Objects
*
* @param value STArray or Array of Objects to parse into an STArray
* @returns An STArray object
*/
static from<T extends STArray | Array<JsonObject>>(value: T): STArray {
if (value instanceof STArray) {
return value
}
if (isObjects(value)) {
const bytes: Array<Buffer> = []
value.forEach((obj) => {
bytes.push(STObject.from(obj).toBytes())
})
bytes.push(ARRAY_END_MARKER)
return new STArray(Buffer.concat(bytes))
}
throw new Error('Cannot construct STArray from value given')
}
/**
* Return the JSON representation of this.bytes
*
* @returns An Array of JSON objects
*/
toJSON(): Array<JsonObject> {
const result: Array<JsonObject> = []
const arrayParser = new BinaryParser(this.toString())
while (!arrayParser.end()) {
const field = arrayParser.readField()
if (field.name === ARRAY_END_MARKER_NAME) {
break
}
const outer = {}
outer[field.name] = STObject.fromParser(arrayParser).toJSON()
result.push(outer)
}
return result
}
}
export { STArray }

View File

@@ -0,0 +1,159 @@
import { Field, FieldInstance } from '../enums'
import { SerializedType, JsonObject } from './serialized-type'
import { xAddressToClassicAddress, isValidXAddress } from 'ripple-address-codec'
import { BinaryParser } from '../serdes/binary-parser'
import { BinarySerializer, BytesList } from '../serdes/binary-serializer'
import { Buffer } from 'buffer/'
const OBJECT_END_MARKER_BYTE = Buffer.from([0xe1])
const OBJECT_END_MARKER = 'ObjectEndMarker'
const ST_OBJECT = 'STObject'
const DESTINATION = 'Destination'
const ACCOUNT = 'Account'
const SOURCE_TAG = 'SourceTag'
const DEST_TAG = 'DestinationTag'
/**
* Break down an X-Address into an account and a tag
*
* @param field Name of field
* @param xAddress X-Address corresponding to the field
*/
function handleXAddress(field: string, xAddress: string): JsonObject {
const decoded = xAddressToClassicAddress(xAddress)
let tagName
if (field === DESTINATION) tagName = DEST_TAG
else if (field === ACCOUNT) tagName = SOURCE_TAG
else if (decoded.tag !== false)
throw new Error(`${field} cannot have an associated tag`)
return decoded.tag !== false
? { [field]: decoded.classicAddress, [tagName]: decoded.tag }
: { [field]: decoded.classicAddress }
}
/**
* Validate that two objects don't both have the same tag fields
*
* @param obj1 First object to check for tags
* @param obj2 Second object to check for tags
* @throws When both objects have SourceTag or DestinationTag
*/
function checkForDuplicateTags(obj1: JsonObject, obj2: JsonObject): void {
if (!(obj1[SOURCE_TAG] === undefined || obj2[SOURCE_TAG] === undefined))
throw new Error('Cannot have Account X-Address and SourceTag')
if (!(obj1[DEST_TAG] === undefined || obj2[DEST_TAG] === undefined))
throw new Error('Cannot have Destination X-Address and DestinationTag')
}
/**
* Class for Serializing/Deserializing objects
*/
class STObject extends SerializedType {
/**
* Construct a STObject from a BinaryParser
*
* @param parser BinaryParser to read STObject from
* @returns A STObject object
*/
static fromParser(parser: BinaryParser): STObject {
const list: BytesList = new BytesList()
const bytes: BinarySerializer = new BinarySerializer(list)
while (!parser.end()) {
const field = parser.readField()
if (field.name === OBJECT_END_MARKER) {
break
}
const associatedValue = parser.readFieldValue(field)
bytes.writeFieldAndValue(field, associatedValue)
if (field.type.name === ST_OBJECT) {
bytes.put(OBJECT_END_MARKER_BYTE)
}
}
return new STObject(list.toBytes())
}
/**
* Construct a STObject from a JSON object
*
* @param value An object to include
* @param filter optional, denote which field to include in serialized object
* @returns a STObject object
*/
static from<T extends STObject | JsonObject>(
value: T,
filter?: (...any) => boolean,
): STObject {
if (value instanceof STObject) {
return value
}
const list: BytesList = new BytesList()
const bytes: BinarySerializer = new BinarySerializer(list)
const xAddressDecoded = Object.entries(value).reduce((acc, [key, val]) => {
let handled: JsonObject | undefined = undefined
if (val && isValidXAddress(val.toString())) {
handled = handleXAddress(key, val.toString())
checkForDuplicateTags(handled, value)
}
return Object.assign(acc, handled ?? { [key]: val })
}, {})
let sorted = Object.keys(xAddressDecoded)
.map((f: string): FieldInstance => Field[f] as FieldInstance)
.filter(
(f: FieldInstance): boolean =>
f !== undefined &&
xAddressDecoded[f.name] !== undefined &&
f.isSerialized,
)
.sort((a, b) => {
return a.ordinal - b.ordinal
})
if (filter !== undefined) {
sorted = sorted.filter(filter)
}
sorted.forEach((field) => {
const associatedValue = field.associatedType.from(
xAddressDecoded[field.name],
)
bytes.writeFieldAndValue(field, associatedValue)
if (field.type.name === ST_OBJECT) {
bytes.put(OBJECT_END_MARKER_BYTE)
}
})
return new STObject(list.toBytes())
}
/**
* Get the JSON interpretation of this.bytes
*
* @returns a JSON object
*/
toJSON(): JsonObject {
const objectParser = new BinaryParser(this.toString())
const accumulator = {}
while (!objectParser.end()) {
const field = objectParser.readField()
if (field.name === OBJECT_END_MARKER) {
break
}
accumulator[field.name] = objectParser.readFieldValue(field).toJSON()
}
return accumulator
}
}
export { STObject }

View File

@@ -0,0 +1,49 @@
import { UInt } from './uint'
import { BinaryParser } from '../serdes/binary-parser'
import { Buffer } from 'buffer/'
/**
* Derived UInt class for serializing/deserializing 16 bit UInt
*/
class UInt16 extends UInt {
protected static readonly width: number = 16 / 8 // 2
static readonly defaultUInt16: UInt16 = new UInt16(Buffer.alloc(UInt16.width))
constructor(bytes: Buffer) {
super(bytes ?? UInt16.defaultUInt16.bytes)
}
static fromParser(parser: BinaryParser): UInt {
return new UInt16(parser.read(UInt16.width))
}
/**
* Construct a UInt16 object from a number
*
* @param val UInt16 object or number
*/
static from<T extends UInt16 | number>(val: T): UInt16 {
if (val instanceof UInt16) {
return val
}
if (typeof val === 'number') {
const buf = Buffer.alloc(UInt16.width)
buf.writeUInt16BE(val, 0)
return new UInt16(buf)
}
throw new Error('Can not construct UInt16 with given value')
}
/**
* get the value of a UInt16 object
*
* @returns the number represented by this.bytes
*/
valueOf(): number {
return this.bytes.readUInt16BE(0)
}
}
export { UInt16 }

View File

@@ -0,0 +1,56 @@
import { UInt } from './uint'
import { BinaryParser } from '../serdes/binary-parser'
import { Buffer } from 'buffer/'
/**
* Derived UInt class for serializing/deserializing 32 bit UInt
*/
class UInt32 extends UInt {
protected static readonly width: number = 32 / 8 // 4
static readonly defaultUInt32: UInt32 = new UInt32(Buffer.alloc(UInt32.width))
constructor(bytes: Buffer) {
super(bytes ?? UInt32.defaultUInt32.bytes)
}
static fromParser(parser: BinaryParser): UInt {
return new UInt32(parser.read(UInt32.width))
}
/**
* Construct a UInt32 object from a number
*
* @param val UInt32 object or number
*/
static from<T extends UInt32 | number | string>(val: T): UInt32 {
if (val instanceof UInt32) {
return val
}
const buf = Buffer.alloc(UInt32.width)
if (typeof val === 'string') {
const num = Number.parseInt(val)
buf.writeUInt32BE(num, 0)
return new UInt32(buf)
}
if (typeof val === 'number') {
buf.writeUInt32BE(val, 0)
return new UInt32(buf)
}
throw new Error('Cannot construct UInt32 from given value')
}
/**
* get the value of a UInt32 object
*
* @returns the number represented by this.bytes
*/
valueOf(): number {
return this.bytes.readUInt32BE(0)
}
}
export { UInt32 }

View File

@@ -0,0 +1,105 @@
import { UInt } from './uint'
import { BinaryParser } from '../serdes/binary-parser'
import * as bigInt from 'big-integer'
import { isInstance } from 'big-integer'
import { Buffer } from 'buffer/'
const HEX_REGEX = /^[a-fA-F0-9]{1,16}$/
const mask = bigInt(0x00000000ffffffff)
/**
* Derived UInt class for serializing/deserializing 64 bit UInt
*/
class UInt64 extends UInt {
protected static readonly width: number = 64 / 8 // 8
static readonly defaultUInt64: UInt64 = new UInt64(Buffer.alloc(UInt64.width))
constructor(bytes: Buffer) {
super(bytes ?? UInt64.defaultUInt64.bytes)
}
static fromParser(parser: BinaryParser): UInt {
return new UInt64(parser.read(UInt64.width))
}
/**
* Construct a UInt64 object
*
* @param val A UInt64, hex-string, bigInt, or number
* @returns A UInt64 object
*/
static from<T extends UInt64 | string | bigInt.BigInteger | number>(
val: T,
): UInt64 {
if (val instanceof UInt64) {
return val
}
let buf = Buffer.alloc(UInt64.width)
if (typeof val === 'number') {
if (val < 0) {
throw new Error('value must be an unsigned integer')
}
const number = bigInt(val)
const intBuf = [Buffer.alloc(4), Buffer.alloc(4)]
intBuf[0].writeUInt32BE(Number(number.shiftRight(32)), 0)
intBuf[1].writeUInt32BE(Number(number.and(mask)), 0)
return new UInt64(Buffer.concat(intBuf))
}
if (typeof val === 'string') {
if (!HEX_REGEX.test(val)) {
throw new Error(`${val} is not a valid hex-string`)
}
const strBuf = val.padStart(16, '0')
buf = Buffer.from(strBuf, 'hex')
return new UInt64(buf)
}
if (isInstance(val)) {
const intBuf = [Buffer.alloc(4), Buffer.alloc(4)]
intBuf[0].writeUInt32BE(Number(val.shiftRight(bigInt(32))), 0)
intBuf[1].writeUInt32BE(Number(val.and(mask)), 0)
return new UInt64(Buffer.concat(intBuf))
}
throw new Error('Cannot construct UInt64 from given value')
}
/**
* The JSON representation of a UInt64 object
*
* @returns a hex-string
*/
toJSON(): string {
return this.bytes.toString('hex').toUpperCase()
}
/**
* Get the value of the UInt64
*
* @returns the number represented buy this.bytes
*/
valueOf(): bigInt.BigInteger {
const msb = bigInt(this.bytes.slice(0, 4).readUInt32BE(0))
const lsb = bigInt(this.bytes.slice(4).readUInt32BE(0))
return msb.shiftLeft(bigInt(32)).or(lsb)
}
/**
* Get the bytes representation of the UInt64 object
*
* @returns 8 bytes representing the UInt64
*/
toBytes(): Buffer {
return this.bytes
}
}
export { UInt64 }

View File

@@ -0,0 +1,49 @@
import { UInt } from './uint'
import { BinaryParser } from '../serdes/binary-parser'
import { Buffer } from 'buffer/'
/**
* Derived UInt class for serializing/deserializing 8 bit UInt
*/
class UInt8 extends UInt {
protected static readonly width: number = 8 / 8 // 1
static readonly defaultUInt8: UInt8 = new UInt8(Buffer.alloc(UInt8.width))
constructor(bytes: Buffer) {
super(bytes ?? UInt8.defaultUInt8.bytes)
}
static fromParser(parser: BinaryParser): UInt {
return new UInt8(parser.read(UInt8.width))
}
/**
* Construct a UInt8 object from a number
*
* @param val UInt8 object or number
*/
static from<T extends UInt8 | number>(val: T): UInt8 {
if (val instanceof UInt8) {
return val
}
if (typeof val === 'number') {
const buf = Buffer.alloc(UInt8.width)
buf.writeUInt8(val, 0)
return new UInt8(buf)
}
throw new Error('Cannot construct UInt8 from given value')
}
/**
* get the value of a UInt8 object
*
* @returns the number represented by this.bytes
*/
valueOf(): number {
return this.bytes.readUInt8(0)
}
}
export { UInt8 }

View File

@@ -0,0 +1,57 @@
import * as bigInt from 'big-integer'
import { Comparable } from './serialized-type'
import { Buffer } from 'buffer/'
/**
* Compare numbers and bigInts n1 and n2
*
* @param n1 First object to compare
* @param n2 Second object to compare
* @returns -1, 0, or 1, depending on how the two objects compare
*/
function compare(
n1: number | bigInt.BigInteger,
n2: number | bigInt.BigInteger,
): number {
return n1 < n2 ? -1 : n1 == n2 ? 0 : 1
}
/**
* Base class for serializing and deserializing unsigned integers.
*/
abstract class UInt extends Comparable {
protected static width: number
constructor(bytes: Buffer) {
super(bytes)
}
/**
* Overload of compareTo for Comparable
*
* @param other other UInt to compare this to
* @returns -1, 0, or 1 depending on how the objects relate to each other
*/
compareTo(other: UInt): number {
return compare(this.valueOf(), other.valueOf())
}
/**
* Convert a UInt object to JSON
*
* @returns number or string represented by this.bytes
*/
toJSON(): number | string {
const val = this.valueOf()
return typeof val === 'number' ? val : val.toString()
}
/**
* Get the value of the UInt represented by this.bytes
*
* @returns the value
*/
abstract valueOf(): number | bigInt.BigInteger
}
export { UInt }

View File

@@ -0,0 +1,84 @@
import { SerializedType } from './serialized-type'
import { BinaryParser } from '../serdes/binary-parser'
import { Hash256 } from './hash-256'
import { BytesList } from '../serdes/binary-serializer'
import { Buffer } from 'buffer/'
/**
* TypeGuard for Array<string>
*/
function isStrings(arg): arg is Array<string> {
return Array.isArray(arg) && (arg.length === 0 || typeof arg[0] === 'string')
}
/**
* Class for serializing and deserializing vectors of Hash256
*/
class Vector256 extends SerializedType {
constructor(bytes: Buffer) {
super(bytes)
}
/**
* Construct a Vector256 from a BinaryParser
*
* @param parser BinaryParser to
* @param hint length of the vector, in bytes, optional
* @returns a Vector256 object
*/
static fromParser(parser: BinaryParser, hint?: number): Vector256 {
const bytesList = new BytesList()
const bytes = hint ?? parser.size()
const hashes = bytes / 32
for (let i = 0; i < hashes; i++) {
Hash256.fromParser(parser).toBytesSink(bytesList)
}
return new Vector256(bytesList.toBytes())
}
/**
* Construct a Vector256 object from an array of hashes
*
* @param value A Vector256 object or array of hex-strings representing Hash256's
* @returns a Vector256 object
*/
static from<T extends Vector256 | Array<string>>(value: T): Vector256 {
if (value instanceof Vector256) {
return value
}
if (isStrings(value)) {
const bytesList = new BytesList()
value.forEach((hash) => {
Hash256.from(hash).toBytesSink(bytesList)
})
return new Vector256(bytesList.toBytes())
}
throw new Error('Cannot construct Vector256 from given value')
}
/**
* Return an Array of hex-strings represented by this.bytes
*
* @returns An Array of strings representing the Hash256 objects
*/
toJSON(): Array<string> {
if (this.bytes.byteLength % 32 !== 0) {
throw new Error('Invalid bytes for Vector256')
}
const result: Array<string> = []
for (let i = 0; i < this.bytes.byteLength; i += 32) {
result.push(
this.bytes
.slice(i, i + 32)
.toString('hex')
.toUpperCase(),
)
}
return result
}
}
export { Vector256 }

View File

@@ -0,0 +1,43 @@
const { loadFixture } = require('./utils')
const { coreTypes } = require('../dist/types')
const { Amount } = coreTypes
const fixtures = loadFixture('data-driven-tests.json')
function amountErrorTests() {
fixtures.values_tests
.filter((obj) => obj.type === 'Amount')
.forEach((f) => {
// We only want these with errors
if (!f.error) {
return
}
const testName =
`${JSON.stringify(f.test_json)}\n\tis invalid ` + `because: ${f.error}`
it(testName, () => {
expect(() => {
Amount.from(f.test_json)
JSON.stringify(f.test_json)
}).toThrow()
})
})
}
describe('Amount', function () {
it('can be parsed from', function () {
expect(Amount.from('1000000') instanceof Amount).toBe(true)
expect(Amount.from('1000000').toJSON()).toEqual('1000000')
const fixture = {
value: '1',
issuer: '0000000000000000000000000000000000000000',
currency: 'USD',
}
const amt = Amount.from(fixture)
const rewritten = {
value: '1',
issuer: 'rrrrrrrrrrrrrrrrrrrrrhoLvTp',
currency: 'USD',
}
expect(amt.toJSON()).toEqual(rewritten)
})
amountErrorTests()
})

View File

@@ -0,0 +1,45 @@
const fixtures = require('./fixtures/codec-fixtures.json')
const { decode, encode, decodeLedgerData } = require('../dist')
function json(object) {
return JSON.stringify(object)
}
function truncateForDisplay(longStr) {
return `${longStr.slice(0, 10)} ... ${longStr.slice(-10)}`
}
describe('ripple-binary-codec', function () {
function makeSuite(name, entries) {
describe(name, function () {
entries.forEach((t, testN) => {
test(`${name}[${testN}] can encode ${truncateForDisplay(
json(t.json),
)} to ${truncateForDisplay(t.binary)}`, () => {
expect(encode(t.json)).toEqual(t.binary)
})
test(`${name}[${testN}] can decode ${truncateForDisplay(
t.binary,
)} to ${truncateForDisplay(json(t.json))}`, () => {
const decoded = decode(t.binary)
expect(decoded).toEqual(t.json)
})
})
})
}
makeSuite('transactions', fixtures.transactions)
makeSuite('accountState', fixtures.accountState)
describe('ledgerData', function () {
if (fixtures.ledgerData) {
fixtures.ledgerData.forEach((t, testN) => {
test(`ledgerData[${testN}] can decode ${t.binary} to ${json(
t.json,
)}`, () => {
const decoded = decodeLedgerData(t.binary)
expect(t.json).toEqual(decoded)
})
})
}
})
})

View File

@@ -0,0 +1,396 @@
const { coreTypes } = require('../dist/types')
const Decimal = require('decimal.js')
const { encodeAccountID } = require('ripple-address-codec')
const { binary } = require('../dist/coretypes')
const { Amount, Hash160 } = coreTypes
const { makeParser, readJSON } = binary
const { Field, TransactionType } = require('./../dist/enums')
const { parseHexOnly, hexOnly, loadFixture } = require('./utils')
const fixtures = loadFixture('data-driven-tests.json')
const { BytesList } = require('../dist/serdes/binary-serializer')
const { Buffer } = require('buffer/')
const __ = hexOnly
function toJSON(v) {
return v.toJSON ? v.toJSON() : v
}
function assertEqualAmountJSON(actual, expected) {
expect(typeof actual === typeof expected).toBe(true)
if (typeof actual === 'string') {
expect(actual).toEqual(expected)
return
}
expect(actual.currency).toEqual(expected.currency)
expect(actual.issuer).toEqual(expected.issuer)
expect(
actual.value === expected.value ||
new Decimal(actual.value).equals(new Decimal(expected.value)),
).toBe(true)
}
function basicApiTests() {
const bytes = parseHexOnly('00,01020304,0506', Uint8Array)
test('can read slices of bytes', () => {
const parser = makeParser(bytes)
expect(parser.bytes instanceof Buffer).toBe(true)
const read1 = parser.read(1)
expect(read1 instanceof Buffer).toBe(true)
expect(read1).toEqual(Buffer.from([0]))
expect(parser.read(4)).toEqual(Buffer.from([1, 2, 3, 4]))
expect(parser.read(2)).toEqual(Buffer.from([5, 6]))
expect(() => parser.read(1)).toThrow()
})
test('can read a Uint32 at full', () => {
const parser = makeParser('FFFFFFFF')
expect(parser.readUInt32()).toEqual(0xffffffff)
})
}
function transactionParsingTests() {
const transaction = {
json: {
Account: 'raD5qJMAShLeHZXf9wjUmo6vRK4arj9cF3',
Fee: '10',
Flags: 0,
Sequence: 103929,
SigningPubKey:
'028472865AF4CB32AA285834B57576B7290AA8C31B459047DB27E16F418D6A7166',
TakerGets: {
currency: 'ILS',
issuer: 'rNPRNzBB92BVpAhhZr4iXDTveCgV5Pofm9',
value: '1694.768',
},
TakerPays: '98957503520',
TransactionType: 'OfferCreate',
TxnSignature: __(`
304502202ABE08D5E78D1E74A4C18F2714F64E87B8BD57444AF
A5733109EB3C077077520022100DB335EE97386E4C0591CAC02
4D50E9230D8F171EEB901B5E5E4BD6D1E0AEF98C`),
},
binary: __(`
120007220000000024000195F964400000170A53AC2065D5460561E
C9DE000000000000000000000000000494C53000000000092D70596
8936C419CE614BF264B5EEB1CEA47FF468400000000000000A73210
28472865AF4CB32AA285834B57576B7290AA8C31B459047DB27E16F
418D6A71667447304502202ABE08D5E78D1E74A4C18F2714F64E87B
8BD57444AFA5733109EB3C077077520022100DB335EE97386E4C059
1CAC024D50E9230D8F171EEB901B5E5E4BD6D1E0AEF98C811439408
A69F0895E62149CFCC006FB89FA7D1E6E5D`),
}
const tx_json = transaction.json
// These tests are basically development logs
test('can be done with low level apis', () => {
const parser = makeParser(transaction.binary)
expect(parser.readField()).toEqual(Field.TransactionType)
expect(parser.readUInt16()).toEqual(7)
expect(parser.readField()).toEqual(Field.Flags)
expect(parser.readUInt32()).toEqual(0)
expect(parser.readField()).toEqual(Field.Sequence)
expect(parser.readUInt32()).toEqual(103929)
expect(parser.readField()).toEqual(Field.TakerPays)
parser.read(8)
expect(parser.readField()).toEqual(Field.TakerGets)
// amount value
expect(parser.read(8)).not.toBe([])
// amount currency
expect(Hash160.fromParser(parser)).not.toBe([])
expect(encodeAccountID(parser.read(20))).toEqual(tx_json.TakerGets.issuer)
expect(parser.readField()).toEqual(Field.Fee)
expect(parser.read(8)).not.toEqual([])
expect(parser.readField()).toEqual(Field.SigningPubKey)
expect(parser.readVariableLengthLength()).toBe(33)
expect(parser.read(33).toString('hex').toUpperCase()).toEqual(
tx_json.SigningPubKey,
)
expect(parser.readField()).toEqual(Field.TxnSignature)
expect(parser.readVariableLength().toString('hex').toUpperCase()).toEqual(
tx_json.TxnSignature,
)
expect(parser.readField()).toEqual(Field.Account)
expect(encodeAccountID(parser.readVariableLength())).toEqual(
tx_json.Account,
)
expect(parser.end()).toBe(true)
})
test('can be done with high level apis', () => {
const parser = makeParser(transaction.binary)
function readField() {
return parser.readFieldAndValue()
}
{
const [field, value] = readField()
expect(field).toEqual(Field.TransactionType)
expect(value).toEqual(TransactionType.OfferCreate)
}
{
const [field, value] = readField()
expect(field).toEqual(Field.Flags)
expect(value.valueOf()).toEqual(0)
}
{
const [field, value] = readField()
expect(field).toEqual(Field.Sequence)
expect(value.valueOf()).toEqual(103929)
}
{
const [field, value] = readField()
expect(field).toEqual(Field.TakerPays)
expect(value.isNative()).toEqual(true)
expect(value.toJSON()).toEqual('98957503520')
}
{
const [field, value] = readField()
expect(field).toEqual(Field.TakerGets)
expect(value.isNative()).toEqual(false)
expect(value.toJSON().issuer).toEqual(tx_json.TakerGets.issuer)
}
{
const [field, value] = readField()
expect(field).toEqual(Field.Fee)
expect(value.isNative()).toEqual(true)
}
{
const [field, value] = readField()
expect(field).toEqual(Field.SigningPubKey)
expect(value.toJSON()).toEqual(tx_json.SigningPubKey)
}
{
const [field, value] = readField()
expect(field).toEqual(Field.TxnSignature)
expect(value.toJSON()).toEqual(tx_json.TxnSignature)
}
{
const [field, value] = readField()
expect(field).toEqual(Field.Account)
expect(value.toJSON()).toEqual(tx_json.Account)
}
expect(parser.end()).toBe(true)
})
test('can be done with higher level apis', () => {
const parser = makeParser(transaction.binary)
const jsonFromBinary = readJSON(parser)
expect(jsonFromBinary).toEqual(tx_json)
})
test('readJSON (binary.decode) does not return STObject ', () => {
const parser = makeParser(transaction.binary)
const jsonFromBinary = readJSON(parser)
expect(jsonFromBinary instanceof coreTypes.STObject).toBe(false)
expect(jsonFromBinary instanceof Object).toBe(true)
expect(jsonFromBinary.prototype).toBe(undefined)
})
}
function amountParsingTests() {
fixtures.values_tests
.filter((obj) => obj.type === 'Amount')
.forEach((f, i) => {
if (f.error) {
return
}
const parser = makeParser(f.expected_hex)
const testName = `values_tests[${i}] parses ${f.expected_hex.slice(
0,
16,
)}...
as ${JSON.stringify(f.test_json)}`
test(testName, () => {
const value = parser.readType(Amount)
// May not actually be in canonical form. The fixtures are to be used
// also for json -> binary;
const json = toJSON(value)
assertEqualAmountJSON(json, f.test_json)
if (f.exponent) {
const exponent = new Decimal(json.value)
expect(exponent.e - 15).toEqual(f.exponent)
}
})
})
}
function fieldParsingTests() {
fixtures.fields_tests.forEach((f, i) => {
const parser = makeParser(f.expected_hex)
test(`fields[${i}]: parses ${f.expected_hex} as ${f.name}`, () => {
const field = parser.readField()
expect(field.name).toEqual(f.name)
expect(field.type.name).toEqual(f.type_name)
})
})
test('Field throws when type code out of range', () => {
const parser = makeParser('0101')
expect(() => parser.readField()).toThrow(
new Error('Cannot read FieldOrdinal, type_code out of range'),
)
})
test('Field throws when field code out of range', () => {
const parser = makeParser('1001')
expect(() => parser.readFieldOrdinal()).toThrowError(
new Error('Cannot read FieldOrdinal, field_code out of range'),
)
})
test('Field throws when both type and field code out of range', () => {
const parser = makeParser('000101')
expect(() => parser.readFieldOrdinal()).toThrowError(
new Error('Cannot read FieldOrdinal, type_code out of range'),
)
})
}
function assertRecyclable(json, forField) {
const Type = forField.associatedType
const recycled = Type.from(json).toJSON()
expect(recycled).toEqual(json)
const sink = new BytesList()
Type.from(recycled).toBytesSink(sink)
const recycledAgain = makeParser(sink.toHex()).readType(Type).toJSON()
expect(recycledAgain).toEqual(json)
}
function nestedObjectTests() {
fixtures.whole_objects.forEach((f, i) => {
test(`whole_objects[${i}]: can parse blob into
${JSON.stringify(
f.tx_json,
)}`, /* */ () => {
const parser = makeParser(f.blob_with_no_signing)
let ix = 0
while (!parser.end()) {
const [field, value] = parser.readFieldAndValue()
const expected = f.fields[ix]
const expectedJSON = expected[1].json
const expectedField = expected[0]
const actual = toJSON(value)
try {
expect(actual).toEqual(expectedJSON)
} catch (e) {
throw new Error(`${e} ${field} a: ${actual} e: ${expectedJSON}`)
}
expect(field.name).toEqual(expectedField)
assertRecyclable(actual, field)
ix++
}
})
})
}
function pathSetBinaryTests() {
const bytes = __(
`1200002200000000240000002E2E00004BF161D4C71AFD498D00000000000000
0000000000000055534400000000000A20B3C85F482532A9578DBB3950B85CA0
6594D168400000000000000A69D446F8038585E9400000000000000000000000
00425443000000000078CA21A6014541AB7B26C3929B9E0CD8C284D61C732103
A4665B1F0B7AE2BCA12E2DB80A192125BBEA660F80E9CEE137BA444C1B0769EC
7447304502205A964536805E35785C659D1F9670D057749AE39668175D6AA75D
25B218FE682E0221009252C0E5DDD5F2712A48F211669DE17B54113918E0D2C2
66F818095E9339D7D3811478CA21A6014541AB7B26C3929B9E0CD8C284D61C83
140A20B3C85F482532A9578DBB3950B85CA06594D1011231585E1F3BD02A15D6
185F8BB9B57CC60DEDDB37C10000000000000000000000004254430000000000
585E1F3BD02A15D6185F8BB9B57CC60DEDDB37C131E4FE687C90257D3D2D694C
8531CDEECBE84F33670000000000000000000000004254430000000000E4FE68
7C90257D3D2D694C8531CDEECBE84F3367310A20B3C85F482532A9578DBB3950
B85CA06594D100000000000000000000000042544300000000000A20B3C85F48
2532A9578DBB3950B85CA06594D1300000000000000000000000005553440000
0000000A20B3C85F482532A9578DBB3950B85CA06594D1FF31585E1F3BD02A15
D6185F8BB9B57CC60DEDDB37C100000000000000000000000042544300000000
00585E1F3BD02A15D6185F8BB9B57CC60DEDDB37C131E4FE687C90257D3D2D69
4C8531CDEECBE84F33670000000000000000000000004254430000000000E4FE
687C90257D3D2D694C8531CDEECBE84F33673115036E2D3F5437A83E5AC3CAEE
34FF2C21DEB618000000000000000000000000425443000000000015036E2D3F
5437A83E5AC3CAEE34FF2C21DEB6183000000000000000000000000055534400
000000000A20B3C85F482532A9578DBB3950B85CA06594D1FF31585E1F3BD02A
15D6185F8BB9B57CC60DEDDB37C1000000000000000000000000425443000000
0000585E1F3BD02A15D6185F8BB9B57CC60DEDDB37C13157180C769B66D942EE
69E6DCC940CA48D82337AD000000000000000000000000425443000000000057
180C769B66D942EE69E6DCC940CA48D82337AD10000000000000000000000000
00000000000000003000000000000000000000000055534400000000000A20B3
C85F482532A9578DBB3950B85CA06594D100`,
)
const expectedJSON = [
[
{
account: 'r9hEDb4xBGRfBCcX3E4FirDWQBAYtpxC8K',
currency: 'BTC',
issuer: 'r9hEDb4xBGRfBCcX3E4FirDWQBAYtpxC8K',
},
{
account: 'rM1oqKtfh1zgjdAgbFmaRm3btfGBX25xVo',
currency: 'BTC',
issuer: 'rM1oqKtfh1zgjdAgbFmaRm3btfGBX25xVo',
},
{
account: 'rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B',
currency: 'BTC',
issuer: 'rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B',
},
{
currency: 'USD',
issuer: 'rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B',
},
],
[
{
account: 'r9hEDb4xBGRfBCcX3E4FirDWQBAYtpxC8K',
currency: 'BTC',
issuer: 'r9hEDb4xBGRfBCcX3E4FirDWQBAYtpxC8K',
},
{
account: 'rM1oqKtfh1zgjdAgbFmaRm3btfGBX25xVo',
currency: 'BTC',
issuer: 'rM1oqKtfh1zgjdAgbFmaRm3btfGBX25xVo',
},
{
account: 'rpvfJ4mR6QQAeogpXEKnuyGBx8mYCSnYZi',
currency: 'BTC',
issuer: 'rpvfJ4mR6QQAeogpXEKnuyGBx8mYCSnYZi',
},
{
currency: 'USD',
issuer: 'rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B',
},
],
[
{
account: 'r9hEDb4xBGRfBCcX3E4FirDWQBAYtpxC8K',
currency: 'BTC',
issuer: 'r9hEDb4xBGRfBCcX3E4FirDWQBAYtpxC8K',
},
{
account: 'r3AWbdp2jQLXLywJypdoNwVSvr81xs3uhn',
currency: 'BTC',
issuer: 'r3AWbdp2jQLXLywJypdoNwVSvr81xs3uhn',
},
{ currency: 'XRP' },
{
currency: 'USD',
issuer: 'rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B',
},
],
]
test('works with long paths', () => {
const parser = makeParser(bytes)
const txn = readJSON(parser)
expect(txn.Paths).toEqual(expectedJSON)
// TODO: this should go elsewhere
expect(coreTypes.PathSet.from(txn.Paths).toJSON()).toEqual(expectedJSON)
})
}
describe('Binary Parser', function () {
describe('pathSetBinaryTests', () => pathSetBinaryTests())
describe('nestedObjectTests', () => nestedObjectTests())
describe('fieldParsingTests', () => fieldParsingTests())
describe('amountParsingTests', () => amountParsingTests())
describe('transactionParsingTests', () => transactionParsingTests())
describe('basicApiTests', () => basicApiTests())
})

View File

@@ -0,0 +1,289 @@
const { binary } = require('../dist/coretypes')
const { encode, decode } = require('../dist')
const { makeParser, BytesList, BinarySerializer } = binary
const { coreTypes } = require('../dist/types')
const { UInt8, UInt16, UInt32, UInt64, STObject } = coreTypes
const bigInt = require('big-integer')
const { Buffer } = require('buffer/')
const { loadFixture } = require('./utils')
const fixtures = loadFixture('data-driven-tests.json')
const deliverMinTx = require('./fixtures/delivermin-tx.json')
const deliverMinTxBinary = require('./fixtures/delivermin-tx-binary.json')
const SignerListSet = {
tx: require('./fixtures/signerlistset-tx.json'),
binary: require('./fixtures/signerlistset-tx-binary.json'),
meta: require('./fixtures/signerlistset-tx-meta-binary.json'),
}
const DepositPreauth = {
tx: require('./fixtures/deposit-preauth-tx.json'),
binary: require('./fixtures/deposit-preauth-tx-binary.json'),
meta: require('./fixtures/deposit-preauth-tx-meta-binary.json'),
}
const Escrow = {
create: {
tx: require('./fixtures/escrow-create-tx.json'),
binary: require('./fixtures/escrow-create-binary.json'),
},
finish: {
tx: require('./fixtures/escrow-finish-tx.json'),
binary: require('./fixtures/escrow-finish-binary.json'),
meta: require('./fixtures/escrow-finish-meta-binary.json'),
},
cancel: {
tx: require('./fixtures/escrow-cancel-tx.json'),
binary: require('./fixtures/escrow-cancel-binary.json'),
},
}
const PaymentChannel = {
create: {
tx: require('./fixtures/payment-channel-create-tx.json'),
binary: require('./fixtures/payment-channel-create-binary.json'),
},
fund: {
tx: require('./fixtures/payment-channel-fund-tx.json'),
binary: require('./fixtures/payment-channel-fund-binary.json'),
},
claim: {
tx: require('./fixtures/payment-channel-claim-tx.json'),
binary: require('./fixtures/payment-channel-claim-binary.json'),
},
}
const Ticket = {
create: {
tx: require('./fixtures/ticket-create-tx.json'),
binary: require('./fixtures/ticket-create-binary.json'),
},
}
let json_undefined = {
TakerPays: '223174650',
Account: 'rPk2dXr27rMw9G5Ej9ad2Tt7RJzGy8ycBp',
TransactionType: 'OfferCreate',
Memos: [
{
Memo: {
MemoType: '584D4D2076616C7565',
MemoData: '322E3230393635',
MemoFormat: undefined,
},
},
],
Fee: '15',
OfferSequence: undefined,
TakerGets: {
currency: 'XMM',
value: '100',
issuer: 'rExAPEZvbkZqYPuNcZ7XEBLENEshsWDQc8',
},
Flags: 524288,
Sequence: undefined,
LastLedgerSequence: 6220135,
}
let json_omitted = {
TakerPays: '223174650',
Account: 'rPk2dXr27rMw9G5Ej9ad2Tt7RJzGy8ycBp',
TransactionType: 'OfferCreate',
Memos: [
{
Memo: {
MemoType: '584D4D2076616C7565',
MemoData: '322E3230393635',
},
},
],
Fee: '15',
TakerGets: {
currency: 'XMM',
value: '100',
issuer: 'rExAPEZvbkZqYPuNcZ7XEBLENEshsWDQc8',
},
Flags: 524288,
LastLedgerSequence: 6220135,
}
const NegativeUNL = require('./fixtures/negative-unl.json')
function bytesListTest() {
const list = new BytesList()
.put(Buffer.from([0]))
.put(Buffer.from([2, 3]))
.put(Buffer.from([4, 5]))
test('is an Array<Buffer>', function () {
expect(Array.isArray(list.bytesArray)).toBe(true)
expect(list.bytesArray[0] instanceof Buffer).toBe(true)
})
test('keeps track of the length itself', function () {
expect(list.getLength()).toBe(5)
})
test('can join all arrays into one via toBytes', function () {
const joined = list.toBytes()
expect(joined).toHaveLength(5)
expect(joined).toEqual(Buffer.from([0, 2, 3, 4, 5]))
})
}
function assertRecycles(blob) {
const parser = makeParser(blob)
const so = parser.readType(STObject)
const out = new BytesList()
so.toBytesSink(out)
const hex = out.toHex()
expect(hex).toEqual(blob)
expect(hex + ':').not.toEqual(blob)
}
function nestedObjectTests() {
fixtures.whole_objects.forEach((f, i) => {
test(`whole_objects[${i}]: can parse blob and dump out same blob`, () => {
assertRecycles(f.blob_with_no_signing)
})
})
}
function check(type, n, expected) {
test(`Uint${type.width * 8} serializes ${n} as ${expected}`, function () {
const bl = new BytesList()
const serializer = new BinarySerializer(bl)
if (expected === 'throws') {
expect(() => serializer.writeType(type, n)).toThrow()
return
}
serializer.writeType(type, n)
expect(bl.toBytes()).toEqual(Buffer.from(expected))
})
}
check(UInt8, 5, [5])
check(UInt16, 5, [0, 5])
check(UInt32, 5, [0, 0, 0, 5])
check(UInt32, 0xffffffff, [255, 255, 255, 255])
check(UInt8, 0xfeffffff, 'throws')
check(UInt16, 0xfeffffff, 'throws')
check(UInt16, 0xfeffffff, 'throws')
check(UInt64, 0xfeffffff, [0, 0, 0, 0, 254, 255, 255, 255])
check(UInt64, -1, 'throws')
check(UInt64, 0, [0, 0, 0, 0, 0, 0, 0, 0])
check(UInt64, 1, [0, 0, 0, 0, 0, 0, 0, 1])
check(UInt64, bigInt(1), [0, 0, 0, 0, 0, 0, 0, 1])
function deliverMinTest() {
test('can serialize DeliverMin', () => {
expect(encode(deliverMinTx)).toEqual(deliverMinTxBinary)
})
}
function SignerListSetTest() {
test('can serialize SignerListSet', () => {
expect(encode(SignerListSet.tx)).toEqual(SignerListSet.binary)
})
test('can serialize SignerListSet metadata', () => {
expect(encode(SignerListSet.tx.meta)).toEqual(SignerListSet.meta)
})
}
function DepositPreauthTest() {
test('can serialize DepositPreauth', () => {
expect(encode(DepositPreauth.tx)).toEqual(DepositPreauth.binary)
})
test('can serialize DepositPreauth metadata', () => {
expect(encode(DepositPreauth.tx.meta)).toEqual(DepositPreauth.meta)
})
}
function EscrowTest() {
test('can serialize EscrowCreate', () => {
expect(encode(Escrow.create.tx)).toEqual(Escrow.create.binary)
})
test('can serialize EscrowFinish', () => {
expect(encode(Escrow.finish.tx)).toEqual(Escrow.finish.binary)
expect(encode(Escrow.finish.tx.meta)).toEqual(Escrow.finish.meta)
})
test('can serialize EscrowCancel', () => {
expect(encode(Escrow.cancel.tx)).toEqual(Escrow.cancel.binary)
})
}
function PaymentChannelTest() {
test('can serialize PaymentChannelCreate', () => {
expect(encode(PaymentChannel.create.tx)).toEqual(
PaymentChannel.create.binary,
)
})
test('can serialize PaymentChannelFund', () => {
expect(encode(PaymentChannel.fund.tx)).toEqual(PaymentChannel.fund.binary)
})
test('can serialize PaymentChannelClaim', () => {
expect(encode(PaymentChannel.claim.tx)).toEqual(PaymentChannel.claim.binary)
})
}
function NegativeUNLTest() {
test('can serialize NegativeUNL', () => {
expect(encode(NegativeUNL.tx)).toEqual(NegativeUNL.binary)
})
test('can deserialize NegativeUNL', () => {
expect(decode(NegativeUNL.binary)).toEqual(NegativeUNL.tx)
})
}
function omitUndefinedTest() {
test('omits fields with undefined value', () => {
let encodedOmitted = encode(json_omitted)
let encodedUndefined = encode(json_undefined)
expect(encodedOmitted).toEqual(encodedUndefined)
expect(decode(encodedOmitted)).toEqual(decode(encodedUndefined))
})
}
function ticketTest() {
test('can serialize TicketCreate', () => {
expect(encode(Ticket.create.tx)).toEqual(Ticket.create.binary)
})
}
function nfTokenTest() {
const fixtures = require('./fixtures/nf-token.json')
for (const txName of Object.keys(fixtures)) {
test(`can serialize transaction ${txName}`, () => {
expect(encode(fixtures[txName].tx.json)).toEqual(
fixtures[txName].tx.binary,
)
})
test(`can deserialize transaction ${txName}`, () => {
expect(decode(fixtures[txName].tx.binary)).toEqual(
fixtures[txName].tx.json,
)
})
test(`can serialize meta ${txName}`, () => {
expect(encode(fixtures[txName].meta.json)).toEqual(
fixtures[txName].meta.binary,
)
})
test(`can deserialize meta ${txName}`, () => {
expect(decode(fixtures[txName].meta.binary)).toEqual(
fixtures[txName].meta.json,
)
})
}
}
describe('Binary Serialization', function () {
describe('nestedObjectTests', nestedObjectTests)
describe('BytesList', bytesListTest)
describe('DeliverMin', deliverMinTest)
describe('DepositPreauth', DepositPreauthTest)
describe('SignerListSet', SignerListSetTest)
describe('Escrow', EscrowTest)
describe('PaymentChannel', PaymentChannelTest)
describe('NegativeUNLTest', NegativeUNLTest)
describe('OmitUndefined', omitUndefinedTest)
describe('TicketTest', ticketTest)
describe('NFToken', nfTokenTest)
})

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1 @@
"1200002280020000240000689E201B010BF0E361D4950EA99C657EF800000000000000000000000055534400000000000A20B3C85F482532A9578DBB3950B85CA06594D1684000000000002AF8694000000000003A986AD40485B690F28E8000000000000000000000000055534400000000000A20B3C85F482532A9578DBB3950B85CA06594D173210254D771E2A30552D1F347F5B88EC87513843F8BC1A408E70A4175B2E3C325FD3C7446304402202A4965FCF0571B7308971956864B1949C2BD924B5A41B5E8DAF00C91C64F964502207FD3BEB7C165BD1F10E6E7C443742BD686F8E102A89B502A4A495F4C29EC5C488114EAAA52373B59DCFBFD3476049AA6408AA22EAA898314EAAA52373B59DCFBFD3476049AA6408AA22EAA8901123000000000000000000000000055534400000000000A20B3C85F482532A9578DBB3950B85CA06594D1FF01FDF050193BEDEAA9074764B961405D31E66AC0E9300000000000000000000000005553440000000000FDF050193BEDEAA9074764B961405D31E66AC0E901FDF050193BEDEAA9074764B961405D31E66AC0E9FF300000000000000000000000005553440000000000DD39C650A96EDA48334E70CC4A85B8B2E8502CD301DD39C650A96EDA48334E70CC4A85B8B2E8502CD3017C44F934D7A5FEEBD1530570CDB83D1D8EF1F37E00"

View File

@@ -0,0 +1,98 @@
{
"Account": "r4PowrZ7KZw83oWDYxzY82ht2kgDmFUpB7",
"Amount": {
"currency": "USD",
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
"value": "5.927096147083"
},
"DeliverMin": {
"currency": "USD",
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
"value": "0.012729190692"
},
"Destination": "r4PowrZ7KZw83oWDYxzY82ht2kgDmFUpB7",
"Fee": "11000",
"Flags": 2147614720,
"LastLedgerSequence": 17559779,
"Paths": [
[
{
"currency": "USD",
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
"type": 48,
"type_hex": "0000000000000030"
}
],
[
{
"account": "rQ96qm46YsRX2F7SSCQxToR2ybRuUYsZ4R",
"type": 1,
"type_hex": "0000000000000001"
},
{
"currency": "USD",
"issuer": "rQ96qm46YsRX2F7SSCQxToR2ybRuUYsZ4R",
"type": 48,
"type_hex": "0000000000000030"
},
{
"account": "rQ96qm46YsRX2F7SSCQxToR2ybRuUYsZ4R",
"type": 1,
"type_hex": "0000000000000001"
}
],
[
{
"currency": "USD",
"issuer": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
"type": 48,
"type_hex": "0000000000000030"
},
{
"account": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
"type": 1,
"type_hex": "0000000000000001"
},
{
"account": "rULnR9YhAkj9HrcxAcudzBhaXRSqT7zJkq",
"type": 1,
"type_hex": "0000000000000001"
}
]
],
"SendMax": "15000",
"Sequence": 26782,
"SigningPubKey": "0254D771E2A30552D1F347F5B88EC87513843F8BC1A408E70A4175B2E3C325FD3C",
"TransactionType": "Payment",
"TxnSignature": "304402202A4965FCF0571B7308971956864B1949C2BD924B5A41B5E8DAF00C91C64F964502207FD3BEB7C165BD1F10E6E7C443742BD686F8E102A89B502A4A495F4C29EC5C48",
"date": 502912010,
"hash": "0FB10DF664F33840ABC68A8BBE78178359C55AC1AFC83DB468CE69C4A86E3EAC",
"inLedger": 17559773,
"ledger_index": 17559773,
"meta": {
"AffectedNodes": [
{
"ModifiedNode": {
"FinalFields": {
"Account": "r4PowrZ7KZw83oWDYxzY82ht2kgDmFUpB7",
"Balance": "1064773000",
"Flags": 65536,
"OwnerCount": 9,
"Sequence": 26783
},
"LedgerEntryType": "AccountRoot",
"LedgerIndex": "0D7F8ADAA3269E9C8B2AA9CDE31BC57E2E52133F36516D3DF576DBCE6E405BDC",
"PreviousFields": {
"Balance": "1064784000",
"Sequence": 26782
},
"PreviousTxnID": "E028797D6C7AE9B84C6930452D427D5E40CE23E199E8DF0534DAAE5277A76CC1",
"PreviousTxnLgrSeq": 17537115
}
}
],
"TransactionIndex": 12,
"TransactionResult": "tecPATH_PARTIAL"
},
"validated": true
}

View File

@@ -0,0 +1 @@
"1200132280000000240000004168400000000000000A732103EB1E2603E7571D6144684996C10DA75063D6E2F3B3FDABE38B857C1BE9578A5574473045022100B0A5672E3E09FA3AF8CF1DCC1D8C881F58B39212D6FDC42CCF30E5400D0EFD9F02202DDD9517D9409D1D9A529B8AEA7DE13AE4CDF96BB6D18FA0D9732DBFC887348D81148A928D14A643F388AC0D26BAF9755B07EB0A2B44851486FFE2A17E861BA0FE9A3ED8352F895D80E789E0"

View File

@@ -0,0 +1 @@
"201C00000000F8E51100612500AE5F59558107CEE99D556326ACD4662CA10A24550240D9F933E55435A0C0DB3B06DD343E56146AAAF7A266D8A92DFFEAB1A71B6523534F27820873F4E213014B23398867D2E624000000412D00000007624000000249CB5DD0E1E7220000000024000000422D00000008624000000249CB5DC681148A928D14A643F388AC0D26BAF9755B07EB0A2B44E1E1E311007056C2D0317AD266B93CB3B36AEB0ABB673B0AFFAB134809CCACFD7158F539603C3AE881148A928D14A643F388AC0D26BAF9755B07EB0A2B44851486FFE2A17E861BA0FE9A3ED8352F895D80E789E0E1E1E511006456CD08416851CA53E9649408118A4908E01E43436ED950886D1B1E66F4B68B82ECE7220000000058CD08416851CA53E9649408118A4908E01E43436ED950886D1B1E66F4B68B82EC82148A928D14A643F388AC0D26BAF9755B07EB0A2B44E1E1F1031000"

View File

@@ -0,0 +1,58 @@
{
"Account": "rDd6FpNbeY2CrQajSmP178BmNGusmQiYMM",
"Authorize": "rDJFnv5sEfp42LMFiX3mVQKczpFTdxYDzM",
"Fee": "10",
"Flags": 2147483648,
"Sequence": 65,
"SigningPubKey": "03EB1E2603E7571D6144684996C10DA75063D6E2F3B3FDABE38B857C1BE9578A55",
"TransactionType": "DepositPreauth",
"TxnSignature": "3045022100B0A5672E3E09FA3AF8CF1DCC1D8C881F58B39212D6FDC42CCF30E5400D0EFD9F02202DDD9517D9409D1D9A529B8AEA7DE13AE4CDF96BB6D18FA0D9732DBFC887348D",
"hash": "B5D94C027C846171B2F5D4C2D126E88580BF369986A155C1890352F5BC4D7AF9",
"meta": {
"AffectedNodes": [
{
"ModifiedNode": {
"FinalFields": {
"Account": "rDd6FpNbeY2CrQajSmP178BmNGusmQiYMM",
"Balance": "9827999174",
"Flags": 0,
"OwnerCount": 8,
"Sequence": 66
},
"LedgerEntryType": "AccountRoot",
"LedgerIndex": "146AAAF7A266D8A92DFFEAB1A71B6523534F27820873F4E213014B23398867D2",
"PreviousFields": {
"Balance": "9827999184",
"OwnerCount": 7,
"Sequence": 65
},
"PreviousTxnID": "8107CEE99D556326ACD4662CA10A24550240D9F933E55435A0C0DB3B06DD343E",
"PreviousTxnLgrSeq": 11427673
}
},
{
"CreatedNode": {
"LedgerEntryType": "DepositPreauth",
"LedgerIndex": "C2D0317AD266B93CB3B36AEB0ABB673B0AFFAB134809CCACFD7158F539603C3A",
"NewFields": {
"Account": "rDd6FpNbeY2CrQajSmP178BmNGusmQiYMM",
"Authorize": "rDJFnv5sEfp42LMFiX3mVQKczpFTdxYDzM"
}
}
},
{
"ModifiedNode": {
"FinalFields": {
"Flags": 0,
"Owner": "rDd6FpNbeY2CrQajSmP178BmNGusmQiYMM",
"RootIndex": "CD08416851CA53E9649408118A4908E01E43436ED950886D1B1E66F4B68B82EC"
},
"LedgerEntryType": "DirectoryNode",
"LedgerIndex": "CD08416851CA53E9649408118A4908E01E43436ED950886D1B1E66F4B68B82EC"
}
}
],
"TransactionIndex": 0,
"TransactionResult": "tesSUCCESS"
}
}

View File

@@ -0,0 +1 @@
"1200042019000000198114EE5F7CF61504C7CF7E0C22562EB19CC7ACB0FCBA8214EE5F7CF61504C7CF7E0C22562EB19CC7ACB0FCBA"

View File

@@ -0,0 +1,6 @@
{
"Account" : "r4jQDHCUvgcBAa5EzcB1D8BHGcjYP9eBC2",
"OfferSequence" : 25,
"Owner" : "r4jQDHCUvgcBAa5EzcB1D8BHGcjYP9eBC2",
"TransactionType" : "EscrowCancel"
}

View File

@@ -0,0 +1 @@
"1200012E00005BB82024258D09812025258D0980614000000000000064701127A0258020E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B8558101008114EE5F7CF61504C7CF7E0C22562EB19CC7ACB0FCBA8314B5F762798A53D543A014CAF8B297CFF8F2F937E8"

View File

@@ -0,0 +1,10 @@
{
"Account" : "r4jQDHCUvgcBAa5EzcB1D8BHGcjYP9eBC2",
"Amount" : "100",
"CancelAfter" : 630000001,
"Condition" : "A0258020E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855810100",
"Destination" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"DestinationTag" : 23480,
"FinishAfter" : 630000000,
"TransactionType": "EscrowCreate"
}

View File

@@ -0,0 +1 @@
"1200022280000000240000000320190000000268400000000000000A7321028DB04DA8B702272B2A29FAF3DBCF40D01386208E6A9541DB497BE962FEF96A9C74473045022100E3C860D54E88AFA8584FBED99AA38BCB512AB1D69D87F3F71EF38ACB6EA4B7A202204CC1BB34DAA221416DB8946B583D4F33C7E22C130F9FA49353FB6ADB2DF6C69D8114E151CA3207BAB5B91D2F0E4D35ECDFD4551C69A18214E151CA3207BAB5B91D2F0E4D35ECDFD4551C69A1"

View File

@@ -0,0 +1 @@
"201C0000000BF8E511006125020B814F55F72706F8C7B9C07D83332BE330D77B5CE6A246FE4FA04DD47EBC88719A35B5F95644A462A2806A513D7480CA71059D3D33637B65458017A8828A8F95AF17272501E6624000000010DC67D0E1E7220000000024000000052D00000000624000000013C074F08114DC0BCC71D87BB4E684B35721DC12F2C4E1ABABA4E1E1E4110075569766AE124E5053BCFDE253F6E3DDBAC13858CC0700DDECDCD57FF2FA777BEF7DE7220000000025020B814F202521A0C1B834000000000000000039000000000000000055F72706F8C7B9C07D83332BE330D77B5CE6A246FE4FA04DD47EBC88719A35B5F9614000000002E40D208114E151CA3207BAB5B91D2F0E4D35ECDFD4551C69A18314DC0BCC71D87BB4E684B35721DC12F2C4E1ABABA4E1E1E511006456BA4B47767C25E21CCDA3553BD45BE3699B34B508B459FE0472C70C51660058E0E7220000000058BA4B47767C25E21CCDA3553BD45BE3699B34B508B459FE0472C70C51660058E08214E151CA3207BAB5B91D2F0E4D35ECDFD4551C69A1E1E1E511006125020B814F55F72706F8C7B9C07D83332BE330D77B5CE6A246FE4FA04DD47EBC88719A35B5F956E4DA2A510F0C7FFD0474FAA4C7308A83828E0B3DD09EAA9CFDFFC067E3719D2EE624000000032D00000001624000000002FAF06CE1E7220000000024000000042D00000000624000000002FAF0628114E151CA3207BAB5B91D2F0E4D35ECDFD4551C69A1E1E1E511006456ECE79D27042E87B02DF3A263DB6BB6FCD96E69E20E0955F84D47D164C37546A1E7220000000058ECE79D27042E87B02DF3A263DB6BB6FCD96E69E20E0955F84D47D164C37546A18214DC0BCC71D87BB4E684B35721DC12F2C4E1ABABA4E1E1F1031000"

View File

@@ -0,0 +1,95 @@
{
"Account": "rMYPppnVNQ7crMizv8D6wF45kYuSupygyr",
"Fee": "10",
"Flags": 2147483648,
"OfferSequence": 2,
"Owner": "rMYPppnVNQ7crMizv8D6wF45kYuSupygyr",
"Sequence": 3,
"SigningPubKey": "028DB04DA8B702272B2A29FAF3DBCF40D01386208E6A9541DB497BE962FEF96A9C",
"TransactionType": "EscrowFinish",
"TxnSignature": "3045022100E3C860D54E88AFA8584FBED99AA38BCB512AB1D69D87F3F71EF38ACB6EA4B7A202204CC1BB34DAA221416DB8946B583D4F33C7E22C130F9FA49353FB6ADB2DF6C69D",
"hash": "1A76D4BA47A53A66B539D4BD4C30826A5E51C78D0B7344758EACAC77A6753C3C",
"meta": {
"AffectedNodes": [
{
"ModifiedNode": {
"FinalFields": {
"Account": "rMhV8zfKJRqEspcayRfqa4FuzQg8kW5LdB",
"Balance": "331379952",
"Flags": 0,
"OwnerCount": 0,
"Sequence": 5
},
"LedgerEntryType": "AccountRoot",
"LedgerIndex": "44A462A2806A513D7480CA71059D3D33637B65458017A8828A8F95AF17272501",
"PreviousFields": {
"Balance": "282879952"
},
"PreviousTxnID": "F72706F8C7B9C07D83332BE330D77B5CE6A246FE4FA04DD47EBC88719A35B5F9",
"PreviousTxnLgrSeq": 34308431
}
},
{
"DeletedNode": {
"FinalFields": {
"Account": "rMYPppnVNQ7crMizv8D6wF45kYuSupygyr",
"Amount": "48500000",
"Destination": "rMhV8zfKJRqEspcayRfqa4FuzQg8kW5LdB",
"DestinationNode": "0000000000000000",
"FinishAfter": 564183480,
"Flags": 0,
"OwnerNode": "0000000000000000",
"PreviousTxnID": "F72706F8C7B9C07D83332BE330D77B5CE6A246FE4FA04DD47EBC88719A35B5F9",
"PreviousTxnLgrSeq": 34308431
},
"LedgerEntryType": "Escrow",
"LedgerIndex": "9766AE124E5053BCFDE253F6E3DDBAC13858CC0700DDECDCD57FF2FA777BEF7D"
}
},
{
"ModifiedNode": {
"FinalFields": {
"Flags": 0,
"Owner": "rMYPppnVNQ7crMizv8D6wF45kYuSupygyr",
"RootIndex": "BA4B47767C25E21CCDA3553BD45BE3699B34B508B459FE0472C70C51660058E0"
},
"LedgerEntryType": "DirectoryNode",
"LedgerIndex": "BA4B47767C25E21CCDA3553BD45BE3699B34B508B459FE0472C70C51660058E0"
}
},
{
"ModifiedNode": {
"FinalFields": {
"Account": "rMYPppnVNQ7crMizv8D6wF45kYuSupygyr",
"Balance": "49999970",
"Flags": 0,
"OwnerCount": 0,
"Sequence": 4
},
"LedgerEntryType": "AccountRoot",
"LedgerIndex": "E4DA2A510F0C7FFD0474FAA4C7308A83828E0B3DD09EAA9CFDFFC067E3719D2E",
"PreviousFields": {
"Balance": "49999980",
"OwnerCount": 1,
"Sequence": 3
},
"PreviousTxnID": "F72706F8C7B9C07D83332BE330D77B5CE6A246FE4FA04DD47EBC88719A35B5F9",
"PreviousTxnLgrSeq": 34308431
}
},
{
"ModifiedNode": {
"FinalFields": {
"Flags": 0,
"Owner": "rMhV8zfKJRqEspcayRfqa4FuzQg8kW5LdB",
"RootIndex": "ECE79D27042E87B02DF3A263DB6BB6FCD96E69E20E0955F84D47D164C37546A1"
},
"LedgerEntryType": "DirectoryNode",
"LedgerIndex": "ECE79D27042E87B02DF3A263DB6BB6FCD96E69E20E0955F84D47D164C37546A1"
}
}
],
"TransactionIndex": 11,
"TransactionResult": "tesSUCCESS"
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,12 @@
{
"binary": "120066240000000026000003006840000000000000007300701321ED9D593004CC501CACD261BD8E31E863F2B3F6CA69505E7FD54DA8F5690BEFB7AE8114000000000000000000000000000000000000000000101101",
"tx": {
"UNLModifyDisabling": 1,
"LedgerSequence": 768,
"UNLModifyValidator": "ED9D593004CC501CACD261BD8E31E863F2B3F6CA69505E7FD54DA8F5690BEFB7AE",
"TransactionType": "UNLModify",
"Account": "rrrrrrrrrrrrrrrrrrrrrhoLvTp",
"Sequence": 0,
"Fee": "0",
"SigningPubKey": ""}
}

View File

@@ -0,0 +1,547 @@
{
"NFTokenMint": {
"tx": {
"json": {
"Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"Fee": "12",
"Flags": 9,
"LastLedgerSequence": 22,
"Sequence": 5,
"SigningPubKey": "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
"TokenTaxon": 0,
"TransactionType": "NFTokenMint",
"TransferFee": 50,
"TxnSignature": "3045022100DAB7343B26035702FF7E0736E04A092AC9512964E41C3CA64926CDFBE777946602202F295A3BB1282E0AF98F9F5978D4037D75EDEB0EC642519D966D7B9B5826E61B",
"URI": "68747470733A2F2F677265677765697362726F642E636F6D"
},
"binary": "12001914003222000000092400000005201B00000016202A0000000068400000000000000C73210330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD02074473045022100DAB7343B26035702FF7E0736E04A092AC9512964E41C3CA64926CDFBE777946602202F295A3BB1282E0AF98F9F5978D4037D75EDEB0EC642519D966D7B9B5826E61B751868747470733A2F2F677265677765697362726F642E636F6D8114B5F762798A53D543A014CAF8B297CFF8F2F937E8"
},
"meta": {
"json": {
"AffectedNodes": [
{
"ModifiedNode": {
"FinalFields": {
"Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"Balance": "99999999999999940",
"Flags": 0,
"MintedTokens": 5,
"OwnerCount": 1,
"Sequence": 6
},
"LedgerEntryType": "AccountRoot",
"LedgerIndex": "2B6AC232AA4C4BE41BF49D2459FA4A0347E1B543A4C92FCEE0821C0201E2E9A8",
"PreviousFields": {
"Balance": "99999999999999952",
"MintedTokens": 4,
"Sequence": 5
},
"PreviousTxnID": "E9BFEE7C403F74445B59B8FA8E972ABD642A360E1FBC15C53BAA717573BEC462",
"PreviousTxnLgrSeq": 3
}
},
{
"ModifiedNode": {
"FinalFields": {
"Flags": 0,
"NonFungibleTokens": [
{
"NonFungibleToken": {
"TokenID": "00090032B5F762798A53D543A014CAF8B297CFF8F2F937E80000099B00000000",
"URI": "68747470733A2F2F677265677765697362726F642E636F6D"
}
},
{
"NonFungibleToken": {
"TokenID": "00090032B5F762798A53D543A014CAF8B297CFF8F2F937E816E5DA9C00000001",
"URI": "68747470733A2F2F677265677765697362726F642E636F6D"
}
},
{
"NonFungibleToken": {
"TokenID": "00090032B5F762798A53D543A014CAF8B297CFF8F2F937E82DCBAB9D00000002",
"URI": "68747470733A2F2F677265677765697362726F642E636F6D"
}
},
{
"NonFungibleToken": {
"TokenID": "00090032B5F762798A53D543A014CAF8B297CFF8F2F937E844B17C9E00000003",
"URI": "68747470733A2F2F677265677765697362726F642E636F6D"
}
},
{
"NonFungibleToken": {
"TokenID": "00090032B5F762798A53D543A014CAF8B297CFF8F2F937E85B974D9F00000004",
"URI": "68747470733A2F2F677265677765697362726F642E636F6D"
}
}
]
},
"LedgerEntryType": "NFTokenPage",
"LedgerIndex": "B5F762798A53D543A014CAF8B297CFF8F2F937E8FFFFFFFFFFFFFFFFFFFFFFFF",
"PreviousFields": {
"NonFungibleTokens": [
{
"NonFungibleToken": {
"TokenID": "00090032B5F762798A53D543A014CAF8B297CFF8F2F937E80000099B00000000",
"URI": "68747470733A2F2F677265677765697362726F642E636F6D"
}
},
{
"NonFungibleToken": {
"TokenID": "00090032B5F762798A53D543A014CAF8B297CFF8F2F937E816E5DA9C00000001",
"URI": "68747470733A2F2F677265677765697362726F642E636F6D"
}
},
{
"NonFungibleToken": {
"TokenID": "00090032B5F762798A53D543A014CAF8B297CFF8F2F937E82DCBAB9D00000002",
"URI": "68747470733A2F2F677265677765697362726F642E636F6D"
}
},
{
"NonFungibleToken": {
"TokenID": "00090032B5F762798A53D543A014CAF8B297CFF8F2F937E844B17C9E00000003",
"URI": "68747470733A2F2F677265677765697362726F642E636F6D"
}
}
]
},
"PreviousTxnID": "E9BFEE7C403F74445B59B8FA8E972ABD642A360E1FBC15C53BAA717573BEC462",
"PreviousTxnLgrSeq": 3
}
}
],
"TransactionIndex": 4,
"TransactionResult": "tesSUCCESS"
},
"binary": "201C00000004F8E5110061250000000355E9BFEE7C403F74445B59B8FA8E972ABD642A360E1FBC15C53BAA717573BEC462562B6AC232AA4C4BE41BF49D2459FA4A0347E1B543A4C92FCEE0821C0201E2E9A8E62400000005202B0000000462416345785D89FFD0E1E7220000000024000000062D00000001202B0000000562416345785D89FFC48114B5F762798A53D543A014CAF8B297CFF8F2F937E8E1E1E5110050250000000355E9BFEE7C403F74445B59B8FA8E972ABD642A360E1FBC15C53BAA717573BEC46256B5F762798A53D543A014CAF8B297CFF8F2F937E8FFFFFFFFFFFFFFFFFFFFFFFFE6FAEC5A00090032B5F762798A53D543A014CAF8B297CFF8F2F937E80000099B00000000751868747470733A2F2F677265677765697362726F642E636F6DE1EC5A00090032B5F762798A53D543A014CAF8B297CFF8F2F937E816E5DA9C00000001751868747470733A2F2F677265677765697362726F642E636F6DE1EC5A00090032B5F762798A53D543A014CAF8B297CFF8F2F937E82DCBAB9D00000002751868747470733A2F2F677265677765697362726F642E636F6DE1EC5A00090032B5F762798A53D543A014CAF8B297CFF8F2F937E844B17C9E00000003751868747470733A2F2F677265677765697362726F642E636F6DE1F1E1E72200000000FAEC5A00090032B5F762798A53D543A014CAF8B297CFF8F2F937E80000099B00000000751868747470733A2F2F677265677765697362726F642E636F6DE1EC5A00090032B5F762798A53D543A014CAF8B297CFF8F2F937E816E5DA9C00000001751868747470733A2F2F677265677765697362726F642E636F6DE1EC5A00090032B5F762798A53D543A014CAF8B297CFF8F2F937E82DCBAB9D00000002751868747470733A2F2F677265677765697362726F642E636F6DE1EC5A00090032B5F762798A53D543A014CAF8B297CFF8F2F937E844B17C9E00000003751868747470733A2F2F677265677765697362726F642E636F6DE1EC5A00090032B5F762798A53D543A014CAF8B297CFF8F2F937E85B974D9F00000004751868747470733A2F2F677265677765697362726F642E636F6DE1F1E1E1F1031000"
}
},
"NFTokenBurn": {
"tx": {
"json": {
"Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"Fee": "12",
"Flags": 0,
"LastLedgerSequence": 23,
"Sequence": 6,
"SigningPubKey": "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
"TokenID": "00090032B5F762798A53D543A014CAF8B297CFF8F2F937E85B974D9F00000004",
"TransactionType": "NFTokenBurn",
"TxnSignature": "3045022100D614E1F0A1C41A05652B8998FC2C4DC8658B95BFD89F4A0DEBE3FFDCB75CE1D8022027DF89138FC442C803DC2BEC07636CEB8D0EC6297E23262A729B83D32F93FD3D"
},
"binary": "12001A22000000002400000006201B000000175A00090032B5F762798A53D543A014CAF8B297CFF8F2F937E85B974D9F0000000468400000000000000C73210330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD02074473045022100D614E1F0A1C41A05652B8998FC2C4DC8658B95BFD89F4A0DEBE3FFDCB75CE1D8022027DF89138FC442C803DC2BEC07636CEB8D0EC6297E23262A729B83D32F93FD3D8114B5F762798A53D543A014CAF8B297CFF8F2F937E8"
},
"meta": {
"json": {
"AffectedNodes": [
{
"ModifiedNode": {
"FinalFields": {
"Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"Balance": "99999999999999928",
"BurnedTokens": 1,
"Flags": 0,
"MintedTokens": 5,
"OwnerCount": 1,
"Sequence": 7
},
"LedgerEntryType": "AccountRoot",
"LedgerIndex": "2B6AC232AA4C4BE41BF49D2459FA4A0347E1B543A4C92FCEE0821C0201E2E9A8",
"PreviousFields": {
"Balance": "99999999999999940",
"Sequence": 6
},
"PreviousTxnID": "5F0E3A19F1D5B028A31B8A0FDE8533B0FD185E4AE306F79CFF51D18E68985231",
"PreviousTxnLgrSeq": 3
}
},
{
"ModifiedNode": {
"FinalFields": {
"Flags": 0,
"NonFungibleTokens": [
{
"NonFungibleToken": {
"TokenID": "00090032B5F762798A53D543A014CAF8B297CFF8F2F937E80000099B00000000",
"URI": "68747470733A2F2F677265677765697362726F642E636F6D"
}
},
{
"NonFungibleToken": {
"TokenID": "00090032B5F762798A53D543A014CAF8B297CFF8F2F937E816E5DA9C00000001",
"URI": "68747470733A2F2F677265677765697362726F642E636F6D"
}
},
{
"NonFungibleToken": {
"TokenID": "00090032B5F762798A53D543A014CAF8B297CFF8F2F937E82DCBAB9D00000002",
"URI": "68747470733A2F2F677265677765697362726F642E636F6D"
}
},
{
"NonFungibleToken": {
"TokenID": "00090032B5F762798A53D543A014CAF8B297CFF8F2F937E844B17C9E00000003",
"URI": "68747470733A2F2F677265677765697362726F642E636F6D"
}
}
]
},
"LedgerEntryType": "NFTokenPage",
"LedgerIndex": "B5F762798A53D543A014CAF8B297CFF8F2F937E8FFFFFFFFFFFFFFFFFFFFFFFF",
"PreviousFields": {
"NonFungibleTokens": [
{
"NonFungibleToken": {
"TokenID": "00090032B5F762798A53D543A014CAF8B297CFF8F2F937E80000099B00000000",
"URI": "68747470733A2F2F677265677765697362726F642E636F6D"
}
},
{
"NonFungibleToken": {
"TokenID": "00090032B5F762798A53D543A014CAF8B297CFF8F2F937E816E5DA9C00000001",
"URI": "68747470733A2F2F677265677765697362726F642E636F6D"
}
},
{
"NonFungibleToken": {
"TokenID": "00090032B5F762798A53D543A014CAF8B297CFF8F2F937E82DCBAB9D00000002",
"URI": "68747470733A2F2F677265677765697362726F642E636F6D"
}
},
{
"NonFungibleToken": {
"TokenID": "00090032B5F762798A53D543A014CAF8B297CFF8F2F937E844B17C9E00000003",
"URI": "68747470733A2F2F677265677765697362726F642E636F6D"
}
},
{
"NonFungibleToken": {
"TokenID": "00090032B5F762798A53D543A014CAF8B297CFF8F2F937E85B974D9F00000004",
"URI": "68747470733A2F2F677265677765697362726F642E636F6D"
}
}
]
},
"PreviousTxnID": "5F0E3A19F1D5B028A31B8A0FDE8533B0FD185E4AE306F79CFF51D18E68985231",
"PreviousTxnLgrSeq": 3
}
}
],
"TransactionIndex": 0,
"TransactionResult": "tesSUCCESS"
},
"binary": "201C00000000F8E51100612500000003555F0E3A19F1D5B028A31B8A0FDE8533B0FD185E4AE306F79CFF51D18E68985231562B6AC232AA4C4BE41BF49D2459FA4A0347E1B543A4C92FCEE0821C0201E2E9A8E6240000000662416345785D89FFC4E1E7220000000024000000072D00000001202B00000005202C0000000162416345785D89FFB88114B5F762798A53D543A014CAF8B297CFF8F2F937E8E1E1E51100502500000003555F0E3A19F1D5B028A31B8A0FDE8533B0FD185E4AE306F79CFF51D18E6898523156B5F762798A53D543A014CAF8B297CFF8F2F937E8FFFFFFFFFFFFFFFFFFFFFFFFE6FAEC5A00090032B5F762798A53D543A014CAF8B297CFF8F2F937E80000099B00000000751868747470733A2F2F677265677765697362726F642E636F6DE1EC5A00090032B5F762798A53D543A014CAF8B297CFF8F2F937E816E5DA9C00000001751868747470733A2F2F677265677765697362726F642E636F6DE1EC5A00090032B5F762798A53D543A014CAF8B297CFF8F2F937E82DCBAB9D00000002751868747470733A2F2F677265677765697362726F642E636F6DE1EC5A00090032B5F762798A53D543A014CAF8B297CFF8F2F937E844B17C9E00000003751868747470733A2F2F677265677765697362726F642E636F6DE1EC5A00090032B5F762798A53D543A014CAF8B297CFF8F2F937E85B974D9F00000004751868747470733A2F2F677265677765697362726F642E636F6DE1F1E1E72200000000FAEC5A00090032B5F762798A53D543A014CAF8B297CFF8F2F937E80000099B00000000751868747470733A2F2F677265677765697362726F642E636F6DE1EC5A00090032B5F762798A53D543A014CAF8B297CFF8F2F937E816E5DA9C00000001751868747470733A2F2F677265677765697362726F642E636F6DE1EC5A00090032B5F762798A53D543A014CAF8B297CFF8F2F937E82DCBAB9D00000002751868747470733A2F2F677265677765697362726F642E636F6DE1EC5A00090032B5F762798A53D543A014CAF8B297CFF8F2F937E844B17C9E00000003751868747470733A2F2F677265677765697362726F642E636F6DE1F1E1E1F1031000"
}
},
"NFTokenCreateOffer": {
"tx": {
"json": {
"Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"Amount": "100",
"Destination": "rV3WAvwwXgvPrYiUgSoytn9w3mejtPgLo",
"Expiration": 999999999,
"Fee": "12",
"Flags": 1,
"LastLedgerSequence": 26,
"Sequence": 9,
"SigningPubKey": "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
"TokenID": "00090032B5F762798A53D543A014CAF8B297CFF8F2F937E80000099B00000000",
"TransactionType": "NFTokenCreateOffer",
"TxnSignature": "3045022100BCEEEF98B9DB3A2ACA7CE80AB91B9398E3429B93F660BB8A063F134AA798AE970220667C560D16E555DF5EF30536804C082DAEC7A446DF2C7533ADB1E2437AF2CCB0"
},
"binary": "12001B220000000124000000092A3B9AC9FF201B0000001A5A00090032B5F762798A53D543A014CAF8B297CFF8F2F937E80000099B0000000061400000000000006468400000000000000C73210330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD02074473045022100BCEEEF98B9DB3A2ACA7CE80AB91B9398E3429B93F660BB8A063F134AA798AE970220667C560D16E555DF5EF30536804C082DAEC7A446DF2C7533ADB1E2437AF2CCB08114B5F762798A53D543A014CAF8B297CFF8F2F937E883140551EBD684BF2ADE0EF093A92B6E2C55D15BD9AE"
},
"meta": {
"json": {
"AffectedNodes": [
{
"CreatedNode": {
"LedgerEntryType": "NFTokenOffer",
"LedgerIndex": "1DEF39A07F364CB73BF5F8306BE22628D0AE517A2CB0AE5341269B1E671F2052",
"NewFields": {
"Amount": "100",
"Expiration": 999999999,
"Flags": 1,
"Owner": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"TokenID": "00090032B5F762798A53D543A014CAF8B297CFF8F2F937E80000099B00000000"
}
}
},
{
"ModifiedNode": {
"FinalFields": {
"Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"Balance": "99999999999999892",
"BurnedTokens": 1,
"Flags": 0,
"MintedTokens": 5,
"OwnerCount": 2,
"Sequence": 10
},
"LedgerEntryType": "AccountRoot",
"LedgerIndex": "2B6AC232AA4C4BE41BF49D2459FA4A0347E1B543A4C92FCEE0821C0201E2E9A8",
"PreviousFields": {
"Balance": "99999999999999904",
"OwnerCount": 1,
"Sequence": 9
},
"PreviousTxnID": "D73C0ACEA1D4C9186A4AF1EAE2A4BD0A719A78AF6CE897C289AB297D371BEF53",
"PreviousTxnLgrSeq": 6
}
},
{
"CreatedNode": {
"LedgerEntryType": "DirectoryNode",
"LedgerIndex": "86992C19DA69763CAA9A4FC1697508140A995F15173EB00892C8EE23D5FD8FC3",
"NewFields": {
"Flags": 2,
"RootIndex": "86992C19DA69763CAA9A4FC1697508140A995F15173EB00892C8EE23D5FD8FC3",
"TokenID": "00090032B5F762798A53D543A014CAF8B297CFF8F2F937E80000099B00000000"
}
}
},
{
"CreatedNode": {
"LedgerEntryType": "DirectoryNode",
"LedgerIndex": "D8120FC732737A2CF2E9968FDF3797A43B457F2A81AA06D2653171A1EA635204",
"NewFields": {
"Owner": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"RootIndex": "D8120FC732737A2CF2E9968FDF3797A43B457F2A81AA06D2653171A1EA635204"
}
}
}
],
"TransactionIndex": 0,
"TransactionResult": "tesSUCCESS"
},
"binary": "201C00000000F8E3110037561DEF39A07F364CB73BF5F8306BE22628D0AE517A2CB0AE5341269B1E671F2052E822000000012A3B9AC9FF5A00090032B5F762798A53D543A014CAF8B297CFF8F2F937E80000099B000000006140000000000000648214B5F762798A53D543A014CAF8B297CFF8F2F937E8E1E1E5110061250000000655D73C0ACEA1D4C9186A4AF1EAE2A4BD0A719A78AF6CE897C289AB297D371BEF53562B6AC232AA4C4BE41BF49D2459FA4A0347E1B543A4C92FCEE0821C0201E2E9A8E624000000092D0000000162416345785D89FFA0E1E72200000000240000000A2D00000002202B00000005202C0000000162416345785D89FF948114B5F762798A53D543A014CAF8B297CFF8F2F937E8E1E1E31100645686992C19DA69763CAA9A4FC1697508140A995F15173EB00892C8EE23D5FD8FC3E822000000025886992C19DA69763CAA9A4FC1697508140A995F15173EB00892C8EE23D5FD8FC35A00090032B5F762798A53D543A014CAF8B297CFF8F2F937E80000099B00000000E1E1E311006456D8120FC732737A2CF2E9968FDF3797A43B457F2A81AA06D2653171A1EA635204E858D8120FC732737A2CF2E9968FDF3797A43B457F2A81AA06D2653171A1EA6352048214B5F762798A53D543A014CAF8B297CFF8F2F937E8E1E1F1031000"
}
},
"NFTokenCancelOffer": {
"tx": {
"json": {
"Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"Fee": "12",
"Flags": 0,
"LastLedgerSequence": 27,
"Sequence": 10,
"SigningPubKey": "0330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020",
"TokenIDs": [
"00090032B5F762798A53D543A014CAF8B297CFF8F2F937E80000099B00000000"
],
"TransactionType": "NFTokenCancelOffer",
"TxnSignature": "3044022075EAF267D19A626B3D970A96C363380FC7CCFB81178D75F723C5F097309B9FBC022027A896B759E882BFCB810C8AB5B3D819AEBFCAD6E0AF17F909BB3AFA9085EBEE"
},
"binary": "12001C2200000000240000000A201B0000001B68400000000000000C73210330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD02074463044022075EAF267D19A626B3D970A96C363380FC7CCFB81178D75F723C5F097309B9FBC022027A896B759E882BFCB810C8AB5B3D819AEBFCAD6E0AF17F909BB3AFA9085EBEE8114B5F762798A53D543A014CAF8B297CFF8F2F937E804132000090032B5F762798A53D543A014CAF8B297CFF8F2F937E80000099B00000000"
},
"meta": {
"json": {
"AffectedNodes": [
{
"ModifiedNode": {
"FinalFields": {
"Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"Balance": "99999999999999880",
"BurnedTokens": 1,
"Flags": 0,
"MintedTokens": 5,
"OwnerCount": 2,
"Sequence": 11
},
"LedgerEntryType": "AccountRoot",
"LedgerIndex": "2B6AC232AA4C4BE41BF49D2459FA4A0347E1B543A4C92FCEE0821C0201E2E9A8",
"PreviousFields": {
"Balance": "99999999999999892",
"Sequence": 10
},
"PreviousTxnID": "4D43E602582E492DC685408C36B18CFB326FBC06C03DA46580F03356F91D590D",
"PreviousTxnLgrSeq": 7
}
}
],
"TransactionIndex": 0,
"TransactionResult": "tesSUCCESS"
},
"binary": "201C00000000F8E51100612500000007554D43E602582E492DC685408C36B18CFB326FBC06C03DA46580F03356F91D590D562B6AC232AA4C4BE41BF49D2459FA4A0347E1B543A4C92FCEE0821C0201E2E9A8E6240000000A62416345785D89FF94E1E72200000000240000000B2D00000002202B00000005202C0000000162416345785D89FF888114B5F762798A53D543A014CAF8B297CFF8F2F937E8E1E1F1031000"
}
},
"NFTokenAcceptOffer": {
"tx": {
"json": {
"Account": "rKBmBAi3cWzuj6iZYx6K7F3xF1LSs3br3o",
"Fee": "12",
"Flags": 0,
"LastLedgerSequence": 37,
"SellOffer": "AED08CC1F50DD5F23A1948AF86153A3F3B7593E5EC77D65A02BB1B29E05AB6AF",
"Sequence": 9,
"SigningPubKey": "ED3C94824B6696F16CA54F0E3085A5ED8867D19DC4BA572086E03DCAB30B094D79",
"TransactionType": "NFTokenAcceptOffer",
"TxnSignature": "D6653C5BDA53E29CFF05905BE4EA36A913D28D8730EAAB339FFC57D0484230349E195303A301490DDF5DC3BC01AD22047D9A0BBC37983D96ED06DBBFE43F9A08"
},
"binary": "12001D22000000002400000009201B00000025501DAED08CC1F50DD5F23A1948AF86153A3F3B7593E5EC77D65A02BB1B29E05AB6AF68400000000000000C7321ED3C94824B6696F16CA54F0E3085A5ED8867D19DC4BA572086E03DCAB30B094D797440D6653C5BDA53E29CFF05905BE4EA36A913D28D8730EAAB339FFC57D0484230349E195303A301490DDF5DC3BC01AD22047D9A0BBC37983D96ED06DBBFE43F9A088114C77B4F8423139A8F0939DDEB9EB076CC74F4A3B3"
},
"meta": {
"json": {
"AffectedNodes": [
{
"ModifiedNode": {
"FinalFields": {
"Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"Balance": "99997999999999932",
"BurnedTokens": 1,
"Flags": 0,
"MintedTokens": 5,
"OwnerCount": 3,
"Sequence": 15
},
"LedgerEntryType": "AccountRoot",
"LedgerIndex": "2B6AC232AA4C4BE41BF49D2459FA4A0347E1B543A4C92FCEE0821C0201E2E9A8",
"PreviousFields": {
"Balance": "99997999999999832",
"OwnerCount": 4
},
"PreviousTxnID": "BB2608749900A1762B2C7E60AFB437091F56810B39E85545E9541A5F33FD2785",
"PreviousTxnLgrSeq": 16
}
},
{
"DeletedNode": {
"FinalFields": {
"Flags": 2,
"RootIndex": "45D3F54AACBCD7F8A5FB0737DA561BE9F0EA924276B2FDB0B8EA8D7FE4319632",
"TokenID": "00090032B5F762798A53D543A014CAF8B297CFF8F2F937E844B17C9E00000003"
},
"LedgerEntryType": "DirectoryNode",
"LedgerIndex": "45D3F54AACBCD7F8A5FB0737DA561BE9F0EA924276B2FDB0B8EA8D7FE4319632"
}
},
{
"ModifiedNode": {
"FinalFields": {
"Account": "rKBmBAi3cWzuj6iZYx6K7F3xF1LSs3br3o",
"Balance": "1999999999888",
"Flags": 0,
"OwnerCount": 1,
"Sequence": 10
},
"LedgerEntryType": "AccountRoot",
"LedgerIndex": "4BDDA92DDF4C9702E2952261A181E7E1EFF37E9C2AC9D390D0E81AF34FC8A325",
"PreviousFields": {
"Balance": "2000000000000",
"OwnerCount": 0,
"Sequence": 9
},
"PreviousTxnID": "2B07B79F67C41680E07ED8EDCA5BC20827F1694D51207EFD800F5174FE76ADB3",
"PreviousTxnLgrSeq": 13
}
},
{
"DeletedNode": {
"FinalFields": {
"Amount": "100",
"Flags": 1,
"OfferNode": "0000000000000000",
"Owner": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"OwnerNode": "0000000000000000",
"TokenID": "00090032B5F762798A53D543A014CAF8B297CFF8F2F937E844B17C9E00000003"
},
"LedgerEntryType": "NFTokenOffer",
"LedgerIndex": "AED08CC1F50DD5F23A1948AF86153A3F3B7593E5EC77D65A02BB1B29E05AB6AF"
}
},
{
"ModifiedNode": {
"FinalFields": {
"Flags": 0,
"NonFungibleTokens": [
{
"NonFungibleToken": {
"TokenID": "00090032B5F762798A53D543A014CAF8B297CFF8F2F937E80000099B00000000",
"URI": "68747470733A2F2F677265677765697362726F642E636F6D"
}
},
{
"NonFungibleToken": {
"TokenID": "00090032B5F762798A53D543A014CAF8B297CFF8F2F937E816E5DA9C00000001",
"URI": "68747470733A2F2F677265677765697362726F642E636F6D"
}
},
{
"NonFungibleToken": {
"TokenID": "00090032B5F762798A53D543A014CAF8B297CFF8F2F937E82DCBAB9D00000002",
"URI": "68747470733A2F2F677265677765697362726F642E636F6D"
}
}
]
},
"LedgerEntryType": "NFTokenPage",
"LedgerIndex": "B5F762798A53D543A014CAF8B297CFF8F2F937E8FFFFFFFFFFFFFFFFFFFFFFFF",
"PreviousFields": {
"NonFungibleTokens": [
{
"NonFungibleToken": {
"TokenID": "00090032B5F762798A53D543A014CAF8B297CFF8F2F937E80000099B00000000",
"URI": "68747470733A2F2F677265677765697362726F642E636F6D"
}
},
{
"NonFungibleToken": {
"TokenID": "00090032B5F762798A53D543A014CAF8B297CFF8F2F937E816E5DA9C00000001",
"URI": "68747470733A2F2F677265677765697362726F642E636F6D"
}
},
{
"NonFungibleToken": {
"TokenID": "00090032B5F762798A53D543A014CAF8B297CFF8F2F937E82DCBAB9D00000002",
"URI": "68747470733A2F2F677265677765697362726F642E636F6D"
}
},
{
"NonFungibleToken": {
"TokenID": "00090032B5F762798A53D543A014CAF8B297CFF8F2F937E844B17C9E00000003",
"URI": "68747470733A2F2F677265677765697362726F642E636F6D"
}
}
]
},
"PreviousTxnID": "EF14A0EB3B1E7E928A07F4B6A659EEA4FB0F839499397B224E19DE61CAA884C7",
"PreviousTxnLgrSeq": 4
}
},
{
"CreatedNode": {
"LedgerEntryType": "NFTokenPage",
"LedgerIndex": "C77B4F8423139A8F0939DDEB9EB076CC74F4A3B3FFFFFFFFFFFFFFFFFFFFFFFF",
"NewFields": {
"NonFungibleTokens": [
{
"NonFungibleToken": {
"TokenID": "00090032B5F762798A53D543A014CAF8B297CFF8F2F937E844B17C9E00000003",
"URI": "68747470733A2F2F677265677765697362726F642E636F6D"
}
}
]
}
}
},
{
"ModifiedNode": {
"FinalFields": {
"Flags": 0,
"Owner": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
"RootIndex": "D8120FC732737A2CF2E9968FDF3797A43B457F2A81AA06D2653171A1EA635204"
},
"LedgerEntryType": "DirectoryNode",
"LedgerIndex": "D8120FC732737A2CF2E9968FDF3797A43B457F2A81AA06D2653171A1EA635204"
}
}
],
"TransactionIndex": 0,
"TransactionResult": "tesSUCCESS"
},
"binary": "201C00000000F8E5110061250000001055BB2608749900A1762B2C7E60AFB437091F56810B39E85545E9541A5F33FD2785562B6AC232AA4C4BE41BF49D2459FA4A0347E1B543A4C92FCEE0821C0201E2E9A8E62D0000000462416343A6B43FDF58E1E72200000000240000000F2D00000003202B00000005202C0000000162416343A6B43FDFBC8114B5F762798A53D543A014CAF8B297CFF8F2F937E8E1E1E41100645645D3F54AACBCD7F8A5FB0737DA561BE9F0EA924276B2FDB0B8EA8D7FE4319632E722000000025845D3F54AACBCD7F8A5FB0737DA561BE9F0EA924276B2FDB0B8EA8D7FE43196325A00090032B5F762798A53D543A014CAF8B297CFF8F2F937E844B17C9E00000003E1E1E5110061250000000D552B07B79F67C41680E07ED8EDCA5BC20827F1694D51207EFD800F5174FE76ADB3564BDDA92DDF4C9702E2952261A181E7E1EFF37E9C2AC9D390D0E81AF34FC8A325E624000000092D0000000062400001D1A94A2000E1E72200000000240000000A2D0000000162400001D1A94A1F908114C77B4F8423139A8F0939DDEB9EB076CC74F4A3B3E1E1E411003756AED08CC1F50DD5F23A1948AF86153A3F3B7593E5EC77D65A02BB1B29E05AB6AFE722000000013400000000000000003C00000000000000005A00090032B5F762798A53D543A014CAF8B297CFF8F2F937E844B17C9E000000036140000000000000648214B5F762798A53D543A014CAF8B297CFF8F2F937E8E1E1E5110050250000000455EF14A0EB3B1E7E928A07F4B6A659EEA4FB0F839499397B224E19DE61CAA884C756B5F762798A53D543A014CAF8B297CFF8F2F937E8FFFFFFFFFFFFFFFFFFFFFFFFE6FAEC5A00090032B5F762798A53D543A014CAF8B297CFF8F2F937E80000099B00000000751868747470733A2F2F677265677765697362726F642E636F6DE1EC5A00090032B5F762798A53D543A014CAF8B297CFF8F2F937E816E5DA9C00000001751868747470733A2F2F677265677765697362726F642E636F6DE1EC5A00090032B5F762798A53D543A014CAF8B297CFF8F2F937E82DCBAB9D00000002751868747470733A2F2F677265677765697362726F642E636F6DE1EC5A00090032B5F762798A53D543A014CAF8B297CFF8F2F937E844B17C9E00000003751868747470733A2F2F677265677765697362726F642E636F6DE1F1E1E72200000000FAEC5A00090032B5F762798A53D543A014CAF8B297CFF8F2F937E80000099B00000000751868747470733A2F2F677265677765697362726F642E636F6DE1EC5A00090032B5F762798A53D543A014CAF8B297CFF8F2F937E816E5DA9C00000001751868747470733A2F2F677265677765697362726F642E636F6DE1EC5A00090032B5F762798A53D543A014CAF8B297CFF8F2F937E82DCBAB9D00000002751868747470733A2F2F677265677765697362726F642E636F6DE1F1E1E1E311005056C77B4F8423139A8F0939DDEB9EB076CC74F4A3B3FFFFFFFFFFFFFFFFFFFFFFFFE8FAEC5A00090032B5F762798A53D543A014CAF8B297CFF8F2F937E844B17C9E00000003751868747470733A2F2F677265677765697362726F642E636F6DE1F1E1E1E511006456D8120FC732737A2CF2E9968FDF3797A43B457F2A81AA06D2653171A1EA635204E7220000000058D8120FC732737A2CF2E9968FDF3797A43B457F2A81AA06D2653171A1EA6352048214B5F762798A53D543A014CAF8B297CFF8F2F937E8E1E1F1031000"
}
}
}

View File

@@ -0,0 +1 @@
"12000F5016C1AE6DDDEEC05CF2978C0BAD6FE302948E9533691DC749DCDD3B9E5992CA61986140000000000F42406240000000000F4240712132D2471DB72B27E3310F355BB33E339BF26F8392D5A93D3BC0FC3B566612DA0F0A764630440220718D264EF05CAED7C781FF6DE298DCAC68D002562C9BF3A07C1E721B420C0DAB02203A5A4779EF4D2CCC7BC3EF886676D803A9981B928D3B8ACA483B80ECA3CD7B9B"

View File

@@ -0,0 +1,8 @@
{
"TransactionType": "PaymentChannelClaim",
"Channel": "C1AE6DDDEEC05CF2978C0BAD6FE302948E9533691DC749DCDD3B9E5992CA6198",
"Balance": "1000000",
"Amount": "1000000",
"Signature": "30440220718D264EF05CAED7C781FF6DE298DCAC68D002562C9BF3A07C1E721B420C0DAB02203A5A4779EF4D2CCC7BC3EF886676D803A9981B928D3B8ACA483B80ECA3CD7B9B",
"PublicKey": "32D2471DB72B27E3310F355BB33E339BF26F8392D5A93D3BC0FC3B566612DA0F0A"
}

View File

@@ -0,0 +1 @@
"12000D2300002DE32E00005BB820241FC78D66202700015180614000000000002710712132D2471DB72B27E3310F355BB33E339BF26F8392D5A93D3BC0FC3B566612DA0F0A81144B4E9C06F24296074F7BC48F92A97916C6DC5EA98314204288D2E47F8EF6C99BCC457966320D12409711"

View File

@@ -0,0 +1,11 @@
{
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"TransactionType": "PaymentChannelCreate",
"Amount": "10000",
"Destination": "rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW",
"SettleDelay": 86400,
"PublicKey": "32D2471DB72B27E3310F355BB33E339BF26F8392D5A93D3BC0FC3B566612DA0F0A",
"CancelAfter": 533171558,
"DestinationTag": 23480,
"SourceTag": 11747
}

View File

@@ -0,0 +1 @@
"12000E2A206023E65016C1AE6DDDEEC05CF2978C0BAD6FE302948E9533691DC749DCDD3B9E5992CA6198614000000000030D4081144B4E9C06F24296074F7BC48F92A97916C6DC5EA9"

View File

@@ -0,0 +1,7 @@
{
"Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
"TransactionType": "PaymentChannelFund",
"Channel": "C1AE6DDDEEC05CF2978C0BAD6FE302948E9533691DC749DCDD3B9E5992CA6198",
"Amount": "200000",
"Expiration": 543171558
}

View File

@@ -0,0 +1 @@
"12000C22800000002400003B49201B01724E3520230000000368400000000000000B73210315B15964B3704B171E860DE1FC914D283395EE825C8546AEEBF0D24A5802BBC574463044022069FC98D0BC32F510D4F94ECC726613E957D290050E428DD86EDA2C2515A1732D02207064EF085437B3F12A744AC6528D9E0C59FAA5A9FE903DF3639D2F09B522175F81144901F90028CEAD8AF389AC6FA0F83643DB67E95BF4EB1300018114EA97C2F7C88AE5735A59811F6F89E825B478982FE1EB1300018114B4AC72AF6C0EE5A1B8C94A3C20BE09599BBB57EEE1EB1300018114FA7420343B9EA7C9B294C3AF802AE80103F0B11BE1F1"

View File

@@ -0,0 +1 @@
"201C00000008F8E51100612501724363554CD30C2526418A76ABED74713DF144B19F1B29BD8F7BC9EADCF16D33D7EC83D8560DAF42BEE40F0EEFCFD8D54E81ECACD9371D281CDD9B77384FCDAF0E16560A44E62400003B4962400000010F99515AE1E722000000002400003B4A2D0000001962400000010F99514F81144901F90028CEAD8AF389AC6FA0F83643DB67E95B8814CAA26A38FC8F4E5D6D142432B0D7D94A2880DDDFE1E1E51100535616F6AEEC6B85C9658B4BF604671677B7A7B2FAAFDB2FA5A0B72CBB49CAE80924E72200000000202300000003202600000000340000000000000000F4EB1300018114B4AC72AF6C0EE5A1B8C94A3C20BE09599BBB57EEE1EB1300018114EA97C2F7C88AE5735A59811F6F89E825B478982FE1EB1300018114FA7420343B9EA7C9B294C3AF802AE80103F0B11BE1F1E1E1F1031000"

View File

@@ -0,0 +1,94 @@
{
"Account": "rfCp6hiUS4qqN1i4hTyX4ogA49MEbXgCau",
"Fee": "11",
"Flags": 2147483648,
"LastLedgerSequence": 24268341,
"Sequence": 15177,
"SignerEntries": [
{
"SignerEntry": {
"Account": "r4PQv7BCpp4SAJx3isNpQM8T2BuGrMQs5U",
"SignerWeight": 1
}
},
{
"SignerEntry": {
"Account": "rH7KDR67MZR7LDV7gesmEMXtaqU3FaK7Lr",
"SignerWeight": 1
}
},
{
"SignerEntry": {
"Account": "rPqHsX34XApKSfE4UxKbqVXb3WRmmgMY2u",
"SignerWeight": 1
}
}
],
"SignerQuorum": 3,
"SigningPubKey": "0315B15964B3704B171E860DE1FC914D283395EE825C8546AEEBF0D24A5802BBC5",
"TransactionType": "SignerListSet",
"TxnSignature": "3044022069FC98D0BC32F510D4F94ECC726613E957D290050E428DD86EDA2C2515A1732D02207064EF085437B3F12A744AC6528D9E0C59FAA5A9FE903DF3639D2F09B522175F",
"date": 527847001,
"hash": "98C33CABFAE9F830CE842C260E34C25B0F987EE691941C0C9225AD476871B73D",
"inLedger": 24268339,
"ledger_index": 24268339,
"meta": {
"AffectedNodes": [
{
"ModifiedNode": {
"FinalFields": {
"Account": "rfCp6hiUS4qqN1i4hTyX4ogA49MEbXgCau",
"Balance": "4556673359",
"Flags": 0,
"OwnerCount": 25,
"RegularKey": "rK7ShY9CeDMBHLNFSMtTrSAUd9uzwcymcL",
"Sequence": 15178
},
"LedgerEntryType": "AccountRoot",
"LedgerIndex": "0DAF42BEE40F0EEFCFD8D54E81ECACD9371D281CDD9B77384FCDAF0E16560A44",
"PreviousFields": {
"Balance": "4556673370",
"Sequence": 15177
},
"PreviousTxnID": "4CD30C2526418A76ABED74713DF144B19F1B29BD8F7BC9EADCF16D33D7EC83D8",
"PreviousTxnLgrSeq": 24265571
}
},
{
"ModifiedNode": {
"FinalFields": {
"Flags": 0,
"OwnerNode": "0000000000000000",
"SignerEntries": [
{
"SignerEntry": {
"Account": "rH7KDR67MZR7LDV7gesmEMXtaqU3FaK7Lr",
"SignerWeight": 1
}
},
{
"SignerEntry": {
"Account": "r4PQv7BCpp4SAJx3isNpQM8T2BuGrMQs5U",
"SignerWeight": 1
}
},
{
"SignerEntry": {
"Account": "rPqHsX34XApKSfE4UxKbqVXb3WRmmgMY2u",
"SignerWeight": 1
}
}
],
"SignerListID": 0,
"SignerQuorum": 3
},
"LedgerEntryType": "SignerList",
"LedgerIndex": "16F6AEEC6B85C9658B4BF604671677B7A7B2FAAFDB2FA5A0B72CBB49CAE80924"
}
}
],
"TransactionIndex": 8,
"TransactionResult": "tesSUCCESS"
},
"validated": true
}

Some files were not shown because too many files have changed in this diff Show More