@1hive/connect-core
Version:
Access and interact with Aragon Organizations and their apps.
38 lines • 1.04 kB
TypeScript
import { CallScriptAction } from '../types';
export declare const CALLSCRIPT_ID = "0x00000001";
/**
* Checks whether a EVMScript bytes string is a call script.
*/
export declare function isCallScript(script: string): boolean;
/**
* Decode a call script bytes string into its actions.
*
* Will return an array containing objects with:
*
* - `to`: to address
* - `data`: call data
*
*/
export declare function decodeCallScript(script: string): CallScriptAction[];
/**
* Encode a call script
*
* Example:
*
* input:
* [
* { to: 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, data: 0x11111111 },
* { to: 0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb, data: 0x2222222222 }
* ]
*
* output:
* 0x00000001
* aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa0000000411111111
* bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb000000052222222222
*
*
* @param {Array<CallScriptAction>} actions
* @returns {string}
*/
export declare function encodeCallScript(actions: CallScriptAction[]): string;
//# sourceMappingURL=callScript.d.ts.map