@cashscript/utils 0.13.0-next.2 → 0.13.0-next.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/artifact.d.ts +4 -0
- package/dist/script.d.ts +1 -1
- package/dist/script.js +1 -1
- package/package.json +2 -2
package/dist/artifact.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
export interface CompilerOptions {
|
|
2
|
+
enforceFunctionParameterTypes?: boolean;
|
|
3
|
+
}
|
|
1
4
|
export interface AbiInput {
|
|
2
5
|
name: string;
|
|
3
6
|
type: string;
|
|
@@ -39,6 +42,7 @@ export interface Artifact {
|
|
|
39
42
|
compiler: {
|
|
40
43
|
name: string;
|
|
41
44
|
version: string;
|
|
45
|
+
options?: CompilerOptions;
|
|
42
46
|
};
|
|
43
47
|
updatedAt: string;
|
|
44
48
|
}
|
package/dist/script.d.ts
CHANGED
|
@@ -284,7 +284,7 @@ export declare function bytecodeToBitAuthAsm(bytecode: Uint8Array): string;
|
|
|
284
284
|
export declare function countOpcodes(script: Script): number;
|
|
285
285
|
export declare function calculateBytesize(script: Script): number;
|
|
286
286
|
export declare function encodeNullDataScript(chunks: OpOrData[]): Uint8Array;
|
|
287
|
-
export declare function
|
|
287
|
+
export declare function generateContractBytecodeScript(baseScript: Script, encodedConstructorArgs: Script): Script;
|
|
288
288
|
interface OptimiseBytecodeResult {
|
|
289
289
|
script: Script;
|
|
290
290
|
locationData: FullLocationData;
|
package/dist/script.js
CHANGED
|
@@ -102,7 +102,7 @@ function getPushDataOpcode(data) {
|
|
|
102
102
|
return Uint8Array.from([0x4c, byteLength]);
|
|
103
103
|
throw Error('Pushdata too large');
|
|
104
104
|
}
|
|
105
|
-
export function
|
|
105
|
+
export function generateContractBytecodeScript(baseScript, encodedConstructorArgs) {
|
|
106
106
|
return [...encodedConstructorArgs.slice().reverse(), ...baseScript];
|
|
107
107
|
}
|
|
108
108
|
export function optimiseBytecode(script, locationData, logs, requires, constructorParamLength, runs = 1000) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cashscript/utils",
|
|
3
|
-
"version": "0.13.0-next.
|
|
3
|
+
"version": "0.13.0-next.4",
|
|
4
4
|
"description": "CashScript utilities and types",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bitcoin cash",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"typescript": "^5.9.2",
|
|
49
49
|
"vitest": "^4.0.15"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "a9b4062bda82a2d80adf1bf21b846a62d7592e5b"
|
|
52
52
|
}
|