
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
github.com/blocktree/go-owcdrivers
本包为依赖go-owcrypt实现的一些基础功能以及若干币种的交易驱动和一些需要特殊处理的币种签名。
addressEncoder - 地址编解码
owkeychain - 分层确定性密钥扩展
btcLikeTxDriver- 类比特币交易单驱动
btcTransaction- 类比特币交易单驱动,重构,支持全系地址
bytomTransaction- 比原链交易单驱动
cosmosTransaction- ATOM交易单驱动
omniTransaction- omni协议染色币交易单驱动
ontologyTransaction- ONT/ONG交易单驱动
virtualeconomyTransaction - VSYS交易单驱动
包含各个币种的地址编解码,以及某些币种的公私钥编解码等。当前支持的币种及地址类型有:
注意事项:
type AddressType struct {
EncodeType string //编码类型
Alphabet string //码表
ChecksumType string //checksum类型(base32PolyMod时做前置字符串)
HashType string //地址hash类型,传入数据为公钥时起效
HashLen int //编码前的数据长度
Prefix []byte //数据前面的填充,bech32时用作传入版本号
Suffix []byte //数据后面的填充
}
owkeychain在BIP32的基础之上进行了功能扩展,目前除了支持ECDSA系列的椭圆曲线算法之外,对于EDDSA系列的椭圆曲线算法也能良好支持。 当前支持的扩展算法包括:
注意事项:
针对EDDSA类算法,目前owkeychain对于curve25519、ed25519、x25519的分层确定性扩展都能良好都支持。值得注意的是,次3类曲线实际执行扩展操作的是ed25519,其执行结果经域转换可转换为x25519公钥。同时其可以直接作为curve25519的扩展结果,但是此时对应的私钥为通过sha512 extended后的前32字节。
目前交易单驱动部分基本都提供了类似的功能,大致包含四个主要功能:
创建空交易单
空交易单用于保存交易的基本信息,以及后续的交易单合并等。
创建交易单哈希
创建用于签名的哈希,个别币种由于设计原因,可能此处返回的是原始消息。
合并交易单
即将签名之后的签名值插入空交易单,构建完整交易单用于广播
验证交易单
一般用于在交易合并之后,发送之前的合法性验证。
包含了签名需要特殊处理的部分币种的签名功能。
FAQs
Unknown package
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
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.