-
Notifications
You must be signed in to change notification settings - Fork 0
API : Utility Functions
王辰 edited this page Jan 6, 2020
·
3 revisions
- to16StrFromNumber
- getBufFromNumber
- putUint16
- Opcoder
- putUint32
- signatureScript
- getSignHash
- jsonInterfaceMethodToString
- keccak256
- isHexPrefixed
- stripHexPrefix
- hex2BoxAddr
- box2HexAddr
- rawEncode
- rawDecode
- calcSplitAddr
- encodeTokenAddr
- decodeTokenAddr
- makeUnsignedTxHandle
Convert hex address t box address format.
* prefix <string>
* hexAddr <string>
box-address <string>
Convert box addres to hex addres format.
* box-addr <string>
hex-address <string>
Abi raw encode.
* types
* values
encoded <Buffer>
Abi raw decode.
* types
* values
decoded
Make split address.
* CalcSplitAddrReq <
{
addrs: <string[]>;
weights: <number[]>;
txHash: <string>;
index: <number>;
}
>
split-address <string>
Encode token address.
* token-info <
{
opHash: <string>;
index: <number>;
}
>
encoded-address <string>
Decode token address.
* token-address <string>
token-info <
{
opHash: <string>;
index: <number>;
}
>
Make unsigned transaction handle.
interface: Utxo <
{
out_point: {
hash: <string>;
index: <number>;
};
tx_out: {
value: <string>;
script_pub_key: <string>;
};
block_height: <number>;
is_coinbase: <boolean>;
is_spent: <boolean>;
}
>
Parameters: * MakeUnsignTxReq <
{
from: <string>
to_map: {
[to_addr:<string>]: <number>
}
utxo_list: <Utxo[]>
is_raw?: <boolean>
}
>
transaction json | protocal transaction
By Contentbox