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

CIP-0104? | Web-Wallet Bridge - Account public key #588

Merged
merged 11 commits into from
May 14, 2024
50 changes: 50 additions & 0 deletions CIP-0104/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
CIP: 104
Title: Web-Wallet Bridge - Account public key
Category: Wallets
Status: Proposed
Authors:
- Ola Ahlman <[email protected]>
- Andrew Westberg <[email protected]>
Implementors:
- Eternl <https://eternl.io/>
- newm-chain <https://newm.io/>
Discussions:
- https://github.com/cardano-foundation/cips/pulls/588
Created: 2023-09-03
License: CC-BY-4.0
---

## Abstract
This CIP extends [CIP-30 (Cardano dApp-Wallet Web Bridge)](https://cips.cardano.org/cips/cip30/) to provide an additional endpoint for dApp to get the extended account public key from a connected wallet.

## Motivation: why is this CIP necessary?
Normally it's up to the wallet to handle the logic for utxo selection, derived addresses etc through the established CIP-30 api. Sometimes however, dApp needs greater control due to subpar utxo selection or other specific needs that can only be handled by chain lookup from derived address(es). This moves the control and complexity from wallet to dApp for those dApps that prefer this setup. A dApp has better control and can make a more uniform user experience. By exporting only the account public key, this gives read-only access to the dApp.

## Specification
A new endpoint is added namespaced according to this cip extension number that returns the connected account extended public key as [`cbor<T>`](https://cips.cardano.org/cips/cip30/#cbort) defined in CIP30.

### 1. `api.cip104.getAccountPub(): Promise<cbor<Bip32PublicKey>>`

Errors: APIError

Returns hex-encoded string representing cbor of extended account public key. Throws APIError if needed as defined by CIP30.

Scitz0 marked this conversation as resolved.
Show resolved Hide resolved
Wallets implementing this CIP should, but not enforced, request additional access from the user to access this endpoint as it allows for complete read access to account history and derivation paths.

## Rationale: how does this CIP achieve its goals?
Raw cbor is returned instead of bech32 encoding to follow specification of other CIP30 endpoints.

## Path to Active

### Acceptance Criteria
In order for this standard to be active, the following should be true:
- Implemented by at least two wallets.
- Adopted and used by at least one dApp or infrastructure tool to prove usability.

### Implementation Plan
Communication with additional wallets established to widen availability

## Copyright
This CIP is licensed under [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/legalcode).