mirror of
https://github.com/Xahau/xahau.js.git
synced 2026-07-03 20:42:05 +00:00
Compare commits
4 Commits
4.1.0-alph
...
xahau@4.1.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6edc5a4a83 | ||
|
|
919315ef69 | ||
|
|
94751fc4bc | ||
|
|
c9a22ffa23 |
2
.github/workflows/nodejs.yml
vendored
2
.github/workflows/nodejs.yml
vendored
@@ -4,7 +4,7 @@
|
||||
name: Node.js CI
|
||||
|
||||
env:
|
||||
XAHAUD_VERSION: 2026.6.16-dev+3330
|
||||
XAHAUD_VERSION: 2026.6.21-release+3350
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
6
package-lock.json
generated
6
package-lock.json
generated
@@ -16048,7 +16048,7 @@
|
||||
}
|
||||
},
|
||||
"packages/xahau": {
|
||||
"version": "4.0.4",
|
||||
"version": "4.1.1",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@scure/bip32": "^1.3.1",
|
||||
@@ -16058,7 +16058,7 @@
|
||||
"bignumber.js": "^9.0.0",
|
||||
"eventemitter3": "^5.0.1",
|
||||
"xahau-address-codec": "^5.0.0",
|
||||
"xahau-binary-codec": "^2.1.3",
|
||||
"xahau-binary-codec": "^2.2.0",
|
||||
"xahau-keypairs": "^2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -16091,7 +16091,7 @@
|
||||
}
|
||||
},
|
||||
"packages/xahau-binary-codec": {
|
||||
"version": "2.1.3",
|
||||
"version": "2.2.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@xrplf/isomorphic": "^1.0.1",
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
## Unreleased
|
||||
|
||||
## 2.1.0 (2026-06-23)
|
||||
|
||||
### Added
|
||||
* Support for the Price Oracles amendment (XLS-47).
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xahau-binary-codec",
|
||||
"version": "2.1.3",
|
||||
"version": "2.2.0",
|
||||
"description": "Xahau Network binary codec",
|
||||
"files": [
|
||||
"dist/*",
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
# xrpl.js Release History
|
||||
|
||||
Subscribe to [the **xrpl-announce** mailing list](https://groups.google.com/g/xrpl-announce) for release announcements. We recommend that xrpl.js (ripple-lib) users stay up-to-date with the latest stable release.
|
||||
# xahau.js Release History
|
||||
|
||||
## Unreleased Changes
|
||||
|
||||
### 4.1.1 (2026-07-03)
|
||||
|
||||
### Fixed
|
||||
* Fix HookName validation on HookName deletion
|
||||
|
||||
## 4.1.0 (2026-06-23)
|
||||
|
||||
### Added
|
||||
* Support for HookOnV2 Amendment
|
||||
* Support for IOUClaimReward Amendment
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xahau",
|
||||
"version": "4.0.4",
|
||||
"version": "4.1.1",
|
||||
"license": "ISC",
|
||||
"description": "A TypeScript/JavaScript API for interacting with the Xahau Network in Node.js and the browser",
|
||||
"files": [
|
||||
@@ -29,7 +29,7 @@
|
||||
"bignumber.js": "^9.0.0",
|
||||
"eventemitter3": "^5.0.1",
|
||||
"xahau-address-codec": "^5.0.0",
|
||||
"xahau-binary-codec": "^2.1.3",
|
||||
"xahau-binary-codec": "^2.2.0",
|
||||
"xahau-keypairs": "^2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -79,7 +79,11 @@ export function validateSetHook(tx: Record<string, unknown>): void {
|
||||
`SetHook: HookNamespace in Hook must be a 256-bit (32-byte) hexadecimal value`,
|
||||
)
|
||||
}
|
||||
if (HookName !== undefined && !HOOKNAME_REGEX.test(HookName)) {
|
||||
if (
|
||||
HookName !== undefined &&
|
||||
HookName.length !== 0 &&
|
||||
!HOOKNAME_REGEX.test(HookName)
|
||||
) {
|
||||
throw new ValidationError(
|
||||
`SetHook: HookName in Hook must be a hex string of 8-32 hex characters`,
|
||||
)
|
||||
|
||||
@@ -135,4 +135,49 @@ describe('SetHook', function () {
|
||||
},
|
||||
TIMEOUT,
|
||||
)
|
||||
|
||||
it('hook name update', async () => {
|
||||
let setHookTx: SetHook = {
|
||||
TransactionType: 'SetHook',
|
||||
Account: wallet.classicAddress,
|
||||
Hooks: [
|
||||
{
|
||||
Hook: {
|
||||
CreateCode: acceptHook,
|
||||
HookApiVersion: 0,
|
||||
HookName: '484F4F4B',
|
||||
HookOn: '00'.repeat(32),
|
||||
HookNamespace: '00'.repeat(32),
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
await testTransaction(testContext.client, setHookTx, wallet)
|
||||
{
|
||||
const ledgerEntryResponse = await testContext.client.request({
|
||||
command: 'ledger_entry',
|
||||
hook: { account: wallet.classicAddress },
|
||||
})
|
||||
const node = ledgerEntryResponse.result.node as Hook
|
||||
const hook = node.Hooks[0].Hook
|
||||
expect(hook.HookName).toEqual('484F4F4B')
|
||||
}
|
||||
|
||||
// delete HookName
|
||||
setHookTx = {
|
||||
TransactionType: 'SetHook',
|
||||
Account: wallet.classicAddress,
|
||||
Hooks: [{ Hook: { HookName: '' } }],
|
||||
}
|
||||
await testTransaction(testContext.client, setHookTx, wallet)
|
||||
{
|
||||
const ledgerEntryResponse = await testContext.client.request({
|
||||
command: 'ledger_entry',
|
||||
hook: { account: wallet.classicAddress },
|
||||
})
|
||||
const node = ledgerEntryResponse.result.node as Hook
|
||||
const hook = node.Hooks[0].Hook
|
||||
expect(hook.HookName).toBeUndefined()
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
@@ -175,7 +175,7 @@ describe('SetHook', function () {
|
||||
assert.throws(() => validate(setHookTx), ValidationError, errorMessage)
|
||||
})
|
||||
|
||||
it.each(['', '0'.repeat(7), '0'.repeat(33), 'ZZZZZZZZ'])(
|
||||
it.each(['00', '0000', '000000', '0'.repeat(7), '0'.repeat(33), 'ZZZZZZZZ'])(
|
||||
`throws w/ invalid HookName in Hooks: %s`,
|
||||
function (value: string) {
|
||||
setHookTx.Hooks = [
|
||||
@@ -195,4 +195,16 @@ describe('SetHook', function () {
|
||||
assert.throws(() => validate(setHookTx), ValidationError, errorMessage)
|
||||
},
|
||||
)
|
||||
|
||||
it(`valid HookName "" (deletion) in Hooks`, function () {
|
||||
setHookTx.Hooks = [
|
||||
{
|
||||
Hook: {
|
||||
HookName: '',
|
||||
},
|
||||
},
|
||||
]
|
||||
assert.doesNotThrow(() => validateSetHook(setHookTx))
|
||||
assert.doesNotThrow(() => validate(setHookTx))
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user