xrpjson 0.1.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -10
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# xrpjson
|
|
2
2
|
|
|
3
3
|
Functional transaction factories for the XRP Ledger — 79 frozen-shape
|
|
4
4
|
builders verified against [xrpl.js](https://github.com/XRPLF/xrpl.js),
|
|
5
5
|
[xrpl.org](https://xrpl.org/), and [XLS specs](https://github.com/XRPLF/XRPL-Standards).
|
|
6
6
|
|
|
7
7
|
```ts
|
|
8
|
-
import { payment, accountSet, vaultCreate } from '
|
|
8
|
+
import { payment, accountSet, vaultCreate } from 'xrpjson';
|
|
9
9
|
|
|
10
10
|
const tx = payment({
|
|
11
11
|
Account: 'rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh',
|
|
@@ -20,7 +20,7 @@ const wire = tx.toJSON();
|
|
|
20
20
|
|
|
21
21
|
## What it is
|
|
22
22
|
|
|
23
|
-
`
|
|
23
|
+
`xrpjson` is the functional-programming API for building XRPL transactions.
|
|
24
24
|
Every factory returns a **frozen** transaction object with **eager validation**
|
|
25
25
|
at construction. If a required field is missing, malformed, or violates a
|
|
26
26
|
ledger rule the factory knows about, the call throws — no separate
|
|
@@ -100,7 +100,7 @@ Every divergence is cited: file path + line number in
|
|
|
100
100
|
## Usage
|
|
101
101
|
|
|
102
102
|
```ts
|
|
103
|
-
import { payment, vaultCreate, nftokenCreateOffer } from '
|
|
103
|
+
import { payment, vaultCreate, nftokenCreateOffer } from 'xrpjson';
|
|
104
104
|
|
|
105
105
|
// 1. Build a frozen, validated tx.
|
|
106
106
|
const tx = payment({
|
|
@@ -155,8 +155,8 @@ If you need these, use the class-based [`xrplt`](https://github.com/Jonathan-Dob
|
|
|
155
155
|
## Development
|
|
156
156
|
|
|
157
157
|
```bash
|
|
158
|
-
git clone https://github.com/Jonathan-Dobson/
|
|
159
|
-
cd
|
|
158
|
+
git clone https://github.com/Jonathan-Dobson/xrpjson.git
|
|
159
|
+
cd xrpjson
|
|
160
160
|
npm ci
|
|
161
161
|
npm test # run the 79 test files (2829 tests)
|
|
162
162
|
npm run lint # ESLint 9 flat config + typescript-eslint strict
|
|
@@ -174,10 +174,10 @@ MIT
|
|
|
174
174
|
## Related projects
|
|
175
175
|
|
|
176
176
|
- [`xrplt`](https://github.com/Jonathan-Dobson/xrplt) — class-based
|
|
177
|
-
transaction builder, full v0.7.1 transaction coverage. `
|
|
178
|
-
fp refactor of `xrplt`'s functional subpath (`xrplt/fp`).
|
|
177
|
+
transaction builder, full v0.7.1 transaction coverage. `xrpjson` is
|
|
178
|
+
the fp refactor of `xrplt`'s functional subpath (`xrplt/fp`).
|
|
179
179
|
- [xrpl.js](https://github.com/XRPLF/xrpl.js) — the canonical JavaScript
|
|
180
|
-
library; `
|
|
180
|
+
library; `xrpjson` uses xrpl.js as a devDep for test round-tripping
|
|
181
181
|
(encode/decode).
|
|
182
182
|
- [XRPL Standards](https://github.com/XRPLF/XRPL-Standards) — the
|
|
183
|
-
amendment specs `
|
|
183
|
+
amendment specs `xrpjson` verifies against.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xrpjson",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Functional transaction factories for the XRP Ledger — 79 frozen-shape builders verified against xrpl.js, xrpl.org, and XLS specs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -58,10 +58,10 @@
|
|
|
58
58
|
},
|
|
59
59
|
"repository": {
|
|
60
60
|
"type": "git",
|
|
61
|
-
"url": "git+https://github.com/Jonathan-Dobson/
|
|
61
|
+
"url": "git+https://github.com/Jonathan-Dobson/xrpjson.git"
|
|
62
62
|
},
|
|
63
63
|
"bugs": {
|
|
64
|
-
"url": "https://github.com/Jonathan-Dobson/
|
|
64
|
+
"url": "https://github.com/Jonathan-Dobson/xrpjson/issues"
|
|
65
65
|
},
|
|
66
|
-
"homepage": "https://github.com/Jonathan-Dobson/
|
|
66
|
+
"homepage": "https://github.com/Jonathan-Dobson/xrpjson#readme"
|
|
67
67
|
}
|