Skip to content
This repository has been archived by the owner on Nov 4, 2020. It is now read-only.

Latest commit

 

History

History
45 lines (35 loc) · 1.1 KB

get-started.md

File metadata and controls

45 lines (35 loc) · 1.1 KB

🚀 Get Started

📦 Installation

Magic interacts with the Zilliqa blockchain via Magic's extension NPM package @magic-ext/zilliqa. The Zilliqa extension also lets you interact with the blockchain using methods from Zilliqa's Javascript SDK.

{% hint style="info" %} You can skip straight to our kitchen sink example directly:

👉Zilliqa Example**** {% endhint %}

{% tabs %} {% tab title="NPM" %}

npm install --save @magic-ext/zilliqa

{% endtab %}

{% tab title="Yarn" %}

yarn add @magic-ext/zilliqa

{% endtab %} {% endtabs %}

⚡️ Initializing Extension

{% tabs %} {% tab title="ES Modules/TypeScript" %}

import { Magic } from 'magic-sdk';
import { ZilliqaExtension } from '@magic-ext/zilliqa';
 
const magic = new Magic('YOUR_API_KEY', {
  extensions: [
    new ZilliqaExtension({
      rpcUrl: 'Zilliqa_RPC_NODE_URL'
    })
  ]
});

{% endtab %} {% endtabs %}