-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathtraits.types.ts
More file actions
37 lines (34 loc) · 967 Bytes
/
traits.types.ts
File metadata and controls
37 lines (34 loc) · 967 Bytes
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
/**
* The trait reference structure, as it appears in the AST under the
* `implemented_traits` field.
*/
export interface ImplementedTraitType {
name: string;
contract_identifier: { issuer: number[]; name: string };
}
/**
* The imported trait reference structure, as it appears in the AST under a
* `TraitReference` node. Used to represent the `trait_reference` data for an
* imported trait `(use-trait <contract_id>.<trait_name>)`.
*/
export interface ImportedTraitType {
name: string;
import: {
Imported: TraitData;
};
}
/**
* The defined trait reference structure, as it appears in the AST under a
* `TraitReference` node. Used to represent the `trait_reference` data for a
* defined trait `(define-trait <trait_name> (<trait_definition>))`.
*/
export interface DefinedTraitType {
name: string;
import: {
Defined: TraitData;
};
}
interface TraitData {
name: string;
contract_identifier: { issuer: any[]; name: string };
}