Connect a wallet
1. How to Install Keplr in a Browser
To install Keplr:
- Open your browser (Google Chrome or Brave recommended).
- Go to the Keplr Extension Page in the Chrome Web Store.
- Click "Add to Chrome" (or "Add to Brave").
- Follow the instructions and confirm the installation.
Once installed, you will see the Keplr icon in your browser extensions section.
For more detailed help, you can visit Keplr's installation guide.
2. How to Make an Account
- Click on the Keplr icon in your browser extensions.
- You'll see options to create a new account or import an existing one:
- To create a new account, click "Create New Account."
- Follow the prompts to generate a new mnemonic phrase.
- Write down your 12 or 24-word mnemonic safely (do not share it with anyone).
- Complete the form by entering your desired account name and setting a password.
- Click "Next" to finalize and create your Keplr account.
For more detailed steps, refer to Keplr's help center.
3. How to Add the Layer Testnet to Keplr
If you're connecting to an example app that automatically adds the testnet:
- Go to the example AVS demo app.
- In the top-right corner of the app, click the "Connect Wallet" button.
- The app will prompt you to connect your Keplr wallet and add the hacknet if it's not already added.
- Approve the network addition in the Keplr popup.
Example Code: Here is the relevant piece of code from the app that handles connecting to Keplr and adding the testnet:
await window.keplr.experimentalSuggestChain({chainId: "layer-hack-1",chainName: "Layer Hacknet",rpc: "https://rpc.hack.layer.xyz",rest: "https://grpc.hack.layer.xyz:443",stakeCurrency: {coinDenom: "Layer",coinMinimalDenom: "ulayer",coinDecimals: 6},bip44: { coinType: 118 },bech32Config: {bech32PrefixAccAddr: "layer",bech32PrefixAccPub: "layerpub",bech32PrefixValAddr: "layervaloper",bech32PrefixValPub: "layervaloperpub",bech32PrefixConsAddr: "layervalcons",bech32PrefixConsPub: "layervalconspub"},currencies: [{ coinDenom: "LAYER", coinMinimalDenom: "ulayer", coinDecimals: 6 }],feeCurrencies: [{ coinDenom: "LAYER", coinMinimalDenom: "ulayer", coinDecimals: 6 }],gasPriceStep: { low: 0.015, average: 0.025, high: 0.035 }});await window.keplr.enable("layer-hack-1");
For more details on adding custom networks to Keplr, check Keplr's documentation on managing chains.
4. How to Hit the Faucet
You'll need to install Telegram in order to get faucet funds for the hacknet. Visit https://telegram.org/ and follow installation instructions for your device.
- After installing Telegram, Visit https://t.me/LayerUp_bot to open the LayerUp Telegram app.
- Click Start and then Start adventure.
- After following the prompts in the app, you'll be able to open the menu in the left corner of the screen. Click the illuminated drop-shaped button.
- Scroll down and input your wallet address.
- Click Claim Tokens after entering your wallet address. The faucet tokens will be sent to your wallet.
5. How to Send Tokens Between Two Accounts Using Keplr UI
To send tokens between two accounts:
- Open Keplr in your browser.
- Go to the "Assets" tab.
- Select the network (e.g., Layer Hacknet or mainnet) from which you want to send tokens.
- Click the "Send" button.
- Enter the recipient's address and the amount of tokens you wish to send.
- Click "Next" to review the transaction.
- Click "Approve" to complete the transaction.
You can also check out Keplr's official guide for sending tokens here.
Network Configuration (for Developers)
To connect to the Layer hacknet network programmatically, use the following configuration:
export const HacknetConfig = {rpc_endpoint: "https://rpc.hack.layer.xyz",grpc_endpoint: "https://grpc.hack.layer.xyz:443",chain_id: "layer-hack-1",native_denom: "ulayer",};
Chain Registry Entry
For connecting to and registering the Layer network in wallets and applications, use this configuration:
export const chainRegistryEntry = {chainId: "layer-hack-1",chainName: "Layer Hacknet",rpc: "https://rpc.hack.layer.xyz",rest: "https://grpc.hack.layer.xyz:443",bip44: { coinType: 118 },bech32Config: {bech32PrefixAccAddr: "layer",bech32PrefixAccPub: "layerpub",bech32PrefixValAddr: "layervaloper",bech32PrefixValPub: "layervaloperpub",bech32PrefixConsAddr: "layervalcons",bech32PrefixConsPub: "layervalconspub"},currencies: [{coinDenom: "LAYER",coinMinimalDenom: "ulayer",coinDecimals: 6,coinGeckoId: "layer",},],feeCurrencies: [{coinDenom: "Layer",coinMinimalDenom: "ulayer",coinDecimals: 6,coinGeckoId: "layer",gasPriceStep: { low: 0.015, average: 0.025, high: 0.035 },},],stakeCurrency: {coinDenom: "layer",coinMinimalDenom: "ulayer",coinDecimals: 6,coinGeckoId: "layer",},};