Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Web3 #28

Merged
merged 12 commits into from
Apr 9, 2020
Merged

Support Web3 #28

merged 12 commits into from
Apr 9, 2020

Conversation

smithki
Copy link
Contributor

@smithki smithki commented Mar 31, 2020

Short example of the API:

import { Magic } from 'magic-sdk';
import Web3 from 'web3';

const magic = new Magic('API_KEY');
const web3 = new Web3(magic.rpcProvider);

With custom node:

import { Magic } from 'magic-sdk';
import Web3 from 'web3';

const magic = new Magic('API_KEY', { network: /* custom node options here */ });
const web3 = new Web3(magic.rpcProvider);

With ethers.js:

import { ethers } from 'ethers';
import { Magic } from 'magic-sdk';

const magic = new Magic('API_KEY');
var provider = new ethers.providers.Web3Provider(magic.rpcProvider);

Tests:

Screen Shot 2020-04-08 at 1 29 00 PM

@smithki smithki self-assigned this Apr 8, 2020
@smithki smithki changed the title Support Web3 (W.I.P.) Support Web3 Apr 8, 2020
@smithki smithki requested a review from Dizigen April 8, 2020 19:23
@smithki smithki marked this pull request as ready for review April 8, 2020 19:23
@smithki smithki requested a review from seanli April 8, 2020 19:30
@smithki
Copy link
Contributor Author

smithki commented Apr 8, 2020

I'm also interested in @seanli's feedback on the API 👆

UPDATE:

Sean and I have spoken, we are solid on the API above 😄

@smithki smithki mentioned this pull request Apr 9, 2020
Copy link
Contributor

@Dizigen Dizigen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@smithki smithki merged commit f920aa2 into master Apr 9, 2020
@FYJen FYJen deleted the smithki_support_web3 branch April 17, 2020 19:07
@smithki
Copy link
Contributor Author

smithki commented Oct 22, 2020

@smithki smithki added the released This issue/pull request has been released. label Oct 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants