External module: "eosjs-serialize"
Index
Classes
Interfaces
Functions
- arrayToHex
- blockTimestampToDate
- createInitialTypes
- dateToBlockTimestamp
- dateToTimePoint
- dateToTimePointSec
- deserializeAction
- deserializeActionData
- getType
- getTypesFromAbi
- hexToUint8Array
- serializeAction
- serializeActionData
- stringToSymbol
- supportedAbiVersion
- symbolToString
- timePointSecToDate
- timePointToDate
- transactionHeader
Functions
arrayToHex
▸ arrayToHex(data
: Uint8Array): string
Parameters:
Name | Type |
---|---|
data |
Uint8Array |
Returns: string
blockTimestampToDate
▸ blockTimestampToDate(slot
: number): string
Parameters:
Name | Type |
---|---|
slot |
number |
Returns: string
createInitialTypes
▸ createInitialTypes(): Map‹string, Type›
Returns: Map‹string, Type›
dateToBlockTimestamp
▸ dateToBlockTimestamp(date
: string): number
Parameters:
Name | Type |
---|---|
date |
string |
Returns: number
dateToTimePoint
▸ dateToTimePoint(date
: string): number
Parameters:
Name | Type |
---|---|
date |
string |
Returns: number
dateToTimePointSec
▸ dateToTimePointSec(date
: string): number
Parameters:
Name | Type |
---|---|
date |
string |
Returns: number
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
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
getType
▸ getType(types
: Map‹string, Type›, name
: string): Type
Parameters:
Name | Type |
---|---|
types |
Map‹string, Type› |
name |
string |
Returns: Type
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›
hexToUint8Array
▸ hexToUint8Array(hex
: string): Uint8Array
Parameters:
Name | Type |
---|---|
hex |
string |
Returns: Uint8Array
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
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
stringToSymbol
▸ stringToSymbol(s
: string): object
Parameters:
Name | Type |
---|---|
s |
string |
Returns: object
supportedAbiVersion
▸ supportedAbiVersion(version
: string): boolean
Parameters:
Name | Type |
---|---|
version |
string |
Returns: boolean
symbolToString
▸ symbolToString(__namedParameters
: object): string
Parameters:
Name | Type |
---|---|
__namedParameters |
object |
Returns: string
timePointSecToDate
▸ timePointSecToDate(sec
: number): string
Parameters:
Name | Type |
---|---|
sec |
number |
Returns: string
timePointToDate
▸ timePointToDate(us
: number): string
Parameters:
Name | Type |
---|---|
us |
number |
Returns: string
transactionHeader
▸ transactionHeader(refBlock
: BlockTaposInfo, expireSeconds
: number): object
Parameters:
Name | Type |
---|---|
refBlock |
BlockTaposInfo |
expireSeconds |
number |
Returns: object