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
  • Overview
  • MSafe registration
  • Sending a transaction
  • Revoke a transaction
  1. Developers
  2. System

Backend Walk Through

Overview

MSafe uses move modules to store essential data of transaction on chain. Basically, the transaction payload and signatures are stored in the multi-sig wallet's resource data in deployed MOVE module, and the executor will collect the signatures from chain, assemble signatures to form multi-ed25519 signatures, and submit the transaction through MSafe wallet.

MSafe registration

For example, for a 3/5 multi-sig wallet created by 5 public keys A, B, C, D, and E. The process of the MSafe multi-sig wallet will follow the following process:

  1. Alice initiate a wallet creation by constructing the transaction momentum_safe.register,and submit their signature by sending a transaction calling creator.initTransaction to submit the wallet creation request.

  2. Bob submit their signature to approve the creation of MSafe through creator.submit_signature.

  3. Charlie collects the signature from Alice and Bob, combine their signatures, form a transaction, and submit it on blockchain.

  4. The function MomentumSafe.register is called, and data is publish under the multi-sig wallet’s resource. Thus MSafe wallet is initialized and registered on blockchain.

Sending a transaction

The process of sending a transaction will follow the following process:

  1. Alice initiates a new transaction through momentum_safe.initTransaction and submits the transaction payload and their signature.

  2. Bob submit their signature on-chain through momentum_safe.submit_signature.

  3. Charlie collects the two signatures from Alice and Bob, combines their signature, forms a transaction, and submits it to the blockchain.

  4. The transaction passes multi-ed25519 signature verification and is finalized in the blockchain.

Revoke a transaction

Sometimes, the user may want to revoke a transaction to unblock the following transactions.

  1. Alice initiates a transaction Tx1.

  2. Bob initiates a transaction Tx2. Tx2 will be blocked by Tx1.

  3. Bob, Charlie, and Danny want to revoke Tx1, they sign a dummy transaction Tx1’ with the same sequence number as Tx1, and submit it to the blockchain.

  4. Tx1’ is finalized by blockchain, and Tx1 is pruned.

  5. Tx2 will be submitted again and further finalized after Tx1’ is finalized.

PreviousAuth-key & Multi-Ed25519NextMSafe Contracts

Last updated 2 years ago