PHP WebShell
Текущая директория: /usr/lib/node_modules/bitgo/node_modules/@stacks/transactions/dist
Просмотр файла: contract-abi.d.ts
import { ClarityValue } from './clarity';
import { ContractCallPayload } from './payload';
export declare type ClarityAbiTypeBuffer = {
buffer: {
length: number;
};
};
export declare type ClarityAbiTypeStringAscii = {
'string-ascii': {
length: number;
};
};
export declare type ClarityAbiTypeStringUtf8 = {
'string-utf8': {
length: number;
};
};
export declare type ClarityAbiTypeResponse = {
response: {
ok: ClarityAbiType;
error: ClarityAbiType;
};
};
export declare type ClarityAbiTypeOptional = {
optional: ClarityAbiType;
};
export declare type ClarityAbiTypeTuple = {
tuple: {
name: string;
type: ClarityAbiType;
}[];
};
export declare type ClarityAbiTypeList = {
list: {
type: ClarityAbiType;
length: number;
};
};
export declare type ClarityAbiTypeUInt128 = 'uint128';
export declare type ClarityAbiTypeInt128 = 'int128';
export declare type ClarityAbiTypeBool = 'bool';
export declare type ClarityAbiTypePrincipal = 'principal';
export declare type ClarityAbiTypeTraitReference = 'trait_reference';
export declare type ClarityAbiTypeNone = 'none';
export declare type ClarityAbiTypePrimitive = ClarityAbiTypeUInt128 | ClarityAbiTypeInt128 | ClarityAbiTypeBool | ClarityAbiTypePrincipal | ClarityAbiTypeTraitReference | ClarityAbiTypeNone;
export declare type ClarityAbiType = ClarityAbiTypePrimitive | ClarityAbiTypeBuffer | ClarityAbiTypeResponse | ClarityAbiTypeOptional | ClarityAbiTypeTuple | ClarityAbiTypeList | ClarityAbiTypeStringAscii | ClarityAbiTypeStringUtf8 | ClarityAbiTypeTraitReference;
export declare enum ClarityAbiTypeId {
ClarityAbiTypeUInt128 = 1,
ClarityAbiTypeInt128 = 2,
ClarityAbiTypeBool = 3,
ClarityAbiTypePrincipal = 4,
ClarityAbiTypeNone = 5,
ClarityAbiTypeBuffer = 6,
ClarityAbiTypeResponse = 7,
ClarityAbiTypeOptional = 8,
ClarityAbiTypeTuple = 9,
ClarityAbiTypeList = 10,
ClarityAbiTypeStringAscii = 11,
ClarityAbiTypeStringUtf8 = 12,
ClarityAbiTypeTraitReference = 13
}
export declare const isClarityAbiPrimitive: (val: ClarityAbiType) => val is ClarityAbiTypePrimitive;
export declare const isClarityAbiBuffer: (val: ClarityAbiType) => val is ClarityAbiTypeBuffer;
export declare const isClarityAbiStringAscii: (val: ClarityAbiType) => val is ClarityAbiTypeStringAscii;
export declare const isClarityAbiStringUtf8: (val: ClarityAbiType) => val is ClarityAbiTypeStringUtf8;
export declare const isClarityAbiResponse: (val: ClarityAbiType) => val is ClarityAbiTypeResponse;
export declare const isClarityAbiOptional: (val: ClarityAbiType) => val is ClarityAbiTypeOptional;
export declare const isClarityAbiTuple: (val: ClarityAbiType) => val is ClarityAbiTypeTuple;
export declare const isClarityAbiList: (val: ClarityAbiType) => val is ClarityAbiTypeList;
export declare type ClarityAbiTypeUnion = {
id: ClarityAbiTypeId.ClarityAbiTypeUInt128;
type: ClarityAbiTypeUInt128;
} | {
id: ClarityAbiTypeId.ClarityAbiTypeInt128;
type: ClarityAbiTypeInt128;
} | {
id: ClarityAbiTypeId.ClarityAbiTypeBool;
type: ClarityAbiTypeBool;
} | {
id: ClarityAbiTypeId.ClarityAbiTypePrincipal;
type: ClarityAbiTypePrincipal;
} | {
id: ClarityAbiTypeId.ClarityAbiTypeTraitReference;
type: ClarityAbiTypeTraitReference;
} | {
id: ClarityAbiTypeId.ClarityAbiTypeNone;
type: ClarityAbiTypeNone;
} | {
id: ClarityAbiTypeId.ClarityAbiTypeBuffer;
type: ClarityAbiTypeBuffer;
} | {
id: ClarityAbiTypeId.ClarityAbiTypeResponse;
type: ClarityAbiTypeResponse;
} | {
id: ClarityAbiTypeId.ClarityAbiTypeOptional;
type: ClarityAbiTypeOptional;
} | {
id: ClarityAbiTypeId.ClarityAbiTypeTuple;
type: ClarityAbiTypeTuple;
} | {
id: ClarityAbiTypeId.ClarityAbiTypeList;
type: ClarityAbiTypeList;
} | {
id: ClarityAbiTypeId.ClarityAbiTypeStringAscii;
type: ClarityAbiTypeStringAscii;
} | {
id: ClarityAbiTypeId.ClarityAbiTypeStringUtf8;
type: ClarityAbiTypeStringUtf8;
};
export declare function getTypeUnion(val: ClarityAbiType): ClarityAbiTypeUnion;
declare function encodeClarityValue(type: ClarityAbiType, val: string): ClarityValue;
declare function encodeClarityValue(type: ClarityAbiTypeUnion, val: string): ClarityValue;
export { encodeClarityValue };
export declare function getTypeString(val: ClarityAbiType): string;
export interface ClarityAbiFunction {
name: string;
access: 'private' | 'public' | 'read_only';
args: {
name: string;
type: ClarityAbiType;
}[];
outputs: {
type: ClarityAbiType;
};
}
export declare function abiFunctionToString(func: ClarityAbiFunction): string;
export interface ClarityAbiVariable {
name: string;
access: 'variable' | 'constant';
type: ClarityAbiType;
}
export interface ClarityAbiMap {
name: string;
key: {
name: string;
type: ClarityAbiType;
}[];
value: {
name: string;
type: ClarityAbiType;
}[];
}
export interface ClarityAbiTypeFungibleToken {
name: string;
}
export interface ClarityAbiTypeNonFungibleToken {
name: string;
type: ClarityAbiType;
}
export interface ClarityAbi {
functions: ClarityAbiFunction[];
variables: ClarityAbiVariable[];
maps: ClarityAbiMap[];
fungible_tokens: ClarityAbiTypeFungibleToken[];
non_fungible_tokens: ClarityAbiTypeNonFungibleToken[];
}
export declare function validateContractCall(payload: ContractCallPayload, abi: ClarityAbi): boolean;
export declare function parseToCV(input: string, type: ClarityAbiType): ClarityValue;
Выполнить команду
Для локальной разработки. Не используйте в интернете!