MSafe | Aptos
  • Overview
    • MSafe Overview
    • What can you do with MSafe wallet?
      • Why Multi-Sig & Non-Custodial
      • MSafe Wallet Key Benefits
    • Use Cases
      • Treasury Management
      • Smart Contract Deployment & Update
      • Protocol Admin Control
      • dApp Store Integration
    • Security
  • Users
    • Glossary
    • Launch App
    • Connect Wallet
    • Navigation Bar
    • Address Book
    • Create an Account
      • Initiate Creation
      • Co-Managers to Accept
    • Switch btw Accounts
    • Deposit / Receive
    • View Assets
    • View Pending Txn
    • View Txn History
    • Propose Transaction (Enable NFT, Send, Register Coin)
      • Enable NFT
      • Send
      • Add Coin
    • Approve Transaction
      • Co-Managers to Approve Enable NFT
      • Co-Managers to Approve Send
      • Co-Manager to Approve Add Coin
    • Change Vote
    • Reject Transaction
      • Co-Managers to Reject
    • Execute Transaction
      • Execute Approval
      • Execute Rejection
    • App Store
      • Use dApps
    • MSafe 1.0 User guide
      • Connect Wallet
      • First time registration
      • Create an MSafe Account
      • Receive Coin
      • Coin Transfer (APT)
      • DAPP Store
      • Add a new coin
      • Address Book
      • Permissions
      • Wallet FAQs
  • Developers
    • Overview
    • System
      • Auth-key & Multi-Ed25519
      • Backend Walk Through
      • MSafe Contracts
    • Interactive CLI
      • Installation
      • CLI arguments
      • Register and View
      • Create a MSafe Wallet
      • Approve / execute a transaction
      • Transfer Coin
      • Smart Contract | Module Publish
      • Entry Function
      • Reject a transaction
      • Migration from MSafe 1.0 to MSafe 2.0
    • SDK
      • Smart Contract | Deploy a MOVE Module
      • Call An Entry Function
    • Integrate with MSafe (DAPP)
      • FAQ
    • Move Module Publish
  • Product updates
    • 2022 Q4
Powered by GitBook
On this page
  • MSafe Wallet
  • Installation
  • Make some change to your code
  • Request MSafe team to add your dApp to app store
  1. Developers

Integrate with MSafe (DAPP)

MSafe Wallet

This guide is used to integrate dapp into MSafe.

Installation

Installation of the npm package:

npm install @msafe/aptos-aip62-wallet

Make some change to your code

  • Add MSafeWallet to AptosWalletAdapterProvider

<AptosWalletAdapterProvider plugins={[new MSafeWallet({
    network: Network.TESTNET,
    appId: "", // If you have already integrate with MSafe (list in MSafe App Store), you can ask MSafe team to provide the AppId
    appUrl: "" // If you are not integrate with MSafe, you can provide your app url here
})]}>
  {appContent}
</AptosWalletAdapterProvider>
  • Add auto detect and connect code

import { useWallet } from '@aptos-labs/wallet-adapter-react'
import { inMSafeWallet, MSafeWalletName } from '@msafe/aptos-wallet'

const wallet = useWallet()

useEffect(() => {
  if (!wallet.connected && inMSafeWallet()) {
    wallet.connect(MSafeWalletName)
  }
}, [wallet.isLoading])
  • Deploy above change to your app

Request MSafe team to add your dApp to app store

Please provide below information to MSafe team

  • Name

  • Logo

  • Description

  • Tags (e.g. DeFi)

  • Mainnet Url

  • Mainnet Contracts

  • Testnet Url

  • Testnet Contracts

Once MSafe verify your dApp integration code, MSafe team will notify you the integration is finished. User can using your dApp by multi-sig wallet now.

PreviousCall An Entry FunctionNextFAQ

Last updated 4 months ago