Pundi
Pundi AIPundi X
  • 🤖Pundi AI overview
  • 🈁Pundi AI Data Platform
    • Data stakeholders
    • Data Labelling
    • Pundi AI Data Platform (Alpha Testnet) - User Guide
    • FAQ
  • 🦾Pundi AIFX Omnilayer
    • Pundi AIFX
    • Installation Pundi AIFX
    • Setup Node
      • Full node with Binaries
      • Full node with Docker
      • Snapshot Guide
      • Node Monitoring Device
    • Validators
      • Validator Overview
      • Setting Up a Validator for Pundi AIFX
      • Validator Recovery
      • Validator FAQ
      • Validator Security Notice
      • Migration Best Practices
      • Transfer Validator Permissions
    • Delegators
      • Delegators FAQ
      • Delegator CLI Guide
      • Delegator Security Notice
    • Pundi AIFX Tutorials
      • Pundi AIFX CLI Commands
      • Cloud Setup
      • Testnet faucet
      • Ledger Integration for fxcored
      • Sentry Nodes
      • Account Migration Guide (CLI)
    • Upgrade Instructions
      • Cosmovisor Upgrade Guide v8.5.x
        • Cosmovisor Integration - Binaries
        • Cosmovisor Integration - Docker
      • Manual Upgrade Guide v8.5.x
        • Binaries - Upgrading Your Node
        • Docker - Upgrading Your Node
      • Upgrade Versions
        • v2.2.0 Upgrade Instructions
        • v3.1.0 Upgrade Instructions
        • v4.2.1 Upgrade Instructions
        • v5.0.0 Upgrade Instructions
      • Upgrade FAQ
    • Deploying on Pundi AIFX EVM
      • Products
      • MetaMask
        • Download and Install MetaMask
        • Add Network
        • Configure Custom Tokens
        • Create and Import Accounts
      • Connect Wallet to Dapps
        • Connect using MetaMask
        • Connect using Pundi Wallet (Wallet Connect)
      • With Remix
      • With Truffle
      • With Hardhat
      • Cross-Chain Bridges
        • Bridging Tokens from other networks
        • Pundi Gravity Bridge
    • DApps and Infra
      • Margin X Swap
      • Pundi Wallet
      • PundiScan
      • Baklava Space
      • Safe Multisig
      • PortfolioX
      • Token Factory
    • Developers
      • Pundi AIFX Network
      • Pundi AIFX Modules
      • Pundi AIFX JSON RPC
      • Pundi AIFX REST API
      • Web3 JSON RPC
        • JSON RPC Server
        • Namespaces
        • JSON RPC Methods
        • Events
      • Support Leap
      • Third Party Price Oracles
      • Contract Deployments
      • Pundi AIFX Cross Chain
        • sendToFx
        • f(x)Core
        • ibc
        • Target
      • Precompiled Contracts
        • CrossChain Precompiled
        • Staking-V2 Precompiled
      • Pundi AIFX SDKs
        • Python SDK
        • JavaScript SDK
      • Contract Monitoring
    • Pundi X Chain (under Pundi X)
      • Getting Started
        • Install Pundi X (PundiXChain)
        • Setup Node
          • Full node with Binaries
          • Full node with Docker
          • Snapshot Guide
          • Node Monitoring Device
          • Node Peers
      • Validators
        • Validator Overview
        • Setting Up a Validator for PundiXChain
        • Validator Recovery
        • Validator FAQ
        • Validator Security
        • Sentry Nodes
      • Delegators
        • Delegator FAQ
        • Delegator Overview
        • Delegator CLI Guide
      • Pundi X Tutorials
        • Pundi X CLI Guide
        • Ledger Integration for pundixd
        • Testnet Faucet
        • Cloud Setup
      • Upgrade Instructions
        • Cosmovisor Integration - Binaries
        • Cosmovisor Integration - Docker
        • Support keplr
      • Developers
        • Pundi X Network
        • Pundi X Protobuf
        • Pundi X gRPC & REST
        • Pundi X JSON RPC
        • Pundi X Cross Chain
          • ibc
  • 👛PURSE+
    • Purse Box
      • How many NFTs can I mint?
      • Minting (Etherscan)
      • Minting (Pursetoken.com)
    • PURSE+
      • Links
    • Bridging
      • BSC -> Ethereum
    • Protocols
      • LP Restaking Farms
        • How to Use Farms
        • Contract on BscScan
      • PURSE Staking
      • PURSE Staking Rewards
        • Campaigns
      • PURSE Retroactive Rewards
        • Campaigns
    • Contracts
      • Ethereum
      • Binance
      • Function X
    • IBC
      • PUNDIX Chain
    • PURSE Token
      • Background
      • ERC404 intro
      • Accounting of Balances
      • Minting PURSE NFT(s)
      • Transferring PURSE
      • Maintaining PURSE NFT(s)
      • NFTs in Queue
      • Token IDs
  • 🎡Pundi AI MM Agent
    • Why Market Making
    • Traditional MM vs. AMM
    • AI MM Agent: Bridging the Gap
    • Use Cases
    • Train & Launch (Step 1 & 2)
    • Flywheel (Step 3)
    • How the AI MM Agent Works in Detail
    • Why This is Powerful
  • 🛍️Pundi AI Data Marketplace (soon)
  • 🥇PUNDIAI Token Overview
    • Revenue generation flywheel
    • vePUNDIAI
      • how to bribe with vePUNDIAI
    • Protocol pool
  • Governance
    • Governance Proposal Information
      • EGF Info
      • EGF Grants Program
      • Application Template
      • Successful Grant Applicants
      • Launching an EGF Proposal
  • Links
Powered by GitBook
On this page
  • Connecting through the UI
  • Connect Pundi Wallet account to Dapp
  • Disconnect Pundi Wallet account from Dapp
  • For Developers
  • Dependencies
  • WalletConnectId
  • CHAIN_ID
  • Get Accounts
  • Sign Transactions (amino)
  1. Pundi AIFX Omnilayer
  2. Deploying on Pundi AIFX EVM
  3. Connect Wallet to Dapps

Connect using Pundi Wallet (Wallet Connect)

Steps to connect Pundi Wallet using Wallet Connect to Dapps

PreviousConnect using MetaMaskNextWith Remix

Last updated 3 months ago

Connecting through the UI

Connect Pundi Wallet account to Dapp

When you create an account on the Pundi Wallet application, it automatically generates an Ethereum address. This address can be used to interact with Dapps via Wallet Connect. In this tutorial iOS is used, the process is similar on Andriod.

Only connect to websites that you trust. Always check that the URL is correct, and bookmark Dapps that you regularly visit/use.

  1. Click on 'Connect Wallet' or 'Connect to a wallet'. Other Dapps will have similar buttons for the user to connect their wallet to start using the application.

  2. Select 'WalletConnect'

  3. A QR code will appear

  4. Open Pundi Wallet, and click on the blue button at the bottom.

  5. Select 'Scan'

  6. Scan the QR code

  7. The wallet will show it is connecting for a brief moment

  8. Select the address you want to connect to the Dapp

  9. Click on 'Authorize'

  10. Now, you will see your address of the account at the top right hand corner instead of 'Connect to a wallet'

Read from left to right.

Disconnect Pundi Wallet account from Dapp

WalletConnect only allows you to connect to one Dapp at a time. You will have to disconnect from the previous Dapp before connecting to another Dapp. It is good practice to disconnect your account from the Dapp when you are done using it.

  1. You will see a tab appear on your Pundi Wallet home screen, click on it and it will open up the page for you to disconnect

  2. Click on 'Disconnect'

  3. It will prompt you once more, click on 'Disconnect' again

Your Dapp should now not show your address being connected anymore.

For Developers

Dependencies

  • fxwallet version (minimum): v2.0

WalletConnectId

  • 39778

CHAIN_ID

  • fxevm

Get Accounts

export function getAccountRequest(chainIds) {
  return {
    id: payloadId(),
    jsonrpc: '2.0',
    method: 'functionx_wc_accounts_v1',
    params: chainIds,
  };
}

Example

const request = getAccountRequest([CHAIN_ID,CHAIN_ID]);
connector.sendCustomRequest(request)
  .then((accounts) => {
    setAccounts(accounts);
    console.log(accounts.length == 1);
  }).catch((error) => {
    console.error(error);
  });

Result

[name, algo, publicKey, addressByte, bech32Address]

Sign Transactions (amino)

Sign transaction using FunctionX Mobile Wallet via Wallet Connect

  • signer: bech32Address

Example:

import {
  makeSignDoc as makeAminoSignDoc,
  serializeSignDoc
} from "@cosmjs/amino"
import { fromUtf8 } from "@cosmjs/encoding"

const signDoc = makeAminoSignDoc(messages, fee, chainId, memo, accountNumber, sequence)
const signBytes = serializeSignDoc(signDoc)
const signData = fromUtf8(signBytes)
     
connector.sendCustomRequest({
    id: payloadId(),
    jsonrpc: '2.0',
    method: 'functionx_wc_sign_tx_v1',
    params: [chainId, signer, signData],
  })
  .then((response) => {
    const signed = _.get(response, '0.signed');
    const signature = _.get(response, '0.signature');
    return broadcastTx(signed, signature);
  }).then((result) => {
    const code = _.get(result, 'code');
    if (code === 0) {
      const txHash = _.get(result, 'txhash');
      console.log(txHash);
    } else {
      const rawLog = _.get(result, 'raw_log');
      console.error(rawLog);
    }
  })

fx-js-sdk:

🦾
https://www.npmjs.com/package/fx-js-sdk
Click on 'WalletConnect'
QR code will appear
Press on the blue button
Select 'Scan'
Scan the QR code
Wait for it to connect
Select the address to connect
'Authorize' the Dapp to connect to your address
Connected via WalletConnect!
Click on the tab
Click on 'Disconnect'
Click on 'Disconnect'