function PushDataScript(size) {
    const buf = new util_1.default.Writer();
    if (size <= OP_MAX_SINGLE_BYTE_PUSH_DATA) {
        return buf.uint8(size).buf; // Single byte push
    }
    else if (size < OP_PUSH_DATA_1_MAX) {
        return buf.write(Buffer.from([OP_PUSH_DATA_1, size])).buf;
    }
    else if (size < OP_PUSH_DATA_2_MAX) {
        buf.uint8(OP_PUSH_DATA_2);
        buf.uint16le(size);
        return buf.buf;
    }
    buf.uint8(OP_PUSH_DATA_4);
    buf.uint32le(size);
    return buf.buf;
}
// PushDataScript prepares a push data script based on the given size
PushDataScript prepares a push data script based on the given size
PushDataScript prepares a push data script based on the given size
function PushDataScript(size) {
    const buf = new util_1.default.Writer();
    if (size <= OP_MAX_SINGLE_BYTE_PUSH_DATA) {
        return buf.uint8(size).buf; 
    }
    else if (size < OP_PUSH_DATA_1_MAX) {
        return buf.write(Buffer.from([OP_PUSH_DATA_1, size])).buf;
    }
    else if (size < OP_PUSH_DATA_2_MAX) {
        buf.uint8(OP_PUSH_DATA_2);
        buf.uint16le(size);
        return buf.buf;
    }
    buf.uint8(OP_PUSH_DATA_4);
    buf.uint32le(size);
    return buf.buf;
}
function PushDataScript ( size ) { const buf = new util_1 . default . Writer ( ) ; if ( size <= OP_MAX_SINGLE_BYTE_PUSH_DATA ) { return buf . uint8 ( size ) . buf ; } else if ( size < OP_PUSH_DATA_1_MAX ) { return buf . write ( Buffer . from ( [ OP_PUSH_DATA_1 , size ] ) ) . buf ; } else if ( size < OP_PUSH_DATA_2_MAX ) { buf . uint8 ( OP_PUSH_DATA_2 ) ; buf . uint16le ( size ) ; return buf . buf ; } buf . uint8 ( OP_PUSH_DATA_4 ) ; buf . uint32le ( size ) ; return buf . buf ; }
PushDataScript prepares a push data script based on the given size
PushDataScript prepares a push data script based on the given size
// Single byte push