-
Notifications
You must be signed in to change notification settings - Fork 2
/
loader.d.ts
55 lines (36 loc) · 2.05 KB
/
loader.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import type { DecodedPostConditionsResult, DecodedTxResult, ClarityValue, ClarityValueAbstract } from ".";
export function getVersion(): string;
export function decodeTransaction(arg: string | Buffer): DecodedTxResult;
export function decodeClarityValueToRepr(arg: string | Buffer): string;
export function decodeClarityValueToTypeName(arg: string | Buffer): string;
export function decodeClarityValue<T extends ClarityValue = ClarityValue>(arg: string | Buffer): T;
/**
*
* @param arg
* @param deep - If not true, then the deserialized objects will only contain the
* properties `hex, repr, type, type_id`. And nested types like Tuple, List, Response, etc will
* not contain decoded children.
* TODO: fix the clarity result type definition to be more accurate.
*/
export function decodeClarityValueList(arg: string | Buffer, deep?: false | undefined): ClarityValueAbstract[];
/**
*
* @param arg
* @param deep - If not true, then the deserialized objects will only contain the
* properties `hex, repr, type, type_id`. And nested types like Tuple, List, Response, etc will
* not contain decoded children.
* TODO: fix the clarity result type definition to be more accurate.
*/
export function decodeClarityValueList(arg: string | Buffer, deep: true): ClarityValue[];
export function decodePostConditions(arg: string | Buffer): DecodedPostConditionsResult;
export function stacksToBitcoinAddress(stackAddress: string): string;
export function bitcoinToStacksAddress(bitcoinAddress: string): string;
export function isValidStacksAddress(address: string): boolean;
export function decodeStacksAddress(address: string): [version: number, hash160: string];
export function decodeClarityValueToPrincipal(clarityValue: string | Buffer) : string;
export function stacksAddressFromParts(version: number, hash160: string | Buffer): string;
export function memoToString(memo: string | Buffer): string;
export function startProfiler(): string;
export function stopProfiler(): Buffer;
export function createProfiler(): () => Buffer;
export function perfTestC32Encode(): Buffer;