![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
@33cn/chain33-transaction-parser
Advanced tools
使用方法:
npm install @33cn/chain33-transaction-parser
import { txParser, txInWords, parseTransferNote } from '@33cn/chain33-transaction-parser'
确定交易的含义,主要由执行器execer的类别,以及传参payload来确定
txmap.ts 文件中包含对execer的翻译以及payload中代表价值的字段判断
栗子
const execer = 'ticket'
const payload = {
"miner": {
"bits": 508549505,
"reward": "1800000000",
"ticketId": "1bgg6HwQretMiVcSWvayPRvVtwjyKfz1J:0x5b7a322ab74e65d7482ad1d6877a23de98e0f6b5c15d5d92bb3dcbfed5be89f5:0000000000",
"modify": "0x307837306161376436623761326335646362376366643438316464383065663838323437616338656564326135383233636139613862663763633562376238633130",
"privHash": null
},
"ty": 16
}
// 解析交易内容
const { execerName, action } = txParser(execer, payload, 'cn')
// execerName -> 购票
// action -> {"name":"挖矿","amount":1800000000,"coin":"BTY"}
// 解析交易内容并以字符串形式输出
var words = txInWords(execer, payload, 'cn')
// words -> '购票 {"name":"挖矿","amount":1800000000,"coin":"BTY"}'
6.0.2开始 转账的相关交易中note字段底层在处理时会以 byte[] 形式储存
展示时一般需要转换为utf8
parseTransferNote('0xe5ae89e585a8e694afe587bae8b4b9e794a83a20313030303030')
// 安全支出费用: 100000
tools.ts 中提供了各种格式字符串的转换
// 16进制字符串转unicode字符串
var hex2str = hex2str(hex)
// unicode字符串转16进制字符串
var str2hex = str2hex(str)
// ... 等等 详情参见tools.ts
FAQs
The npm package @33cn/chain33-transaction-parser receives a total of 7 weekly downloads. As such, @33cn/chain33-transaction-parser popularity was classified as not popular.
We found that @33cn/chain33-transaction-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.