mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-04 13:05:49 +00:00
xahau-patch
This commit is contained in:
@@ -99,7 +99,7 @@ r.ripple.com 51235
|
||||
# You will likely update the list with all amendments from a new release of rippled all at once.
|
||||
|
||||
# To get the list of amendments on a network (e.g. devnet) follow the steps in xrpl.js's CONTRIBUTING.md for "Updating the Docker container".
|
||||
# https://github.com/XRPLF/xrpl.js/blob/main/CONTRIBUTING.md
|
||||
# https://github.com/Xahau/xahau.js/blob/main/CONTRIBUTING.md
|
||||
# (Running the script `getNewAmendments.js` should help you identify any new amendments that should be added.)
|
||||
#
|
||||
# Note: The version of rippled you use this config with must have an implementation for the amendments you attempt to enable or it will crash.
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:XRPLF/xrpl.js.git"
|
||||
"url": "git@github.com:Xahau/xahau.js.git"
|
||||
},
|
||||
"license": "ISC",
|
||||
"prettier": "@xrplf/prettier-config",
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
"prettier": "@xrplf/prettier-config",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:XRPLF/xrpl.js.git"
|
||||
"url": "git@github.com:Xahau/xahau.js.git"
|
||||
},
|
||||
"license": "ISC",
|
||||
"readmeFilename": "README.md",
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:XRPLF/xrpl.js.git"
|
||||
"url": "git@github.com:Xahau/xahau.js.git"
|
||||
},
|
||||
"prepublish": "tsc -b",
|
||||
"prepublishOnly": "tslint -b ./ && jest",
|
||||
|
||||
@@ -31,12 +31,12 @@
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:XRPLF/xrpl.js.git"
|
||||
"url": "git@github.com:Xahau/xahau.js.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/XRPLF/xrpl.js/issues"
|
||||
"url": "https://github.com/Xahau/xahau.js/issues"
|
||||
},
|
||||
"homepage": "https://github.com/XRPLF/xrpl.js/tree/main/packages/xahau-binary-codec#readme",
|
||||
"homepage": "https://github.com/Xahau/xahau.js/tree/main/packages/xahau-binary-codec#readme",
|
||||
"license": "ISC",
|
||||
"readmeFilename": "README.md",
|
||||
"prettier": "@xrplf/prettier-config",
|
||||
|
||||
@@ -43,7 +43,7 @@ If true, the field is Variable Length encoded and [length-prefixed](https://xrpl
|
||||
|
||||
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/xahau-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
|
||||
@@ -69,7 +69,7 @@ If you're building your own sidechain or writing an amendment for the XRPL, you
|
||||
|
||||
To do that there are a couple things you need to do:
|
||||
|
||||
1. Generate your own `definitions.json` file from rippled source code using [this tool](https://github.com/RichardAH/xrpl-codec-gen) (The default `definitions.json` for mainnet can be found [here](https://github.com/XRPLF/xrpl.js/blob/main/packages/ripple-binary-codec/src/enums/definitions.json))
|
||||
1. Generate your own `definitions.json` file from rippled source code using [this tool](https://github.com/RichardAH/xrpl-codec-gen) (The default `definitions.json` for mainnet can be found [here](https://github.com/Xahau/xahau.js/blob/main/packages/xahau-binary-codec/src/enums/definitions.json))
|
||||
2. Create new SerializedType classes for any new Types (So that encode/decode behavior is defined). The SerializedType classes correspond to "ST..." classes in Rippled. Note: This is very rarely required.
|
||||
|
||||
- For examples of how to implement that you can look at objects in the [`types` folder](../types/), such as `Amount`, `UInt8`, or `STArray`.
|
||||
@@ -141,4 +141,4 @@ const decoded = decode(encoded, newDefs)
|
||||
|
||||
## Other examples
|
||||
|
||||
You can find other examples of how to modify `definitions.json` in `definition.test.js` which contains tests for this feature, and uses various example modified `definition` files. You can find the tests and the corresponding example `definition` files in [this folder of test cases](https://github.com/XRPLF/xrpl.js/tree/main/packages/ripple-binary-codec/test)
|
||||
You can find other examples of how to modify `definitions.json` in `definition.test.js` which contains tests for this feature, and uses various example modified `definition` files. You can find the tests and the corresponding example `definition` files in [this folder of test cases](https://github.com/Xahau/xahau.js/tree/main/packages/xahau-binary-codec/test)
|
||||
|
||||
@@ -4,7 +4,7 @@ import { TYPE_WIDTH } from './constants'
|
||||
|
||||
/**
|
||||
* Encoding information for a xahaud field, often used in transactions.
|
||||
* See the enums [README.md](https://github.com/XRPLF/xrpl.js/tree/main/packages/xahau-binary-codec/src/enums) for more details on what each means.
|
||||
* See the enums [README.md](https://github.com/Xahau/xahau.js/tree/main/packages/xahau-binary-codec/src/enums) for more details on what each means.
|
||||
*/
|
||||
export interface FieldInfo {
|
||||
nth: number
|
||||
|
||||
@@ -247,13 +247,13 @@ function NegativeUNLTest() {
|
||||
}
|
||||
|
||||
function UNLReportTest() {
|
||||
test('can serialize UNLReport', () => {
|
||||
it('can serialize UNLReport', () => {
|
||||
expect(encode(UNLReport.tx)).toEqual(UNLReport.binary)
|
||||
})
|
||||
test('can serialize UNLReport metadata', () => {
|
||||
it('can serialize UNLReport metadata', () => {
|
||||
expect(encode(UNLReport.tx.meta)).toEqual(UNLReport.meta)
|
||||
})
|
||||
test('can deserialize UNLReport metadata', () => {
|
||||
it('can deserialize UNLReport metadata', () => {
|
||||
expect(decode(UNLReport.meta)).toEqual(UNLReport.tx.meta)
|
||||
})
|
||||
}
|
||||
@@ -274,7 +274,7 @@ function ticketTest() {
|
||||
}
|
||||
|
||||
function remitTest() {
|
||||
test('can serialize Remit', () => {
|
||||
it('can serialize Remit', () => {
|
||||
expect(encode(Remit.tx)).toEqual(Remit.binary)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:XRPLF/xrpl.js.git"
|
||||
"url": "git@github.com:Xahau/xahau.js.git"
|
||||
},
|
||||
"license": "ISC",
|
||||
"prettier": "@xrplf/prettier-config",
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
"prettier": "@xrplf/prettier-config",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:XRPLF/xrpl.js.git"
|
||||
"url": "git@github.com:Xahau/xahau.js.git"
|
||||
},
|
||||
"readmeFilename": "README.md",
|
||||
"keywords": [
|
||||
|
||||
Reference in New Issue
Block a user