Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@actalink/snap

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@actalink/snap

Metamask Snap powered by in-house Acta SDK

  • 0.1.10
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-93.33%
Maintainers
2
Weekly downloads
 
Created
Source

Acta Snap

Welcome to the MetaMask Snap integration for Acta SDK. This Snap empowers users to harness the full potential of their smart wallet payments by seamlessly integrating the Acta SDK into the MetaMask extension.

  • Create Smart Wallet from your EOA and load it to Metamask using Acta SDK
  • Send ERC20 tokens from your EOA via your Smart Wallet
  • Reccuring payments using Smart Wallet

⚡️ Features

🚀 Smart Wallet Creation

Utilize Acta Snap to effortlessly create and load smart wallets into MetaMask Keyring API, seamlessly integrating them as regular MetaMask accounts labeled with Snaps Beta. These off-chain smart wallets incur no gas fees during creation, transitioning to on-chain upon the completion of the first transaction. Enjoy a streamlined and cost-effective onboarding experience with Acta Snap.

App Screenshot

🤑 Send Payments via Smart Wallet

Send ERC20 tokens using your smart wallet. Steps to achieve this :-

  • Give allowance to the smart wallet address generated
  • Connect your wallet
  • Sign the message

App Screenshot

⏰ Send Reccuring Payments via Smart Wallet

Work in progress.

📕 Documentation - @actalink/snap

⬇️ Installing the snap

To install the snap, you need to attach the follwing code to the button

    await window.ethereum.request({
            method: 'wallet_requestSnaps',
            params: {
                [npm:@actalink/snap]: <version number>,
            },
  });

🌎 Create Smart Wallet

    await window.ethereum.request({
        method: 'wallet_invokeSnap',
        params: {
            snapId: "npm:@actalink/snap",
            request: { method: 'snap.createAccount' },
        },
  }))

💸 Send Erc20 Token

Here, the tokenAddress is the address of the ERC20 toke smart contract, tokenAmount is the amount you want to transfer, and to is the reciever's address.

await window.ethereum.request({
  method: 'wallet_invokeSnap',
  params: {
    snapId: 'npm:@actalink/snap',
    request: {
      method: 'snap.transaction',
      params: {
        to: targetAddress,
        tokenAmount,
        tokenAddress,
      },
    },
  },
});

🕰️ Scheduled Transaction

Here, the scheduledTokenAddress is the address of the ERC20 toke smart contract, scheduledTokenAmount is the amount you want to transfer, and scheduledTo is the reciever's address. The minutes filed here is a comma-seperated uints for specific intervals, eg. - [3,2,1] will execute the first tx after 3 mins from now, and then 2 minutes from then after 1 minute.

await window.ethereum.request({
  method: 'wallet_invokeSnap',
  params: {
    snapId: defaultSnapOrigin,
    request: {
      method: 'snap.scheduledOp',
      params: {
        scheduledTo: targetAddress,
        scheduledTokenAmount: tokenAmount,
        scheduledTokenAddress: tokenAddress,
        minutes: intervalMinutes,
      },
    },
  },
});

Authors

  • Acta Link
  • @iamyxsh

Keywords

FAQs

Package last updated on 05 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc