Bech32编码 地址验证示例

Posted thefist11

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Bech32编码 地址验证示例相关的知识,希望对你有一定的参考价值。

1. 有效的

● A12UEL5L
● a12uel5l
● an83characterlonghumanreadablepartthatcontainsthenumber1andtheexcludedcharactersbio1tt5tgs
● abcdef1qpzry9x8gf2tvdw0s3jn54khce6mua7lmqqqxw
● 11qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqc8247j
● split1checkupstagehandshakeupstreamerranterredcaperred2y9e3w
● ?1ezyfcl WARNING: During conversion to US-ASCII some encoders may set unmappable characters to a valid US-ASCII character, such as ‘?’. For example:

bech32_encode(’\\x80’.encode(‘ascii’, ‘replace’).decode(‘ascii’), [])
‘?1ezyfcl’

2. 无效的

● 0x20 + 1nwldj5: HRP character out of range
● 0x7F + 1axkwrx: HRP character out of range
● 0x80 + 1eym55h: HRP character out of range
● an84characterslonghumanreadablepartthatcontainsthenumber1andtheexcludedcharactersbio1569pvx: overall max length exceeded
● pzry9x0s0muk: No separator character
● 1pzry9x0s0muk: Empty HRP
● x1b4n0q5v: Invalid data character
● li1dgmt3: Too short checksum
● de1lg7wt + 0xFF: Invalid character in checksum
● A1G7SGD8: checksum calculated with uppercase form of HRP
● 10a06t8: empty HRP
● 1qzzfhee: empty HRP

3. 隔离见证地址和对应公钥

● BC1QW508D6QEJXTDG4Y5R3ZARVARY0C5XW7KV8F3T4: 0014751e76e8199196d454941c45d1b3a323f1433bd6
● tb1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3q0sl5k7: 00201863143c14c5166804bd19203356da136c985678cd4d27a1b8c6329604903262
● bc1pw508d6qejxtdg4y5r3zarvary0c5xw7kw508d6qejxtdg4y5r3zarvary0c5xw7k7grplx: 5128751e76e8199196d454941c45d1b3a323f1433bd6751e76e8199196d454941c45d1b3a323f1433bd6
● BC1SW50QA3JX3S: 6002751e
● bc1zw508d6qejxtdg4y5r3zarvaryvg6kdaj: 5210751e76e8199196d454941c45d1b3a323
● tb1qqqqqp399et2xygdj5xreqhjjvcmzhxw4aywxecjdzew6hylgvsesrxh6hy: 0020000000c4a5cad46221b2a187905e5266362b99d5e91c6ce24d165dab93e86433

4. 无效隔离见证地址

● tc1qw508d6qejxtdg4y5r3zarvary0c5xw7kg3g4ty: Invalid human-readable part
● bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t5: Invalid checksum
● BC13W508D6QEJXTDG4Y5R3ZARVARY0C5XW7KN40WF2: Invalid witness version
● bc1rw5uspcuh: Invalid program length
● bc10w508d6qejxtdg4y5r3zarvary0c5xw7kw508d6qejxtdg4y5r3zarvary0c5xw7kw5rljs90: Invalid program length
● BC1QR508D6QEJXTDG4Y5R3ZARVARYV98GJ9P: Invalid program length for witness version 0 (per BIP141)
● tb1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3q0sL5k7: Mixed case
● bc1zw508d6qejxtdg4y5r3zarvaryvqyzf3du: zero padding of more than 4 bits
● tb1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3pjxtptv: Non-zero padding in 8-to-5 conversion
● bc1gmk9yu: Empty data section

以上是关于Bech32编码 地址验证示例的主要内容,如果未能解决你的问题,请参考以下文章

Bech32编码 原理

Bech32编码 产生背景

币安智能链查询账户余额-解码bech32失败

速码验证码接码平台API接入示例说明

javascript 地理编码地址的AJAX示例

数据结构与算法之深入解析“UTF-8编码验证”的求解思路与算法示例