You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, create a CIP 30 extension CIP that adds a api.getNetworkMagic(): Promise<number> function which returns the connected networks magic number, so the dapp can determine exactly what test network it is connected to.
We need a way to tell what network a wallet is conencted to, not just if its a tesnet or mainnet.
Cip30: https://github.com/cardano-foundation/CIPs/blob/master/CIP-0030/README.md
CIP30 defines a way to create extensions: https://github.com/cardano-foundation/CIPs/blob/master/CIP-0030/README.md#extension
It also defines a method to return the network: https://github.com/cardano-foundation/CIPs/blob/master/CIP-0030/README.md#apigetnetworkid-promisenumber
However, this only says if the network is mainnet, or not. Its not useful, pre-prod, pre-view or any other test network are all lumped together as
0
. We need to be able to tell if a wallet is used Preprod or preview or some other test network reliably.Actual wallet addresses do not do this, as they could be the same across test networks.
So, create a CIP 30 extension CIP that adds a
api.getNetworkMagic(): Promise<number>
function which returns the connected networks magic number, so the dapp can determine exactly what test network it is connected to.for pre-existing examples of cip-30 extensions, See:
https://github.com/cardano-foundation/CIPs/blob/d08e2671148a4f970ad9dab6ea82c9e94ddf32af/CIP-0106/README.md?plain
https://github.com/cardano-foundation/CIPs/blob/d08e2671148a4f970ad9dab6ea82c9e94ddf32af/CIP-0095/README.md?plain
https://github.com/cardano-foundation/CIPs/blob/d08e2671148a4f970ad9dab6ea82c9e94ddf32af/CIP-0104/README.md?plain
The extension should be small and introduce this one feature.
The text was updated successfully, but these errors were encountered: