Resolve "feat(Primitives): Have Bytes Primitive extends Uint8Array (if possible)"
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { Address } from '~/src/address';
|
||||
import { Bytes } from '~/src/bytes';
|
||||
import { Address } from '../src/address';
|
||||
import { Bytes } from '../src/bytes';
|
||||
|
||||
describe('Success cases', () => {
|
||||
// Test cases with different address representations
|
||||
@@ -27,7 +27,7 @@ describe('Success cases', () => {
|
||||
type: 'P2PKH',
|
||||
payload: Bytes.fromHex(
|
||||
'626025854e5a67ca5eb122e213f409ec842d45e4',
|
||||
).toBytes(),
|
||||
).toUint8Array(),
|
||||
},
|
||||
representations: {
|
||||
cashAddr: 'bitcoincash:qp3xqfv9fedx0jj7ky3wyyl5p8kggt29usvlhrrxws',
|
||||
@@ -35,13 +35,13 @@ describe('Success cases', () => {
|
||||
tokenAddr: 'bitcoincash:zp3xqfv9fedx0jj7ky3wyyl5p8kggt29ust4yadq3r',
|
||||
lockscriptBytes: Bytes.fromHex(
|
||||
'76a914626025854e5a67ca5eb122e213f409ec842d45e488ac',
|
||||
).toBytes(),
|
||||
).toUint8Array(),
|
||||
lockscriptHex: '76a914626025854e5a67ca5eb122e213f409ec842d45e488ac',
|
||||
lockscriptASM:
|
||||
'OP_DUP OP_HASH160 OP_PUSHBYTES_20 0x626025854e5a67ca5eb122e213f409ec842d45e4 OP_EQUALVERIFY OP_CHECKSIG',
|
||||
hash160Bytes: Bytes.fromHex(
|
||||
'626025854e5a67ca5eb122e213f409ec842d45e4',
|
||||
).toBytes(),
|
||||
).toUint8Array(),
|
||||
hash160Hex: '626025854e5a67ca5eb122e213f409ec842d45e4',
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user