X-address compatibility (#90)

ripple-binary-codec can encode transactions with X-Addresses
This commit is contained in:
Nathan Nichols
2020-08-21 14:06:09 -05:00
parent d1b23a8b2d
commit 440e9922d7
6 changed files with 404 additions and 15 deletions

View File

@@ -16,10 +16,14 @@ describe('Hash160', function () {
expect(h1.lt(h2)).toBe(true)
expect(h3.lt(h2)).toBe(true)
})
test('throws when constructed from invalid hash length', () => {
expect(() => Hash160.from('10000000000000000000000000000000000000')).toThrow('Invalid Hash length 19')
expect(() => Hash160.from('100000000000000000000000000000000000000000')).toThrow('Invalid Hash length 21')
})
})
describe('Hash256', function () {
test('has a static width membmer', function () {
test('has a static width member', function () {
expect(Hash256.width).toBe(32)
})
test('has a ZERO_256 member', function () {