ckb-cell / rgbpp-sdk

Utilities for Bitcoin and RGB++ asset integration
ISC License
53 stars 15 forks source link

Use first 16 bytes of xUDT cell data as an amount #211

Closed duanyytop closed 1 month ago

duanyytop commented 1 month ago

Now the RGB++ SDK uses the whole xUDT cell data as an amount suitable for most scenarios. The xUDT protocol supports cell data with a length greater than 16 bytes.

See: https://blog.cryptape.com/enhance-sudts-programmability-with-xudt#heading-xudt-data-structures

To ensure the accuracy of xUDT cell data, the RGB++ SDK should cut the first 16 bytes as the xUDT amount.