Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cashscript/utils

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cashscript/utils - npm Package Compare versions

Comparing version 0.10.0-next.4 to 0.10.0-next.5

2

dist/script.d.ts

@@ -29,3 +29,3 @@ export declare const Op: typeof import("@bitauth/libauth").OpcodesBCH2023;

export declare function replaceBytecodeNop(script: Script): Script;
export declare function generateRedeemScript(baseScript: Script, encodedArgs: Script): Script;
export declare function generateRedeemScript(baseScript: Script, encodedConstructorArgs: Script): Script;
export declare function optimiseBytecode(script: Script, runs?: number): Script;

@@ -68,3 +68,3 @@ import { OpcodesBCH, encodeDataPush, hexToBin, disassembleBytecodeBCH, flattenBinArray, encodeAuthenticationInstructions, decodeAuthenticationInstructions, } from '@bitauth/libauth';

let asm = disassembleBytecodeBCH(bytecode);
// COnvert libauth's ASM format to BITBOX's
// COnvert libauth's ASM format to BitAuth Script ASM
asm = asm.replace(/OP_PUSHBYTES_[^\s]+/g, '');

@@ -146,4 +146,4 @@ asm = asm.replace(/OP_PUSHDATA[^\s]+ [^\s]+/g, '');

}
export function generateRedeemScript(baseScript, encodedArgs) {
return replaceBytecodeNop([...encodedArgs, ...baseScript]);
export function generateRedeemScript(baseScript, encodedConstructorArgs) {
return replaceBytecodeNop([...encodedConstructorArgs.slice().reverse(), ...baseScript]);
}

@@ -150,0 +150,0 @@ export function optimiseBytecode(script, runs = 1000) {

{
"name": "@cashscript/utils",
"version": "0.10.0-next.4",
"version": "0.10.0-next.5",
"description": "CashScript utilities and types",

@@ -52,3 +52,3 @@ "keywords": [

},
"gitHead": "9105dbcd300aa6a96f8f5297147572a9a79af6c4"
"gitHead": "3d6611410e8c7ed9d760071a8c639e91c2cbb477"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc