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

CHIP-0028: Blind Signer Translation #103

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
175 changes: 175 additions & 0 deletions CHIPs/chip-0028.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
CHIP Number | 0028
:-------------|:----
Title | Blind Signer Translation
Description | Translates the wallet APIs from CHIP-0027 to be smaller, for blind signers to use
Author | [Matt Hauff](https://github.com/Quexington)
Editor | [Dan Perry](https://github.com/danieljperry)
Comments-URI | [CHIPs repo, PR #103](https://github.com/Chia-Network/chips/pull/103)
Status | Review
Category | Process
Sub-Category | Tooling
Created | 2024-03-14
Requires | [0027](https://github.com/Chia-Network/chips/pull/102)
Replaces | None
Superseded-By | None

## Abstract

This CHIP is a translation layer that reduces the maximal set of wallet protocol APIs from `CHIP-0027` into an optimal set of APIs for one or more signers. This CHIP is designed specifically for blind signers, which only include signature targets, and not anything about the spends.

## Motivation

Multiple types of signers will likely use the APIs from `CHIP-0027`. Each signer type will require a separate CHIP to standardize a method for translating the APIs. This CHIP focuses narrowly on blind signers.

## Backwards Compatibility

This CHIP does not introduce any backwards incompatibilities.

## Rationale

This CHIP is targeted at developers of blind signers, in order to provide them with a standard method to translate the wallet protocol API into a smaller form.

## Specification

### Types

This section lists the relevant APIs from CHIP-0027, along with their replacements in this CHIP.

#### signing_target

CHIP-0027 version:

```py
{
"pubkey": "..."
"message": "..."
"hook": "..."
}
```

This CHIP:

```py
{
"p": "..."
"m": "..."
"h": "..."
}
```

#### sum_hint

CHIP-0027 version:

```py
{
"fingerprints": ["..."]
"synthetic_offset": "..."
}
```

This CHIP:

```py
{
"f": ["..."]
"o": "..."
}
```

#### path_hint

CHIP-0027 version:

```py
{
"root_fingerprint": "..."
"path": ["..."]
}
```

This CHIP:

```json
{
"f": "..."
"p": ["..."]
}
```

#### signing_instructions

CHIP-0027 version:

```py
{
"key_hints": <key_hints>
"targets": [<signing_target>]
}
```

This CHIP:

```py
{
"s": [<sum_hint>]
"p": [<path_hint>]
"t": [<signing_target>]
}
```

#### unsigned_transaction

CHIP-0027 version:

```py
{
"transaction_info": <transaction_info>
"signing_instructions": <signing_instructions>
}
```

This CHIP:

```py
{
"s": [<sum_hint>]
"p": [<path_hint>]
"t": [<signing_target>]
}
```

#### signing_response

CHIP-0027 version:

```py
{
"signature": "..."
"hook": "..."
}
```

This CHIP:

```py
{
"s": "..."
"h": "..."
}
```

## Reference Implementation

This CHIP is implemented in [blind_signer_tl.py](https://github.com/Chia-Network/chia-blockchain/blob/385916a6a29c5124155b43cb7cfe48c6ec7b3590/chia/wallet/util/blind_signer_tl.py).

## Security

Chia Network, Inc. has conducted an internal review of the code involved with this CHIP.

## Additional Assets

None

## Copyright
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).