External module: "eosjs-serialize"
Index
Classes
Interfaces
Type aliases
Functions
- arrayToHex
- blockTimestampToDate
- createAbiTypes
- createInitialTypes
- dateToBlockTimestamp
- dateToTimePoint
- dateToTimePointSec
- deserializeAction
- deserializeActionData
- deserializeAnyArray
- deserializeAnyObject
- deserializeAnyvar
- deserializeAnyvarShort
- getType
- getTypesFromAbi
- hexToUint8Array
- serializeAction
- serializeActionData
- serializeAnyArray
- serializeAnyObject
- serializeAnyvar
- serializeQuery
- stringToSymbol
- supportedAbiVersion
- symbolToString
- timePointSecToDate
- timePointToDate
- transactionHeader
Type aliases
Anyvar
Ƭ Anyvar: null | string | number | Anyvar[] | object | Record‹string, unknown›
Functions
Const
arrayToHex
▸ arrayToHex(data
: Uint8Array): string
Parameters:
Name | Type |
---|---|
data |
Uint8Array |
Returns: string
Const
blockTimestampToDate
▸ blockTimestampToDate(slot
: number): string
Parameters:
Name | Type |
---|---|
slot |
number |
Returns: string
Const
createAbiTypes
▸ createAbiTypes(): Map‹string, Type›
Returns: Map‹string, Type›
Const
createInitialTypes
▸ createInitialTypes(): Map‹string, Type›
Returns: Map‹string, Type›
Const
dateToBlockTimestamp
▸ dateToBlockTimestamp(date
: string): number
Parameters:
Name | Type |
---|---|
date |
string |
Returns: number
Const
dateToTimePoint
▸ dateToTimePoint(date
: string): number
Parameters:
Name | Type |
---|---|
date |
string |
Returns: number
Const
dateToTimePointSec
▸ dateToTimePointSec(date
: string): number
Parameters:
Name | Type |
---|---|
date |
string |
Returns: number
Const
deserializeAction
▸ deserializeAction(contract
: Contract, account
: string, name
: string, authorization
: Authorization[], data
: string | Uint8Array | number[], textEncoder
: TextEncoder, textDecoder
: TextDecoder): Action
Parameters:
Name | Type |
---|---|
contract |
Contract |
account |
string |
name |
string |
authorization |
Authorization[] |
data |
string | Uint8Array | number[] |
textEncoder |
TextEncoder |
textDecoder |
TextDecoder |
Returns: Action
Const
deserializeActionData
▸ deserializeActionData(contract
: Contract, account
: string, name
: string, data
: string | Uint8Array | number[], textEncoder
: TextEncoder, textDecoder
: TextDecoder): any
Parameters:
Name | Type |
---|---|
contract |
Contract |
account |
string |
name |
string |
data |
string | Uint8Array | number[] |
textEncoder |
TextEncoder |
textDecoder |
TextDecoder |
Returns: any
Const
deserializeAnyArray
▸ deserializeAnyArray(buffer
: SerialBuffer, state?
: SerializerState): any[]
Parameters:
Name | Type |
---|---|
buffer |
SerialBuffer |
state? |
SerializerState |
Returns: any[]
Const
deserializeAnyObject
▸ deserializeAnyObject(buffer
: SerialBuffer, state?
: SerializerState): any
Parameters:
Name | Type |
---|---|
buffer |
SerialBuffer |
state? |
SerializerState |
Returns: any
Const
deserializeAnyvar
▸ deserializeAnyvar(buffer
: SerialBuffer, state?
: SerializerState): any
Parameters:
Name | Type |
---|---|
buffer |
SerialBuffer |
state? |
SerializerState |
Returns: any
Const
deserializeAnyvarShort
▸ deserializeAnyvarShort(buffer
: SerialBuffer): any
Parameters:
Name | Type |
---|---|
buffer |
SerialBuffer |
Returns: any
Const
getType
▸ getType(types
: Map‹string, Type›, name
: string): Type
Parameters:
Name | Type |
---|---|
types |
Map‹string, Type› |
name |
string |
Returns: Type
Const
getTypesFromAbi
▸ getTypesFromAbi(initialTypes
: Map‹string, Type›, abi?
: Abi): Map‹string, Type›
Parameters:
Name | Type | Description |
---|---|---|
initialTypes |
Map‹string, Type› | Set of types to build on. In most cases, it's best to fill this from a fresh call to getTypesFromAbi() . |
abi? |
Abi | - |
Returns: Map‹string, Type›
Const
hexToUint8Array
▸ hexToUint8Array(hex
: string): Uint8Array
Parameters:
Name | Type |
---|---|
hex |
string |
Returns: Uint8Array
Const
serializeAction
▸ serializeAction(contract
: Contract, account
: string, name
: string, authorization
: Authorization[], data
: any, textEncoder
: TextEncoder, textDecoder
: TextDecoder): SerializedAction
Parameters:
Name | Type |
---|---|
contract |
Contract |
account |
string |
name |
string |
authorization |
Authorization[] |
data |
any |
textEncoder |
TextEncoder |
textDecoder |
TextDecoder |
Returns: SerializedAction
Const
serializeActionData
▸ serializeActionData(contract
: Contract, account
: string, name
: string, data
: any, textEncoder
: TextEncoder, textDecoder
: TextDecoder): string
Parameters:
Name | Type |
---|---|
contract |
Contract |
account |
string |
name |
string |
data |
any |
textEncoder |
TextEncoder |
textDecoder |
TextDecoder |
Returns: string
Const
serializeAnyArray
▸ serializeAnyArray(buffer
: SerialBuffer, arr
: Anyvar[]): void
Parameters:
Name | Type |
---|---|
buffer |
SerialBuffer |
arr |
Anyvar[] |
Returns: void
Const
serializeAnyObject
▸ serializeAnyObject(buffer
: SerialBuffer, obj
: any): void
Parameters:
Name | Type |
---|---|
buffer |
SerialBuffer |
obj |
any |
Returns: void
Const
serializeAnyvar
▸ serializeAnyvar(buffer
: SerialBuffer, anyvar
: Anyvar): void
Parameters:
Name | Type |
---|---|
buffer |
SerialBuffer |
anyvar |
Anyvar |
Returns: void
Const
serializeQuery
▸ serializeQuery(buffer
: SerialBuffer, query
: Query): void
Parameters:
Name | Type |
---|---|
buffer |
SerialBuffer |
query |
Query |
Returns: void
Const
stringToSymbol
▸ stringToSymbol(s
: string): object
Parameters:
Name | Type |
---|---|
s |
string |
Returns: object
Const
supportedAbiVersion
▸ supportedAbiVersion(version
: string): boolean
Parameters:
Name | Type |
---|---|
version |
string |
Returns: boolean
Const
symbolToString
▸ symbolToString(__namedParameters
: object): string
Parameters:
Name | Type |
---|---|
__namedParameters |
object |
Returns: string
Const
timePointSecToDate
▸ timePointSecToDate(sec
: number): string
Parameters:
Name | Type |
---|---|
sec |
number |
Returns: string
Const
timePointToDate
▸ timePointToDate(us
: number): string
Parameters:
Name | Type |
---|---|
us |
number |
Returns: string
Const
transactionHeader
▸ transactionHeader(refBlock
: BlockTaposInfo, expireSeconds
: number): TransactionHeader
Parameters:
Name | Type |
---|---|
refBlock |
BlockTaposInfo |
expireSeconds |
number |
Returns: TransactionHeader