摘要:类接口函数函数定义于将二进制数据转换为十六进制。参数名称类型返回定义于将自不同纪元以来的半秒转换为格式的日期。参数名称类型描述要构建的类型集,在大多数情况下,最好通过对的新调用来填充它返回定义于将十六进制转换为二进制数据。
Serialize 类
SerialBuffer
SerializerState
接口Action
Authorization
Contract
CreateTypeArgs
Field
SerializedAction
SerializerOptions
Symbol
Type
函数arrayToHex
blockTimestampToDate
checkDateParse
checkRange
createInitialTypes
createType
dateToBlockTimestamp
dateToTimePoint
dateToTimePointSec
deserializeAction
deserializeActionData
deserializeArray
deserializeExtension
deserializeOptional
deserializeStruct
deserializeUnknown
deserializeVariant
getType
getTypesFromAbi
hexToUint8Array
serializeAction
serializeActionData
serializeArray
serializeExtension
serializeOptional
serializeStruct
serializeUnknown
serializeVariant
stringToSymbol
supportedAbiVersion
symbolToString
timePointSecToDate
timePointToDate
transactionHeader
函数 arrayToHex</>复制代码
arrayToHex(data: Uint8Array): string
定义于eosjs-serialize.ts:592
将二进制数据转换为十六进制。
参数:
名称 | 类型 |
---|---|
data | Uint8Array |
返回:string
blockTimestampToDate</>复制代码
blockTimestampToDate(slot: number): string
定义于eosjs-serialize.ts:569
将block_timestamp_type(自不同纪元以来的半秒)转换为ISO格式的日期。
参数:
名称 | 类型 |
---|---|
slot | number |
返回:string
checkDateParse</>复制代码
checkDateParse(date: string): number
定义于eosjs-serialize.ts:533
参数:
名称 | 类型 |
---|---|
date | string |
返回:number
checkRange</>复制代码
checkRange(orig: number, converted: number): number
定义于eosjs-serialize.ts:765
参数:
名称 | 类型 |
---|---|
orig | number |
converted | number |
返回:number
createInitialTypes</>复制代码
createInitialTypes(): Map
定义于eosjs-serialize.ts:776
创建内置到abi格式的类型集。
返回:Map
</>复制代码
createType(attrs: CreateTypeArgs): Type
定义于eosjs-serialize.ts:749
参数:
名称 | 类型 |
---|---|
attrs | CreateTypeArgs |
返回:Type
dateToBlockTimestamp</>复制代码
dateToBlockTimestamp(date: string): number
定义于eosjs-serialize.ts:564
将ISO格式的日期转换为block_timestamp_type(自不同纪元以来的半秒)。
参数:
名称 | 类型 |
---|---|
date | string |
返回:number
dateToTimePoint</>复制代码
dateToTimePoint(date: string): number
定义于eosjs-serialize.ts:542
将ISO格式的日期转换为time_point(自纪元以来的毫秒数)。
参数:
名称 | 类型 |
---|---|
date | string |
返回:number
dateToTimePointSec</>复制代码
dateToTimePointSec(date: string): number
定义于eosjs-serialize.ts:553
将ISO格式的日期转换为time_point_sec(自纪元以来的秒数)。
参数:
名称 | 类型 |
---|---|
date | string |
返回:number
deserializeAction</>复制代码
deserializeAction(contract: Contract, account: string, name: string, authorization: Authorization[], data: string | Uint8Array | number[], textEncoder: TextEncoder, textDecoder: TextDecoder): Action
定义于eosjs-serialize.ts:1104
反序列化操作,如果data是一个string,则假定它是十六进制。
参数:
名称 | 类型 |
---|---|
contract | Contract |
account | string |
name | string |
authorization | Authorization[] |
data | string | Uint8Array | number[] |
textEncoder | TextEncoder |
textDecoder | TextDecoder |
返回:Action
deserializeActionData</>复制代码
deserializeActionData(contract: Contract, account: string, name: string, data: string | Uint8Array | number[], textEncoder: TextEncoder, textDecoder: TextDecoder): any
定义于eosjs-serialize.ts:1088
反序列化操作数据,如果data是一个string,则假定它是十六进制。
参数:
名称 | 类型 |
---|---|
contract | Contract |
account | string |
name | string |
data | string | Uint8Array | number[] |
textEncoder | TextEncoder |
textDecoder | TextDecoder |
返回:any
deserializeArray</>复制代码
deserializeArray(this: Type, buffer: SerialBuffer, state?: SerializerState, allowExtensions?: boolean): any[]
定义于eosjs-serialize.ts:700
参数:
名称 | 类型 |
---|---|
this | Type |
buffer | SerialBuffer |
Optional state | SerializerState |
Optional allowExtensions | boolean |
返回:any[]
deserializeExtension</>复制代码
deserializeExtension(this: Type, buffer: SerialBuffer, state?: SerializerState, allowExtensions?: boolean): any
定义于eosjs-serialize.ts:732
参数:
名称 | 类型 |
---|---|
this | Type |
buffer | SerialBuffer |
Optional state | SerializerState |
Optional allowExtensions | boolean |
返回:any
deserializeOptional</>复制代码
deserializeOptional(this: Type, buffer: SerialBuffer, state?: SerializerState, allowExtensions?: boolean): any
定义于eosjs-serialize.ts:719
参数:
名称 | 类型 |
---|---|
this | Type |
buffer | SerialBuffer |
Optional state | SerializerState |
Optional allowExtensions | boolean |
返回:any
deserializeStruct</>复制代码
deserializeStruct(this: Type, buffer: SerialBuffer, state?: SerializerState, allowExtensions?: boolean): any
定义于eosjs-serialize.ts:653
参数:
名称 | 类型 | 默认值 |
---|---|---|
this | Type | - |
buffer | SerialBuffer | - |
Optional state | SerializerState | new SerializerState() |
Optional allowExtensions | boolean | true |
返回:any
deserializeUnknown</>复制代码
deserializeUnknown(buffer: SerialBuffer): SerialBuffer
定义于eosjs-serialize.ts:624
参数:
名称 | 类型 |
---|---|
buffer | SerialBuffer |
返回:SerialBuffer
deserializeVariant</>复制代码
deserializeVariant(this: Type, buffer: SerialBuffer, state?: SerializerState, allowExtensions?: boolean): any[]
定义于eosjs-serialize.ts:683
参数:
名称 | 类型 |
---|---|
this | Type |
buffer | SerialBuffer |
Optional state | SerializerState |
Optional allowExtensions | boolean |
返回:any[]
getType</>复制代码
getType(types: Map, name: string): Type
定义于eosjs-serialize.ts:974
从types中获取类型。
参数:
名称 | 类型 |
---|---|
types | Map |
name | string |
返回:Type
getTypesFromAbi</>复制代码
getTypesFromAbi(initialTypes: Map, abi: Abi): Map
定义于eosjs-serialize.ts:1014
从abi获取类型。
参数:
名称 | 类型 | 描述 |
---|---|---|
initialTypes | Map |
要构建的类型集,在大多数情况下,最好通过对getTypesFromAbi()的新调用来填充它 |
abi | Abi |
返回:Map
</>复制代码
hexToUint8Array(hex: string): Uint8Array
定义于eosjs-serialize.ts:601
将十六进制转换为二进制数据。
参数:
名称 | 类型 |
---|---|
hex | string |
返回:Uint8Array
serializeAction</>复制代码
serializeAction(contract: Contract, account: string, name: string, authorization: Authorization[], data: any, textEncoder: TextEncoder, textDecoder: TextDecoder): SerializedAction
定义于eosjs-serialize.ts:1076
以序列化形式返回操作。
参数:
名称 | 类型 |
---|---|
contract | Contract |
account | string |
name | string |
authorization | Authorization[] |
data | any |
textEncoder | TextEncoder |
textDecoder | TextDecoder |
返回:SerializedAction
serializeActionData</>复制代码
serializeActionData(contract: Contract, account: string, name: string, data: any, textEncoder: TextEncoder, textDecoder: TextDecoder): string
定义于eosjs-serialize.ts:1064
将操作数据转换为序列化形式(十六进制)。
参数:
名称 | 类型 |
---|---|
contract | Contract |
account | string |
name | string |
data | any |
textEncoder | TextEncoder |
textDecoder | TextDecoder |
返回:string
serializeArray</>复制代码
serializeArray(this: Type, buffer: SerialBuffer, data: any[], state?: SerializerState, allowExtensions?: boolean): void
定义于eosjs-serialize.ts:692
参数:
名称 | 类型 |
---|---|
this | Type |
buffer | SerialBuffer |
data | any[] |
Optional state | SerializerState |
Optional allowExtensions | boolean |
返回:void
serializeExtension</>复制代码
serializeExtension(this: Type, buffer: SerialBuffer, data: any, state?: SerializerState, allowExtensions?: boolean): void
定义于eosjs-serialize.ts:727
参数:
名称 | 类型 |
---|---|
this | Type |
buffer | SerialBuffer |
data | any |
Optional state | SerializerState |
Optional allowExtensions | boolean |
返回:void
serializeOptional</>复制代码
serializeOptional(this: Type, buffer: SerialBuffer, data: any, state?: SerializerState, allowExtensions?: boolean): void
定义于eosjs-serialize.ts:709
参数:
名称 | 类型 |
---|---|
this | Type |
buffer | SerialBuffer |
data | any |
Optional state | SerializerState |
Optional allowExtensions | boolean |
返回:void
serializeStruct</>复制代码
serializeStruct(this: Type, buffer: SerialBuffer, data: any, state?: SerializerState, allowExtensions?: boolean): void
定义于eosjs-serialize.ts:628
参数:
名称 | 类型 | 默认值 |
---|---|---|
this | Type | - |
buffer | SerialBuffer | - |
data | any | - |
Optional state | SerializerState | new SerializerState() |
Optional allowExtensions | boolean | true |
返回:void
serializeUnknown</>复制代码
serializeUnknown(buffer: SerialBuffer, data: any): SerialBuffer
定义于eosjs-serialize.ts:620
参数:
名称 | 类型 |
---|---|
buffer | SerialBuffer |
data | any |
返回:SerialBuffer
serializeVariant</>复制代码
serializeVariant(this: Type, buffer: SerialBuffer, data: any, state?: SerializerState, allowExtensions?: boolean): void
定义于eosjs-serialize.ts:670
参数:
名称 | 类型 |
---|---|
this | Type |
buffer | SerialBuffer |
data | any |
Optional state | SerializerState |
Optional allowExtensions | boolean |
返回:void
stringToSymbol</>复制代码
stringToSymbol(s: string): object
定义于eosjs-serialize.ts:575
将string转换为Symbol,格式:precision,NAME。
参数:
名称 | 类型 |
---|---|
s | string |
返回:object
supportedAbiVersion</>复制代码
supportedAbiVersion(version: string): boolean
定义于eosjs-serialize.ts:529
这是受支持的ABI版本吗?
参数:
名称 | 类型 |
---|---|
version | string |
返回:boolean
symbolToString</>复制代码
symbolToString(__namedParameters: object): string
定义于eosjs-serialize.ts:587
将Symbol转换为string,格式:precision,NAME。
参数:
__namedParameters:object
名称 | 类型 |
---|---|
name | string |
precision | number |
返回:string
timePointSecToDate</>复制代码
timePointSecToDate(sec: number): string
定义于eosjs-serialize.ts:558
将time_point_sec(自纪元以来的秒数)转换为ISO格式的日期。
参数:
名称 | 类型 |
---|---|
sec | number |
返回:string
timePointToDate</>复制代码
timePointToDate(us: number): string
定义于eosjs-serialize.ts:547
将time_point(自纪元以来的毫秒数)转换为ISO格式的日期。
参数:
名称 | 类型 |
---|---|
us | number |
返回:string
transactionHeader</>复制代码
transactionHeader(refBlock: BlockTaposInfo, expireSeconds: number): object
定义于eosjs-serialize.ts:1055
TAPoS:返回引用refBlock的交易字段,并在refBlock.timestamp之后expireSeconds到期。
参数:
名称 | 类型 |
---|---|
refBlock | BlockTaposInfo |
expireSeconds | number |
返回:object
上一篇:RPC接口 下一篇:Serialize类文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。
转载请注明本文地址:https://www.ucloud.cn/yun/100686.html
摘要:属性定义于定义于定义于定义于属性定义于属性定义于符号的名称,不包括精度。定义于小数点后的位数。定义于包含的字段,如果这是一个结构。定义于将转换为二进制形式并存储在中。类型声明参数名称类型返回上一篇类 Serialize接口 Action 属性 account:string 定义于eosjs-serialize.ts:92 authorization:Authorization[]...
摘要:类构造函数定义于参数如果序列化或要反序列化的二进制数据,则为。返回定义于获取作为,注意只有位精度,有些值会改变,建议使用。返回构造函数定义于参数名称类型默认值返回属性定义于定义于是否已跳过任何二进制扩展名上一篇下一篇接口 Serialize类 SerialBuffer 构造函数 new SerialBuffer(__namedParameters?: object): SerialBu...
摘要:文档用于使用与基于的区块链集成的。重要最近发布了针对的重大改写,一定要锁定你的依赖项。如果你正在寻找以前版本的,可以在这里找到它。指南介绍浏览器交易读取区块链参考接口接口类接口 eosjs 文档 用于使用EOSIO RPC API与基于EOSIO的区块链集成的Javascript API。 重要!最近发布了针对eosjs的重大改写,一定要锁定你的依赖项。 如果你正在寻找以前版本的eos...
摘要:参数名称类型默认值返回如果,则节点响应,如果则。上一篇读取区块链下一篇接口 API 类 Api 变量 abiAbi transactionAbi 变量 abiAbi abiAbi:any = require(../src/abi.abi.json) 定义于eosjs-api.ts:12 transactionAbi transactionAbi:any = require(...
摘要:接口接口属性定义于定义于定义于定义于定义于定义于定义于定义于定义于属性定义于定义于定义于属性定义于定义于属性定义于定义于定义于定义于定义于定义于定义于定义于 RPC接口 接口 Abi BlockTaposInfo GetAbiResult GetBlockResult GetCodeResult GetInfoResult GetRawCodeAndAbiResult PushTra...
阅读 3320·2021-10-11 10:59
阅读 2886·2021-10-11 10:58
阅读 2289·2021-09-04 16:45
阅读 2772·2019-08-30 15:44
阅读 714·2019-08-30 15:44
阅读 3236·2019-08-30 10:51
阅读 1638·2019-08-29 18:46
阅读 2797·2019-08-29 13:57