# Wolf Progress Report December 5, 2023 ## Gordian Depo First Preview Release Two Rust repos are now available: * [bc-depo-rust](https://github.com/BlockchainCommons/bc-depo-rust): The actual depo server * [bc-depo-api-rust](https://github.com/BlockchainCommons/bc-depo-api-rust): A library used to encode depo requests and decode responses ## Version 2 CBOR Tags and UR Types All the CBOR tags we were using in the `3xx` range have been deprecated (but still exist), and are now superseded by "version 2" tags. There were a couple motivations for these changes: * It made sense for the new "version 3" output descriptor format to use existing CBOR definitions for HD Keys, EC Keys, Bitcoin addresses etc., but previously these used version 1 tags that would not be granted by IANA. * We still want to maintain backward compatibility with software that uses the old tag values. The implementation of these changes required a fair amount of work: * All the new tags have been assigned the value (old value + 40000). * Since there is a 1-to-1 correspondence between CBOR tags and UR type strings, new UR type strings have been assigned for the version 2 tags. * Most of the new UR type strings are formed by dropping the `crypto-` prefix on the UR type. * For example, the old `ur:crypto-seed` type and CBOR tag `#6.300` has been superseded by a new version 2 type `ur:seed` and CBOR tag `#6.40300`. * The [Registry of UR Types](https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-006-urtypes.md) has been updated to reflect these changes, documenting both the version 1 and version 2 tags. * Our entire Swift codebase has been updated to reflect these changes. * The Swift Codebase now allows a `CBORCodable` type to support a primary type and one or more secondary types. So the same code is used to read and write `ur:seed` and `ur:hdkey`, but will also transparently read version 1 `ur:crypto-seed` and `ur:crypto-hdkey`. The documentation for these changes involved updating a number of BCR documents that referenced the version 1 CBOR tags and/or UR types. These updates involved updating all documentation and examples that reference the version 1 types and adding a note that the version 1 is deprecated but may be supported for backward compatibility. Other than the tag/type string changes, these specs remain unchanged and useful: * [BCR-2020-006 Registry of UR Types](https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-006-urtypes.md) * [BCR-2020-007 HDKeys](https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-007-hdkey.md) * [BCR-2020-008 ECKeys](https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-008-eckey.md) * [BCR-2020-009 Address](https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-009-address.md) * [BCR-2020-011 SSKR](https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-011-sskr.md) * [BCR-2020-012 Bytewords](https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-012-bytewords.md) The notes on the following documents have been updated to reflect that while deprecated, they may be supported for backward compatibility: * [BCR-2020-010](bcr-2020-010-output-desc.md) version 1 `crypto-output` * [BCR-2020-015](https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-015-account.md)`crypto-account` ## Version 3 Output Descriptor Definition Pursuant to community discussion, a new [BCR-2023-010](https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2023-010-output-descriptor.md) "UR Type Definition for Bitcoin Output Descriptors (Version 3)" has been added. It includes a discussion of the previous versions and the rationale for the new version. The type is `ur:output-descriptor` and the CBOR tag is `#6.40308`. The main important aspects of this version are: * Pure CBOR (no use of Gordian Envelope) * Support for additional metadata (name, note) * Support for compact textual output descriptors, i.e., `wsh(sortedmulti(2,@0,@1,@2))` with the keys corresponding to the placeholders being provided in an array of CBOR-encoded values. The older output descriptor formats have been marked as deprecated: * Version 1 (CBOR) [BCR-2020-010](https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-010-output-desc.md) has been marked as deprecated, but eligible for backward compatibility support. * Version 2 (Envelope) [BCR-2023-007](https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2023-007-envelope-output-desc.md) has been marked as deprecated, but not recommended for backward compatibility support due to no known deployments. The Swift codebase has been updated to support input and output of Version 3 output descriptors. Gordian SeedTool for iOS has been updated to version 1.6 (72). * SeedTool now exports the version 3 `ur:output-descriptor` (#6.40308) type, as documented in [BCR-2023-010](https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2023-010-output-descriptor.md). * SeedTool now exports version 2 CBOR tags for several structures, while maintaining backwards-compatibility with version 1 CBOR tags. So instead of exporting `ur:crypto-seed` (#6.300), SeedTool now exports `ur:seed` (#6.40300), while still being able to import `ur:crypto-seed`. This also applies to `ur:crypto-sskr` (#6.303) which is now `ur:sskr` (#6.40303) and `ur:crypto-hdkey` (#6.303) which is now `ur:hdkey` (#6.40303). SeedTool now exports version 2 CBOR tags for several structures, while maintaining backwards-compatibility with version 1 CBOR tags. So instead of exporting `ur:crypto-seed` (#6.300), SeedTool now exports `ur:seed` (#6.40300), while still being able to import `ur:crypto-seed`. This also applies to `ur:crypto-sskr` (#6.303) which is now `ur:sskr` (#6.40303) and `ur:crypto-hdkey` (#6.303) which is now `ur:hdkey` (#6.40303). ## Upcoming Tasks - Document GSTP. - Merge Carston's dCBOR I-D with our own.