Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support generate open transaction message to sign #32

Open
TheWaWaR opened this issue Oct 13, 2022 · 1 comment
Open

Support generate open transaction message to sign #32

TheWaWaR opened this issue Oct 13, 2022 · 1 comment
Labels
f:open-transaction Feature: CKB Open Transaction

Comments

@TheWaWaR
Copy link
Contributor

Provide apis to read all data of an open transaction for sign, include all input command and according data to read.

The cell mask:

The full current transaction hash
length of input & output cells in current script group
data from input and output cell:

| 0x1   | Capacity         |
| 0x2   | lock.code_hash   |
| 0x4   | lock.hash_type   |
| 0x8   | lock.args        |
| 0x10  | type.code_hash   |
| 0x20  | type.hash_type   |
| 0x40  | type.args        |
| 0x80  | Cell data        |
| 0x100 | Lock script hash |
| 0x200 | Type script hash |
| 0x400 | The whole cell   |

The cell input mask: data from CellInput structure:

| 0x1   | Capacity         |
| 0x2   | lock.code_hash   |
| 0x4   | lock.hash_type   |
| 0x8   | lock.args        |
| 0x10  | type.code_hash   |
| 0x20  | type.hash_type   |
| 0x40  | type.args        |
| 0x80  | Cell data        |
| 0x100 | Lock script hash |
| 0x200 | Type script hash |
| 0x400 | The whole cell   |
@TheWaWaR
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
f:open-transaction Feature: CKB Open Transaction
Projects
None yet
Development

No branches or pull requests

1 participant