@typemove/move
Module
Enumerations
Classes
Interfaces
InternalMoveEnum
Properties
| Property | Type |
|---|---|
abilities | string[] |
name | string |
typeParams | InternalMoveTypeParam[] |
variants | object |
InternalMoveFunction
Properties
| Property | Type |
|---|---|
isEntry | boolean |
isView? | boolean |
name | string |
params | TypeDescriptor<any>[] |
return | TypeDescriptor<any>[] |
typeParams | InternalMoveTypeParam[] |
visibility | InternalMoveFunctionVisibility |
InternalMoveModule
Properties
| Property | Type |
|---|---|
address | string |
enums | InternalMoveEnum[] |
exposedFunctions | InternalMoveFunction[] |
name | string |
structs | InternalMoveStruct[] |
InternalMoveStruct
Properties
| Property | Type |
|---|---|
abilities | string[] |
fields | InternalMoveStructField[] |
isEvent | boolean |
isNative | boolean |
name | string |
typeParams | InternalMoveTypeParam[] |
InternalMoveStructField
Properties
| Property | Type |
|---|---|
name | string |
type | TypeDescriptor |
Type Aliases
DecodedStruct
type DecodedStruct<B, T> = B & object;Type Declaration
| Name | Type | Description |
|---|---|---|
data_decoded | T | decoded data using ABI, undefined if there is decoding error, usually because the ABI/data mismatch |
type_arguments | string[] | - |
Type Parameters
| Type Parameter |
|---|
B |
T |
InternalMoveTypeParam
type InternalMoveTypeParam = object;Properties
constraints
constraints: string[];NestedDecodedStruct
type NestedDecodedStruct<A, B extends object, T> = B & object;Type Declaration
| Name | Type |
|---|---|
data | DecodedStruct<A, T> |
Type Parameters
| Type Parameter |
|---|
A |
B extends object |
T |
Variables
ANY_TYPE
const ANY_TYPE: TypeDescriptor<any>;BUILTIN_TYPES
const BUILTIN_TYPES: object;Type Declaration
| Name | Type | Default value |
|---|---|---|
ADDRESS_TYPE | TypeDescriptor<string> | - |
BOOL_TYPE | TypeDescriptor<number> | - |
U128_TYPE | TypeDescriptor<number> | - |
U16_TYPE | TypeDescriptor<number> | - |
U256_TYPE | TypeDescriptor<number> | - |
U32_TYPE | TypeDescriptor<number> | - |
U64_TYPE | TypeDescriptor<number> | - |
U8_TYPE | TypeDescriptor<number> | - |
VECTOR_TYPE() | <T>(t: TypeDescriptor<T>) => TypeDescriptor<T[]> | vectorType |
VECTOR_TYPE_ANY | TypeDescriptor<any[]> | - |
SPLITTER
const SPLITTER: "::" = '::';VECTOR_STR
const VECTOR_STR: "vector" = 'vector';Functions
accountAddressString()
function accountAddressString(account: string): string;Parameters
| Parameter | Type |
|---|---|
account | string |
Returns
string
accountTypeString()
function accountTypeString(account: string): string;Parameters
| Parameter | Type |
|---|---|
account | string |
Returns
string
camel()
function camel(str: string): string;Parameters
| Parameter | Type |
|---|---|
str | string |
Returns
string
isFrameworkAccount()
function isFrameworkAccount(account: string): boolean;Parameters
| Parameter | Type |
|---|---|
account | string |
Returns
boolean
isValidMoveAddress()
function isValidMoveAddress(value: string): boolean;Parameters
| Parameter | Type |
|---|---|
value | string |
Returns
boolean
matchType()
function matchType(matcher: TypeDescriptor, type: TypeDescriptor): boolean;Parameters
| Parameter | Type | Description |
|---|---|---|
matcher | TypeDescriptor | - |
type | TypeDescriptor | - |
Returns
boolean
moduleQname()
function moduleQname(module: object): string;Parameters
| Parameter | Type |
|---|---|
module | { address: string; name: string; } |
module.address | string |
module.name | string |
Returns
string
moduleQnameForType()
function moduleQnameForType(type: string): [string, string];Parameters
| Parameter | Type |
|---|---|
type | string |
Returns
[string, string]
normalizeToJSName()
function normalizeToJSName(name: string): string;Parameters
| Parameter | Type |
|---|---|
name | string |
Returns
string
parseMoveType()
function parseMoveType(type: string): TypeDescriptor;Parameters
| Parameter | Type |
|---|---|
type | string |
Returns
structQname()
function structQname(module: InternalMoveModule, struct: InternalMoveStruct): string;Parameters
| Parameter | Type |
|---|---|
module | InternalMoveModule |
struct | InternalMoveStruct |
Returns
string
upperFirst()
function upperFirst(str: string): string;Parameters
| Parameter | Type |
|---|---|
str | string |
Returns
string
vectorType()
function vectorType<T>(t?: TypeDescriptor<T>): TypeDescriptor<T[]>;Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type | Default value |
|---|---|---|
t | TypeDescriptor<T> | ANY_TYPE |
Returns
TypeDescriptor<T[]>