New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@matterlabs/composables

Package Overview
Dependencies
Maintainers
4
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@matterlabs/composables

Collection of essential Vue.js composables for zkSync

  • 1.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12
increased by100%
Maintainers
4
Weekly downloads
 
Created
Source

@matterlabs/composables

Collection of essential Vue.js composables for zkSync

Usage

npm install @matterlabs/composables
  • useWallet - used to setup a connection to MetaMask wallet

    import { useWallet } from "@matterlabs/composables";
    
    const { initialize } = useWallet(context);
    initialize().then(() => { /* application bootstrap */ })
    
    const { getL1Signer, getL2Signer } = useWallet(context);
    
    const l1Signer = await getL1Signer();
    const tx = await l1signer.deposit({
        to,
        token,
        amount,
    })
    
    const l2Signer = await getL2Signer();
    const tx = await l2Signer.transfer({
        to,
        token,
        amount
    });
    

Logging

You can override default existing logging behavior via attachLogger:

import { attachLogger } from "@matterlabs/composables";

attachLogger(logger);

Type definition for logger:

type LoggerLike = {
  log(...data: unknown[]): void;
  error(e: unknown, ...data: unknown[]): void;
  warn(message: string, ...data: unknown[]): void;
};

Peer dependencies

  • vue
  • @vueuse/core
  • zksync-web3

FAQs

Package last updated on 24 Apr 2023

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