Skip to content

Commit d7a8130

Browse files
committed
Reference ELIP-152 and other improvement
1 parent 3622175 commit d7a8130

File tree

1 file changed

+10
-48
lines changed

1 file changed

+10
-48
lines changed

elip-0XXX.mediawiki

Lines changed: 10 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
===Abstract===
1717

18-
This document defines the account ID and asset ID specifications for the Liquid Network to enable interoperability with WalletConnect and other chain-agnostic protocols.
18+
This document defines the account ID and asset ID specifications for the Liquid Network to enable interoperability with chain-agnostic wallet connection protocols.
1919
These specifications are based on the Chain Agnostic Improvement Proposals (CAIPs), specifically [CAIP-10](https://chainagnostic.org/CAIPs/caip-10) for account identification and [CAIP-19](https://chainagnostic.org/CAIPs/caip-19) for asset identification,
2020
adapted to the UTXO model of the Liquid Network.
2121

@@ -25,14 +25,11 @@ This document is licensed under the 3-clause BSD license.
2525

2626
===Motivation===
2727

28-
WalletConnect has become a standard protocol for wallet-to-dapp communication in the blockchain ecosystem.
29-
However, its implementation on UTXO-based blockchains like the Liquid Network presents unique challenges due to the fundamental differences between UTXO and account-based models.
30-
31-
Currently, there is no standardized method for identifying accounts and assets on the Liquid Network within the WalletConnect ecosystem.
32-
This lack of standardization impedes the development of interoperable applications and hinders the integration of Liquid Network with cross-chain protocols.
28+
Currently, there is no standardized method for identifying accounts and assets on the Liquid Network.
29+
This lack of standardization impedes Liquid's integration with wallet connection protocols and cross-chain applications.
3330

3431
This ELIP aims to establish a standardized approach for representing Liquid Network accounts and assets in a way that is compatible with existing chain-agnostic standards,
35-
thereby enabling integration with WalletConnect and other cross-chain protocols.
32+
thereby enabling integration with wallet connection protocols.
3633

3734
==Specification==
3835

@@ -41,33 +38,24 @@ thereby enabling integration with WalletConnect and other cross-chain protocols.
4138
Following CAIP-10, the account ID for Liquid Network is defined as:
4239

4340
<pre>
44-
account_id: chain_id + ":" + account_address
41+
account_id: chain_id + ":" + dwid
4542
chain_id: "bip122:" + reference
4643
reference: First 32 characters of the network's genesis block hash
47-
account_address: Hexadecimal string deterministically derived from a CT Descriptor ([ELIP-150](https://github.com/ElementsProject/ELIPs/blob/master/ELIPs/elip-0150.mediawiki))
44+
dwid: Deterministic Wallet IDentifier (DWID) as defined in [https://github.com/ElementsProject/ELIPs/blob/main/elip-0152.mediawiki ELIP-152]
4845
</pre>
4946

5047
Where:
5148
* For Liquid Network: chain_id = "bip122:1466275836220db2944ca059a3a10ef6"
5249
* For Liquid Testnet: chain_id = "bip122:a771da8e52ee6ad581ed1e9a99825e5b"
50+
* For Liquid Regtest (default): chain_id = "bip122:cc2641af46f536fba45aab6016f63e12"
5351
54-
The account_address in the UTXO model isn't a proper address where someone can send funds to.
55-
This is done on purpose to avoid address reuse and leaking information about the wallet.
56-
57-
The account_address is derived from the CT descriptor and the network with the following steps:
58-
59-
1. If the descriptor has no wildcard, fail.
60-
2. If the descriptor is multipath (it contains "<0;1>"), take the external chain (0).
61-
3. Deriving a blinded address from the given CT descriptor and network at the fixed index (2^31 - 1). By doing so slightly different descriptors that represent the same wallet (eg. using or not using the fingerprint) will create the same identifier.
62-
4. Hashing the address string with SHA256, so that is not possible to send funds to the account_address.
63-
5. Taking the first 16 bytes (32 hex characters) of the hash, so that is not too long but it is still impossible to create collisions.
64-
6. Formatting with hyphens every 4 characters (e.g. "1234-5678-90ab-cdef-1234-5678-90ab-cdef") This should improve human readability and comparability.
52+
The DWID is derived from the CT descriptor as specified in ELIP-152.
53+
Note that in the UTXO model this isn't a proper address where someone can send funds to, which avoids address reuse and prevents leaking information about the wallet.
6554

6655
Example Account IDs:
6756
* Liquid : "bip122:1466275836220db2944ca059a3a10ef6:d41f-fe12-4da1-28d5-9449-5e49-d3f4-42ca"
6857
* Liquid Testnet: "bip122:a771da8e52ee6ad581ed1e9a99825e5b:2cb9-6c92-93b8-1f96-0c3f-afc7-9504-afdd"
6958
70-
Test vectors are available in the [Test Vectors](#test-vectors) section.
7159

7260
===Asset ID Specification===
7361

@@ -94,7 +82,7 @@ Example Asset IDs:
9482
9583
Note: This specification replaces the previously suggested [slip44](https://github.com/satoshilabs/slips/blob/master/slip-0044.md) namespace for Liquid assets, as the slip44 namespace can represent only the policy asset (Liquid BTC) and cannot represent the variety of assets on the Liquid Network.
9684

97-
===Cross-Chain Asset Recognition===
85+
===Use Cases===
9886

9987
The asset ID specification allows for recognition of the same asset across different blockchains. For example:
10088
* Tether USDt on Liquid: "bip122:1466275836220db2944ca059a3a10ef6/elipXXX:ce091c998b83c78bb71a632313ba3760f1763d9cfcffae02258ffa9865a37bd2"
@@ -103,32 +91,6 @@ The asset ID specification allows for recognition of the same asset across diffe
10391
Applications can use these identifiers to recognize that these assets represent the same underlying value, facilitating cross-chain operations.
10492

10593

106-
==Test Vectors==
107-
108-
The following are test vectors for the account identifier.
109-
110-
network: Liquid
111-
descriptor: ct(slip77(9c8e4f05c7711a98c838be228bcb84924d4570ca53f35fa1c793e58841d47023),elwpkh([73c5da0a/84h/1776h/0h]xpub6CRFzUgHFDaiDAQFNX7VeV9JNPDRabq6NYSpzVZ8zW8ANUCiDdenkb1gBoEZuXNZb3wPc1SVcDXgD2ww5UBtTb8s8ArAbTkoRQ8qn34KgcY/<0;1>/*))#y8jljyxl
112-
account_address: d41f-fe12-4da1-28d5-9449-5e49-d3f4-42ca
113-
account_id: bip122:1466275836220db2944ca059a3a10ef6:d41f-fe12-4da1-28d5-9449-5e49-d3f4-42ca
114-
115-
network: Liquid Testnet
116-
descriptor: ct(slip77(9c8e4f05c7711a98c838be228bcb84924d4570ca53f35fa1c793e58841d47023),elwpkh([73c5da0a/84h/1h/0h]tpubDC8msFGeGuwnKG9Upg7DM2b4DaRqg3CUZa5g8v2SRQ6K4NSkxUgd7HsL2XVWbVm39yBA4LAxysQAm397zwQSQoQgewGiYZqrA9DsP4zbQ1M/<0;1>/*))#xte2lx9x
117-
account_address: 2cb9-6c92-93b8-1f96-0c3f-afc7-9504-afdd
118-
account_id: bip122:a771da8e52ee6ad581ed1e9a99825e5b:2cb9-6c92-93b8-1f96-0c3f-afc7-9504-afdd
119-
120-
network: Regtest
121-
descriptor: ct(slip77(9c8e4f05c7711a98c838be228bcb84924d4570ca53f35fa1c793e58841d47023),elwpkh([73c5da0a/84h/1h/0h]tpubDC8msFGeGuwnKG9Upg7DM2b4DaRqg3CUZa5g8v2SRQ6K4NSkxUgd7HsL2XVWbVm39yBA4LAxysQAm397zwQSQoQgewGiYZqrA9DsP4zbQ1M/<0;1>/*))#xte2lx9x
122-
account_address: 5f42-ad62-d515-96f8-ed85-5d5f-0e86-467e
123-
account_id: bip122:cc2641af46f536fba45aab6016f63e12:5f42-ad62-d515-96f8-ed85-5d5f-0e86-467e
124-
125-
12694
==Backwards Compatibility==
12795

12896
This proposal introduces new standards and does not affect existing functionality. Wallets and applications that do not support these standards can continue to operate as before.
129-
130-
==Reference Implementation==
131-
132-
A reference implementation of the account_address computation is available in [LWK](https://github.com/Blockstream/lwk/blob/4ec85076f549d17cc920e3b7763516345daea3ad/lwk_wollet/src/descriptor.rs#L164)
133-
134-

0 commit comments

Comments
 (0)