资讯专栏INFORMATION COLUMN

eosjs 文档(Numeric)

superw / 3028人阅读

摘要:定义于类型声明参数名称类型返回定义于签名数据大小,不包括类型字段。参数名称类型返回定义于如果密钥是旧格式前缀,则将其转换为新格式,保持其他格式不变。参数名称类型返回定义于返回定义于返回定义于将中的无符号十进制数转换为。

Numeric 枚举

KeyType

接口

Key

变量

base58Chars

base58Map

base64Chars

base64Map

privateKeyDataSize

publicKeyDataSize

ripemd160

signatureDataSize

函数

base58ToBinary

base64ToBinary

binaryToBase58

binaryToDecimal

convertLegacyPublicKey

convertLegacyPublicKeys

create_base58_map

create_base64_map

decimalToBinary

digestSuffixRipemd160

isNegative

keyToString

negate

privateKeyToString

publicKeyToString

signatureToString

signedBinaryToDecimal

signedDecimalToBinary

stringToKey

stringToPrivateKey

stringToPublicKey

stringToSignature

变量 base58Chars
const base58Chars = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";

定义于eosjs-numeric.ts:9

base58Map
const base58Map = create_base58_map();

定义于eosjs-numeric.ts:20

base64Chars
const base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

定义于eosjs-numeric.ts:10

base64Map
const base64Map = create_base64_map();

定义于eosjs-numeric.ts:31

privateKeyDataSize
export const privateKeyDataSize = 32;

定义于eosjs-numeric.ts:227

私钥数据大小,不包括类型字段。

publicKeyDataSize
export const publicKeyDataSize = 33;

定义于eosjs-numeric.ts:224

公钥数据大小,不包括类型字段。

ripemd160
const ripemd160 = require("./ripemd").RIPEMD160.hash as (a: Uint8Array) => ArrayBuffer;

定义于eosjs-numeric.ts:7

类型声明
(a: Uint8Array): ArrayBuffer

参数:

名称 类型
a Uint8Array

返回:ArrayBuffer

signatureDataSize
export const signatureDataSize = 65;

定义于eosjs-numeric.ts:230

签名数据大小,不包括类型字段。

函数 base58ToBinary
base58ToBinary(size: number, s: string): Uint8Array

定义于eosjs-numeric.ts:132

s中的无符号base-58数转换为bignum。

参数:

名称 类型 描述
size number bignum大小(字节)
s string

返回:Uint8Array

base64ToBinary
base64ToBinary(s: string): Uint8Array

定义于eosjs-numeric.ts:182

s中的无符号base-64数转换为bignum。

参数:

名称 类型
s string

返回:Uint8Array

binaryToBase58
binaryToBase58(bignum: Uint8Array, minDigits?: number): string

定义于eosjs-numeric.ts:156

bignum转换为base-58的数。

参数:

名称 类型 默认值 描述
bignum Uint8Array -
Default value minDigits number 1 0填充的结果是许多数字

返回:string

binaryToDecimal
binaryToDecimal(bignum: Uint8Array, minDigits?: number): string

定义于eosjs-numeric.ts:97

bignum转换为无符号十进制数。

参数:

名称 类型 默认值 描述
bignum Uint8Array -
Default value minDigits number 1 0填充的结果是许多数字

返回:string

convertLegacyPublicKey
convertLegacyPublicKey(s: string): string

定义于eosjs-numeric.ts:312

如果密钥是旧格式(EOS前缀),则将其转换为新格式(PUB_K1_),保持其他格式不变。

参数:

名称 类型
s string

返回:string

convertLegacyPublicKeys
convertLegacyPublicKeys(keys: string[]): string[]

定义于eosjs-numeric.ts:322

如果密钥是旧格式(EOS前缀),则将其转换为新格式(PUB_K1_),保持其他格式不变。

参数:

名称 类型
keys string[]

返回:string[]

create_base58_map
create_base58_map(): number[]

定义于eosjs-numeric.ts:12

返回:number[]

create_base64_map
create_base64_map(): number[]

定义于eosjs-numeric.ts:22

返回:number[]

decimalToBinary
decimalToBinary(size: number, s: string): Uint8Array

定义于eosjs-numeric.ts:52

s中的无符号十进制数转换为bignum。

参数:

名称 类型 描述
size number bignum大小(字节)
s string

返回:Uint8Array

digestSuffixRipemd160
digestSuffixRipemd160(data: Uint8Array, suffix: string): ArrayBuffer

定义于eosjs-numeric.ts:238

参数:

名称 类型
data Uint8Array
suffix string

返回:ArrayBuffer

isNegative
isNegative(bignum: Uint8Array): boolean

定义于eosjs-numeric.ts:34

bignum是负数吗?

参数:

名称 类型
bignum Uint8Array

返回:boolean

keyToString
keyToString(key: Key, suffix: string, prefix: string): string

定义于eosjs-numeric.ts:260

参数:

名称 类型
key Key
suffix string
prefix string

返回:string

negate
negate(bignum: Uint8Array): void

定义于eosjs-numeric.ts:39

bignum转为负数。

参数:

名称 类型
bignum Uint8Array

返回:void

privateKeyToString
privateKeyToString(key: Key): string

定义于eosjs-numeric.ts:339

key转换为字符串(base-58)形式。

参数:

名称 类型
key Key

返回:string

publicKeyToString
publicKeyToString(key: Key): string

定义于eosjs-numeric.ts:299

key转换为字符串(base-58)形式。

参数:

名称 类型
key Key

返回:string

signatureToString
signatureToString(signature: Key): string

定义于eosjs-numeric.ts:362

signature转换为字符串(base-58)形式。

参数:

名称 类型
signature Key

返回:string

signedBinaryToDecimal
signedBinaryToDecimal(bignum: Uint8Array, minDigits?: number): string

定义于eosjs-numeric.ts:119

bignum转换为带符号的十进制数。

参数:

名称 类型 默认值 描述
bignum Uint8Array -
Default value minDigits number 1 0填充的结果是许多数字

返回:string

signedDecimalToBinary
signedDecimalToBinary(size: number, s: string): Uint8Array

定义于eosjs-numeric.ts:76

s中的带符号十进制数转换为bignum。

参数:

名称 类型 描述
size number bignum大小(字节)
s string

返回:Uint8Array

stringToKey
stringToKey(s: string, type: KeyType, size: number, suffix: string): Key

定义于eosjs-numeric.ts:249

参数:

名称 类型
s string
type KeyType
size number
suffix string

返回:Key

stringToPrivateKey
stringToPrivateKey(s: string): Key

定义于eosjs-numeric.ts:327

s中的密钥转换为二进制形式。

参数:

名称 类型
s string

返回:Key

stringToPublicKey
stringToPublicKey(s: string): Key

定义于eosjs-numeric.ts:273

s中的密钥转换为二进制形式。

参数:

名称 类型
s string

返回:Key

stringToSignature
stringToSignature(s: string): Key

定义于eosjs-numeric.ts:348

s中的密钥转换为二进制形式。

参数:

名称 类型
s string

返回:Key

KeyType 枚举成员 k1

k1:= 0

定义于eosjs-numeric.ts:219

r1

r1:= 1

定义于eosjs-numeric.ts:220

Key 属性 data

data:Uint8Array

定义于eosjs-numeric.ts:235

type

type:KeyType

定义于eosjs-numeric.ts:234

上一篇:JSON-RPC 下一篇:RPC-Error

文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。

转载请注明本文地址:https://www.ucloud.cn/yun/100623.html

相关文章

  • eosjs 文档(目录)

    摘要:文档用于使用与基于的区块链集成的。重要最近发布了针对的重大改写,一定要锁定你的依赖项。如果你正在寻找以前版本的,可以在这里找到它。指南介绍浏览器交易读取区块链参考接口接口类接口 eosjs 文档 用于使用EOSIO RPC API与基于EOSIO的区块链集成的Javascript API。 重要!最近发布了针对eosjs的重大改写,一定要锁定你的依赖项。 如果你正在寻找以前版本的eos...

    shleyZ 评论0 收藏0
  • eosjs 文档(RPC-Error)

    摘要:类构造函数定义于参数名称类型返回属性定义于详细的错误信息。上一篇下一篇接口 RPC-Error 类 RpcError RpcError 构造函数 new RpcError(json: any): RpcError 定义于eosjs-rpcerror.ts:9 参数: 名称 类型 json any 返回:RpcError 属性 json json:any 定义于eosjs...

    glumes 评论0 收藏0
  • eosjs 文档(Serialize类)

    摘要:类构造函数定义于参数如果序列化或要反序列化的二进制数据,则为。返回定义于获取作为,注意只有位精度,有些值会改变,建议使用。返回构造函数定义于参数名称类型默认值返回属性定义于定义于是否已跳过任何二进制扩展名上一篇下一篇接口 Serialize类 SerialBuffer 构造函数 new SerialBuffer(__namedParameters?: object): SerialBu...

    waterc 评论0 收藏0
  • eosjs 文档(JSON-RPC)

    JSON-RPC 类 JsonRpc 函数 arrayToHex 函数 arrayToHex arrayToHex(data: Uint8Array): string 定义于eosjs-jsonrpc.ts:11 参数: 名称 类型 data Uint8Array 返回:string JsonRpc 实现接口 AuthorityProvider AbiProvider 构造函数 n...

    dockerclub 评论0 收藏0
  • eosjs 文档(RPC接口)

    摘要:接口接口属性定义于定义于定义于定义于定义于定义于定义于定义于定义于属性定义于定义于定义于属性定义于定义于属性定义于定义于定义于定义于定义于定义于定义于定义于 RPC接口 接口 Abi BlockTaposInfo GetAbiResult GetBlockResult GetCodeResult GetInfoResult GetRawCodeAndAbiResult PushTra...

    call_me_R 评论0 收藏0

发表评论

0条评论

最新活动
阅读需要支付1元查看
<