Socket
Book a DemoInstallSign in
Socket

@magic-ext/connect

Package Overview
Dependencies
Maintainers
19
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@magic-ext/connect

Magic SDK Connect Extension for Web environments.

9.1.0
latest
Source
npmnpm
Version published
Weekly downloads
4.6K
34.86%
Maintainers
19
Weekly downloads
 
Created
Source

🔒 Magic Connect Extension for Web Browsers and React Native Apps

<MagicLabs>

Magic Connect JavaScript SDK extension.

License · Changelog · Contributing Guide

📖 Documentation

See the developer documentation to learn how to get started with Connect in Magic SDK.

🔗 Installation

Integrating your app with Magic will require our client-side NPM package and the Connect extension:

Web Browser:

# Via NPM:
npm install --save magic-sdk @magic-ext/connect

# Via Yarn:
yarn add magic-sdk @magic-ext/connect

Alternatively, you can load via CDN with by adding a script tag to your app’s <head>:

<script src="https://cdn.jsdelivr.net/npm/magic-sdk/dist/magic.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@magic-ext/connect/dist/extension.js"></script>

Bare React Native:

# Via NPM:
npm install --save @magic-sdk/react-native-bare @magic-ext/connect

# Via Yarn:
yarn add @magic-sdk/react-native-bare @magic-ext/connect

Expo React Native:

# Via NPM:
npm install --save @magic-sdk/react-native-expo @magic-ext/connect

# Via Yarn:
yarn add @magic-sdk/react-native-expo @magic-ext/connect

⚡️ Quick Start

Sign up or log in to the developer dashboard to receive API keys that will allow your application to interact with Magic's APIs.

From your login page:

import Web3 from 'web3';
import { Magic } from 'magic-sdk'; // web browsers
import { Magic } from '@magic-sdk/react-native-bare'; // Bare React Native
import { Magic } from '@magic-sdk/react-native-expo'; // Expo React Native
import { ConnectExtension } from '@magic-ext/connect';

const magic = new Magic('YOUR_API_KEY', {
  extensions: [new ConnectExtension()],
  network: 'mainnet' // 'mainnet' or 'testnet'
});

const web3 = new Web3(magic.rpcProvider);

await web3.eth.getAccounts();

FAQs

Package last updated on 04 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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.