Make waitForTransaction part of BaseBlockchain

This commit is contained in:
Jim Hamill
2025-04-22 00:12:00 +00:00
parent 87b57bd535
commit e7ac86c0a4
5 changed files with 73 additions and 56 deletions
+20 -1
View File
@@ -1,6 +1,10 @@
import { Bytes } from './bytes.js';
import { assembleBytecodeBCH, disassembleBytecodeBCH } from '@bitauth/libauth';
import {
assembleBytecodeBCH,
disassembleBytecodeBCH,
compileCashAssembly,
} from '@bitauth/libauth';
/**
* Script Entity.
@@ -109,6 +113,21 @@ export class Script {
return new this(assembleResult.bytecode);
}
// NOTE: In its current form, this is pretty useless because it does not allow OP_CODES.
// Disabling because it will probably just cause confusion.
/*
public static fromCashASM(cashASM: string) {
const result = compileCashAssembly(cashASM);
if (typeof result === 'string') {
// TODO: Make error more detailed.
throw new Error(`Failed to parse CashASM: ${result}`);
}
return new this(result);
}
*/
/**
* Create a Script Entity from the given bytes (as hexadecimal string).
*