Compare commits

...

7 Commits

Author SHA1 Message Date
Mayukha Vadari
596a2df4f8 Merge branch 'main' into sidechain-2.5 2023-02-21 13:48:54 -05:00
Jackson Mills
3d0bec7e89 Add support for disallowIncoming flags (#2221)
* Add support for disallowIncoming flags

* Fix broken tests

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

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

* Update HISTORY.md
2023-02-21 10:22:47 -08:00
Mayukha Vadari
fa8fa7cef9 Merge branch 'main' into sidechain-2.5 2023-02-21 13:15:36 -05:00
Mayukha Vadari
28ad836c13 fix isIssue typing 2023-02-21 13:15:16 -05:00
dependabot[bot]
fde954640f build(deps-dev): bump prettier from 2.8.3 to 2.8.4 (#2210) 2023-02-16 22:08:03 +00:00
Mayukha Vadari
b2dcce75b0 docs: update release instructions with beta details (#2213)
* Update release instructions with beta details

* add tag details

* add version info
2023-02-16 16:07:46 -05:00
dependabot[bot]
e6c7c88209 build(deps-dev): bump webpack-cli from 4.9.2 to 5.0.1 (#2165)
Bumps [webpack-cli](https://github.com/webpack/webpack-cli) from 4.9.2 to 5.0.1.
- [Release notes](https://github.com/webpack/webpack-cli/releases)
- [Changelog](https://github.com/webpack/webpack-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-cli/compare/webpack-cli@4.9.2...webpack-cli@5.0.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-15 16:12:33 -08:00
9 changed files with 171 additions and 110 deletions

View File

@@ -177,32 +177,33 @@ npm uninstall abbrev -w xrpl
NOW WE ARE READY TO PUBLISH! No new code changes happen manually now.
2. Checkout `main` and `git pull`.
3. Create a new branch to capture updates that take place during this process. `git checkout -b <BRANCH_NAME>`
2. Checkout `main` (or your beta branch) and `git pull`.
3. Create a new branch (`git checkout -b <BRANCH_NAME>`) to capture updates that take place during this process.
4. Update `HISTORY.md` to reflect release changes.
5. Run `npm run docgen` if the docs were modified in this release to update them.
5. Run `npm run docgen` if the docs were modified in this release to update them (skip this step for a beta).
6. Run `npm run build` to triple check the build still works
7. Run `npx lerna version --no-git-tag-version` - This creates a draft PR and release tags for the new version.
8. For each changed package, pick what the new version should be. Lerna will bump the versions, commit version bumps to `main`, and create a new git tag for each published package.
9. Run `npm i` to update the package-lock with the updated versions
10. Create a new PR from this branch into `main` and merge it.
11. Checkout `main` and `git pull`
12. Run `npx lerna publish from-package --yes` - This will actually publish the packages.
13. If it asks for it, enter your [npmjs.com](https://npmjs.com) OTP (one-time password) to complete publication.
14. Create a new branch to capture the updated packages from the release (`git checkout -b <BRANCH_NAME>`)
15. Make a PR to merge those changes into `main`
7. Run `npx lerna version --no-git-tag-version` - This creates a draft PR and bumps the versions of the packages.
* For each changed package, pick what the new version should be. Lerna will bump the versions, commit version bumps to `main`, and create a new git tag for each published package.
* If publishing a beta, make sure that the versions are all of the form `a.b.c-beta.d`, where `a`, `b`, and `c` are identical to the last normal release except for one, which has been incremented by 1.
8. Run `npm i` to update the package-lock with the updated versions
9. Create a new PR from this branch into `main` and merge it (you can directly merge into the beta branch for a beta).
10. Checkout `main` and `git pull` (you can skip this step for a beta since you already have the latest version of the beta branch).
11. Run `npx lerna publish from-package --yes` - This will actually publish the packages.
* NOTE: if you're releasing a beta, run `npx lerna publish from-package --dist-tag beta --yes` instead.
* If it asks for it, enter your [npmjs.com](https://npmjs.com) OTP (one-time password) to complete publication.
12. Create a new branch (`git checkout -b <BRANCH_NAME>`)to capture the updated packages from the release. Merge those changes into `main`. (You can skip this step on a beta release).
NOW YOU HAVE PUBLISHED! But you're not done; we have to notify people!
16. Pull the most recent changes to main locally.
17. Run `git tag <tagname> -m <tagname>`, where `<tagname>` is the new package and version (e.g. `xrpl@2.1.1`), for each version released.
18. Run `git push --follow-tags`, to push the tags to Github.
19. On Github, click the "releases" link on the right-hand side of the page.
20. Click "Draft a new release"
21. Click "Choose a tag", and choose a tag that you just created.
22. Edit the name of the release to match the tag (IE \<package\>@\<version\>) and edit the description as you see fit.
23. Repeat steps 19-21 for each release.
24. Send an email to [xrpl-announce](https://groups.google.com/g/xrpl-announce).
13. Pull the most recent changes to main locally.
14. Run `git tag <tagname> -m <tagname>`, where `<tagname>` is the new package and version (e.g. `xrpl@2.1.1`), for each version released.
15. Run `git push --follow-tags`, to push the tags to Github.
16. On Github, click the "releases" link on the right-hand side of the page.
17. Click "Draft a new release"
18. Click "Choose a tag", and choose a tag that you just created.
19. Edit the name of the release to match the tag (IE \<package\>@\<version\>) and edit the description as you see fit.
20. Repeat steps 17-19 for each release.
21. Send an email to [xrpl-announce](https://groups.google.com/g/xrpl-announce).
## Mailing Lists

165
package-lock.json generated
View File

@@ -65,7 +65,7 @@
"url": "^0.11.0",
"webpack": "^5.6.0",
"webpack-bundle-analyzer": "^4.1.0",
"webpack-cli": "^4.2.0"
"webpack-cli": "^5.0.1"
},
"engines": {
"node": ">=12.0.0",
@@ -3339,34 +3339,42 @@
}
},
"node_modules/@webpack-cli/configtest": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz",
"integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==",
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.0.1.tgz",
"integrity": "sha512-njsdJXJSiS2iNbQVS0eT8A/KPnmyH4pv1APj2K0d1wrZcBLw+yppxOy4CGqa0OxDJkzfL/XELDhD8rocnIwB5A==",
"dev": true,
"engines": {
"node": ">=14.15.0"
},
"peerDependencies": {
"webpack": "4.x.x || 5.x.x",
"webpack-cli": "4.x.x"
"webpack": "5.x.x",
"webpack-cli": "5.x.x"
}
},
"node_modules/@webpack-cli/info": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.5.0.tgz",
"integrity": "sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==",
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.1.tgz",
"integrity": "sha512-fE1UEWTwsAxRhrJNikE7v4EotYflkEhBL7EbajfkPlf6E37/2QshOy/D48Mw8G5XMFlQtS6YV42vtbG9zBpIQA==",
"dev": true,
"dependencies": {
"envinfo": "^7.7.3"
"engines": {
"node": ">=14.15.0"
},
"peerDependencies": {
"webpack-cli": "4.x.x"
"webpack": "5.x.x",
"webpack-cli": "5.x.x"
}
},
"node_modules/@webpack-cli/serve": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.7.0.tgz",
"integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==",
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.1.tgz",
"integrity": "sha512-0G7tNyS+yW8TdgHwZKlDWYXFA6OJQnoLCQvYKkQP0Q2X205PSQ6RNUj0M+1OB/9gRQaUZ/ccYfaxd0nhaWKfjw==",
"dev": true,
"engines": {
"node": ">=14.15.0"
},
"peerDependencies": {
"webpack-cli": "4.x.x"
"webpack": "5.x.x",
"webpack-cli": "5.x.x"
},
"peerDependenciesMeta": {
"webpack-dev-server": {
@@ -8780,12 +8788,12 @@
}
},
"node_modules/interpret": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz",
"integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==",
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz",
"integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==",
"dev": true,
"engines": {
"node": ">= 0.10"
"node": ">=10.13.0"
}
},
"node_modules/ip": {
@@ -13439,9 +13447,9 @@
}
},
"node_modules/prettier": {
"version": "2.8.3",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.3.tgz",
"integrity": "sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw==",
"version": "2.8.4",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz",
"integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==",
"dev": true,
"bin": {
"prettier": "bin-prettier.js"
@@ -14220,15 +14228,15 @@
}
},
"node_modules/rechoir": {
"version": "0.7.1",
"resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz",
"integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==",
"version": "0.8.0",
"resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz",
"integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==",
"dev": true,
"dependencies": {
"resolve": "^1.9.0"
"resolve": "^1.20.0"
},
"engines": {
"node": ">= 0.10"
"node": ">= 10.13.0"
}
},
"node_modules/redent": {
@@ -16621,44 +16629,42 @@
}
},
"node_modules/webpack-cli": {
"version": "4.10.0",
"resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz",
"integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==",
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.0.1.tgz",
"integrity": "sha512-S3KVAyfwUqr0Mo/ur3NzIp6jnerNpo7GUO6so51mxLi1spqsA17YcMXy0WOIJtBSnj748lthxC6XLbNKh/ZC+A==",
"dev": true,
"dependencies": {
"@discoveryjs/json-ext": "^0.5.0",
"@webpack-cli/configtest": "^1.2.0",
"@webpack-cli/info": "^1.5.0",
"@webpack-cli/serve": "^1.7.0",
"@webpack-cli/configtest": "^2.0.1",
"@webpack-cli/info": "^2.0.1",
"@webpack-cli/serve": "^2.0.1",
"colorette": "^2.0.14",
"commander": "^7.0.0",
"commander": "^9.4.1",
"cross-spawn": "^7.0.3",
"envinfo": "^7.7.3",
"fastest-levenshtein": "^1.0.12",
"import-local": "^3.0.2",
"interpret": "^2.2.0",
"rechoir": "^0.7.0",
"interpret": "^3.1.1",
"rechoir": "^0.8.0",
"webpack-merge": "^5.7.3"
},
"bin": {
"webpack-cli": "bin/cli.js"
},
"engines": {
"node": ">=10.13.0"
"node": ">=14.15.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/webpack"
},
"peerDependencies": {
"webpack": "4.x.x || 5.x.x"
"webpack": "5.x.x"
},
"peerDependenciesMeta": {
"@webpack-cli/generators": {
"optional": true
},
"@webpack-cli/migrate": {
"optional": true
},
"webpack-bundle-analyzer": {
"optional": true
},
@@ -16668,12 +16674,12 @@
}
},
"node_modules/webpack-cli/node_modules/commander": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
"integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==",
"version": "9.5.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz",
"integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==",
"dev": true,
"engines": {
"node": ">= 10"
"node": "^12.20.0 || >=14"
}
},
"node_modules/webpack-merge": {
@@ -19873,25 +19879,23 @@
}
},
"@webpack-cli/configtest": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz",
"integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==",
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.0.1.tgz",
"integrity": "sha512-njsdJXJSiS2iNbQVS0eT8A/KPnmyH4pv1APj2K0d1wrZcBLw+yppxOy4CGqa0OxDJkzfL/XELDhD8rocnIwB5A==",
"dev": true,
"requires": {}
},
"@webpack-cli/info": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.5.0.tgz",
"integrity": "sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==",
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.1.tgz",
"integrity": "sha512-fE1UEWTwsAxRhrJNikE7v4EotYflkEhBL7EbajfkPlf6E37/2QshOy/D48Mw8G5XMFlQtS6YV42vtbG9zBpIQA==",
"dev": true,
"requires": {
"envinfo": "^7.7.3"
}
"requires": {}
},
"@webpack-cli/serve": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.7.0.tgz",
"integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==",
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.1.tgz",
"integrity": "sha512-0G7tNyS+yW8TdgHwZKlDWYXFA6OJQnoLCQvYKkQP0Q2X205PSQ6RNUj0M+1OB/9gRQaUZ/ccYfaxd0nhaWKfjw==",
"dev": true,
"requires": {}
},
@@ -24134,9 +24138,9 @@
}
},
"interpret": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz",
"integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==",
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz",
"integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==",
"dev": true
},
"ip": {
@@ -27838,9 +27842,9 @@
"dev": true
},
"prettier": {
"version": "2.8.3",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.3.tgz",
"integrity": "sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw==",
"version": "2.8.4",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz",
"integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==",
"dev": true
},
"prettier-linter-helpers": {
@@ -28457,12 +28461,12 @@
}
},
"rechoir": {
"version": "0.7.1",
"resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz",
"integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==",
"version": "0.8.0",
"resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz",
"integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==",
"dev": true,
"requires": {
"resolve": "^1.9.0"
"resolve": "^1.20.0"
}
},
"redent": {
@@ -30285,29 +30289,30 @@
}
},
"webpack-cli": {
"version": "4.10.0",
"resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz",
"integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==",
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.0.1.tgz",
"integrity": "sha512-S3KVAyfwUqr0Mo/ur3NzIp6jnerNpo7GUO6so51mxLi1spqsA17YcMXy0WOIJtBSnj748lthxC6XLbNKh/ZC+A==",
"dev": true,
"requires": {
"@discoveryjs/json-ext": "^0.5.0",
"@webpack-cli/configtest": "^1.2.0",
"@webpack-cli/info": "^1.5.0",
"@webpack-cli/serve": "^1.7.0",
"@webpack-cli/configtest": "^2.0.1",
"@webpack-cli/info": "^2.0.1",
"@webpack-cli/serve": "^2.0.1",
"colorette": "^2.0.14",
"commander": "^7.0.0",
"commander": "^9.4.1",
"cross-spawn": "^7.0.3",
"envinfo": "^7.7.3",
"fastest-levenshtein": "^1.0.12",
"import-local": "^3.0.2",
"interpret": "^2.2.0",
"rechoir": "^0.7.0",
"interpret": "^3.1.1",
"rechoir": "^0.8.0",
"webpack-merge": "^5.7.3"
},
"dependencies": {
"commander": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
"integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==",
"version": "9.5.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz",
"integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==",
"dev": true
}
}

View File

@@ -69,7 +69,7 @@
"url": "^0.11.0",
"webpack": "^5.6.0",
"webpack-bundle-analyzer": "^4.1.0",
"webpack-cli": "^4.2.0"
"webpack-cli": "^5.0.1"
},
"workspaces": [
"./packages/*"

View File

@@ -26,6 +26,7 @@ Wallet.fromMmnemonic()
### Added
* Optional custom amount field to `fundWallet`.
* Support for `disallowIncoming` account set flags (e.g. `asfDisallowIncomingTrustline`)
* Support for the cross-chain bridge feature.
### Changed

View File

@@ -116,6 +116,22 @@ export interface AccountRootFlagsInterface {
* (It has DepositAuth enabled.)
*/
lsfDepositAuth?: boolean
/**
* Disallow incoming NFTOffers from other accounts.
*/
lsfDisallowIncomingNFTOffer?: boolean
/**
* Disallow incoming Checks from other accounts.
*/
lsfDisallowIncomingCheck?: boolean
/**
* Disallow incoming PayChannels from other accounts.
*/
lsfDisallowIncomingPayChan?: boolean
/**
* Disallow incoming Trustlines from other accounts.
*/
lsfDisallowIncomingTrustline?: boolean
}
export enum AccountRootFlags {
@@ -156,4 +172,20 @@ export enum AccountRootFlags {
* (It has DepositAuth enabled.)
*/
lsfDepositAuth = 0x01000000,
/**
* Disallow incoming NFTOffers from other accounts.
*/
lsfDisallowIncomingNFTOffer = 0x04000000,
/**
* Disallow incoming Checks from other accounts.
*/
lsfDisallowIncomingCheck = 0x08000000,
/**
* Disallow incoming PayChannels from other accounts.
*/
lsfDisallowIncomingPayChan = 0x10000000,
/**
* Disallow incoming Trustlines from other accounts.
*/
lsfDisallowIncomingTrustline = 0x20000000,
}

View File

@@ -44,6 +44,15 @@ export enum AccountSetAsfFlags {
* Allow another account to mint and burn tokens on behalf of this account.
*/
asfAuthorizedNFTokenMinter = 10,
/** asf 11 is reserved for Hooks amendment */
/** Disallow other accounts from creating incoming NFTOffers */
asfDisallowIncomingNFTOffer = 12,
/** Disallow other accounts from creating incoming Checks */
asfDisallowIncomingCheck = 13,
/** Disallow other accounts from creating incoming PayChannels */
asfDisallowIncomingPayChan = 14,
/** Disallow other accounts from creating incoming Trustlines */
asfDisallowIncomingTrustline = 15,
}
/**

View File

@@ -6,7 +6,7 @@ import { TRANSACTION_TYPES } from 'ripple-binary-codec'
import { ValidationError } from '../../errors'
import {
Amount,
IssuedCurrency,
Currency,
IssuedCurrencyAmount,
Memo,
Signer,
@@ -72,7 +72,7 @@ function isRecord(value: unknown): value is Record<string, unknown> {
* @param input - The input to check the form and type of.
* @returns Whether the IssuedCurrency is properly formed.
*/
export function isIssue(input: unknown): input is IssuedCurrency {
export function isCurrency(input: unknown): input is Currency {
return (
isRecord(input) &&
((Object.keys(input).length === ISSUE_SIZE &&
@@ -122,9 +122,9 @@ export function isXChainBridge(input: unknown): input is XChainBridge {
isRecord(input) &&
Object.keys(input).length === XCHAIN_BRIDGE_SIZE &&
typeof input.LockingChainDoor === 'string' &&
isIssue(input.LockingChainIssue) &&
isCurrency(input.LockingChainIssue) &&
typeof input.IssuingChainDoor === 'string' &&
isIssue(input.IssuingChainIssue)
isCurrency(input.IssuingChainIssue)
)
}

View File

@@ -30,7 +30,7 @@ describe('AccountSet', function () {
})
it(`throws w/ invalid SetFlag (out of range)`, function () {
account.SetFlag = 12
account.SetFlag = 20
assert.throws(
() => validateAccountSet(account),
@@ -60,7 +60,7 @@ describe('AccountSet', function () {
})
it(`throws w/ invalid ClearFlag`, function () {
account.ClearFlag = 12
account.ClearFlag = 20
assert.throws(
() => validateAccountSet(account),

View File

@@ -151,6 +151,7 @@ describe('Models Utils', function () {
assert.strictEqual(tx.Flags, 0)
})
// eslint-disable-next-line complexity -- Simpler to list them all out at once.
it('parseAccountRootFlags all enabled', function () {
const accountRootFlags =
AccountRootFlags.lsfDefaultRipple |
@@ -161,7 +162,11 @@ describe('Models Utils', function () {
AccountRootFlags.lsfNoFreeze |
AccountRootFlags.lsfPasswordSpent |
AccountRootFlags.lsfRequireAuth |
AccountRootFlags.lsfRequireDestTag
AccountRootFlags.lsfRequireDestTag |
AccountRootFlags.lsfDisallowIncomingNFTOffer |
AccountRootFlags.lsfDisallowIncomingCheck |
AccountRootFlags.lsfDisallowIncomingPayChan |
AccountRootFlags.lsfDisallowIncomingTrustline
const parsed = parseAccountRootFlags(accountRootFlags)
@@ -174,7 +179,11 @@ describe('Models Utils', function () {
parsed.lsfNoFreeze &&
parsed.lsfPasswordSpent &&
parsed.lsfRequireAuth &&
parsed.lsfRequireDestTag,
parsed.lsfRequireDestTag &&
parsed.lsfDisallowIncomingNFTOffer &&
parsed.lsfDisallowIncomingCheck &&
parsed.lsfDisallowIncomingPayChan &&
parsed.lsfDisallowIncomingTrustline,
)
})
@@ -190,6 +199,10 @@ describe('Models Utils', function () {
assert.isUndefined(parsed.lsfPasswordSpent)
assert.isUndefined(parsed.lsfRequireAuth)
assert.isUndefined(parsed.lsfRequireDestTag)
assert.isUndefined(parsed.lsfDisallowIncomingNFTOffer)
assert.isUndefined(parsed.lsfDisallowIncomingCheck)
assert.isUndefined(parsed.lsfDisallowIncomingPayChan)
assert.isUndefined(parsed.lsfDisallowIncomingTrustline)
})
})
})