-
Notifications
You must be signed in to change notification settings - Fork 327
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CIP-0021 | Add Babbage changes (#313)
* CIP-0021 | Add Babbage changes * CIP-0021 | Update Status and Type
- Loading branch information
1 parent
269525c
commit dc35438
Showing
1 changed file
with
16 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,8 @@ | |
CIP: 21 | ||
Title: Transaction requirements for interoperability with hardware wallets | ||
Authors: Gabriel Kerekes <[email protected]>, Rafael Korbas <[email protected]>, Jan Mazak <[email protected]> | ||
Status: Draft | ||
Type: Standards | ||
Status: Active | ||
Type: Informational | ||
Created: 2021-06-15 | ||
License: CC-BY-4.0 | ||
--- | ||
|
@@ -63,6 +63,7 @@ The number of the following transaction elements individually must not exceed `U | |
- withdrawals in transaction body | ||
- collateral inputs in transaction body | ||
- required signers in transaction body | ||
- reference inputs in transaction body | ||
- the total number of witnesses | ||
|
||
**Optional empty lists and maps** | ||
|
@@ -71,7 +72,15 @@ Unless mentioned otherwise in this CIP, optional empty lists and maps must not b | |
|
||
**Outputs** | ||
|
||
Outputs containing no multi-asset tokens must be serialized as a simple tuple, i.e. `[address, coin, ?datum_hash]` instead of `[address, [coin, {}], ?datum_hash]`. In addition, including `datum_hash` is only allowed if the payment part of the output's `address` is a script hash. | ||
A new, "post Alonzo", output format has been introduced in the Babbage era which uses a map instead of an array to store the output data. For now, both the "legacy" (array) and "post Alonzo" (map) output formats are supported by HW wallets but we encourage everyone to migrate to the "post Alonzo" format as support for the "legacy" output format might be removed in the future. Both formats can be mixed within a single transaction, both in outputs and in the collateral return output. | ||
|
||
_Legacy outputs_ | ||
|
||
Outputs containing no multi-asset tokens must be serialized as a simple tuple, i.e. `[address, coin, ?datum_hash]` instead of `[address, [coin, {}], ?datum_hash]`. | ||
|
||
_Post Alonzo outputs_ | ||
|
||
If the `data` of `datum_option` is included in an output, it must not be empty. `script_ref` (reference script) must also not be empty if it is included in an output. | ||
|
||
**Multiassets** | ||
|
||
|
@@ -149,6 +158,10 @@ The specified auxiliary data format was chosen in order to be compatible with ot | |
|
||
Tools interacting with HW wallets might need to be updated in order to continue being compatible with HW wallets because of canonical CBOR serialization format, which is being enforced since multi-sig support. | ||
|
||
## Tools | ||
|
||
[`cardano-hw-interop-library`](https://github.com/vacuumlabs/cardano-hw-interop-lib) or [`cardano-hw-cli'](https://github.com/vacuumlabs/cardano-hw-cli) (which uses the interop library) can be used to validate or transform transactions into a HW wallet compatible format if possible. | ||
|
||
## Copyright | ||
|
||
This CIP is licensed under [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/legalcode) |