@aldea/sdk / Exports / abi
Namespace: abi
Table of contents
Enumerations
Classes
Interfaces
- Abi
- ArgNode
- ClassNode
- ClassNodeSchema
- FieldNode
- FunctionNode
- FunctionNodeSchema
- InterfaceNode
- InterfaceNodeSchema
- MethodNode
- ObjectNode
- ObjectNodeSchema
- ProxyClassNode
- ProxyFunctionNode
- ProxyInterfaceNode
- ProxyNodeSchema
- TypeIdNode
- TypeNode
Type Aliases
Functions
- assertClass
- assertClassLike
- assertExists
- assertField
- assertFunction
- assertFunctionLike
- assertInterface
- assertMethod
- assertNodeKind
- assertObject
- assertProxy
- isClass
- isClassLike
- isField
- isFunction
- isFunctionLike
- isInterface
- isMethod
- isNodeKind
- isObject
- isProxy
- normalizeNodeName
- normalizeTypeName
- validateAbi
Type Aliases
CodeDef
Ƭ CodeDef<T
>: T
Code Definition interface
Type parameters
Name | Type |
---|---|
T | ClassNode | FunctionNode | InterfaceNode | ObjectNode | ProxyNode |
Defined in
packages/core/dist/abi/types.d.ts:33
ExportCode
Ƭ ExportCode: ClassNode
| FunctionNode
| InterfaceNode
| ObjectNode
Defined in
packages/core/dist/abi/types.d.ts:35
ImportCode
Ƭ ImportCode: ProxyNode
| ObjectNode
Defined in
packages/core/dist/abi/types.d.ts:36
ProxyNode
Ƭ ProxyNode: ProxyClassNode
| ProxyFunctionNode
| ProxyInterfaceNode
Defined in
packages/core/dist/abi/types.d.ts:34
Functions
assertClass
▸ assertClass(node
): asserts node is ClassNode
Parameters
Name | Type |
---|---|
node | any |
Returns
asserts node is ClassNode
Defined in
packages/core/dist/abi/query.d.ts:39
assertClassLike
▸ assertClassLike(node
): asserts node is ClassNode | InterfaceNode
Parameters
Name | Type |
---|---|
node | any |
Returns
asserts node is ClassNode | InterfaceNode
Defined in
packages/core/dist/abi/query.d.ts:44
assertExists
▸ assertExists<T
>(bool
, msg?
): asserts bool is T
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
bool | undefined | null | T |
msg? | string |
Returns
asserts bool is T
Defined in
packages/core/dist/abi/query.d.ts:37
assertField
▸ assertField(node
): asserts node is FieldNode
Parameters
Name | Type |
---|---|
node | any |
Returns
asserts node is FieldNode
Defined in
packages/core/dist/abi/query.d.ts:46
assertFunction
▸ assertFunction(node
): asserts node is FunctionNode
Parameters
Name | Type |
---|---|
node | any |
Returns
asserts node is FunctionNode
Defined in
packages/core/dist/abi/query.d.ts:40
assertFunctionLike
▸ assertFunctionLike(node
): asserts node is MethodNode | FunctionNode
Parameters
Name | Type |
---|---|
node | any |
Returns
asserts node is MethodNode | FunctionNode
Defined in
packages/core/dist/abi/query.d.ts:45
assertInterface
▸ assertInterface(node
): asserts node is InterfaceNode
Parameters
Name | Type |
---|---|
node | any |
Returns
asserts node is InterfaceNode
Defined in
packages/core/dist/abi/query.d.ts:41
assertMethod
▸ assertMethod(node
): asserts node is MethodNode
Parameters
Name | Type |
---|---|
node | any |
Returns
asserts node is MethodNode
Defined in
packages/core/dist/abi/query.d.ts:47
assertNodeKind
▸ assertNodeKind<T
>(node
, keys
, kind?
): asserts node is T
Type parameters
Name | Type |
---|---|
T | extends Object |
Parameters
Name | Type |
---|---|
node | any |
keys | keyof T [] |
kind? | CodeKind |
Returns
asserts node is T
Defined in
packages/core/dist/abi/query.d.ts:38
assertObject
▸ assertObject(node
): asserts node is ObjectNode
Parameters
Name | Type |
---|---|
node | any |
Returns
asserts node is ObjectNode
Defined in
packages/core/dist/abi/query.d.ts:42
assertProxy
▸ assertProxy(node
): asserts node is ProxyNode
Parameters
Name | Type |
---|---|
node | any |
Returns
asserts node is ProxyNode
Defined in
packages/core/dist/abi/query.d.ts:43
isClass
▸ isClass(node
): node is ClassNode
Parameters
Name | Type |
---|---|
node | any |
Returns
node is ClassNode
Defined in
packages/core/dist/abi/query.d.ts:49
isClassLike
▸ isClassLike(node
): node is ClassNode | InterfaceNode | ObjectNode
Parameters
Name | Type |
---|---|
node | any |
Returns
node is ClassNode | InterfaceNode | ObjectNode
Defined in
packages/core/dist/abi/query.d.ts:54
isField
▸ isField(node
): node is FieldNode
Parameters
Name | Type |
---|---|
node | any |
Returns
node is FieldNode
Defined in
packages/core/dist/abi/query.d.ts:56
isFunction
▸ isFunction(node
): node is FunctionNode
Parameters
Name | Type |
---|---|
node | any |
Returns
node is FunctionNode
Defined in
packages/core/dist/abi/query.d.ts:50
isFunctionLike
▸ isFunctionLike(node
): node is MethodNode | FunctionNode
Parameters
Name | Type |
---|---|
node | any |
Returns
node is MethodNode | FunctionNode
Defined in
packages/core/dist/abi/query.d.ts:55
isInterface
▸ isInterface(node
): node is InterfaceNode
Parameters
Name | Type |
---|---|
node | any |
Returns
node is InterfaceNode
Defined in
packages/core/dist/abi/query.d.ts:51
isMethod
▸ isMethod(node
): node is MethodNode
Parameters
Name | Type |
---|---|
node | any |
Returns
node is MethodNode
Defined in
packages/core/dist/abi/query.d.ts:57
isNodeKind
▸ isNodeKind<T
>(node
, keys
, kind?
): node is T
Type parameters
Name | Type |
---|---|
T | extends Object |
Parameters
Name | Type |
---|---|
node | any |
keys | keyof T [] |
kind? | CodeKind |
Returns
node is T
Defined in
packages/core/dist/abi/query.d.ts:48
isObject
▸ isObject(node
): node is ObjectNode
Parameters
Name | Type |
---|---|
node | any |
Returns
node is ObjectNode
Defined in
packages/core/dist/abi/query.d.ts:52
isProxy
▸ isProxy(node
): node is ProxyNode
Parameters
Name | Type |
---|---|
node | any |
Returns
node is ProxyNode
Defined in
packages/core/dist/abi/query.d.ts:53
normalizeNodeName
▸ normalizeNodeName(node
, parent?
): string
Normalizes an ABI node name. Can optionally be passed it's parent ClassNode.
Parameters
Name | Type |
---|---|
node | MethodNode | FunctionNode | ClassNode | InterfaceNode | FieldNode |
parent? | ClassNode | InterfaceNode | ObjectNode |
Returns
string
Defined in
packages/core/dist/abi/index.d.ts:8
normalizeTypeName
▸ normalizeTypeName(type
): string
Normalizes a types name by concatenating type args (generics)
Example: Map<u32,string>
Parameters
Name | Type |
---|---|
type | null | TypeNode |
Returns
string
Defined in
packages/core/dist/abi/index.d.ts:14
validateAbi
▸ validateAbi(obj
): obj is Abi
Validates the given object implements the ABI interface
Parameters
Name | Type |
---|---|
obj | any |
Returns
obj is Abi
Defined in
packages/core/dist/abi/validations.d.ts:5