Skip to content

Commit 98437b9

Browse files
Scitz0rphairRyun1
authored
CIP-0104? | Web-Wallet Bridge - Account public key (#588)
* CIP-???? | CIP-30 ext: Account public key A [CIP-30 extension](https://cips.cardano.org/cips/cip30/#cardanowalletnameenableextensionsextensionpromiseapi) that allows for a DApp (if allowed) to fetch the connected account public key. Utilizes yet to-be-merged CIP-30 namespace PR #577. * Update CIP-XXXX/README.md Co-authored-by: Ryan Williams <[email protected]> * standard form for copyright footer Co-authored-by: Ryan Williams <[email protected]> * Update according to #590 * Update CIP-XXXX/README.md Co-authored-by: Ryan Williams <[email protected]> * change delimiter character as per #594 * title delimiter changed to - as per #594 update * assign CIP number 104 * Updates according to assigned CIP number * updates according #601 * Move access line to spec section --------- Co-authored-by: Robert Phair <[email protected]> Co-authored-by: Ryan Williams <[email protected]>
1 parent 3c0f51a commit 98437b9

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

CIP-0104/README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
CIP: 104
3+
Title: Web-Wallet Bridge - Account public key
4+
Category: Wallets
5+
Status: Proposed
6+
Authors:
7+
- Ola Ahlman <[email protected]>
8+
- Andrew Westberg <[email protected]>
9+
Implementors:
10+
- Eternl <https://eternl.io/>
11+
- newm-chain <https://newm.io/>
12+
Discussions:
13+
- https://github.com/cardano-foundation/cips/pulls/588
14+
Created: 2023-09-03
15+
License: CC-BY-4.0
16+
---
17+
18+
## Abstract
19+
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.
20+
21+
## Motivation: why is this CIP necessary?
22+
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.
23+
24+
## Specification
25+
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.
26+
27+
### 1. `api.cip104.getAccountPub(): Promise<cbor<Bip32PublicKey>>`
28+
29+
Errors: APIError
30+
31+
Returns hex-encoded string representing cbor of extended account public key. Throws APIError if needed as defined by CIP30.
32+
33+
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.
34+
35+
## Rationale: how does this CIP achieve its goals?
36+
Raw cbor is returned instead of bech32 encoding to follow specification of other CIP30 endpoints.
37+
38+
## Path to Active
39+
40+
### Acceptance Criteria
41+
In order for this standard to be active, the following should be true:
42+
- Implemented by at least two wallets.
43+
- Adopted and used by at least one dApp or infrastructure tool to prove usability.
44+
45+
### Implementation Plan
46+
Communication with additional wallets established to widen availability
47+
48+
## Copyright
49+
This CIP is licensed under [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/legalcode).
50+

0 commit comments

Comments
 (0)