mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-10 15:55:50 +00:00
Compare commits
18 Commits
@transia/x
...
@transia/r
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6c25d08019 | ||
|
|
6f72189c13 | ||
|
|
5429930c0d | ||
|
|
f82872fe9f | ||
|
|
8d16592abb | ||
|
|
f80d6e1747 | ||
|
|
df1897be10 | ||
|
|
bcbba483c5 | ||
|
|
0560a5867f | ||
|
|
f19466cabe | ||
|
|
f6a90a31c4 | ||
|
|
818d12d68c | ||
|
|
277288f1e9 | ||
|
|
ee59c64b65 | ||
|
|
d36349e410 | ||
|
|
2e38cf54a8 | ||
|
|
3a2a0918f8 | ||
|
|
6d6b5a5863 |
6
.github/workflows/codeql-analysis.yml
vendored
6
.github/workflows/codeql-analysis.yml
vendored
@@ -39,7 +39,7 @@ jobs:
|
|||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v2
|
uses: github/codeql-action/init@v1
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||||
@@ -50,7 +50,7 @@ jobs:
|
|||||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||||
# If this step fails, then you should remove it and run the build manually (see below)
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@v2
|
uses: github/codeql-action/autobuild@v1
|
||||||
|
|
||||||
# ℹ️ Command-line programs to run using the OS shell.
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
# 📚 https://git.io/JvXDl
|
# 📚 https://git.io/JvXDl
|
||||||
@@ -64,4 +64,4 @@ jobs:
|
|||||||
# make release
|
# make release
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v2
|
uses: github/codeql-action/analyze@v1
|
||||||
|
|||||||
124
package-lock.json
generated
124
package-lock.json
generated
@@ -9,10 +9,10 @@
|
|||||||
"./packages/*"
|
"./packages/*"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@transia/ripple-address-codec": "file:packages/ripple-address-codec",
|
"ripple-address-codec": "file:packages/ripple-address-codec",
|
||||||
"@transia/ripple-binary-codec": "file:packages/ripple-binary-codec",
|
"ripple-binary-codec": "file:packages/ripple-binary-codec",
|
||||||
"@transia/ripple-keypairs": "file:packages/ripple-keypairs",
|
"ripple-keypairs": "file:packages/ripple-keypairs",
|
||||||
"@transia/xrpl": "file:packages/xrpl"
|
"xrpl": "file:packages/xrpl"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/brorand": "^1.0.30",
|
"@types/brorand": "^1.0.30",
|
||||||
@@ -14506,6 +14506,18 @@
|
|||||||
"inherits": "^2.0.1"
|
"inherits": "^2.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/ripple-address-codec": {
|
||||||
|
"resolved": "packages/ripple-address-codec",
|
||||||
|
"link": true
|
||||||
|
},
|
||||||
|
"node_modules/ripple-binary-codec": {
|
||||||
|
"resolved": "packages/ripple-binary-codec",
|
||||||
|
"link": true
|
||||||
|
},
|
||||||
|
"node_modules/ripple-keypairs": {
|
||||||
|
"resolved": "packages/ripple-keypairs",
|
||||||
|
"link": true
|
||||||
|
},
|
||||||
"node_modules/run-async": {
|
"node_modules/run-async": {
|
||||||
"version": "2.4.1",
|
"version": "2.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz",
|
||||||
@@ -17032,6 +17044,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/xrpl": {
|
||||||
|
"resolved": "packages/xrpl",
|
||||||
|
"link": true
|
||||||
|
},
|
||||||
"node_modules/xtend": {
|
"node_modules/xtend": {
|
||||||
"version": "4.0.2",
|
"version": "4.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
|
||||||
@@ -17125,7 +17141,7 @@
|
|||||||
},
|
},
|
||||||
"packages/ripple-address-codec": {
|
"packages/ripple-address-codec": {
|
||||||
"name": "@transia/ripple-address-codec",
|
"name": "@transia/ripple-address-codec",
|
||||||
"version": "4.2.6-alpha.0",
|
"version": "4.2.6",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"base-x": "^3.0.9",
|
"base-x": "^3.0.9",
|
||||||
@@ -17137,15 +17153,15 @@
|
|||||||
},
|
},
|
||||||
"packages/ripple-binary-codec": {
|
"packages/ripple-binary-codec": {
|
||||||
"name": "@transia/ripple-binary-codec",
|
"name": "@transia/ripple-binary-codec",
|
||||||
"version": "1.4.4-alpha.2",
|
"version": "1.4.4",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@transia/ripple-address-codec": "^4.2.6-alpha.0",
|
|
||||||
"assert": "^2.0.0",
|
"assert": "^2.0.0",
|
||||||
"big-integer": "^1.6.48",
|
"big-integer": "^1.6.48",
|
||||||
"buffer": "5.6.0",
|
"buffer": "5.6.0",
|
||||||
"create-hash": "^1.2.0",
|
"create-hash": "^1.2.0",
|
||||||
"decimal.js": "^10.2.0"
|
"decimal.js": "^10.2.0",
|
||||||
|
"ripple-address-codec": "^4.2.5"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 10"
|
"node": ">= 10"
|
||||||
@@ -17161,14 +17177,14 @@
|
|||||||
},
|
},
|
||||||
"packages/ripple-keypairs": {
|
"packages/ripple-keypairs": {
|
||||||
"name": "@transia/ripple-keypairs",
|
"name": "@transia/ripple-keypairs",
|
||||||
"version": "1.1.6-alpha.2",
|
"version": "1.1.6",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@transia/ripple-address-codec": "^4.2.6-alpha.0",
|
|
||||||
"bn.js": "^5.1.1",
|
"bn.js": "^5.1.1",
|
||||||
"brorand": "^1.0.5",
|
"brorand": "^1.0.5",
|
||||||
"elliptic": "^6.5.4",
|
"elliptic": "^6.5.4",
|
||||||
"hash.js": "^1.0.3"
|
"hash.js": "^1.0.3",
|
||||||
|
"ripple-address-codec": "^4.2.5"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 10"
|
"node": ">= 10"
|
||||||
@@ -17176,17 +17192,17 @@
|
|||||||
},
|
},
|
||||||
"packages/xrpl": {
|
"packages/xrpl": {
|
||||||
"name": "@transia/xrpl",
|
"name": "@transia/xrpl",
|
||||||
"version": "2.7.1-alpha.5",
|
"version": "2.7.1",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@transia/ripple-address-codec": "^4.2.6-alpha.0",
|
|
||||||
"@transia/ripple-binary-codec": "^1.4.4-alpha.2",
|
|
||||||
"@transia/ripple-keypairs": "^1.1.6-alpha.2",
|
|
||||||
"bignumber.js": "^9.0.0",
|
"bignumber.js": "^9.0.0",
|
||||||
"bip32": "^2.0.6",
|
"bip32": "^2.0.6",
|
||||||
"bip39": "^3.0.4",
|
"bip39": "^3.0.4",
|
||||||
"https-proxy-agent": "^5.0.0",
|
"https-proxy-agent": "^5.0.0",
|
||||||
"lodash": "^4.17.4",
|
"lodash": "^4.17.4",
|
||||||
|
"ripple-address-codec": "^4.2.5",
|
||||||
|
"ripple-binary-codec": "^1.4.3",
|
||||||
|
"ripple-keypairs": "^1.1.5",
|
||||||
"ws": "^8.2.2"
|
"ws": "^8.2.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -19364,12 +19380,12 @@
|
|||||||
"@transia/ripple-binary-codec": {
|
"@transia/ripple-binary-codec": {
|
||||||
"version": "file:packages/ripple-binary-codec",
|
"version": "file:packages/ripple-binary-codec",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@transia/ripple-address-codec": "^4.2.6-alpha.0",
|
|
||||||
"assert": "^2.0.0",
|
"assert": "^2.0.0",
|
||||||
"big-integer": "^1.6.48",
|
"big-integer": "^1.6.48",
|
||||||
"buffer": "5.6.0",
|
"buffer": "5.6.0",
|
||||||
"create-hash": "^1.2.0",
|
"create-hash": "^1.2.0",
|
||||||
"decimal.js": "^10.2.0"
|
"decimal.js": "^10.2.0",
|
||||||
|
"ripple-address-codec": "^4.2.5"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"buffer": {
|
"buffer": {
|
||||||
@@ -19384,20 +19400,17 @@
|
|||||||
"@transia/ripple-keypairs": {
|
"@transia/ripple-keypairs": {
|
||||||
"version": "file:packages/ripple-keypairs",
|
"version": "file:packages/ripple-keypairs",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@transia/ripple-address-codec": "^4.2.6-alpha.0",
|
|
||||||
"bn.js": "^5.1.1",
|
"bn.js": "^5.1.1",
|
||||||
"brorand": "^1.0.5",
|
"brorand": "^1.0.5",
|
||||||
"elliptic": "^6.5.4",
|
"elliptic": "^6.5.4",
|
||||||
"hash.js": "^1.0.3"
|
"hash.js": "^1.0.3",
|
||||||
|
"ripple-address-codec": "^4.2.5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@transia/xrpl": {
|
"@transia/xrpl": {
|
||||||
"version": "file:packages/xrpl",
|
"version": "file:packages/xrpl",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@geut/browser-node-core": "^2.0.13",
|
"@geut/browser-node-core": "^2.0.13",
|
||||||
"@transia/ripple-address-codec": "^4.2.6-alpha.0",
|
|
||||||
"@transia/ripple-binary-codec": "^1.4.4-alpha.2",
|
|
||||||
"@transia/ripple-keypairs": "^1.1.6-alpha.2",
|
|
||||||
"@types/node": "^14.18.36",
|
"@types/node": "^14.18.36",
|
||||||
"assert-browserify": "^2.0.0",
|
"assert-browserify": "^2.0.0",
|
||||||
"bignumber.js": "^9.0.0",
|
"bignumber.js": "^9.0.0",
|
||||||
@@ -19414,6 +19427,9 @@
|
|||||||
"lodash": "^4.17.4",
|
"lodash": "^4.17.4",
|
||||||
"node-polyfill-webpack-plugin": "^2.0.1",
|
"node-polyfill-webpack-plugin": "^2.0.1",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
|
"ripple-address-codec": "^4.2.5",
|
||||||
|
"ripple-binary-codec": "^1.4.3",
|
||||||
|
"ripple-keypairs": "^1.1.5",
|
||||||
"typedoc": "^0.23.24",
|
"typedoc": "^0.23.24",
|
||||||
"ws": "^8.2.2"
|
"ws": "^8.2.2"
|
||||||
}
|
}
|
||||||
@@ -28725,6 +28741,43 @@
|
|||||||
"inherits": "^2.0.1"
|
"inherits": "^2.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"ripple-address-codec": {
|
||||||
|
"version": "file:packages/ripple-address-codec",
|
||||||
|
"requires": {
|
||||||
|
"base-x": "^3.0.9",
|
||||||
|
"create-hash": "^1.1.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ripple-binary-codec": {
|
||||||
|
"version": "file:packages/ripple-binary-codec",
|
||||||
|
"requires": {
|
||||||
|
"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.5"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"buffer": {
|
||||||
|
"version": "5.6.0",
|
||||||
|
"requires": {
|
||||||
|
"base64-js": "^1.0.2",
|
||||||
|
"ieee754": "^1.1.4"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ripple-keypairs": {
|
||||||
|
"version": "file:packages/ripple-keypairs",
|
||||||
|
"requires": {
|
||||||
|
"bn.js": "^5.1.1",
|
||||||
|
"brorand": "^1.0.5",
|
||||||
|
"elliptic": "^6.5.4",
|
||||||
|
"hash.js": "^1.0.3",
|
||||||
|
"ripple-address-codec": "^4.2.5"
|
||||||
|
}
|
||||||
|
},
|
||||||
"run-async": {
|
"run-async": {
|
||||||
"version": "2.4.1",
|
"version": "2.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz",
|
||||||
@@ -30611,6 +30664,33 @@
|
|||||||
"integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==",
|
"integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==",
|
||||||
"requires": {}
|
"requires": {}
|
||||||
},
|
},
|
||||||
|
"xrpl": {
|
||||||
|
"version": "file:packages/xrpl",
|
||||||
|
"requires": {
|
||||||
|
"@geut/browser-node-core": "^2.0.13",
|
||||||
|
"@types/node": "^14.18.36",
|
||||||
|
"assert-browserify": "^2.0.0",
|
||||||
|
"bignumber.js": "^9.0.0",
|
||||||
|
"bip32": "^2.0.6",
|
||||||
|
"bip39": "^3.0.4",
|
||||||
|
"browserify-fs": "^1.0.0",
|
||||||
|
"constants-browserify": "^1.0.0",
|
||||||
|
"https-browserify": "^1.0.0",
|
||||||
|
"https-proxy-agent": "^5.0.0",
|
||||||
|
"karma": "^6.4.1",
|
||||||
|
"karma-chrome-launcher": "^3.1.1",
|
||||||
|
"karma-jasmine": "^5.1.0",
|
||||||
|
"karma-webpack": "^5.0.0",
|
||||||
|
"lodash": "^4.17.4",
|
||||||
|
"node-polyfill-webpack-plugin": "^2.0.1",
|
||||||
|
"react": "^18.2.0",
|
||||||
|
"ripple-address-codec": "^4.2.5",
|
||||||
|
"ripple-binary-codec": "^1.4.3",
|
||||||
|
"ripple-keypairs": "^1.1.5",
|
||||||
|
"typedoc": "^0.23.24",
|
||||||
|
"ws": "^8.2.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"xtend": {
|
"xtend": {
|
||||||
"version": "4.0.2",
|
"version": "4.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
|
||||||
|
|||||||
@@ -13,10 +13,10 @@
|
|||||||
"update:confirm": "npx npm-check-updates --configFileName .ncurc.json -u"
|
"update:confirm": "npx npm-check-updates --configFileName .ncurc.json -u"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@transia/ripple-address-codec": "file:packages/ripple-address-codec",
|
"ripple-address-codec": "file:packages/ripple-address-codec",
|
||||||
"@transia/ripple-binary-codec": "file:packages/ripple-binary-codec",
|
"ripple-binary-codec": "file:packages/ripple-binary-codec",
|
||||||
"@transia/ripple-keypairs": "file:packages/ripple-keypairs",
|
"ripple-keypairs": "file:packages/ripple-keypairs",
|
||||||
"@transia/xrpl": "file:packages/xrpl"
|
"xrpl": "file:packages/xrpl"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/brorand": "^1.0.30",
|
"@types/brorand": "^1.0.30",
|
||||||
|
|||||||
4
packages/ripple-address-codec/package-lock.json
generated
4
packages/ripple-address-codec/package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "ripple-address-codec",
|
"name": "ripple-address-codec",
|
||||||
"version": "4.2.6-alpha.0",
|
"version": "4.2.6",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "ripple-address-codec",
|
"name": "ripple-address-codec",
|
||||||
"version": "4.2.6-alpha.0",
|
"version": "4.2.6",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"base-x": "^3.0.9",
|
"base-x": "^3.0.9",
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@transia/ripple-address-codec",
|
"name": "@transia/ripple-address-codec",
|
||||||
"publishConfig": {
|
"version": "4.2.6",
|
||||||
"access": "public"
|
|
||||||
},
|
|
||||||
"version": "4.2.6-alpha.0",
|
|
||||||
"description": "encodes/decodes base58 encoded XRP Ledger identifiers",
|
"description": "encodes/decodes base58 encoded XRP Ledger identifiers",
|
||||||
"files": [
|
"files": [
|
||||||
"dist/*",
|
"dist/*",
|
||||||
@@ -18,7 +15,7 @@
|
|||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git@github.com/Transia-RnD/xrpl.js/tree/beta"
|
"url": "git@github.com:XRPLF/xrpl.js.git"
|
||||||
},
|
},
|
||||||
"prepublish": "tsc -b",
|
"prepublish": "tsc -b",
|
||||||
"prepublishOnly": "tslint -b ./ && jest",
|
"prepublishOnly": "tslint -b ./ && jest",
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@transia/ripple-binary-codec",
|
"name": "@transia/ripple-binary-codec",
|
||||||
"publishConfig": {
|
"version": "1.4.4",
|
||||||
"access": "public"
|
|
||||||
},
|
|
||||||
"version": "1.4.4-alpha.2",
|
|
||||||
"description": "XRP Ledger binary codec",
|
"description": "XRP Ledger binary codec",
|
||||||
"files": [
|
"files": [
|
||||||
"dist/*",
|
"dist/*",
|
||||||
@@ -15,12 +12,12 @@
|
|||||||
"test": "test"
|
"test": "test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@transia/ripple-address-codec": "^4.2.6-alpha.0",
|
|
||||||
"assert": "^2.0.0",
|
"assert": "^2.0.0",
|
||||||
"big-integer": "^1.6.48",
|
"big-integer": "^1.6.48",
|
||||||
"buffer": "5.6.0",
|
"buffer": "5.6.0",
|
||||||
"create-hash": "^1.2.0",
|
"create-hash": "^1.2.0",
|
||||||
"decimal.js": "^10.2.0"
|
"decimal.js": "^10.2.0",
|
||||||
|
"ripple-address-codec": "^4.2.5"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc -b && copyfiles ./src/enums/definitions.json ./dist/enums/",
|
"build": "tsc -b && copyfiles ./src/enums/definitions.json ./dist/enums/",
|
||||||
@@ -31,7 +28,7 @@
|
|||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git@github.com/Transia-RnD/xrpl.js/tree/beta"
|
"url": "git@github.com:XRPLF/xrpl.js.git"
|
||||||
},
|
},
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/XRPLF/xrpl.js/issues"
|
"url": "https://github.com/XRPLF/xrpl.js/issues"
|
||||||
@@ -42,6 +39,5 @@
|
|||||||
"prettier": "@xrplf/prettier-config",
|
"prettier": "@xrplf/prettier-config",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 10"
|
"node": ">= 10"
|
||||||
},
|
}
|
||||||
"gitHead": "3409d5631577c3f2d7e304c73ba19dee6219d6ce"
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -779,7 +779,7 @@
|
|||||||
[
|
[
|
||||||
"LockCount",
|
"LockCount",
|
||||||
{
|
{
|
||||||
"nth": 49,
|
"nth": 47,
|
||||||
"isVLEncoded": false,
|
"isVLEncoded": false,
|
||||||
"isSerialized": true,
|
"isSerialized": true,
|
||||||
"isSigningField": true,
|
"isSigningField": true,
|
||||||
@@ -2315,10 +2315,10 @@
|
|||||||
"temSEQ_AND_TICKET": -263,
|
"temSEQ_AND_TICKET": -263,
|
||||||
"temBAD_NFTOKEN_TRANSFER_FEE": -262,
|
"temBAD_NFTOKEN_TRANSFER_FEE": -262,
|
||||||
"temAMM_BAD_TOKENS": -261,
|
"temAMM_BAD_TOKENS": -261,
|
||||||
"temXCHAIN_EQUAL_DOOR_ACCOUNTS": -260,
|
"temEQUAL_DOOR_ACCOUNTS": -260,
|
||||||
"temXCHAIN_BAD_PROOF": -259,
|
"temBAD_XCHAIN_PROOF": -259,
|
||||||
"temXCHAIN_BRIDGE_BAD_ISSUES": -258,
|
"temSIDECHAIN_BAD_ISSUES": -258,
|
||||||
"temXCHAIN_BRIDGE_NONDOOR_OWNER": -257,
|
"temSIDECHAIN_NONDOOR_OWNER": -257,
|
||||||
"temXCHAIN_BRIDGE_BAD_MIN_ACCOUNT_CREATE_AMOUNT": -256,
|
"temXCHAIN_BRIDGE_BAD_MIN_ACCOUNT_CREATE_AMOUNT": -256,
|
||||||
"temXCHAIN_BRIDGE_BAD_REWARD_AMOUNT": -255,
|
"temXCHAIN_BRIDGE_BAD_REWARD_AMOUNT": -255,
|
||||||
"temXCHAIN_TOO_MANY_ATTESTATIONS": -254,
|
"temXCHAIN_TOO_MANY_ATTESTATIONS": -254,
|
||||||
@@ -2359,8 +2359,7 @@
|
|||||||
"terNO_RIPPLE": -90,
|
"terNO_RIPPLE": -90,
|
||||||
"terQUEUED": -89,
|
"terQUEUED": -89,
|
||||||
"terPRE_TICKET": -88,
|
"terPRE_TICKET": -88,
|
||||||
"terNO_AMM": -87,
|
"terNO_HOOK": -87,
|
||||||
"terNO_HOOK": -86,
|
|
||||||
|
|
||||||
"tesSUCCESS": 0,
|
"tesSUCCESS": 0,
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import {
|
|||||||
encodeAccountID,
|
encodeAccountID,
|
||||||
isValidXAddress,
|
isValidXAddress,
|
||||||
xAddressToClassicAddress,
|
xAddressToClassicAddress,
|
||||||
} from '@transia/ripple-address-codec'
|
} from 'ripple-address-codec'
|
||||||
import { Hash160 } from './hash-160'
|
import { Hash160 } from './hash-160'
|
||||||
import { Buffer } from 'buffer/'
|
import { Buffer } from 'buffer/'
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,7 @@ import {
|
|||||||
XrplDefinitionsBase,
|
XrplDefinitionsBase,
|
||||||
} from '../enums'
|
} from '../enums'
|
||||||
import { SerializedType, JsonObject } from './serialized-type'
|
import { SerializedType, JsonObject } from './serialized-type'
|
||||||
import {
|
import { xAddressToClassicAddress, isValidXAddress } from 'ripple-address-codec'
|
||||||
xAddressToClassicAddress,
|
|
||||||
isValidXAddress,
|
|
||||||
} from '@transia/ripple-address-codec'
|
|
||||||
import { BinaryParser } from '../serdes/binary-parser'
|
import { BinaryParser } from '../serdes/binary-parser'
|
||||||
import { BinarySerializer, BytesList } from '../serdes/binary-serializer'
|
import { BinarySerializer, BytesList } from '../serdes/binary-serializer'
|
||||||
import { Buffer } from 'buffer/'
|
import { Buffer } from 'buffer/'
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
const { coreTypes } = require('../src/types')
|
const { coreTypes } = require('../src/types')
|
||||||
const Decimal = require('decimal.js')
|
const Decimal = require('decimal.js')
|
||||||
|
|
||||||
const { encodeAccountID } = require('@transia/ripple-address-codec')
|
const { encodeAccountID } = require('ripple-address-codec')
|
||||||
const { binary } = require('../src/coretypes')
|
const { binary } = require('../src/coretypes')
|
||||||
const { Amount, Hash160 } = coreTypes
|
const { Amount, Hash160 } = coreTypes
|
||||||
const { makeParser, readJSON } = binary
|
const { makeParser, readJSON } = binary
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@transia/ripple-keypairs",
|
"name": "@transia/ripple-keypairs",
|
||||||
"publishConfig": {
|
"version": "1.1.6",
|
||||||
"access": "public"
|
|
||||||
},
|
|
||||||
"version": "1.1.6-alpha.2",
|
|
||||||
"description": "Cryptographic key pairs for the XRP Ledger",
|
"description": "Cryptographic key pairs for the XRP Ledger",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc -b",
|
"build": "tsc -b",
|
||||||
@@ -20,20 +17,19 @@
|
|||||||
"test": "test"
|
"test": "test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@transia/ripple-address-codec": "^4.2.6-alpha.0",
|
|
||||||
"bn.js": "^5.1.1",
|
"bn.js": "^5.1.1",
|
||||||
"brorand": "^1.0.5",
|
"brorand": "^1.0.5",
|
||||||
"elliptic": "^6.5.4",
|
"elliptic": "^6.5.4",
|
||||||
"hash.js": "^1.0.3"
|
"hash.js": "^1.0.3",
|
||||||
|
"ripple-address-codec": "^4.2.5"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git@github.com/Transia-RnD/xrpl.js/tree/beta"
|
"url": "git@github.com:XRPLF/xrpl.js.git"
|
||||||
},
|
},
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"prettier": "@xrplf/prettier-config",
|
"prettier": "@xrplf/prettier-config",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 10"
|
"node": ">= 10"
|
||||||
},
|
}
|
||||||
"gitHead": "3409d5631577c3f2d7e304c73ba19dee6219d6ce"
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import brorand = require('brorand')
|
|||||||
import * as hashjs from 'hash.js'
|
import * as hashjs from 'hash.js'
|
||||||
import * as elliptic from 'elliptic'
|
import * as elliptic from 'elliptic'
|
||||||
|
|
||||||
import * as addressCodec from '@transia/ripple-address-codec'
|
import * as addressCodec from 'ripple-address-codec'
|
||||||
import { derivePrivateKey, accountPublicFromPublicGenerator } from './secp256k1'
|
import { derivePrivateKey, accountPublicFromPublicGenerator } from './secp256k1'
|
||||||
import * as utils from './utils'
|
import * as utils from './utils'
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import assert from 'assert'
|
import assert from 'assert'
|
||||||
import * as api from '@transia/ripple-address-codec'
|
import * as api from 'ripple-address-codec'
|
||||||
|
|
||||||
function toHex(bytes) {
|
function toHex(bytes) {
|
||||||
return Buffer.from(bytes).toString('hex').toUpperCase()
|
return Buffer.from(bytes).toString('hex').toUpperCase()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import assert from 'assert'
|
import assert from 'assert'
|
||||||
import * as api from '@transia/ripple-address-codec'
|
import * as api from 'ripple-address-codec'
|
||||||
|
|
||||||
function toHex(bytes: Buffer) {
|
function toHex(bytes: Buffer) {
|
||||||
return Buffer.from(bytes).toString('hex').toUpperCase()
|
return Buffer.from(bytes).toString('hex').toUpperCase()
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@transia/xrpl",
|
"name": "@transia/xrpl",
|
||||||
"publishConfig": {
|
"version": "2.7.1",
|
||||||
"access": "public"
|
|
||||||
},
|
|
||||||
"version": "2.7.1-alpha.5",
|
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"description": "A TypeScript/JavaScript API for interacting with the XRP Ledger in Node.js and the browser",
|
"description": "A TypeScript/JavaScript API for interacting with the XRP Ledger in Node.js and the browser",
|
||||||
"files": [
|
"files": [
|
||||||
@@ -25,14 +22,14 @@
|
|||||||
"https-proxy-agent": false
|
"https-proxy-agent": false
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@transia/ripple-address-codec": "^4.2.6-alpha.0",
|
|
||||||
"@transia/ripple-binary-codec": "^1.4.4-alpha.2",
|
|
||||||
"@transia/ripple-keypairs": "^1.1.6-alpha.2",
|
|
||||||
"bignumber.js": "^9.0.0",
|
"bignumber.js": "^9.0.0",
|
||||||
"bip32": "^2.0.6",
|
"bip32": "^2.0.6",
|
||||||
"bip39": "^3.0.4",
|
"bip39": "^3.0.4",
|
||||||
"https-proxy-agent": "^5.0.0",
|
"https-proxy-agent": "^5.0.0",
|
||||||
"lodash": "^4.17.4",
|
"lodash": "^4.17.4",
|
||||||
|
"ripple-address-codec": "^4.2.5",
|
||||||
|
"ripple-binary-codec": "^1.4.3",
|
||||||
|
"ripple-keypairs": "^1.1.5",
|
||||||
"ws": "^8.2.2"
|
"ws": "^8.2.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -78,11 +75,10 @@
|
|||||||
"prettier": "@xrplf/prettier-config",
|
"prettier": "@xrplf/prettier-config",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git@github.com/Transia-RnD/xrpl.js/tree/beta"
|
"url": "git@github.com:XRPLF/xrpl.js.git"
|
||||||
},
|
},
|
||||||
"readmeFilename": "README.md",
|
"readmeFilename": "README.md",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10.13.0"
|
"node": ">=10.13.0"
|
||||||
},
|
}
|
||||||
"gitHead": "3409d5631577c3f2d7e304c73ba19dee6219d6ce"
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { IncomingMessage } from 'http'
|
import { IncomingMessage } from 'http'
|
||||||
import { request as httpsRequest, RequestOptions } from 'https'
|
import { request as httpsRequest, RequestOptions } from 'https'
|
||||||
|
|
||||||
import { isValidClassicAddress } from '@transia/ripple-address-codec'
|
import { isValidClassicAddress } from 'ripple-address-codec'
|
||||||
|
|
||||||
import type { Client } from '../client'
|
import type { Client } from '../client'
|
||||||
import { RippledError, XRPLFaucetError } from '../errors'
|
import { RippledError, XRPLFaucetError } from '../errors'
|
||||||
|
|||||||
@@ -1,17 +1,4 @@
|
|||||||
/* eslint-disable max-lines -- There are lots of equivalent constructors which make sense to have here. */
|
/* eslint-disable max-lines -- There are lots of equivalent constructors which make sense to have here. */
|
||||||
import {
|
|
||||||
decode,
|
|
||||||
encodeForSigning,
|
|
||||||
encodeForMultisigning,
|
|
||||||
encode,
|
|
||||||
} from '@transia/ripple-binary-codec'
|
|
||||||
import {
|
|
||||||
deriveAddress,
|
|
||||||
deriveKeypair,
|
|
||||||
generateSeed,
|
|
||||||
verify,
|
|
||||||
sign,
|
|
||||||
} from '@transia/ripple-keypairs'
|
|
||||||
import BigNumber from 'bignumber.js'
|
import BigNumber from 'bignumber.js'
|
||||||
import { fromSeed } from 'bip32'
|
import { fromSeed } from 'bip32'
|
||||||
import { mnemonicToSeedSync, validateMnemonic } from 'bip39'
|
import { mnemonicToSeedSync, validateMnemonic } from 'bip39'
|
||||||
@@ -22,7 +9,20 @@ import {
|
|||||||
isValidXAddress,
|
isValidXAddress,
|
||||||
xAddressToClassicAddress,
|
xAddressToClassicAddress,
|
||||||
encodeSeed,
|
encodeSeed,
|
||||||
} from '@transia/ripple-address-codec'
|
} from 'ripple-address-codec'
|
||||||
|
import {
|
||||||
|
decode,
|
||||||
|
encodeForSigning,
|
||||||
|
encodeForMultisigning,
|
||||||
|
encode,
|
||||||
|
} from 'ripple-binary-codec'
|
||||||
|
import {
|
||||||
|
deriveAddress,
|
||||||
|
deriveKeypair,
|
||||||
|
generateSeed,
|
||||||
|
verify,
|
||||||
|
sign,
|
||||||
|
} from 'ripple-keypairs'
|
||||||
|
|
||||||
import ECDSA from '../ECDSA'
|
import ECDSA from '../ECDSA'
|
||||||
import { ValidationError, XrplError } from '../errors'
|
import { ValidationError, XrplError } from '../errors'
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
|
import { BigNumber } from 'bignumber.js'
|
||||||
|
import { flatMap } from 'lodash'
|
||||||
|
import { decodeAccountID } from 'ripple-address-codec'
|
||||||
import {
|
import {
|
||||||
decode,
|
decode,
|
||||||
encode,
|
encode,
|
||||||
encodeForSigning,
|
encodeForSigning,
|
||||||
encodeForSigningClaim,
|
encodeForSigningClaim,
|
||||||
} from '@transia/ripple-binary-codec'
|
} from 'ripple-binary-codec'
|
||||||
import { sign as signWithKeypair, verify } from '@transia/ripple-keypairs'
|
import { sign as signWithKeypair, verify } from 'ripple-keypairs'
|
||||||
import { BigNumber } from 'bignumber.js'
|
|
||||||
import { flatMap } from 'lodash'
|
|
||||||
import { decodeAccountID } from '@transia/ripple-address-codec'
|
|
||||||
|
|
||||||
import { ValidationError } from '../errors'
|
import { ValidationError } from '../errors'
|
||||||
import { Signer } from '../models/common'
|
import { Signer } from '../models/common'
|
||||||
|
|||||||
@@ -101,7 +101,6 @@ import {
|
|||||||
getXrpBalance,
|
getXrpBalance,
|
||||||
submit,
|
submit,
|
||||||
submitAndWait,
|
submitAndWait,
|
||||||
getNetworkID,
|
|
||||||
} from '../sugar'
|
} from '../sugar'
|
||||||
import fundWallet from '../Wallet/fundWallet'
|
import fundWallet from '../Wallet/fundWallet'
|
||||||
|
|
||||||
@@ -201,13 +200,6 @@ class Client extends EventEmitter {
|
|||||||
*/
|
*/
|
||||||
public readonly maxFeeXRP: string
|
public readonly maxFeeXRP: string
|
||||||
|
|
||||||
/**
|
|
||||||
* Network ID of the server this sdk is connected to
|
|
||||||
*
|
|
||||||
* @category Fee
|
|
||||||
*/
|
|
||||||
public networkID: number
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new Client with a websocket connection to a rippled server.
|
* Creates a new Client with a websocket connection to a rippled server.
|
||||||
*
|
*
|
||||||
@@ -226,7 +218,6 @@ class Client extends EventEmitter {
|
|||||||
|
|
||||||
this.feeCushion = options.feeCushion ?? DEFAULT_FEE_CUSHION
|
this.feeCushion = options.feeCushion ?? DEFAULT_FEE_CUSHION
|
||||||
this.maxFeeXRP = options.maxFeeXRP ?? DEFAULT_MAX_FEE_XRP
|
this.maxFeeXRP = options.maxFeeXRP ?? DEFAULT_MAX_FEE_XRP
|
||||||
this.networkID = 1
|
|
||||||
|
|
||||||
this.connection = new Connection(server, options)
|
this.connection = new Connection(server, options)
|
||||||
|
|
||||||
@@ -643,11 +634,6 @@ class Client extends EventEmitter {
|
|||||||
*/
|
*/
|
||||||
public getLedgerIndex = getLedgerIndex
|
public getLedgerIndex = getLedgerIndex
|
||||||
|
|
||||||
/**
|
|
||||||
* @category Abstraction
|
|
||||||
*/
|
|
||||||
public getNetworkID = getNetworkID
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @category Faucet
|
* @category Faucet
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { decode } from '@transia/ripple-binary-codec'
|
|
||||||
import BigNumber from 'bignumber.js'
|
import BigNumber from 'bignumber.js'
|
||||||
|
import { decode } from 'ripple-binary-codec'
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
AccountTxResponse,
|
AccountTxResponse,
|
||||||
|
|||||||
@@ -136,10 +136,6 @@ export interface ServerInfoResponse extends BaseResponse {
|
|||||||
* overall network's load factor.
|
* overall network's load factor.
|
||||||
*/
|
*/
|
||||||
load_factor?: number
|
load_factor?: number
|
||||||
/**
|
|
||||||
* The network id of the server.
|
|
||||||
*/
|
|
||||||
network_id?: number
|
|
||||||
/**
|
/**
|
||||||
* Current multiplier to the transaction cost based on
|
* Current multiplier to the transaction cost based on
|
||||||
* load to this server.
|
* load to this server.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* eslint-disable complexity -- Necessary for validateAccountSet */
|
/* eslint-disable complexity -- Necessary for validateAccountSet */
|
||||||
|
|
||||||
import { isValidClassicAddress } from '@transia/ripple-address-codec'
|
import { isValidClassicAddress } from 'ripple-address-codec'
|
||||||
|
|
||||||
import { ValidationError } from '../../errors'
|
import { ValidationError } from '../../errors'
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* eslint-disable max-lines-per-function -- Necessary for validateBaseTransaction */
|
/* eslint-disable max-lines-per-function -- Necessary for validateBaseTransaction */
|
||||||
/* eslint-disable complexity -- Necessary for validateBaseTransaction */
|
/* eslint-disable complexity -- Necessary for validateBaseTransaction */
|
||||||
/* eslint-disable max-statements -- Necessary for validateBaseTransaction */
|
/* eslint-disable max-statements -- Necessary for validateBaseTransaction */
|
||||||
import { TRANSACTION_TYPES } from '@transia/ripple-binary-codec'
|
import { TRANSACTION_TYPES } from 'ripple-binary-codec'
|
||||||
|
|
||||||
import { ValidationError } from '../../errors'
|
import { ValidationError } from '../../errors'
|
||||||
import { Amount, IssuedCurrencyAmount, Memo, Signer } from '../common'
|
import { Amount, IssuedCurrencyAmount, Memo, Signer } from '../common'
|
||||||
@@ -159,9 +159,7 @@ export interface BaseTransaction {
|
|||||||
* account it says it is from.
|
* account it says it is from.
|
||||||
*/
|
*/
|
||||||
TxnSignature?: string
|
TxnSignature?: string
|
||||||
/**
|
|
||||||
* The network id of the transaction.
|
|
||||||
*/
|
|
||||||
NetworkID?: number
|
NetworkID?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -256,9 +254,6 @@ export function validateBaseTransaction(common: Record<string, unknown>): void {
|
|||||||
) {
|
) {
|
||||||
throw new ValidationError('BaseTransaction: invalid TxnSignature')
|
throw new ValidationError('BaseTransaction: invalid TxnSignature')
|
||||||
}
|
}
|
||||||
if (common.NetworkID !== undefined && typeof common.NetworkID !== 'number') {
|
|
||||||
throw new ValidationError('BaseTransaction: invalid NetworkID')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -47,12 +47,3 @@ export { SetHook } from './setHook'
|
|||||||
export { SignerListSet } from './signerListSet'
|
export { SignerListSet } from './signerListSet'
|
||||||
export { TicketCreate } from './ticketCreate'
|
export { TicketCreate } from './ticketCreate'
|
||||||
export { TrustSetFlagsInterface, TrustSetFlags, TrustSet } from './trustSet'
|
export { TrustSetFlagsInterface, TrustSetFlags, TrustSet } from './trustSet'
|
||||||
export {
|
|
||||||
URITokenMintFlagsInterface,
|
|
||||||
URITokenMintFlags,
|
|
||||||
URITokenMint,
|
|
||||||
} from './uriTokenMint'
|
|
||||||
export { URITokenBurn } from './uriTokenBurn'
|
|
||||||
export { URITokenCreateSellOffer } from './uriTokenCreateSellOffer'
|
|
||||||
export { URITokenBuy } from './uriTokenBuy'
|
|
||||||
export { URITokenCancelSellOffer } from './uriTokenCancelSellOffer'
|
|
||||||
|
|||||||
@@ -48,17 +48,6 @@ import { SetRegularKey, validateSetRegularKey } from './setRegularKey'
|
|||||||
import { SignerListSet, validateSignerListSet } from './signerListSet'
|
import { SignerListSet, validateSignerListSet } from './signerListSet'
|
||||||
import { TicketCreate, validateTicketCreate } from './ticketCreate'
|
import { TicketCreate, validateTicketCreate } from './ticketCreate'
|
||||||
import { TrustSet, validateTrustSet } from './trustSet'
|
import { TrustSet, validateTrustSet } from './trustSet'
|
||||||
import { URITokenBurn, validateURITokenBurn } from './uriTokenBurn'
|
|
||||||
import { URITokenBuy, validateURITokenBuy } from './uriTokenBuy'
|
|
||||||
import {
|
|
||||||
URITokenCancelSellOffer,
|
|
||||||
validateURITokenCancelSellOffer,
|
|
||||||
} from './uriTokenCancelSellOffer'
|
|
||||||
import {
|
|
||||||
URITokenCreateSellOffer,
|
|
||||||
validateURITokenCreateSellOffer,
|
|
||||||
} from './uriTokenCreateSellOffer'
|
|
||||||
import { URITokenMint, validateURITokenMint } from './uriTokenMint'
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @category Transaction Models
|
* @category Transaction Models
|
||||||
@@ -89,11 +78,6 @@ export type Transaction =
|
|||||||
| SignerListSet
|
| SignerListSet
|
||||||
| TicketCreate
|
| TicketCreate
|
||||||
| TrustSet
|
| TrustSet
|
||||||
| URITokenBurn
|
|
||||||
| URITokenBuy
|
|
||||||
| URITokenCancelSellOffer
|
|
||||||
| URITokenMint
|
|
||||||
| URITokenCreateSellOffer
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @category Transaction Models
|
* @category Transaction Models
|
||||||
@@ -222,26 +206,6 @@ export function validate(transaction: Record<string, unknown>): void {
|
|||||||
validateTrustSet(tx)
|
validateTrustSet(tx)
|
||||||
break
|
break
|
||||||
|
|
||||||
case 'URITokenMint':
|
|
||||||
validateURITokenMint(tx)
|
|
||||||
break
|
|
||||||
|
|
||||||
case 'URITokenBurn':
|
|
||||||
validateURITokenBurn(tx)
|
|
||||||
break
|
|
||||||
|
|
||||||
case 'URITokenCreateSellOffer':
|
|
||||||
validateURITokenCreateSellOffer(tx)
|
|
||||||
break
|
|
||||||
|
|
||||||
case 'URITokenBuy':
|
|
||||||
validateURITokenBuy(tx)
|
|
||||||
break
|
|
||||||
|
|
||||||
case 'URITokenCancelSellOffer':
|
|
||||||
validateURITokenCancelSellOffer(tx)
|
|
||||||
break
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new ValidationError(
|
throw new ValidationError(
|
||||||
`Invalid field TransactionType: ${tx.TransactionType}`,
|
`Invalid field TransactionType: ${tx.TransactionType}`,
|
||||||
|
|||||||
@@ -1,60 +0,0 @@
|
|||||||
import { ValidationError } from '../../errors'
|
|
||||||
|
|
||||||
import { BaseTransaction, validateBaseTransaction } from './common'
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Map of flags to boolean values representing {@link URITokenBurn} transaction
|
|
||||||
* flags.
|
|
||||||
*
|
|
||||||
* @category Transaction Flags
|
|
||||||
*
|
|
||||||
* @example
|
|
||||||
* ```typescript
|
|
||||||
* const tx: URITokenBurn = {
|
|
||||||
* Account: 'rhFcpWDHLqpBmX4ezWiA5VLSS4e1BHqhHd',
|
|
||||||
* URITokenID: '7AFCE32EBA8BD310CC2D00BE10B76E2183337EA20444D4580E4DBDB396C101FB',
|
|
||||||
* TransactionType: 'URITokenBurn',
|
|
||||||
* }
|
|
||||||
*
|
|
||||||
* // Autofill the tx to see how flags actually look compared to the interface usage.
|
|
||||||
* const autofilledTx = await client.autofill(tx)
|
|
||||||
* console.log(autofilledTx)
|
|
||||||
* // {
|
|
||||||
* // Account: 'rhFcpWDHLqpBmX4ezWiA5VLSS4e1BHqhHd',
|
|
||||||
* // URITokenID: '7AFCE32EBA8BD310CC2D00BE10B76E2183337EA20444D4580E4DBDB396C101FB',
|
|
||||||
* // TransactionType: 'URITokenBurn',
|
|
||||||
* // Sequence: 21970384,
|
|
||||||
* // Fee: '12',
|
|
||||||
* // LastLedgerSequence: 21970404
|
|
||||||
* // }
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An URITokenBurn transaction is effectively a limit order . It defines an
|
|
||||||
* intent to exchange currencies, and creates an Offer object if not completely.
|
|
||||||
* Fulfilled when placed. Offers can be partially fulfilled.
|
|
||||||
*
|
|
||||||
* @category Transaction Models
|
|
||||||
*/
|
|
||||||
export interface URITokenBurn extends BaseTransaction {
|
|
||||||
TransactionType: 'URITokenBurn'
|
|
||||||
/**
|
|
||||||
* Identifies the URIToken object to be removed by the transaction.
|
|
||||||
*/
|
|
||||||
URITokenID: string
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Verify the form and type of an URITokenBurn at runtime.
|
|
||||||
*
|
|
||||||
* @param tx - An URITokenBurn Transaction.
|
|
||||||
* @throws When the URITokenBurn is Malformed.
|
|
||||||
*/
|
|
||||||
export function validateURITokenBurn(tx: Record<string, unknown>): void {
|
|
||||||
validateBaseTransaction(tx)
|
|
||||||
|
|
||||||
if (tx.URITokenID == null) {
|
|
||||||
throw new ValidationError('NFTokenBurn: missing field URITokenID')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
import { ValidationError } from '../../errors'
|
|
||||||
import { Amount } from '../common'
|
|
||||||
|
|
||||||
import { BaseTransaction, isAmount, validateBaseTransaction } from './common'
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Map of flags to boolean values representing {@link URITokenBuy} transaction
|
|
||||||
* flags.
|
|
||||||
*
|
|
||||||
* @category Transaction Flags
|
|
||||||
*
|
|
||||||
* @example
|
|
||||||
* ```typescript
|
|
||||||
* const tx: URITokenBuy = {
|
|
||||||
* Account: 'rhFcpWDHLqpBmX4ezWiA5VLSS4e1BHqhHd',
|
|
||||||
* URITokenID: '7AFCE32EBA8BD310CC2D00BE10B76E2183337EA20444D4580E4DBDB396C101FB',
|
|
||||||
* Amount: '1000000',
|
|
||||||
* TransactionType: 'URITokenBuy',
|
|
||||||
* }
|
|
||||||
*
|
|
||||||
* // Autofill the tx to see how flags actually look compared to the interface usage.
|
|
||||||
* const autofilledTx = await client.autofill(tx)
|
|
||||||
* console.log(autofilledTx)
|
|
||||||
* // {
|
|
||||||
* // Account: 'rhFcpWDHLqpBmX4ezWiA5VLSS4e1BHqhHd',
|
|
||||||
* // URITokenID: '7AFCE32EBA8BD310CC2D00BE10B76E2183337EA20444D4580E4DBDB396C101FB',
|
|
||||||
* // Amount: '1000000',
|
|
||||||
* // TransactionType: 'URITokenBuy',
|
|
||||||
* // Sequence: 21970384,
|
|
||||||
* // Fee: '12',
|
|
||||||
* // LastLedgerSequence: 21970404
|
|
||||||
* // }
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An URITokenBuy transaction is effectively a limit order . It defines an
|
|
||||||
* intent to exchange currencies, and creates an Offer object if not completely.
|
|
||||||
* Fulfilled when placed. Offers can be partially fulfilled.
|
|
||||||
*
|
|
||||||
* @category Transaction Models
|
|
||||||
*/
|
|
||||||
export interface URITokenBuy extends BaseTransaction {
|
|
||||||
TransactionType: 'URITokenBuy'
|
|
||||||
/**
|
|
||||||
* Identifies the URITokenID of the NFToken object that the
|
|
||||||
* offer references.
|
|
||||||
*/
|
|
||||||
URITokenID: string
|
|
||||||
/**
|
|
||||||
* Indicates the amount expected or offered for the Token.
|
|
||||||
*
|
|
||||||
* The amount must be non-zero, except when this is a sell
|
|
||||||
* offer and the asset is XRP. This would indicate that the current
|
|
||||||
* owner of the token is giving it away free, either to anyone at all,
|
|
||||||
* or to the account identified by the Destination field.
|
|
||||||
*/
|
|
||||||
Amount: Amount
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Verify the form and type of an URITokenBuy at runtime.
|
|
||||||
*
|
|
||||||
* @param tx - An URITokenBuy Transaction.
|
|
||||||
* @throws When the URITokenBuy is Malformed.
|
|
||||||
*/
|
|
||||||
export function validateURITokenBuy(tx: Record<string, unknown>): void {
|
|
||||||
validateBaseTransaction(tx)
|
|
||||||
|
|
||||||
if (tx.Account === tx.Destination) {
|
|
||||||
throw new ValidationError(
|
|
||||||
'URITokenBuy: Destination and Account must not be equal',
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (tx.URITokenID == null) {
|
|
||||||
throw new ValidationError('URITokenBuy: missing field URITokenID')
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isAmount(tx.Amount)) {
|
|
||||||
throw new ValidationError('URITokenBuy: invalid Amount')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
import { ValidationError } from '../../errors'
|
|
||||||
|
|
||||||
import { BaseTransaction, validateBaseTransaction } from './common'
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Map of flags to boolean values representing {@link URITokenCancelSellOffer} transaction
|
|
||||||
* flags.
|
|
||||||
*
|
|
||||||
* @category Transaction Flags
|
|
||||||
*
|
|
||||||
* @example
|
|
||||||
* ```typescript
|
|
||||||
* const tx: URITokenCancelSellOffer = {
|
|
||||||
* Account: 'rhFcpWDHLqpBmX4ezWiA5VLSS4e1BHqhHd',
|
|
||||||
* URITokenID: '7AFCE32EBA8BD310CC2D00BE10B76E2183337EA20444D4580E4DBDB396C101FB',
|
|
||||||
* TransactionType: 'URITokenCancelSellOffer',
|
|
||||||
* }
|
|
||||||
*
|
|
||||||
* // Autofill the tx to see how flags actually look compared to the interface usage.
|
|
||||||
* const autofilledTx = await client.autofill(tx)
|
|
||||||
* console.log(autofilledTx)
|
|
||||||
* // {
|
|
||||||
* // Account: 'rhFcpWDHLqpBmX4ezWiA5VLSS4e1BHqhHd',
|
|
||||||
* // URITokenID: '7AFCE32EBA8BD310CC2D00BE10B76E2183337EA20444D4580E4DBDB396C101FB',
|
|
||||||
* // TransactionType: 'URITokenCancelSellOffer',
|
|
||||||
* // Sequence: 21970384,
|
|
||||||
* // Fee: '12',
|
|
||||||
* // LastLedgerSequence: 21970404
|
|
||||||
* // }
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An URITokenCancelSellOffer transaction is effectively a limit order . It defines an
|
|
||||||
* intent to exchange currencies, and creates an Offer object if not completely.
|
|
||||||
* Fulfilled when placed. Offers can be partially fulfilled.
|
|
||||||
*
|
|
||||||
* @category Transaction Models
|
|
||||||
*/
|
|
||||||
export interface URITokenCancelSellOffer extends BaseTransaction {
|
|
||||||
TransactionType: 'URITokenCancelSellOffer'
|
|
||||||
/**
|
|
||||||
* Identifies the URITokenID of the NFToken object that the
|
|
||||||
* offer references.
|
|
||||||
*/
|
|
||||||
URITokenID: string
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Verify the form and type of an URITokenCancelSellOffer at runtime.
|
|
||||||
*
|
|
||||||
* @param tx - An URITokenCancelSellOffer Transaction.
|
|
||||||
* @throws When the URITokenCancelSellOffer is Malformed.
|
|
||||||
*/
|
|
||||||
export function validateURITokenCancelSellOffer(
|
|
||||||
tx: Record<string, unknown>,
|
|
||||||
): void {
|
|
||||||
validateBaseTransaction(tx)
|
|
||||||
|
|
||||||
if (tx.URITokenID == null) {
|
|
||||||
throw new ValidationError(
|
|
||||||
'URITokenCancelSellOffer: missing field URITokenID',
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,93 +0,0 @@
|
|||||||
import { ValidationError } from '../../errors'
|
|
||||||
import { Amount } from '../common'
|
|
||||||
|
|
||||||
import { BaseTransaction, isAmount, validateBaseTransaction } from './common'
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Map of flags to boolean values representing {@link URITokenCreateSellOffer} transaction
|
|
||||||
* flags.
|
|
||||||
*
|
|
||||||
* @category Transaction Flags
|
|
||||||
*
|
|
||||||
* @example
|
|
||||||
* ```typescript
|
|
||||||
* const tx: URITokenCreateSellOffer = {
|
|
||||||
* Account: 'rhFcpWDHLqpBmX4ezWiA5VLSS4e1BHqhHd',
|
|
||||||
* URITokenID: '7AFCE32EBA8BD310CC2D00BE10B76E2183337EA20444D4580E4DBDB396C101FB',
|
|
||||||
* Amount: '1000000',
|
|
||||||
* TransactionType: 'URITokenCreateSellOffer',
|
|
||||||
* }
|
|
||||||
*
|
|
||||||
* // Autofill the tx to see how flags actually look compared to the interface usage.
|
|
||||||
* const autofilledTx = await client.autofill(tx)
|
|
||||||
* console.log(autofilledTx)
|
|
||||||
* // {
|
|
||||||
* // Account: 'rhFcpWDHLqpBmX4ezWiA5VLSS4e1BHqhHd',
|
|
||||||
* // URITokenID: '7AFCE32EBA8BD310CC2D00BE10B76E2183337EA20444D4580E4DBDB396C101FB',
|
|
||||||
* // Amount: '1000000',
|
|
||||||
* // TransactionType: 'URITokenCreateSellOffer',
|
|
||||||
* // Sequence: 21970384,
|
|
||||||
* // Fee: '12',
|
|
||||||
* // LastLedgerSequence: 21970404
|
|
||||||
* // }
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An URITokenCreateSellOffer transaction is effectively a limit order . It defines an
|
|
||||||
* intent to exchange currencies, and creates an Offer object if not completely.
|
|
||||||
* Fulfilled when placed. Offers can be partially fulfilled.
|
|
||||||
*
|
|
||||||
* @category Transaction Models
|
|
||||||
*/
|
|
||||||
export interface URITokenCreateSellOffer extends BaseTransaction {
|
|
||||||
TransactionType: 'URITokenCreateSellOffer'
|
|
||||||
/**
|
|
||||||
* Identifies the URITokenID of the NFToken object that the
|
|
||||||
* offer references.
|
|
||||||
*/
|
|
||||||
URITokenID: string
|
|
||||||
/**
|
|
||||||
* Indicates the amount expected or offered for the Token.
|
|
||||||
*
|
|
||||||
* The amount must be non-zero, except when this is a sell
|
|
||||||
* offer and the asset is XRP. This would indicate that the current
|
|
||||||
* owner of the token is giving it away free, either to anyone at all,
|
|
||||||
* or to the account identified by the Destination field.
|
|
||||||
*/
|
|
||||||
Amount: Amount
|
|
||||||
/**
|
|
||||||
* If present, indicates that this offer may only be
|
|
||||||
* accepted by the specified account. Attempts by other
|
|
||||||
* accounts to accept this offer MUST fail.
|
|
||||||
*/
|
|
||||||
Destination?: string
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Verify the form and type of an URITokenCreateSellOffer at runtime.
|
|
||||||
*
|
|
||||||
* @param tx - An URITokenCreateSellOffer Transaction.
|
|
||||||
* @throws When the URITokenCreateSellOffer is Malformed.
|
|
||||||
*/
|
|
||||||
export function validateURITokenCreateSellOffer(
|
|
||||||
tx: Record<string, unknown>,
|
|
||||||
): void {
|
|
||||||
validateBaseTransaction(tx)
|
|
||||||
|
|
||||||
if (tx.Account === tx.Destination) {
|
|
||||||
throw new ValidationError(
|
|
||||||
'URITokenCreateSellOffer: Destination and Account must not be equal',
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (tx.URITokenID == null) {
|
|
||||||
throw new ValidationError(
|
|
||||||
'URITokenCreateSellOffer: missing field URITokenID',
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isAmount(tx.Amount)) {
|
|
||||||
throw new ValidationError('URITokenCreateSellOffer: invalid Amount')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,92 +0,0 @@
|
|||||||
import { ValidationError } from '../../errors'
|
|
||||||
import { isHex } from '../utils'
|
|
||||||
|
|
||||||
import { BaseTransaction, GlobalFlags, validateBaseTransaction } from './common'
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Transaction Flags for an URITokenMint Transaction.
|
|
||||||
*
|
|
||||||
* @category Transaction Flags
|
|
||||||
*/
|
|
||||||
export enum URITokenMintFlags {
|
|
||||||
/**
|
|
||||||
* If set, indicates that the minted token may be burned by the issuer even
|
|
||||||
* if the issuer does not currently hold the token. The current holder of
|
|
||||||
* the token may always burn it.
|
|
||||||
*/
|
|
||||||
tfBurnable = 0x00000001,
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Map of flags to boolean values representing {@link URITokenMint} transaction
|
|
||||||
* flags.
|
|
||||||
*
|
|
||||||
* @category Transaction Flags
|
|
||||||
*
|
|
||||||
* @example
|
|
||||||
* ```typescript
|
|
||||||
* const tx: URITokenMint = {
|
|
||||||
* Account: 'rhFcpWDHLqpBmX4ezWiA5VLSS4e1BHqhHd',
|
|
||||||
* URI: '697066733A2F2F434944',
|
|
||||||
* TransactionType: 'URITokenMint',
|
|
||||||
* Flags: {
|
|
||||||
* tfBurnable: true,
|
|
||||||
* },
|
|
||||||
* }
|
|
||||||
*
|
|
||||||
* // Autofill the tx to see how flags actually look compared to the interface usage.
|
|
||||||
* const autofilledTx = await client.autofill(tx)
|
|
||||||
* console.log(autofilledTx)
|
|
||||||
* // {
|
|
||||||
* // Account: 'rhFcpWDHLqpBmX4ezWiA5VLSS4e1BHqhHd',
|
|
||||||
* // URI: '697066733A2F2F434944',
|
|
||||||
* // TransactionType: 'URITokenMint',
|
|
||||||
* // Flags: 0,
|
|
||||||
* // Sequence: 21970384,
|
|
||||||
* // Fee: '12',
|
|
||||||
* // LastLedgerSequence: 21970404
|
|
||||||
* // }
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
export interface URITokenMintFlagsInterface extends GlobalFlags {
|
|
||||||
tfBurnable?: boolean
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An URITokenMint transaction is effectively a limit order . It defines an
|
|
||||||
* intent to exchange currencies, and creates an Offer object if not completely.
|
|
||||||
* Fulfilled when placed. Offers can be partially fulfilled.
|
|
||||||
*
|
|
||||||
* @category Transaction Models
|
|
||||||
*/
|
|
||||||
export interface URITokenMint extends BaseTransaction {
|
|
||||||
TransactionType: 'URITokenMint'
|
|
||||||
Flags?: number | URITokenMintFlagsInterface
|
|
||||||
/**
|
|
||||||
* URI that points to the data and/or metadata associated with the NFT.
|
|
||||||
* This field need not be an HTTP or HTTPS URL; it could be an IPFS URI, a
|
|
||||||
* magnet link, immediate data encoded as an RFC2379 "data" URL, or even an
|
|
||||||
* opaque issuer-specific encoding. The URI is NOT checked for validity, but
|
|
||||||
* the field is limited to a maximum length of 256 bytes.
|
|
||||||
*
|
|
||||||
* This field must be hex-encoded. You can use `convertStringToHex` to
|
|
||||||
* convert this field to the proper encoding.
|
|
||||||
*/
|
|
||||||
URI: string
|
|
||||||
|
|
||||||
Digest?: string
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Verify the form and type of an URITokenMint at runtime.
|
|
||||||
*
|
|
||||||
* @param tx - An URITokenMint Transaction.
|
|
||||||
* @throws When the URITokenMint is Malformed.
|
|
||||||
*/
|
|
||||||
export function validateURITokenMint(tx: Record<string, unknown>): void {
|
|
||||||
validateBaseTransaction(tx)
|
|
||||||
|
|
||||||
if (typeof tx.URI === 'string' && !isHex(tx.URI)) {
|
|
||||||
throw new ValidationError('URITokenMint: URI must be in hex format')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,8 +1,5 @@
|
|||||||
import BigNumber from 'bignumber.js'
|
import BigNumber from 'bignumber.js'
|
||||||
import {
|
import { xAddressToClassicAddress, isValidXAddress } from 'ripple-address-codec'
|
||||||
xAddressToClassicAddress,
|
|
||||||
isValidXAddress,
|
|
||||||
} from '@transia/ripple-address-codec'
|
|
||||||
|
|
||||||
import type { Client } from '..'
|
import type { Client } from '..'
|
||||||
import { ValidationError, XrplError } from '../errors'
|
import { ValidationError, XrplError } from '../errors'
|
||||||
@@ -15,7 +12,6 @@ import { getFeeXrp } from './getFeeXrp'
|
|||||||
|
|
||||||
// Expire unconfirmed transactions after 20 ledger versions, approximately 1 minute, by default
|
// Expire unconfirmed transactions after 20 ledger versions, approximately 1 minute, by default
|
||||||
const LEDGER_OFFSET = 20
|
const LEDGER_OFFSET = 20
|
||||||
const RESTRICTED_NETWORKS = 1024
|
|
||||||
interface ClassicAccountAndTag {
|
interface ClassicAccountAndTag {
|
||||||
classicAccount: string
|
classicAccount: string
|
||||||
tag: number | false | undefined
|
tag: number | false | undefined
|
||||||
@@ -43,10 +39,8 @@ async function autofill<T extends Transaction>(
|
|||||||
setValidAddresses(tx)
|
setValidAddresses(tx)
|
||||||
|
|
||||||
setTransactionFlagsToNumber(tx)
|
setTransactionFlagsToNumber(tx)
|
||||||
|
|
||||||
const promises: Array<Promise<void>> = []
|
const promises: Array<Promise<void>> = []
|
||||||
if (this.networkID > RESTRICTED_NETWORKS && tx.NetworkID == null) {
|
|
||||||
tx.NetworkID = this.networkID
|
|
||||||
}
|
|
||||||
if (tx.Sequence == null) {
|
if (tx.Sequence == null) {
|
||||||
promises.push(setNextValidSequenceNumber(this, tx))
|
promises.push(setNextValidSequenceNumber(this, tx))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
import type { Client } from '..'
|
|
||||||
// import { XrplError } from '../errors'
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the network ID of the rippled server.
|
|
||||||
*
|
|
||||||
* @param this - The Client used to connect to the ledger.
|
|
||||||
* @returns The network id.
|
|
||||||
*/
|
|
||||||
export default async function getNetworkID(this: Client): Promise<number> {
|
|
||||||
const response = await this.request({
|
|
||||||
command: 'server_info',
|
|
||||||
})
|
|
||||||
return response.result.info.network_id ?? 1
|
|
||||||
}
|
|
||||||
@@ -7,8 +7,6 @@ export { default as getLedgerIndex } from './getLedgerIndex'
|
|||||||
export { default as getOrderbook } from './getOrderbook'
|
export { default as getOrderbook } from './getOrderbook'
|
||||||
export { getFeeXrp, getFeeEstimateXrp } from './getFeeXrp'
|
export { getFeeXrp, getFeeEstimateXrp } from './getFeeXrp'
|
||||||
|
|
||||||
export { default as getNetworkID } from './getNetworkID'
|
|
||||||
|
|
||||||
export * from './submit'
|
export * from './submit'
|
||||||
|
|
||||||
export * from './utils'
|
export * from './utils'
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { decode, encode } from '@transia/ripple-binary-codec'
|
import { decode, encode } from 'ripple-binary-codec'
|
||||||
|
|
||||||
import type { Client, SubmitRequest, SubmitResponse, Wallet } from '..'
|
import type { Client, SubmitRequest, SubmitResponse, Wallet } from '..'
|
||||||
import { ValidationError, XrplError } from '../errors'
|
import { ValidationError, XrplError } from '../errors'
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
import {
|
import { xAddressToClassicAddress, isValidXAddress } from 'ripple-address-codec'
|
||||||
xAddressToClassicAddress,
|
|
||||||
isValidXAddress,
|
|
||||||
} from '@transia/ripple-address-codec'
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If an address is an X-Address, converts it to a classic address.
|
* If an address is an X-Address, converts it to a classic address.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { classicAddressToXAddress } from '@transia/ripple-address-codec'
|
import { classicAddressToXAddress } from 'ripple-address-codec'
|
||||||
import { deriveKeypair, deriveAddress } from '@transia/ripple-keypairs'
|
import { deriveKeypair, deriveAddress } from 'ripple-keypairs'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Derive an X-Address from a public key and a destination tag.
|
* Derive an X-Address from a public key and a destination tag.
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
/* eslint-disable no-bitwise -- this file mimics behavior in rippled. It uses
|
/* eslint-disable no-bitwise -- this file mimics behavior in rippled. It uses
|
||||||
bitwise operators for and-ing numbers with a mask and bit shifting. */
|
bitwise operators for and-ing numbers with a mask and bit shifting. */
|
||||||
|
|
||||||
import { decode, encode } from '@transia/ripple-binary-codec'
|
|
||||||
import BigNumber from 'bignumber.js'
|
import BigNumber from 'bignumber.js'
|
||||||
|
import { decode, encode } from 'ripple-binary-codec'
|
||||||
|
|
||||||
import { ValidationError, XrplError } from '../../errors'
|
import { ValidationError, XrplError } from '../../errors'
|
||||||
import type { Ledger } from '../../models/ledger'
|
import type { Ledger } from '../../models/ledger'
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
bitwise operators for and-ing numbers with a mask and bit shifting. */
|
bitwise operators for and-ing numbers with a mask and bit shifting. */
|
||||||
|
|
||||||
import BigNumber from 'bignumber.js'
|
import BigNumber from 'bignumber.js'
|
||||||
import { decodeAccountID } from '@transia/ripple-address-codec'
|
import { decodeAccountID } from 'ripple-address-codec'
|
||||||
|
|
||||||
import hashLedger, {
|
import hashLedger, {
|
||||||
hashLedgerHeader,
|
hashLedgerHeader,
|
||||||
|
|||||||
@@ -4,11 +4,9 @@
|
|||||||
* This module contains the transaction types and the function to calculate the hook on
|
* This module contains the transaction types and the function to calculate the hook on
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {
|
// eslint-disable-next-line @typescript-eslint/no-require-imports -- Required
|
||||||
TRANSACTION_TYPES,
|
|
||||||
TRANSACTION_TYPE_MAP,
|
|
||||||
} from '@transia/ripple-binary-codec'
|
|
||||||
import createHash = require('create-hash')
|
import createHash = require('create-hash')
|
||||||
|
import { TRANSACTION_TYPES, TRANSACTION_TYPE_MAP } from 'ripple-binary-codec'
|
||||||
|
|
||||||
import { XrplError } from '../errors'
|
import { XrplError } from '../errors'
|
||||||
import { HookParameter } from '../models/common'
|
import { HookParameter } from '../models/common'
|
||||||
@@ -44,7 +42,7 @@ export function calculateHookOn(arr: Array<keyof TTS>): string {
|
|||||||
`invalid transaction type '${String(nth)}' in HookOn array`,
|
`invalid transaction type '${String(nth)}' in HookOn array`,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- Required
|
||||||
const tts: Record<string, number> = TRANSACTION_TYPE_MAP
|
const tts: Record<string, number> = TRANSACTION_TYPE_MAP
|
||||||
let value = BigInt(hash)
|
let value = BigInt(hash)
|
||||||
// eslint-disable-next-line no-bitwise -- Required
|
// eslint-disable-next-line no-bitwise -- Required
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import * as rbc from '@transia/ripple-binary-codec'
|
|
||||||
import { verify as verifyKeypairSignature } from '@transia/ripple-keypairs'
|
|
||||||
import {
|
import {
|
||||||
classicAddressToXAddress,
|
classicAddressToXAddress,
|
||||||
decodeAccountID,
|
decodeAccountID,
|
||||||
@@ -15,7 +13,9 @@ import {
|
|||||||
isValidClassicAddress,
|
isValidClassicAddress,
|
||||||
isValidXAddress,
|
isValidXAddress,
|
||||||
xAddressToClassicAddress,
|
xAddressToClassicAddress,
|
||||||
} from '@transia/ripple-address-codec'
|
} from 'ripple-address-codec'
|
||||||
|
import * as rbc from 'ripple-binary-codec'
|
||||||
|
import { verify as verifyKeypairSignature } from 'ripple-keypairs'
|
||||||
|
|
||||||
import { LedgerEntry } from '../models/ledger'
|
import { LedgerEntry } from '../models/ledger'
|
||||||
import { Response } from '../models/methods'
|
import { Response } from '../models/methods'
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-magic-numbers -- Doing hex string parsing. */
|
/* eslint-disable @typescript-eslint/no-magic-numbers -- Doing hex string parsing. */
|
||||||
import BigNumber from 'bignumber.js'
|
import BigNumber from 'bignumber.js'
|
||||||
import { encodeAccountID } from '@transia/ripple-address-codec'
|
import { encodeAccountID } from 'ripple-address-codec'
|
||||||
|
|
||||||
import { XrplError } from '../errors'
|
import { XrplError } from '../errors'
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { encodeForSigningClaim } from '@transia/ripple-binary-codec'
|
import { encodeForSigningClaim } from 'ripple-binary-codec'
|
||||||
import { sign } from '@transia/ripple-keypairs'
|
import { sign } from 'ripple-keypairs'
|
||||||
|
|
||||||
import { xrpToDrops } from './xrpConversion'
|
import { xrpToDrops } from './xrpConversion'
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { encodeForSigningClaim } from '@transia/ripple-binary-codec'
|
import { encodeForSigningClaim } from 'ripple-binary-codec'
|
||||||
import { verify } from '@transia/ripple-keypairs'
|
import { verify } from 'ripple-keypairs'
|
||||||
|
|
||||||
import { xrpToDrops } from './xrpConversion'
|
import { xrpToDrops } from './xrpConversion'
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { assert } from 'chai'
|
import { assert } from 'chai'
|
||||||
import { decode } from '@transia/ripple-binary-codec'
|
import { decode } from 'ripple-binary-codec'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
AccountSet,
|
AccountSet,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { assert } from 'chai'
|
import { assert } from 'chai'
|
||||||
import { decode } from '@transia/ripple-binary-codec'
|
import { decode } from 'ripple-binary-codec'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
AccountSet,
|
AccountSet,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { assert } from 'chai'
|
import { assert } from 'chai'
|
||||||
import omit from 'lodash/omit'
|
import omit from 'lodash/omit'
|
||||||
import throttle from 'lodash/throttle'
|
import throttle from 'lodash/throttle'
|
||||||
import { decode } from '@transia/ripple-binary-codec'
|
import { decode } from 'ripple-binary-codec'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Client,
|
Client,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import fs from 'fs'
|
|||||||
import path from 'path'
|
import path from 'path'
|
||||||
|
|
||||||
import { assert } from 'chai'
|
import { assert } from 'chai'
|
||||||
import { encode } from '@transia/ripple-binary-codec'
|
import { encode } from 'ripple-binary-codec'
|
||||||
|
|
||||||
import { OfferCreate, Transaction, ValidationError } from '../../src'
|
import { OfferCreate, Transaction, ValidationError } from '../../src'
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { assert } from 'chai'
|
import { assert } from 'chai'
|
||||||
import { decode } from '@transia/ripple-binary-codec'
|
import { decode } from 'ripple-binary-codec'
|
||||||
|
|
||||||
import { NFTokenMint, Payment, Transaction } from '../../src'
|
import { NFTokenMint, Payment, Transaction } from '../../src'
|
||||||
import ECDSA from '../../src/ECDSA'
|
import ECDSA from '../../src/ECDSA'
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { decode, encode } from '@transia/ripple-binary-codec'
|
|
||||||
import { assert } from 'chai'
|
import { assert } from 'chai'
|
||||||
|
import { decode, encode } from 'ripple-binary-codec'
|
||||||
|
|
||||||
import { Transaction, ValidationError } from '../../src'
|
import { Transaction, ValidationError } from '../../src'
|
||||||
import Wallet from '../../src/Wallet'
|
import Wallet from '../../src/Wallet'
|
||||||
|
|||||||
Reference in New Issue
Block a user