Use Bytes Primitive
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { Bytes } from '~/src/bytes';
|
||||
import { Script } from '~/src/script';
|
||||
import { Bytes } from '../src/bytes';
|
||||
import { Script } from '../src/script';
|
||||
|
||||
describe('Success cases', () => {
|
||||
// Test cases with different script representations
|
||||
type ScriptCase = {
|
||||
raw: Uint8Array;
|
||||
raw: Bytes;
|
||||
representations: {
|
||||
bytes: Uint8Array;
|
||||
bytes: Bytes;
|
||||
asm: string;
|
||||
hex: string;
|
||||
};
|
||||
@@ -15,13 +15,11 @@ describe('Success cases', () => {
|
||||
|
||||
const testCases: ScriptCase[] = [
|
||||
{
|
||||
raw: Bytes.fromHex(
|
||||
'76a914876fbb82ec05caa6af7a3b5e5a983aae6c6cc6d688ac',
|
||||
).toUint8Array(),
|
||||
raw: Bytes.fromHex('76a914876fbb82ec05caa6af7a3b5e5a983aae6c6cc6d688ac'),
|
||||
representations: {
|
||||
bytes: Bytes.fromHex(
|
||||
'76a914876fbb82ec05caa6af7a3b5e5a983aae6c6cc6d688ac',
|
||||
).toUint8Array(),
|
||||
),
|
||||
asm: 'OP_DUP\nOP_HASH160\nOP_PUSHBYTES_20\n0x876fbb82ec05caa6af7a3b5e5a983aae6c6cc6d6\nOP_EQUALVERIFY\nOP_CHECKSIG',
|
||||
hex: '76a914876fbb82ec05caa6af7a3b5e5a983aae6c6cc6d688ac',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user