Preparing search index...
The search index is not available
@sentio/sdk
@sentio/sdk
sui
MoveCoder
Class MoveCoder
Hierarchy (
View Summary
)
AbstractMoveCoder
<
SuiMoveNormalizedModule
,
SuiEvent
|
SuiMoveObject
>
MoveCoder
Index
Constructors
constructor
Properties
adapter
module
Mapping
Methods
contains
decode
decode
Array
decodeBCS
decode
Big
Int
decode
Call
Result
decode
Dev
Inspect
Result
decoded
Struct
decode
Event
decode
Function
Payload
decode
Type
encode
encode
Array
filter
And
Decode
Events
filter
And
Decode
Objects
filter
And
Decode
Struct
getBCSType
get
Dynamic
Fields
get
Move
Function
get
Move
Struct
load
load
Internal
registerBCSTypes
Constructors
constructor
new
MoveCoder
(
client
:
SuiClient
)
:
MoveCoder
Parameters
client
:
SuiClient
Returns
MoveCoder
Properties
adapter
adapter
:
ChainAdapter
<
SuiMoveNormalizedModule
,
|
SuiEvent
|
{
dataType
:
"moveObject"
;
fields
:
MoveStruct
;
hasPublicTransfer
:
boolean
;
type
:
string
;
}
,
>
Protected
module
Mapping
moduleMapping
:
Map
<
string
,
InternalMoveModule
>
Methods
contains
contains
(
account
:
string
,
name
:
string
)
:
boolean
Parameters
account
:
string
name
:
string
Returns
boolean
Protected
decode
decode
(
data
:
any
,
type
:
TypeDescriptor
<
any
>
)
:
Promise
<
any
>
Parameters
data
:
any
type
:
TypeDescriptor
<
any
>
Returns
Promise
<
any
>
decode
Array
decodeArray
(
entries
:
any
[]
,
types
:
TypeDescriptor
<
any
>
[]
,
strict
?:
boolean
,
)
:
Promise
<
any
[]
>
Parameters
entries
:
any
[]
types
:
TypeDescriptor
<
any
>
[]
Optional
strict
:
boolean
Returns
Promise
<
any
[]
>
decodeBCS
decodeBCS
(
type
:
TypeDescriptor
<
any
>
,
data
:
string
|
Uint8Array
,
encoding
?:
Encoding
,
)
:
Promise
<
any
>
Parameters
type
:
TypeDescriptor
<
any
>
data
:
string
|
Uint8Array
Optional
encoding
:
Encoding
Returns
Promise
<
any
>
Protected
decode
Big
Int
decodeBigInt
(
data
:
any
)
:
bigint
Parameters
data
:
any
Returns
bigint
decode
Call
Result
decodeCallResult
(
res
:
any
[]
,
func
:
string
)
:
Promise
<
any
[]
>
Parameters
res
:
any
[]
func
:
string
Returns
Promise
<
any
[]
>
decode
Dev
Inspect
Result
decodeDevInspectResult
<
T
extends
any
[]
>
(
inspectRes
:
DevInspectResults
,
)
:
Promise
<
TypedDevInspectResults
<
T
>
>
Type Parameters
T
extends
any
[]
Parameters
inspectRes
:
DevInspectResults
Returns
Promise
<
TypedDevInspectResults
<
T
>
>
Protected
decoded
Struct
decodedStruct
<
T
,
ST
extends
|
SuiEvent
|
{
dataType
:
"moveObject"
;
fields
:
MoveStruct
;
hasPublicTransfer
:
boolean
;
type
:
string
;
}
,
>
(
typeStruct
:
ST
,
)
:
Promise
<
undefined
|
DecodedStruct
<
ST
,
T
>
>
Type Parameters
T
ST
extends
|
SuiEvent
|
{
dataType
:
"moveObject"
;
fields
:
MoveStruct
;
hasPublicTransfer
:
boolean
;
type
:
string
;
}
Parameters
typeStruct
:
ST
Returns
Promise
<
undefined
|
DecodedStruct
<
ST
,
T
>
>
decode
Event
decodeEvent
<
T
>
(
event
:
SuiEvent
)
:
Promise
<
undefined
|
TypedEventInstance
<
T
>
>
Type Parameters
T
Parameters
event
:
SuiEvent
Returns
Promise
<
undefined
|
TypedEventInstance
<
T
>
>
decode
Function
Payload
decodeFunctionPayload
(
payload
:
MoveCallSuiTransaction
,
inputs
:
SuiCallArg
[]
,
)
:
Promise
<
MoveCallSuiTransaction
>
Parameters
payload
:
MoveCallSuiTransaction
inputs
:
SuiCallArg
[]
Returns
Promise
<
MoveCallSuiTransaction
>
decode
Type
decodeType
<
T
,
ST
>
(
typeStruct
:
ST
,
type
:
TypeDescriptor
<
T
>
,
)
:
Promise
<
undefined
|
T
>
Type Parameters
T
ST
Parameters
typeStruct
:
ST
type
:
TypeDescriptor
<
T
>
Returns
Promise
<
undefined
|
T
>
encode
encode
(
data
:
any
)
:
any
Parameters
data
:
any
Returns
any
encode
Array
encodeArray
(
entriesDecoded
:
any
[]
)
:
any
[]
Parameters
entriesDecoded
:
any
[]
Returns
any
[]
filter
And
Decode
Events
filterAndDecodeEvents
<
T
>
(
type
:
string
|
TypeDescriptor
<
T
>
,
resources
:
SuiEvent
[]
,
)
:
Promise
<
TypedEventInstance
<
T
>
[]
>
Type Parameters
T
Parameters
type
:
string
|
TypeDescriptor
<
T
>
resources
:
SuiEvent
[]
Returns
Promise
<
TypedEventInstance
<
T
>
[]
>
filter
And
Decode
Objects
filterAndDecodeObjects
<
T
>
(
type
:
TypeDescriptor
<
T
>
,
objects
:
{
dataType
:
"moveObject"
;
fields
:
MoveStruct
;
hasPublicTransfer
:
boolean
;
type
:
string
;
}
[]
,
)
:
Promise
<
DecodedStruct
<
{
dataType
:
"moveObject"
;
fields
:
MoveStruct
;
hasPublicTransfer
:
boolean
;
type
:
string
;
}
,
T
,
>
[]
,
>
Type Parameters
T
Parameters
type
:
TypeDescriptor
<
T
>
objects
:
{
dataType
:
"moveObject"
;
fields
:
MoveStruct
;
hasPublicTransfer
:
boolean
;
type
:
string
;
}
[]
Returns
Promise
<
DecodedStruct
<
{
dataType
:
"moveObject"
;
fields
:
MoveStruct
;
hasPublicTransfer
:
boolean
;
type
:
string
;
}
,
T
,
>
[]
,
>
filter
And
Decode
Struct
filterAndDecodeStruct
<
T
,
ST
extends
|
SuiEvent
|
{
dataType
:
"moveObject"
;
fields
:
MoveStruct
;
hasPublicTransfer
:
boolean
;
type
:
string
;
}
,
>
(
typeMatcher
:
TypeDescriptor
<
T
>
,
structsWithTags
:
ST
[]
,
)
:
Promise
<
DecodedStruct
<
ST
,
T
>
[]
>
Type Parameters
T
ST
extends
|
SuiEvent
|
{
dataType
:
"moveObject"
;
fields
:
MoveStruct
;
hasPublicTransfer
:
boolean
;
type
:
string
;
}
Parameters
typeMatcher
:
TypeDescriptor
<
T
>
structsWithTags
:
ST
[]
Returns
Promise
<
DecodedStruct
<
ST
,
T
>
[]
>
getBCSType
getBCSType
(
type
:
TypeDescriptor
<
any
>
)
:
Promise
<
BcsType
<
any
,
any
>
>
Parameters
type
:
TypeDescriptor
<
any
>
Returns
Promise
<
BcsType
<
any
,
any
>
>
get
Dynamic
Fields
getDynamicFields
<
T1
,
T2
>
(
objects
:
{
dataType
:
"moveObject"
;
fields
:
MoveStruct
;
hasPublicTransfer
:
boolean
;
type
:
string
;
}
[]
,
keyType
?:
TypeDescriptor
<
T1
>
,
valueType
?:
TypeDescriptor
<
T2
>
,
)
:
Promise
<
Field
<
T1
,
T2
>
[]
>
Type Parameters
T1
T2
Parameters
objects
:
{
dataType
:
"moveObject"
;
fields
:
MoveStruct
;
hasPublicTransfer
:
boolean
;
type
:
string
;
}
[]
Optional
keyType
:
TypeDescriptor
<
T1
>
Optional
valueType
:
TypeDescriptor
<
T2
>
Returns
Promise
<
Field
<
T1
,
T2
>
[]
>
get
Move
Function
getMoveFunction
(
type
:
string
)
:
Promise
<
InternalMoveFunction
>
Parameters
type
:
string
Returns
Promise
<
InternalMoveFunction
>
get
Move
Struct
getMoveStruct
(
type
:
string
)
:
Promise
<
InternalMoveStruct
>
Parameters
type
:
string
Returns
Promise
<
InternalMoveStruct
>
load
load
(
module
:
SuiMoveNormalizedModule
,
address
:
string
)
:
InternalMoveModule
Parameters
module
:
SuiMoveNormalizedModule
address
:
string
Returns
InternalMoveModule
Protected
load
Internal
loadInternal
(
module
:
InternalMoveModule
,
address
:
string
)
:
void
Parameters
module
:
InternalMoveModule
address
:
string
Returns
void
registerBCSTypes
registerBCSTypes
(
type
:
TypeDescriptor
<
any
>
)
:
Promise
<
void
>
Parameters
type
:
TypeDescriptor
<
any
>
Returns
Promise
<
void
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
adapter
module
Mapping
Methods
contains
decode
decode
Array
decodeBCS
decode
Big
Int
decode
Call
Result
decode
Dev
Inspect
Result
decoded
Struct
decode
Event
decode
Function
Payload
decode
Type
encode
encode
Array
filter
And
Decode
Events
filter
And
Decode
Objects
filter
And
Decode
Struct
getBCSType
get
Dynamic
Fields
get
Move
Function
get
Move
Struct
load
load
Internal
registerBCSTypes
@sentio/sdk
Loading...