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 %}
{% 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 %}