Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4516487a9a | ||
|
|
300fe4a933 | ||
|
|
f580b8ac06 | ||
|
|
f0de81d4b1 | ||
|
|
f3a863a3b1 | ||
|
|
128bca9e07 | ||
|
|
18ba6b381e | ||
|
|
18c16101dd | ||
|
|
b6b94ca348 |
@@ -14,7 +14,7 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
name: Build and Test
|
name: Build and Test
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
runs-on: ubuntu-latest-32
|
runs-on: ubuntu-latest-16
|
||||||
# To use Remote Caching, uncomment the next lines and follow the steps below.
|
# To use Remote Caching, uncomment the next lines and follow the steps below.
|
||||||
env:
|
env:
|
||||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ concurrency:
|
|||||||
jobs:
|
jobs:
|
||||||
integration-tests:
|
integration-tests:
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
runs-on: ubuntu-latest-32
|
runs-on: ubuntu-latest-16
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ jobs:
|
|||||||
comment_body: ${{ github.event.comment.body }}
|
comment_body: ${{ github.event.comment.body }}
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest-32
|
runs-on: ubuntu-latest-16
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
needs: deploy-check
|
needs: deploy-check
|
||||||
if: needs.deploy-check.outputs.triggered == 'true'
|
if: needs.deploy-check.outputs.triggered == 'true'
|
||||||
@@ -67,7 +67,7 @@ jobs:
|
|||||||
uses: ./.github/composite-actions/install
|
uses: ./.github/composite-actions/install
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: yarn build:release
|
run: yarn build
|
||||||
|
|
||||||
- name: Configure npm
|
- name: Configure npm
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ jobs:
|
|||||||
release:
|
release:
|
||||||
name: Release
|
name: Release
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
runs-on: ubuntu-latest-32
|
runs-on: ubuntu-latest-16
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ on: [pull_request]
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest-32
|
runs-on: ubuntu-latest-8
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
# @thirdweb-dev/auth
|
# @thirdweb-dev/auth
|
||||||
|
|
||||||
|
## 3.0.5
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- [#588](https://github.com/thirdweb-dev/js/pull/588) [`f0de81d`](https://github.com/thirdweb-dev/js/commit/f0de81d4b1ba33b2ac73ed16cfdea8fd4eb5da9e) Thanks [@adam-maj](https://github.com/adam-maj)! - Add verify login to auth
|
||||||
|
|
||||||
## 3.0.4
|
## 3.0.4
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@thirdweb-dev/auth",
|
"name": "@thirdweb-dev/auth",
|
||||||
"version": "3.0.4",
|
"version": "3.0.5",
|
||||||
"main": "dist/thirdweb-dev-auth.cjs.js",
|
"main": "dist/thirdweb-dev-auth.cjs.js",
|
||||||
"module": "dist/thirdweb-dev-auth.esm.js",
|
"module": "dist/thirdweb-dev-auth.esm.js",
|
||||||
"exports": {
|
"exports": {
|
||||||
|
|||||||
@@ -50,7 +50,8 @@ export class ThirdwebAuth {
|
|||||||
statement: parsedOptions?.statement,
|
statement: parsedOptions?.statement,
|
||||||
version: parsedOptions?.version,
|
version: parsedOptions?.version,
|
||||||
uri:
|
uri:
|
||||||
parsedOptions?.uri || (isBrowser() ? window.location.href : undefined),
|
parsedOptions?.uri ||
|
||||||
|
(isBrowser() ? window.location.origin : undefined),
|
||||||
chain_id: chainId,
|
chain_id: chainId,
|
||||||
nonce: parsedOptions?.nonce,
|
nonce: parsedOptions?.nonce,
|
||||||
expiration_time:
|
expiration_time:
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
import { ThirdwebAuth } from "../core";
|
||||||
|
import { LoginPayload, VerifyOptions } from "../core/schema";
|
||||||
|
import { SignerWallet } from "./signer";
|
||||||
|
import { ethers } from "ethers";
|
||||||
|
|
||||||
|
const wallet = new SignerWallet(ethers.Wallet.createRandom());
|
||||||
|
const authMap = new Map<string, ThirdwebAuth>();
|
||||||
|
|
||||||
|
export async function verifyLogin(
|
||||||
|
domain: string,
|
||||||
|
payload: LoginPayload,
|
||||||
|
options?: Omit<VerifyOptions, "domain">,
|
||||||
|
) {
|
||||||
|
let auth: ThirdwebAuth;
|
||||||
|
if (!authMap.has(domain)) {
|
||||||
|
auth = new ThirdwebAuth(wallet, domain);
|
||||||
|
authMap.set(domain, auth);
|
||||||
|
} else {
|
||||||
|
auth = authMap.get(domain) as ThirdwebAuth;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const address = await auth.verify(payload, options);
|
||||||
|
return { address, error: undefined };
|
||||||
|
} catch (err: any) {
|
||||||
|
return { address: undefined, error: err.message };
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,93 +1,2 @@
|
|||||||
import { SUPPORTED_CHAIN_ID, supportedChains } from "./evm";
|
export * from "./signer";
|
||||||
import type { Ecosystem, GenericAuthWallet } from "@thirdweb-dev/wallets";
|
export * from "./auth";
|
||||||
import { ethers } from "ethers";
|
|
||||||
|
|
||||||
const EIP1271_ABI = [
|
|
||||||
"function isValidSignature(bytes32 _message, bytes _signature) public view returns (bytes4)",
|
|
||||||
];
|
|
||||||
const EIP1271_MAGICVALUE = "0x1626ba7e";
|
|
||||||
|
|
||||||
export const checkContractWalletSignature = async (
|
|
||||||
message: string,
|
|
||||||
signature: string,
|
|
||||||
address: string,
|
|
||||||
chainId: number,
|
|
||||||
): Promise<boolean> => {
|
|
||||||
const rpcUrl =
|
|
||||||
supportedChains[chainId as SUPPORTED_CHAIN_ID]?.rpcUrls.default.http[0];
|
|
||||||
if (!rpcUrl) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
const provider = new ethers.providers.JsonRpcProvider(rpcUrl);
|
|
||||||
const walletContract = new ethers.Contract(address, EIP1271_ABI, provider);
|
|
||||||
const hashMessage = ethers.utils.hashMessage(message);
|
|
||||||
try {
|
|
||||||
const res = await walletContract.isValidSignature(hashMessage, signature);
|
|
||||||
return res === EIP1271_MAGICVALUE;
|
|
||||||
} catch {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
export class SignerWallet implements GenericAuthWallet {
|
|
||||||
type: Ecosystem = "evm";
|
|
||||||
#signer: ethers.Signer;
|
|
||||||
|
|
||||||
constructor(signer: ethers.Signer) {
|
|
||||||
this.#signer = signer;
|
|
||||||
}
|
|
||||||
|
|
||||||
public async getAddress(): Promise<string> {
|
|
||||||
return this.#signer.getAddress();
|
|
||||||
}
|
|
||||||
|
|
||||||
public async getChainId(): Promise<number> {
|
|
||||||
return this.#signer.getChainId();
|
|
||||||
}
|
|
||||||
|
|
||||||
public async signMessage(message: string): Promise<string> {
|
|
||||||
return await this.#signer.signMessage(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
public async verifySignature(
|
|
||||||
message: string,
|
|
||||||
signature: string,
|
|
||||||
address: string,
|
|
||||||
chainId?: number,
|
|
||||||
): Promise<boolean> {
|
|
||||||
const messageHash = ethers.utils.hashMessage(message);
|
|
||||||
const messageHashBytes = ethers.utils.arrayify(messageHash);
|
|
||||||
const recoveredAddress = ethers.utils.recoverAddress(
|
|
||||||
messageHashBytes,
|
|
||||||
signature,
|
|
||||||
);
|
|
||||||
|
|
||||||
if (recoveredAddress === address) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check if the address is a smart contract wallet
|
|
||||||
if (chainId !== undefined) {
|
|
||||||
try {
|
|
||||||
const isValid = await checkContractWalletSignature(
|
|
||||||
message,
|
|
||||||
signature,
|
|
||||||
address,
|
|
||||||
chainId || 1,
|
|
||||||
);
|
|
||||||
return isValid;
|
|
||||||
} catch {
|
|
||||||
// no-op
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export class PrivateKeyWallet extends SignerWallet {
|
|
||||||
constructor(privateKey: string) {
|
|
||||||
super(new ethers.Wallet(privateKey));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -0,0 +1,93 @@
|
|||||||
|
import { SUPPORTED_CHAIN_ID, supportedChains } from "./evm";
|
||||||
|
import type { Ecosystem, GenericAuthWallet } from "@thirdweb-dev/wallets";
|
||||||
|
import { ethers } from "ethers";
|
||||||
|
|
||||||
|
const EIP1271_ABI = [
|
||||||
|
"function isValidSignature(bytes32 _message, bytes _signature) public view returns (bytes4)",
|
||||||
|
];
|
||||||
|
const EIP1271_MAGICVALUE = "0x1626ba7e";
|
||||||
|
|
||||||
|
export const checkContractWalletSignature = async (
|
||||||
|
message: string,
|
||||||
|
signature: string,
|
||||||
|
address: string,
|
||||||
|
chainId: number,
|
||||||
|
): Promise<boolean> => {
|
||||||
|
const rpcUrl =
|
||||||
|
supportedChains[chainId as SUPPORTED_CHAIN_ID]?.rpcUrls.default.http[0];
|
||||||
|
if (!rpcUrl) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const provider = new ethers.providers.JsonRpcProvider(rpcUrl);
|
||||||
|
const walletContract = new ethers.Contract(address, EIP1271_ABI, provider);
|
||||||
|
const hashMessage = ethers.utils.hashMessage(message);
|
||||||
|
try {
|
||||||
|
const res = await walletContract.isValidSignature(hashMessage, signature);
|
||||||
|
return res === EIP1271_MAGICVALUE;
|
||||||
|
} catch {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export class SignerWallet implements GenericAuthWallet {
|
||||||
|
type: Ecosystem = "evm";
|
||||||
|
#signer: ethers.Signer;
|
||||||
|
|
||||||
|
constructor(signer: ethers.Signer) {
|
||||||
|
this.#signer = signer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async getAddress(): Promise<string> {
|
||||||
|
return this.#signer.getAddress();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async getChainId(): Promise<number> {
|
||||||
|
return this.#signer.getChainId();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async signMessage(message: string): Promise<string> {
|
||||||
|
return await this.#signer.signMessage(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async verifySignature(
|
||||||
|
message: string,
|
||||||
|
signature: string,
|
||||||
|
address: string,
|
||||||
|
chainId?: number,
|
||||||
|
): Promise<boolean> {
|
||||||
|
const messageHash = ethers.utils.hashMessage(message);
|
||||||
|
const messageHashBytes = ethers.utils.arrayify(messageHash);
|
||||||
|
const recoveredAddress = ethers.utils.recoverAddress(
|
||||||
|
messageHashBytes,
|
||||||
|
signature,
|
||||||
|
);
|
||||||
|
|
||||||
|
if (recoveredAddress === address) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if the address is a smart contract wallet
|
||||||
|
if (chainId !== undefined) {
|
||||||
|
try {
|
||||||
|
const isValid = await checkContractWalletSignature(
|
||||||
|
message,
|
||||||
|
signature,
|
||||||
|
address,
|
||||||
|
chainId || 1,
|
||||||
|
);
|
||||||
|
return isValid;
|
||||||
|
} catch {
|
||||||
|
// no-op
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class PrivateKeyWallet extends SignerWallet {
|
||||||
|
constructor(privateKey: string) {
|
||||||
|
super(new ethers.Wallet(privateKey));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
import { ThirdwebAuth } from "../core";
|
||||||
|
import { LoginPayload, VerifyOptions } from "../core/schema";
|
||||||
|
import { KeypairWallet } from "./signer";
|
||||||
|
import { Keypair } from "@solana/web3.js";
|
||||||
|
|
||||||
|
const wallet = new KeypairWallet(Keypair.generate());
|
||||||
|
const authMap = new Map<string, ThirdwebAuth>();
|
||||||
|
|
||||||
|
export async function verifyLogin(
|
||||||
|
domain: string,
|
||||||
|
payload: LoginPayload,
|
||||||
|
options?: Omit<VerifyOptions, "domain">,
|
||||||
|
) {
|
||||||
|
let auth: ThirdwebAuth;
|
||||||
|
if (!authMap.has(domain)) {
|
||||||
|
auth = new ThirdwebAuth(wallet, domain);
|
||||||
|
authMap.set(domain, auth);
|
||||||
|
} else {
|
||||||
|
auth = authMap.get(domain) as ThirdwebAuth;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const address = await auth.verify(payload, options);
|
||||||
|
return { address, error: undefined };
|
||||||
|
} catch (err: any) {
|
||||||
|
return { address: undefined, error: err.message };
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,69 +1,2 @@
|
|||||||
import * as ed25519 from "@noble/ed25519";
|
export * from "./signer";
|
||||||
import { Signer, Keypair, PublicKey } from "@solana/web3.js";
|
export * from "./auth";
|
||||||
import type { Ecosystem, GenericAuthWallet } from "@thirdweb-dev/wallets";
|
|
||||||
import bs58 from "bs58";
|
|
||||||
import nacl from "tweetnacl";
|
|
||||||
|
|
||||||
export interface SolanaSigner {
|
|
||||||
publicKey: PublicKey;
|
|
||||||
signMessage(message: Uint8Array): Promise<Uint8Array>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class SignerWallet implements GenericAuthWallet {
|
|
||||||
type: Ecosystem = "solana";
|
|
||||||
private signer: SolanaSigner;
|
|
||||||
|
|
||||||
constructor(signer: SolanaSigner) {
|
|
||||||
this.signer = signer;
|
|
||||||
}
|
|
||||||
|
|
||||||
public async getAddress(): Promise<string> {
|
|
||||||
return this.signer.publicKey.toBase58();
|
|
||||||
}
|
|
||||||
|
|
||||||
public async signMessage(message: string): Promise<string> {
|
|
||||||
const encodedMessage = new TextEncoder().encode(message);
|
|
||||||
const signedMessage = await this.signer.signMessage(encodedMessage);
|
|
||||||
const signature = bs58.encode(signedMessage);
|
|
||||||
|
|
||||||
return signature;
|
|
||||||
}
|
|
||||||
|
|
||||||
public async verifySignature(
|
|
||||||
message: string,
|
|
||||||
signature: string,
|
|
||||||
address: string,
|
|
||||||
): Promise<boolean> {
|
|
||||||
return nacl.sign.detached.verify(
|
|
||||||
new TextEncoder().encode(message),
|
|
||||||
bs58.decode(signature),
|
|
||||||
bs58.decode(address),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class KeypairSigner implements SolanaSigner {
|
|
||||||
private keypair: Signer;
|
|
||||||
public publicKey: PublicKey;
|
|
||||||
|
|
||||||
constructor(keypair: Signer) {
|
|
||||||
this.keypair = keypair;
|
|
||||||
this.publicKey = keypair.publicKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
public async signMessage(message: Uint8Array): Promise<Uint8Array> {
|
|
||||||
return ed25519.sync.sign(message, this.keypair.secretKey.slice(0, 32));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export class KeypairWallet extends SignerWallet {
|
|
||||||
constructor(keypair: Keypair) {
|
|
||||||
super(new KeypairSigner(keypair));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export class PrivateKeyWallet extends KeypairWallet {
|
|
||||||
constructor(privateKey: string) {
|
|
||||||
super(Keypair.fromSecretKey(bs58.decode(privateKey)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -0,0 +1,69 @@
|
|||||||
|
import * as ed25519 from "@noble/ed25519";
|
||||||
|
import { Signer, Keypair, PublicKey } from "@solana/web3.js";
|
||||||
|
import type { Ecosystem, GenericAuthWallet } from "@thirdweb-dev/wallets";
|
||||||
|
import bs58 from "bs58";
|
||||||
|
import nacl from "tweetnacl";
|
||||||
|
|
||||||
|
export interface SolanaSigner {
|
||||||
|
publicKey: PublicKey;
|
||||||
|
signMessage(message: Uint8Array): Promise<Uint8Array>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class SignerWallet implements GenericAuthWallet {
|
||||||
|
type: Ecosystem = "solana";
|
||||||
|
private signer: SolanaSigner;
|
||||||
|
|
||||||
|
constructor(signer: SolanaSigner) {
|
||||||
|
this.signer = signer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async getAddress(): Promise<string> {
|
||||||
|
return this.signer.publicKey.toBase58();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async signMessage(message: string): Promise<string> {
|
||||||
|
const encodedMessage = new TextEncoder().encode(message);
|
||||||
|
const signedMessage = await this.signer.signMessage(encodedMessage);
|
||||||
|
const signature = bs58.encode(signedMessage);
|
||||||
|
|
||||||
|
return signature;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async verifySignature(
|
||||||
|
message: string,
|
||||||
|
signature: string,
|
||||||
|
address: string,
|
||||||
|
): Promise<boolean> {
|
||||||
|
return nacl.sign.detached.verify(
|
||||||
|
new TextEncoder().encode(message),
|
||||||
|
bs58.decode(signature),
|
||||||
|
bs58.decode(address),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class KeypairSigner implements SolanaSigner {
|
||||||
|
private keypair: Signer;
|
||||||
|
public publicKey: PublicKey;
|
||||||
|
|
||||||
|
constructor(keypair: Signer) {
|
||||||
|
this.keypair = keypair;
|
||||||
|
this.publicKey = keypair.publicKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async signMessage(message: Uint8Array): Promise<Uint8Array> {
|
||||||
|
return ed25519.sync.sign(message, this.keypair.secretKey.slice(0, 32));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class KeypairWallet extends SignerWallet {
|
||||||
|
constructor(keypair: Keypair) {
|
||||||
|
super(new KeypairSigner(keypair));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class PrivateKeyWallet extends KeypairWallet {
|
||||||
|
constructor(privateKey: string) {
|
||||||
|
super(Keypair.fromSecretKey(bs58.decode(privateKey)));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,11 @@
|
|||||||
# @thirdweb-dev/chains
|
# @thirdweb-dev/chains
|
||||||
|
|
||||||
|
## 0.1.1
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- [#599](https://github.com/thirdweb-dev/js/pull/599) [`f580b8a`](https://github.com/thirdweb-dev/js/commit/f580b8ac06534df24b0194cbc632b4a8fd447611) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - New chains added
|
||||||
|
|
||||||
## 0.1.0
|
## 0.1.0
|
||||||
|
|
||||||
### Minor Changes
|
### Minor Changes
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
export default {
|
||||||
|
"name": "AmStar Testnet",
|
||||||
|
"chain": "AmStar",
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://Qmd4TMQdnYxaUZqnVddh5S37NGH72g2kkK38ccCEgdZz1C",
|
||||||
|
"width": 599,
|
||||||
|
"height": 563,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
|
"rpc": [
|
||||||
|
"https://amstar-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://testnet-rpc.amstarscan.com"
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "SINSO",
|
||||||
|
"symbol": "SINSO",
|
||||||
|
"decimals": 18
|
||||||
|
},
|
||||||
|
"infoURL": "https://sinso.io",
|
||||||
|
"shortName": "ASARt",
|
||||||
|
"chainId": 1138,
|
||||||
|
"networkId": 1138,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "amstarscan-testnet",
|
||||||
|
"url": "https://testnet.amstarscan.com",
|
||||||
|
"standard": "EIP3091"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"testnet": true,
|
||||||
|
"slug": "amstar-testnet"
|
||||||
|
} as const;
|
||||||
@@ -1,36 +1,45 @@
|
|||||||
export default {
|
export default {
|
||||||
"name": "zkSync alpha testnet",
|
"name": "zkSync Era Testnet",
|
||||||
"chain": "ETH",
|
"chain": "ETH",
|
||||||
"rpc": [
|
"rpc": [
|
||||||
"https://zksync-alpha-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
"https://zksync-era-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
"https://zksync2-testnet.zksync.dev"
|
"https://zksync2-testnet.zksync.dev"
|
||||||
],
|
],
|
||||||
"faucets": [
|
"faucets": [
|
||||||
"https://portal.zksync.io/faucet"
|
"https://goerli.portal.zksync.io/faucet"
|
||||||
],
|
],
|
||||||
"nativeCurrency": {
|
"nativeCurrency": {
|
||||||
"name": "Ether",
|
"name": "Ether",
|
||||||
"symbol": "ETH",
|
"symbol": "ETH",
|
||||||
"decimals": 18
|
"decimals": 18
|
||||||
},
|
},
|
||||||
"infoURL": "https://v2-docs.zksync.io/",
|
"infoURL": "https://era.zksync.io/docs/",
|
||||||
"shortName": "zksync-goerli",
|
"shortName": "zksync-goerli",
|
||||||
"chainId": 280,
|
"chainId": 280,
|
||||||
"networkId": 280,
|
"networkId": 280,
|
||||||
"icon": {
|
"icon": {
|
||||||
"url": "ipfs://QmdwQDr6vmBtXmK2TmknkEuZNoaDqTasFdZdu3DRw8b2wt",
|
"url": "ipfs://Qma6H9xd8Ydah1bAFnmDuau1jeMh5NjGEL8tpdnjLbJ7m2",
|
||||||
"width": 1000,
|
"width": 512,
|
||||||
"height": 1628,
|
"height": 512,
|
||||||
"format": "png"
|
"format": "svg"
|
||||||
},
|
},
|
||||||
"explorers": [
|
"explorers": [
|
||||||
{
|
{
|
||||||
"name": "blockscout",
|
"name": "zkSync Era Block Explorer",
|
||||||
"url": "https://zksync2-testnet.zkscan.io",
|
"url": "https://goerli.explorer.zksync.io",
|
||||||
"icon": "blockscout",
|
"icon": "zksync-era",
|
||||||
"standard": "EIP3091"
|
"standard": "EIP3091"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"parent": {
|
||||||
|
"type": "L2",
|
||||||
|
"chain": "eip155-1",
|
||||||
|
"bridges": [
|
||||||
|
{
|
||||||
|
"url": "https://goerli.portal.zksync.io/bridge"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"testnet": true,
|
"testnet": true,
|
||||||
"slug": "zksync-alpha-testnet"
|
"slug": "zksync-era-testnet"
|
||||||
} as const;
|
} as const;
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
export default {
|
||||||
|
"name": "Hedera Mainnet",
|
||||||
|
"chain": "Hedera",
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmQikzhvZKyMmbZJd7BVLZb2YTBDMgNDnaMCAErsVjsfuz",
|
||||||
|
"width": 1500,
|
||||||
|
"height": 1500,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
|
"rpc": [
|
||||||
|
"https://hedera.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://mainnet.hashio.io/api"
|
||||||
|
],
|
||||||
|
"features": [
|
||||||
|
{
|
||||||
|
"name": "EIP155"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "EIP1559"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "hbar",
|
||||||
|
"symbol": "HBAR",
|
||||||
|
"decimals": 8
|
||||||
|
},
|
||||||
|
"infoURL": "https://hedera.com",
|
||||||
|
"shortName": "hedera-mainnet",
|
||||||
|
"chainId": 295,
|
||||||
|
"networkId": 295,
|
||||||
|
"slip44": 3030,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "HashScan",
|
||||||
|
"url": "https://hashscan.io/mainnet/dashboard",
|
||||||
|
"standard": "none"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Arkhia Explorer",
|
||||||
|
"url": "https://explorer.arkhia.io",
|
||||||
|
"standard": "none"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "DragonGlass",
|
||||||
|
"url": "https://app.dragonglass.me",
|
||||||
|
"standard": "none"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Hedera Explorer",
|
||||||
|
"url": "https://hederaexplorer.io",
|
||||||
|
"standard": "none"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Ledger Works Explore",
|
||||||
|
"url": "https://explore.lworks.io",
|
||||||
|
"standard": "none"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"testnet": false,
|
||||||
|
"slug": "hedera"
|
||||||
|
} as const;
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
export default {
|
||||||
|
"name": "Hedera Testnet",
|
||||||
|
"chain": "Hedera",
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmQikzhvZKyMmbZJd7BVLZb2YTBDMgNDnaMCAErsVjsfuz",
|
||||||
|
"width": 1500,
|
||||||
|
"height": 1500,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
|
"rpc": [
|
||||||
|
"https://hedera-testnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://testnet.hashio.io/api"
|
||||||
|
],
|
||||||
|
"features": [
|
||||||
|
{
|
||||||
|
"name": "EIP155"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "EIP1559"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"faucets": [
|
||||||
|
"https://portal.hedera.com"
|
||||||
|
],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "hbar",
|
||||||
|
"symbol": "HBAR",
|
||||||
|
"decimals": 8
|
||||||
|
},
|
||||||
|
"infoURL": "https://hedera.com",
|
||||||
|
"shortName": "hedera-testnet",
|
||||||
|
"chainId": 296,
|
||||||
|
"networkId": 296,
|
||||||
|
"slip44": 3030,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "HashScan",
|
||||||
|
"url": "https://hashscan.io/testnet/dashboard",
|
||||||
|
"standard": "none"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Arkhia Explorer",
|
||||||
|
"url": "https://explorer.arkhia.io",
|
||||||
|
"standard": "none"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "DragonGlass",
|
||||||
|
"url": "https://app.dragonglass.me",
|
||||||
|
"standard": "none"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Hedera Explorer",
|
||||||
|
"url": "https://hederaexplorer.io",
|
||||||
|
"standard": "none"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Ledger Works Explore",
|
||||||
|
"url": "https://explore.lworks.io",
|
||||||
|
"standard": "none"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"testnet": true,
|
||||||
|
"slug": "hedera-testnet"
|
||||||
|
} as const;
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
export default {
|
||||||
|
"name": "Hedera Previewnet",
|
||||||
|
"chain": "Hedera",
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmQikzhvZKyMmbZJd7BVLZb2YTBDMgNDnaMCAErsVjsfuz",
|
||||||
|
"width": 1500,
|
||||||
|
"height": 1500,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
|
"rpc": [
|
||||||
|
"https://hedera-previewnet.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://previewnet.hashio.io/api"
|
||||||
|
],
|
||||||
|
"features": [
|
||||||
|
{
|
||||||
|
"name": "EIP155"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "EIP1559"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"faucets": [
|
||||||
|
"https://portal.hedera.com"
|
||||||
|
],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "hbar",
|
||||||
|
"symbol": "HBAR",
|
||||||
|
"decimals": 8
|
||||||
|
},
|
||||||
|
"infoURL": "https://hedera.com",
|
||||||
|
"shortName": "hedera-previewnet",
|
||||||
|
"chainId": 297,
|
||||||
|
"networkId": 297,
|
||||||
|
"slip44": 3030,
|
||||||
|
"explorers": [
|
||||||
|
{
|
||||||
|
"name": "HashScan",
|
||||||
|
"url": "https://hashscan.io/previewnet/dashboard",
|
||||||
|
"standard": "none"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"testnet": false,
|
||||||
|
"slug": "hedera-previewnet"
|
||||||
|
} as const;
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
export default {
|
||||||
|
"name": "Hedera Localnet",
|
||||||
|
"chain": "Hedera",
|
||||||
|
"icon": {
|
||||||
|
"url": "ipfs://QmQikzhvZKyMmbZJd7BVLZb2YTBDMgNDnaMCAErsVjsfuz",
|
||||||
|
"width": 1500,
|
||||||
|
"height": 1500,
|
||||||
|
"format": "png"
|
||||||
|
},
|
||||||
|
"rpc": [],
|
||||||
|
"features": [
|
||||||
|
{
|
||||||
|
"name": "EIP155"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "EIP1559"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"faucets": [],
|
||||||
|
"nativeCurrency": {
|
||||||
|
"name": "hbar",
|
||||||
|
"symbol": "HBAR",
|
||||||
|
"decimals": 8
|
||||||
|
},
|
||||||
|
"infoURL": "https://hedera.com",
|
||||||
|
"shortName": "hedera-localnet",
|
||||||
|
"chainId": 298,
|
||||||
|
"networkId": 298,
|
||||||
|
"slip44": 3030,
|
||||||
|
"explorers": [],
|
||||||
|
"testnet": false,
|
||||||
|
"slug": "hedera-localnet"
|
||||||
|
} as const;
|
||||||
@@ -1,7 +1,10 @@
|
|||||||
export default {
|
export default {
|
||||||
"name": "zkSync v2",
|
"name": "zkSync Era Mainnet",
|
||||||
"chain": "ETH",
|
"chain": "ETH",
|
||||||
"rpc": [],
|
"rpc": [
|
||||||
|
"https://zksync-era.rpc.thirdweb.com/${THIRDWEB_API_KEY}",
|
||||||
|
"https://zksync2-mainnet.zksync.io"
|
||||||
|
],
|
||||||
"faucets": [],
|
"faucets": [],
|
||||||
"nativeCurrency": {
|
"nativeCurrency": {
|
||||||
"name": "Ether",
|
"name": "Ether",
|
||||||
@@ -13,24 +16,28 @@ export default {
|
|||||||
"chainId": 324,
|
"chainId": 324,
|
||||||
"networkId": 324,
|
"networkId": 324,
|
||||||
"icon": {
|
"icon": {
|
||||||
"url": "ipfs://QmdwQDr6vmBtXmK2TmknkEuZNoaDqTasFdZdu3DRw8b2wt",
|
"url": "ipfs://Qma6H9xd8Ydah1bAFnmDuau1jeMh5NjGEL8tpdnjLbJ7m2",
|
||||||
"width": 1000,
|
"width": 512,
|
||||||
"height": 1628,
|
"height": 512,
|
||||||
"format": "png"
|
"format": "svg"
|
||||||
},
|
},
|
||||||
"explorers": [
|
"explorers": [
|
||||||
{
|
{
|
||||||
"name": "zkSync v2 Block Explorer",
|
"name": "zkSync Era Block Explorer",
|
||||||
"url": "https://explorer.zksync.io",
|
"url": "https://explorer.zksync.io",
|
||||||
|
"icon": "zksync-era",
|
||||||
"standard": "EIP3091"
|
"standard": "EIP3091"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"parent": {
|
"parent": {
|
||||||
"type": "L2",
|
"type": "L2",
|
||||||
"chain": "eip155-1",
|
"chain": "eip155-1",
|
||||||
"bridges": []
|
"bridges": [
|
||||||
|
{
|
||||||
|
"url": "https://portal.zksync.io/bridge"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"status": "incubating",
|
|
||||||
"testnet": false,
|
"testnet": false,
|
||||||
"slug": "zksync-v2"
|
"slug": "zksync-era"
|
||||||
} as const;
|
} as const;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@thirdweb-dev/chains",
|
"name": "@thirdweb-dev/chains",
|
||||||
"version": "0.1.0",
|
"version": "0.1.1",
|
||||||
"main": "dist/thirdweb-dev-chains.cjs.js",
|
"main": "dist/thirdweb-dev-chains.cjs.js",
|
||||||
"module": "dist/thirdweb-dev-chains.esm.js",
|
"module": "dist/thirdweb-dev-chains.esm.js",
|
||||||
"exports": {
|
"exports": {
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
# thirdweb
|
# thirdweb
|
||||||
|
|
||||||
|
## 0.9.21
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies []:
|
||||||
|
- @thirdweb-dev/sdk@3.9.1
|
||||||
|
|
||||||
## 0.9.20
|
## 0.9.20
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "thirdweb",
|
"name": "thirdweb",
|
||||||
"main": "dist/cli/index.js",
|
"main": "dist/cli/index.js",
|
||||||
"version": "0.9.20",
|
"version": "0.9.21",
|
||||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/cli",
|
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/cli",
|
||||||
"author": "thirdweb eng <[email protected]>",
|
"author": "thirdweb eng <[email protected]>",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
|||||||
@@ -1,5 +1,15 @@
|
|||||||
# @thirdweb-dev/react-core
|
# @thirdweb-dev/react-core
|
||||||
|
|
||||||
|
## 3.9.1
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- [#588](https://github.com/thirdweb-dev/js/pull/588) [`f0de81d`](https://github.com/thirdweb-dev/js/commit/f0de81d4b1ba33b2ac73ed16cfdea8fd4eb5da9e) Thanks [@adam-maj](https://github.com/adam-maj)! - Update to use new Auth
|
||||||
|
|
||||||
|
- Updated dependencies [[`f0de81d`](https://github.com/thirdweb-dev/js/commit/f0de81d4b1ba33b2ac73ed16cfdea8fd4eb5da9e), [`f580b8a`](https://github.com/thirdweb-dev/js/commit/f580b8ac06534df24b0194cbc632b4a8fd447611)]:
|
||||||
|
- @thirdweb-dev/auth@3.0.5
|
||||||
|
- @thirdweb-dev/chains@0.1.1
|
||||||
|
|
||||||
## 3.9.0
|
## 3.9.0
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@thirdweb-dev/react-core",
|
"name": "@thirdweb-dev/react-core",
|
||||||
"version": "3.9.0",
|
"version": "3.9.1",
|
||||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-core",
|
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-core",
|
||||||
"author": "thirdweb eng <[email protected]>",
|
"author": "thirdweb eng <[email protected]>",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
*.pbxproj -text
|
||||||
|
# specific for windows script files
|
||||||
|
*.bat text eol=crlf
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
# OSX
|
||||||
|
#
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
|
# XDE
|
||||||
|
.expo/
|
||||||
|
|
||||||
|
# VSCode
|
||||||
|
.vscode/
|
||||||
|
jsconfig.json
|
||||||
|
|
||||||
|
# Xcode
|
||||||
|
#
|
||||||
|
build/
|
||||||
|
*.pbxuser
|
||||||
|
!default.pbxuser
|
||||||
|
*.mode1v3
|
||||||
|
!default.mode1v3
|
||||||
|
*.mode2v3
|
||||||
|
!default.mode2v3
|
||||||
|
*.perspectivev3
|
||||||
|
!default.perspectivev3
|
||||||
|
xcuserdata
|
||||||
|
*.xccheckout
|
||||||
|
*.moved-aside
|
||||||
|
DerivedData
|
||||||
|
*.hmap
|
||||||
|
*.ipa
|
||||||
|
*.xcuserstate
|
||||||
|
project.xcworkspace
|
||||||
|
|
||||||
|
# Android/IJ
|
||||||
|
#
|
||||||
|
.classpath
|
||||||
|
.cxx
|
||||||
|
.gradle
|
||||||
|
.idea
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
local.properties
|
||||||
|
android.iml
|
||||||
|
|
||||||
|
# Cocoapods
|
||||||
|
#
|
||||||
|
example/ios/Pods
|
||||||
|
|
||||||
|
# Ruby
|
||||||
|
example/vendor/
|
||||||
|
|
||||||
|
# node.js
|
||||||
|
#
|
||||||
|
node_modules/
|
||||||
|
npm-debug.log
|
||||||
|
yarn-debug.log
|
||||||
|
yarn-error.log
|
||||||
|
|
||||||
|
# BUCK
|
||||||
|
buck-out/
|
||||||
|
\.buckd/
|
||||||
|
android/app/libs
|
||||||
|
android/keystores/debug.keystore
|
||||||
|
|
||||||
|
# Expo
|
||||||
|
.expo/
|
||||||
|
|
||||||
|
# Turborepo
|
||||||
|
.turbo/
|
||||||
|
|
||||||
|
# generated by bob
|
||||||
|
lib/
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
# @thirdweb-dev/react-native-compat
|
||||||
|
|
||||||
|
## 0.1.0
|
||||||
|
|
||||||
|
### Minor Changes
|
||||||
|
|
||||||
|
- [#522](https://github.com/thirdweb-dev/js/pull/522) [`18ba6b3`](https://github.com/thirdweb-dev/js/commit/18ba6b381ee5c72e0fe599ab9b32f2ef66443d5f) Thanks [@iketw](https://github.com/iketw)! - [React Native SDK] init package
|
||||||
@@ -0,0 +1,201 @@
|
|||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright 2021 Non-Fungible Labs, Inc
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
# @thirdweb-dev/react-native-compat
|
||||||
|
|
||||||
|
Shims for Thirdweb in React Native Projects
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
module.exports = {
|
||||||
|
presets: ['module:metro-react-native-babel-preset'],
|
||||||
|
};
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"name": "@thirdweb-dev/react-native-compat",
|
||||||
|
"description": "Shims for Thirdweb in React Native Projects",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"author": "thirdweb eng <[email protected]>",
|
||||||
|
"repository": "https://github.com/thirdweb-dev/js",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"main": "dist/index.js",
|
||||||
|
"files": [
|
||||||
|
"dist/*"
|
||||||
|
],
|
||||||
|
"keywords": [
|
||||||
|
"thirdweb",
|
||||||
|
"dapp",
|
||||||
|
"react",
|
||||||
|
"react-native"
|
||||||
|
],
|
||||||
|
"scripts": {
|
||||||
|
"prettier": "prettier --check './**/*.{js,ts,jsx,tsx}'",
|
||||||
|
"build": "tsc",
|
||||||
|
"push": "yalc push"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@ethersproject/shims": "^5.7.0",
|
||||||
|
"@walletconnect/react-native-compat": "^2.3.3",
|
||||||
|
"events": "3.3.0",
|
||||||
|
"react-native-get-random-values": "^1.8.0",
|
||||||
|
"base-64": "^1.0.0",
|
||||||
|
"big-integer": "^1.6.51"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"ethers": ">=5.5.1",
|
||||||
|
"react": ">=18.0.0",
|
||||||
|
"react-native": ">=0.70.0",
|
||||||
|
"wagmi": ">=0.7.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"babel-plugin-module-resolver": "^5.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import './shims';
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
import 'react-native-get-random-values';
|
||||||
|
import '@ethersproject/shims';
|
||||||
|
import '@walletconnect/react-native-compat';
|
||||||
|
|
||||||
|
if (typeof BigInt === 'undefined') {
|
||||||
|
global.BigInt = require('big-integer');
|
||||||
|
}
|
||||||
|
if (typeof Buffer === 'undefined') {
|
||||||
|
global.Buffer = require('buffer').Buffer;
|
||||||
|
}
|
||||||
|
global.btoa = global.btoa || require('base-64').encode;
|
||||||
|
global.atob = global.atob || require('base-64').decode;
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"extends": "@thirdweb-dev/tsconfig/react-native-library.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"outDir": "./dist",
|
||||||
|
"baseUrl": "./src",
|
||||||
|
"rootDir": "./src"
|
||||||
|
},
|
||||||
|
"typeRoots": ["../node_modules/@types"],
|
||||||
|
"include": ["./src/**/*.ts", "./src/**/*.tsx"],
|
||||||
|
"exclude": ["node_modules", "**/*.test.ts", "**/*.test.tsx"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"presets": [
|
||||||
|
"module:metro-react-native-babel-preset"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# folders
|
||||||
|
dist/
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# files
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
module.exports = {
|
||||||
|
root: true,
|
||||||
|
extends: ["thirdweb"],
|
||||||
|
};
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# XDE
|
||||||
|
.expo/
|
||||||
|
|
||||||
|
# VSCode
|
||||||
|
.vscode/
|
||||||
|
jsconfig.json
|
||||||
|
|
||||||
|
# node.js
|
||||||
|
#
|
||||||
|
node_modules/
|
||||||
|
npm-debug.log
|
||||||
|
yarn-debug.log
|
||||||
|
yarn-error.log
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# @thirdweb-dev/react-native
|
||||||
|
|
||||||
|
## 0.1.1
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [[`f0de81d`](https://github.com/thirdweb-dev/js/commit/f0de81d4b1ba33b2ac73ed16cfdea8fd4eb5da9e), [`300fe4a`](https://github.com/thirdweb-dev/js/commit/300fe4a933f83ac59f89ff019f173cdfc6a2cdff), [`f580b8a`](https://github.com/thirdweb-dev/js/commit/f580b8ac06534df24b0194cbc632b4a8fd447611)]:
|
||||||
|
- @thirdweb-dev/react-core@3.9.1
|
||||||
|
- @thirdweb-dev/storage@1.0.9
|
||||||
|
- @thirdweb-dev/chains@0.1.1
|
||||||
|
- @thirdweb-dev/sdk@3.9.1
|
||||||
|
|
||||||
|
## 0.1.0
|
||||||
|
|
||||||
|
### Minor Changes
|
||||||
|
|
||||||
|
- [#522](https://github.com/thirdweb-dev/js/pull/522) [`18ba6b3`](https://github.com/thirdweb-dev/js/commit/18ba6b381ee5c72e0fe599ab9b32f2ef66443d5f) Thanks [@iketw](https://github.com/iketw)! - [React Native SDK] init package
|
||||||
@@ -0,0 +1,201 @@
|
|||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright 2021 Non-Fungible Labs, Inc
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
<p align="center">
|
||||||
|
<br />
|
||||||
|
<a href="https://thirdweb.com"><img src="https://github.com/thirdweb-dev/js/blob/main/packages/sdk/logo.svg?raw=true" width="200" alt=""/></a>
|
||||||
|
<br />
|
||||||
|
</p>
|
||||||
|
<h1 align="center">thirdweb React Native SDK</h1>
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://www.npmjs.com/package/@thirdweb-dev/react-native"><img src="https://img.shields.io/npm/v/@thirdweb-dev/react?color=red&label=npm&logo=npm" alt="npm version"/></a>
|
||||||
|
<a href="https://github.com/thirdweb-dev/js/actions/workflows/CI.yml"><img alt="Build Status" src="https://github.com/thirdweb-dev/js/actions/workflows/CI.yml/badge.svg"/></a>
|
||||||
|
<a href="https://discord.gg/thirdweb"><img alt="Join our Discord!" src="https://img.shields.io/discord/834227967404146718.svg?color=7289da&label=discord&logo=discord&style=flat"/></a>
|
||||||
|
|
||||||
|
</p>
|
||||||
|
<p align="center"><strong>Powering react-native dapps.</strong></p>
|
||||||
|
<br />
|
||||||
|
|
||||||
|
## 👷🚧 Alpha 🚧👷
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
|
Head over to the [documentation](https://portal.thirdweb.com/react-native) to learn more
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
{
|
||||||
|
"name": "@thirdweb-dev/react-native",
|
||||||
|
"version": "0.1.1",
|
||||||
|
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native",
|
||||||
|
"author": "thirdweb eng <[email protected]>",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"main": "dist/index.js",
|
||||||
|
"types": "dist/index.d.ts",
|
||||||
|
"sideEffects": false,
|
||||||
|
"files": [
|
||||||
|
"dist/*"
|
||||||
|
],
|
||||||
|
"scripts": {
|
||||||
|
"typecheck": "tsc --noEmit",
|
||||||
|
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
||||||
|
"fix": "eslint src/ --fix",
|
||||||
|
"clean": "rm -rf dist/",
|
||||||
|
"build": "tsc",
|
||||||
|
"push": "yalc push"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"react-native",
|
||||||
|
"ios",
|
||||||
|
"android"
|
||||||
|
],
|
||||||
|
"dependencies": {
|
||||||
|
"@tanstack/react-query": "^4.0.10",
|
||||||
|
"@thirdweb-dev/chains": "*",
|
||||||
|
"@thirdweb-dev/react-core": "*",
|
||||||
|
"@thirdweb-dev/sdk": "*",
|
||||||
|
"@thirdweb-dev/storage": "*",
|
||||||
|
"tiny-invariant": "^1.2.0",
|
||||||
|
"wagmi": "^0.11.0"
|
||||||
|
},
|
||||||
|
"sideEffects:": false,
|
||||||
|
"devDependencies": {
|
||||||
|
"@babel/core": "^7.12.9",
|
||||||
|
"@react-native-community/eslint-config": "^3.0.2",
|
||||||
|
"@types/jest": "^29.2.1",
|
||||||
|
"@types/react": "^18.0.24",
|
||||||
|
"@types/react-native": "^0.71.0",
|
||||||
|
"@types/react-test-renderer": "^18.0.0",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^5.33.0",
|
||||||
|
"@typescript-eslint/parser": "^5.33.0",
|
||||||
|
"babel-jest": "^29.2.1",
|
||||||
|
"eslint": "^8.32.0",
|
||||||
|
"eslint-config-prettier": "^8.5.0",
|
||||||
|
"eslint-plugin-import": "^2.26.0",
|
||||||
|
"eslint-plugin-inclusive-language": "^2.2.0",
|
||||||
|
"eslint-plugin-prettier": "^4.2.1",
|
||||||
|
"jest": "^29.2.1",
|
||||||
|
"prettier": "^2.4.1",
|
||||||
|
"react": "^18.2.0",
|
||||||
|
"react-native": "^0.71.0",
|
||||||
|
"react-native-test-app": "^2.3.1",
|
||||||
|
"react-test-renderer": "^18.2.0",
|
||||||
|
"typescript": "^4.8.4"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@react-native-async-storage/async-storage": "*",
|
||||||
|
"ethers": ">=5.5.1 <6",
|
||||||
|
"react": ">=18.0.0",
|
||||||
|
"react-native": ">=0.70.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 16.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
const warnSet = new Set<`${string}:${string}`>();
|
||||||
|
|
||||||
|
export function showDeprecationWarning(
|
||||||
|
deprecated: string,
|
||||||
|
replacement: string,
|
||||||
|
) {
|
||||||
|
// deprecation warnings only in dev only in dev
|
||||||
|
if (__DEV__) {
|
||||||
|
if (warnSet.has(`${deprecated}:${replacement}`)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
warnSet.add(`${deprecated}:${replacement}`);
|
||||||
|
console.warn(
|
||||||
|
`\`${deprecated}\` is deprecated and will be removed in a future major version. Please use \`${replacement}\` instead.`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
export const TW_WC_PROJECT_ID = '145769e410f16970a79ff77b2d89a1e0'
|
||||||
|
export const WC_RELAY_URL = 'wss://relay.walletconnect.com'
|
||||||
@@ -0,0 +1,113 @@
|
|||||||
|
import { useEffect, useState } from "react";
|
||||||
|
import invariant from "tiny-invariant";
|
||||||
|
import { useClient, useConnect, useDisconnect } from "wagmi";
|
||||||
|
import { WalletConnectConnector } from "wagmi/dist/connectors/walletConnect";
|
||||||
|
import { Linking } from "react-native";
|
||||||
|
import UniversalProvider from "@walletconnect/universal-provider/dist/types/UniversalProvider";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hook for connecting to a mobile wallet with Wallet Connect
|
||||||
|
*
|
||||||
|
* ```javascript
|
||||||
|
* import { useWalletConnect } from "@thirdweb-dev/react-native"
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @example
|
||||||
|
* We can allows user to connect their mobile wallets as follows:
|
||||||
|
* ```javascript
|
||||||
|
* import { useWalletConnect } from "@thirdweb-dev/react-native"
|
||||||
|
*
|
||||||
|
* const App = () => {
|
||||||
|
* const {connect} = useWalletConnect()
|
||||||
|
*
|
||||||
|
* return (
|
||||||
|
* <Button onClick={connect} title={'Connect Wallet'} />
|
||||||
|
* )
|
||||||
|
* }
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* Android: `connect` will trigger a modal with a list of available wallets to connect to on their device.
|
||||||
|
* iOS: `connect` will try to open the first app available to handle `wc://` links on the device.
|
||||||
|
*
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
export function useWalletConnect() {
|
||||||
|
const client = useClient();
|
||||||
|
invariant(
|
||||||
|
client,
|
||||||
|
`useWalletConnect() can only be used inside <ThirdwebProvider />. If you are using <ThirdwebSDKProvider /> you will have to use your own wallet-connection logic.`,
|
||||||
|
);
|
||||||
|
const [displayUri, setDisplayUri] = useState<string | undefined>();
|
||||||
|
const [connectError, setConnectError] = useState<Error | null>();
|
||||||
|
|
||||||
|
const { connect, connectors, error: wagmiConnectError, isLoading, isSuccess } =
|
||||||
|
useConnect();
|
||||||
|
|
||||||
|
const walletConnector = connectors.find(
|
||||||
|
(c) => c.id === "walletConnect",
|
||||||
|
) as WalletConnectConnector;
|
||||||
|
invariant(
|
||||||
|
walletConnector,
|
||||||
|
"WalletConnectConnector not found, please make sure it is provided to your <ThirdwebProvider />",
|
||||||
|
);
|
||||||
|
|
||||||
|
const { disconnect } = useDisconnect();
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
setConnectError(wagmiConnectError);
|
||||||
|
}, [wagmiConnectError]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
// wagmi storage doesn't support async storage on mobile so we need to manually connect
|
||||||
|
// https://github.com/wagmi-dev/wagmi/discussions/1630
|
||||||
|
const getProvider = async () => {
|
||||||
|
const provider = await walletConnector.getProvider();
|
||||||
|
const univProvider = provider as unknown as UniversalProvider;
|
||||||
|
|
||||||
|
// waiting on wagmi to update to latest universal provider (tag 2.4.2)
|
||||||
|
// univProvider.client.on('session_request_sent', ({ topic, request, chainId }) => {
|
||||||
|
// // redirect to wallet
|
||||||
|
// Linking.openURL(displayUri);
|
||||||
|
// });
|
||||||
|
|
||||||
|
if (univProvider.client.session.length > 0) {
|
||||||
|
// wc client does not report a successful initialization
|
||||||
|
// so we need to wait for it to initialize before connecting
|
||||||
|
setTimeout(() => {
|
||||||
|
connect({ connector: walletConnector });
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getProvider();
|
||||||
|
// eslint-disable-next-line react-hooks/exhaustive-deps -- we only want to run this once
|
||||||
|
}, [])
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
walletConnector.addListener('message', async ({ type, data }) => {
|
||||||
|
switch (type) {
|
||||||
|
case 'display_uri':
|
||||||
|
invariant(typeof data === 'string', 'display_uri message data must be a string')
|
||||||
|
// store first part of the uri to trigger wallet connect
|
||||||
|
setDisplayUri(data);
|
||||||
|
Linking.openURL(data);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
walletConnector.addListener('connect', () => {
|
||||||
|
console.log('walletConnector connect')
|
||||||
|
});
|
||||||
|
|
||||||
|
walletConnector.addListener('disconnect', () => {
|
||||||
|
// we need to disconnect wagmi when the connector disconnects
|
||||||
|
disconnect();
|
||||||
|
})
|
||||||
|
return () => {
|
||||||
|
walletConnector.removeAllListeners();
|
||||||
|
}
|
||||||
|
}, [disconnect, walletConnector]);
|
||||||
|
|
||||||
|
return { connector: walletConnector, connect: () => { connect({ connector: walletConnector }) }, isLoading: isLoading, isSuccess: isSuccess, connectError, displayUri }
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
import invariant from "tiny-invariant";
|
||||||
|
import {
|
||||||
|
useAccount as useWagmiAccount,
|
||||||
|
useClient
|
||||||
|
} from "wagmi";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
|
export function useAccount() {
|
||||||
|
const wagmiContext = useClient();
|
||||||
|
invariant(
|
||||||
|
wagmiContext,
|
||||||
|
`useAccount() can only be used inside <ThirdwebProvider />. If you are using <ThirdwebSDKProvider /> you will have to use your own account logic.`,
|
||||||
|
);
|
||||||
|
return useWagmiAccount();
|
||||||
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
|
||||||
|
import { useCallback } from "react";
|
||||||
|
import invariant from "tiny-invariant";
|
||||||
|
import { useClient, useDisconnect as useWagmiDisconnect } from "wagmi";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hook for disconnecting the currently connected wallet
|
||||||
|
*
|
||||||
|
* ```javascript
|
||||||
|
* import { useDisconnect } from "@thirdweb-dev/react"
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @example
|
||||||
|
* The following will enable users to disconnect their wallet from the page.
|
||||||
|
* ```javascript
|
||||||
|
* import { useDisconnect } from "@thirdweb-dev/react-native"
|
||||||
|
*
|
||||||
|
* const App = () => {
|
||||||
|
* const disconnect = useDisconnect()
|
||||||
|
*
|
||||||
|
* return (
|
||||||
|
* <Button onClick={disconnect} title={'Disconnect'} />
|
||||||
|
* )
|
||||||
|
* }
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* Once users disconnect their wallet, the `useAddress`, `useChainId`, `useAccount`, and `useNetwork` hooks will no longer return values until a user connects their wallet again.
|
||||||
|
*
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
export function useDisconnect() {
|
||||||
|
const wagmiClient = useClient();
|
||||||
|
invariant(
|
||||||
|
wagmiClient,
|
||||||
|
`useDisconnect() can only be used inside <ThirdwebProvider />. If you are using <ThirdwebSDKProvider /> you will have to use your own connection logic.`,
|
||||||
|
);
|
||||||
|
const { disconnect } = useWagmiDisconnect();
|
||||||
|
|
||||||
|
const disconnectInternal = useCallback(() => {
|
||||||
|
disconnect();
|
||||||
|
wagmiClient.queryClient.clear();
|
||||||
|
}, [disconnect, wagmiClient.queryClient]);
|
||||||
|
|
||||||
|
return disconnectInternal;
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
import invariant from "tiny-invariant";
|
||||||
|
import {
|
||||||
|
useNetwork as useWagmiNetwork,
|
||||||
|
useClient
|
||||||
|
} from "wagmi";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hook for getting metadata about the network the current wallet is connected to and switching networks
|
||||||
|
*
|
||||||
|
* @example
|
||||||
|
* ```javascript
|
||||||
|
* import { useNetwork, ChainId } from "@thirdweb-dev/react";
|
||||||
|
*
|
||||||
|
* const App = () => {
|
||||||
|
* const [, switchNetwork] = useNetwork();
|
||||||
|
*
|
||||||
|
* return (
|
||||||
|
* <button onClick={() => switchNetwork(ChainId.Polygon)}>
|
||||||
|
* Switch Network
|
||||||
|
* </button>
|
||||||
|
* );
|
||||||
|
* };
|
||||||
|
```
|
||||||
|
*
|
||||||
|
* It's important to note that some wallet apps do not support programmatic network switching and switchNetwork will be undefined.
|
||||||
|
* For those situations, you can typically switch networks in the wallet app this hook will still work.
|
||||||
|
*
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
|
||||||
|
export function useNetwork() {
|
||||||
|
const wagmiContext = useClient();
|
||||||
|
invariant(
|
||||||
|
wagmiContext,
|
||||||
|
`useNetwork() can only be used inside <ThirdwebProvider />. If you are using <ThirdwebSDKProvider /> you will have to use your own network logic.`,
|
||||||
|
);
|
||||||
|
return useWagmiNetwork();
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
// providers
|
||||||
|
export * from "./providers/full";
|
||||||
|
|
||||||
|
// require to be inside `<ThirdwebProvider />`
|
||||||
|
export * from "./hooks/wagmi-required/useAccount";
|
||||||
|
export * from "./hooks/wagmi-required/useNetwork";
|
||||||
|
export * from "./hooks/connectors/useWalletConnect";
|
||||||
|
export * from "./hooks/wagmi-required/useDisconnect";
|
||||||
|
|
||||||
|
// re-export everything from react-core
|
||||||
|
export * from "@thirdweb-dev/react-core/evm";
|
||||||
@@ -0,0 +1,303 @@
|
|||||||
|
import { QueryClient } from "@tanstack/react-query";
|
||||||
|
import { Chain, defaultChains } from "@thirdweb-dev/chains";
|
||||||
|
import {
|
||||||
|
ThirdwebAuthConfig,
|
||||||
|
ThirdwebConfigProvider,
|
||||||
|
ThirdwebSDKProvider,
|
||||||
|
ThirdwebSDKProviderProps,
|
||||||
|
} from "@thirdweb-dev/react-core/evm";
|
||||||
|
import type { SDKOptions } from "@thirdweb-dev/sdk";
|
||||||
|
import type { ThirdwebStorage } from "@thirdweb-dev/storage";
|
||||||
|
import { getDefaultProvider } from "ethers";
|
||||||
|
import { transformChainToMinimalWagmiChain } from "../utils/chains";
|
||||||
|
import React, { useMemo } from "react";
|
||||||
|
import invariant from "tiny-invariant";
|
||||||
|
import {
|
||||||
|
Connector, createClient, useSigner, WagmiConfig,
|
||||||
|
} from "wagmi";
|
||||||
|
import { WalletConnectConnector } from "wagmi/connectors/walletConnect";
|
||||||
|
import { TW_WC_PROJECT_ID, WC_RELAY_URL } from "../constants/walletConnect";
|
||||||
|
import { showDeprecationWarning } from "../../core/utils";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
|
export type WalletConnectConnectorType =
|
||||||
|
| WalletConnectConnector
|
||||||
|
| 'walletConnect'
|
||||||
|
| { name: 'walletConnect'; options: Omit<WalletConnectConnector['options'], 'version' | 'qrcode' | 'metadata'> };
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
|
export type WalletConnector = WalletConnectConnectorType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the metadata to pass to wallet connection dialog (may show up during the wallet-connection process)
|
||||||
|
* @remarks this is only used for wallet connect and wallet link, metamask does not support it
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
export interface DAppMetaData {
|
||||||
|
/**
|
||||||
|
* the name of your app
|
||||||
|
*/
|
||||||
|
name: string;
|
||||||
|
/**
|
||||||
|
* optional - a description of your app
|
||||||
|
*/
|
||||||
|
description: string;
|
||||||
|
/**
|
||||||
|
* optional - a url that points to a logo (or favicon) of your app
|
||||||
|
*/
|
||||||
|
logoUrl: string;
|
||||||
|
/**
|
||||||
|
* optional - the url where your app is hosted
|
||||||
|
*/
|
||||||
|
url: string;
|
||||||
|
/**
|
||||||
|
* optional - whether to show the connect dialog in darkmode or not
|
||||||
|
*/
|
||||||
|
isDarkMode?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The possible props for the ThirdwebProvider.
|
||||||
|
*/
|
||||||
|
export interface ThirdwebProviderProps<
|
||||||
|
TChains extends Chain[] = typeof defaultChains,
|
||||||
|
> {
|
||||||
|
/**
|
||||||
|
* The network to use for the SDK.
|
||||||
|
*/
|
||||||
|
activeChain?: TChains[number]["chainId"] | TChains[number]["slug"] | Chain;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Chains to support. If not provided, will default to the chains supported by the SDK.
|
||||||
|
*/
|
||||||
|
supportedChains?: Readonly<TChains>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The {@link SDKOptions | Thirdweb SDK Options} to pass to the thirdweb SDK
|
||||||
|
* comes with sensible defaults
|
||||||
|
*/
|
||||||
|
sdkOptions?: SDKOptions;
|
||||||
|
/**
|
||||||
|
* An array of connector types (strings) or wallet connector objects that the dApp supports
|
||||||
|
* If not provided, will default to metamask (injected), wallet connect and walletlink (coinbase wallet) with sensible defaults
|
||||||
|
*/
|
||||||
|
walletConnectors?: WalletConnector[];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Metadata to pass to wallet connect and walletlink wallet connect. (Used to show *which* dApp is being connected to in mobile wallets that support it)
|
||||||
|
* Defaults to just the name being passed as `thirdweb powered dApp`.
|
||||||
|
*/
|
||||||
|
dAppMeta?: DAppMetaData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The configuration used for thirdweb auth usage. Enables users to login
|
||||||
|
* to backends with their wallet.
|
||||||
|
*/
|
||||||
|
authConfig?: ThirdwebAuthConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The storage interface to use with the sdk.
|
||||||
|
*/
|
||||||
|
storageInterface?: ThirdwebStorage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The react-query client to use. (Defaults to a default client.)
|
||||||
|
*/
|
||||||
|
queryClient?: QueryClient;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The chainId that your dApp is running on.
|
||||||
|
* @deprecated - use `network` instead
|
||||||
|
*/
|
||||||
|
desiredChainId?: number | undefined;
|
||||||
|
/**
|
||||||
|
* A partial map of chainIds to rpc urls to use for certain chains
|
||||||
|
* If not provided, will default to the rpcUrls of the chain objects for the supported chains
|
||||||
|
* @deprecated - use `chains` instead
|
||||||
|
*/
|
||||||
|
chainRpc?: Record<number, string>;
|
||||||
|
}
|
||||||
|
|
||||||
|
// SDK handles this under the hood for us
|
||||||
|
|
||||||
|
const defaultdAppMeta: DAppMetaData = {
|
||||||
|
name: 'thirdweb powered dApp',
|
||||||
|
url: 'https://thirdweb.com',
|
||||||
|
logoUrl: 'https://thirdweb.com/favicon.ico',
|
||||||
|
description: 'thirdweb powered dApp',
|
||||||
|
};
|
||||||
|
|
||||||
|
const defaultWalletConnectors: Required<
|
||||||
|
ThirdwebProviderProps['walletConnectors']
|
||||||
|
> = ['walletConnect'];
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* The `<ThirdwebProvider />` component lets you control what networks you want users to connect to, what types of wallets can connect to your app, and the settings for the [Typescript SDK](https://docs.thirdweb.com/typescript).
|
||||||
|
*
|
||||||
|
* @example
|
||||||
|
* You can wrap your application with the provider as follows:
|
||||||
|
*
|
||||||
|
* ```jsx title="App.jsx"
|
||||||
|
* import { ThirdwebProvider, ChainId } from "@thirdweb-dev/react";
|
||||||
|
*
|
||||||
|
* const App = () => {
|
||||||
|
* return (
|
||||||
|
* <ThirdwebProvider desiredChainId={ChainId.Mainnet}>
|
||||||
|
* <YourApp />
|
||||||
|
* </ThirdwebProvider>
|
||||||
|
* );
|
||||||
|
* };
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* @public
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export const ThirdwebProvider = <
|
||||||
|
TChains extends Chain[] = typeof defaultChains,
|
||||||
|
>({
|
||||||
|
sdkOptions,
|
||||||
|
|
||||||
|
// @ts-expect-error - different subtype of Chain[] but this works fine
|
||||||
|
supportedChains = defaultChains,
|
||||||
|
activeChain,
|
||||||
|
|
||||||
|
walletConnectors = defaultWalletConnectors,
|
||||||
|
dAppMeta = defaultdAppMeta,
|
||||||
|
|
||||||
|
authConfig,
|
||||||
|
storageInterface,
|
||||||
|
queryClient,
|
||||||
|
children,
|
||||||
|
|
||||||
|
// deprecated
|
||||||
|
desiredChainId,
|
||||||
|
chainRpc,
|
||||||
|
}: React.PropsWithChildren<ThirdwebProviderProps<TChains>>) => {
|
||||||
|
if (chainRpc) {
|
||||||
|
showDeprecationWarning("chainRpc", "supportedChains");
|
||||||
|
}
|
||||||
|
if (desiredChainId) {
|
||||||
|
showDeprecationWarning("desiredChainId", "activeChain");
|
||||||
|
}
|
||||||
|
|
||||||
|
const mergedChains = useMemo(() => {
|
||||||
|
if (
|
||||||
|
!activeChain ||
|
||||||
|
typeof activeChain === "string" ||
|
||||||
|
typeof activeChain === "number"
|
||||||
|
) {
|
||||||
|
return supportedChains as Readonly<Chain[]>;
|
||||||
|
}
|
||||||
|
return [...supportedChains, activeChain] as Readonly<Chain[]>;
|
||||||
|
}, [supportedChains, activeChain]);
|
||||||
|
|
||||||
|
const _client = useMemo(() => {
|
||||||
|
const walletConnectClientMeta = {
|
||||||
|
name: dAppMeta.name,
|
||||||
|
url: dAppMeta.url,
|
||||||
|
icons: [dAppMeta.logoUrl],
|
||||||
|
description: dAppMeta.description,
|
||||||
|
};
|
||||||
|
|
||||||
|
const wagmiChains = mergedChains.map(transformChainToMinimalWagmiChain);
|
||||||
|
|
||||||
|
const client = createClient({
|
||||||
|
connectors: () => {
|
||||||
|
return walletConnectors
|
||||||
|
.map((connector) => {
|
||||||
|
if (connector instanceof Connector) {
|
||||||
|
return connector;
|
||||||
|
}
|
||||||
|
// wallet connect
|
||||||
|
if (
|
||||||
|
(typeof connector === 'string' &&
|
||||||
|
connector === 'walletConnect') ||
|
||||||
|
(typeof connector === 'object' &&
|
||||||
|
connector.name === 'walletConnect')
|
||||||
|
) {
|
||||||
|
const mainnet = wagmiChains.find((chain) => chain.id === 1);
|
||||||
|
invariant(mainnet, 'Mainnet chain not found');
|
||||||
|
return new WalletConnectConnector({
|
||||||
|
chains: [mainnet],
|
||||||
|
options: typeof connector === "string"
|
||||||
|
? {
|
||||||
|
metadata: walletConnectClientMeta,
|
||||||
|
qrcode: false,
|
||||||
|
version: '2',
|
||||||
|
projectId: TW_WC_PROJECT_ID,
|
||||||
|
relayUrl: WC_RELAY_URL,
|
||||||
|
logger: 'info',
|
||||||
|
}
|
||||||
|
: {
|
||||||
|
metadata: walletConnectClientMeta,
|
||||||
|
qrcode: false,
|
||||||
|
version: '2',
|
||||||
|
projectId: TW_WC_PROJECT_ID,
|
||||||
|
relayUrl: WC_RELAY_URL,
|
||||||
|
logger: 'info',
|
||||||
|
... connector.options
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new Error(`Wallet connector not recognised: ${connector}`);
|
||||||
|
})
|
||||||
|
.filter((c) => c !== null);
|
||||||
|
},
|
||||||
|
provider: getDefaultProvider(),
|
||||||
|
});
|
||||||
|
|
||||||
|
return client;
|
||||||
|
}, [dAppMeta.description, dAppMeta.logoUrl, dAppMeta.name, dAppMeta.url, mergedChains, walletConnectors]);
|
||||||
|
|
||||||
|
const activeChainId = useMemo(() => {
|
||||||
|
if (!activeChain) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
if (typeof activeChain === "string" || typeof activeChain === "number") {
|
||||||
|
return activeChain;
|
||||||
|
}
|
||||||
|
return activeChain.chainId;
|
||||||
|
}, [activeChain]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<ThirdwebConfigProvider
|
||||||
|
value={{
|
||||||
|
chains: supportedChains,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<WagmiConfig client={_client}>
|
||||||
|
<ThirdwebSDKProviderWagmiWrapper
|
||||||
|
queryClient={queryClient}
|
||||||
|
sdkOptions={sdkOptions}
|
||||||
|
supportedChains={supportedChains}
|
||||||
|
// desiredChainId is deprecated, we will remove it in the future but still need to pass it here for now
|
||||||
|
activeChain={activeChainId || desiredChainId}
|
||||||
|
storageInterface={storageInterface}
|
||||||
|
authConfig={authConfig}
|
||||||
|
>
|
||||||
|
{children}
|
||||||
|
</ThirdwebSDKProviderWagmiWrapper>
|
||||||
|
</WagmiConfig>
|
||||||
|
</ThirdwebConfigProvider>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const ThirdwebSDKProviderWagmiWrapper = <TChains extends Chain[]>({
|
||||||
|
children,
|
||||||
|
...props
|
||||||
|
}: React.PropsWithChildren<
|
||||||
|
Omit<ThirdwebSDKProviderProps<TChains>, "signer" | "provider">
|
||||||
|
>) => {
|
||||||
|
const {data} = useSigner();
|
||||||
|
return (
|
||||||
|
<ThirdwebSDKProvider signer={data || undefined} {...props}>
|
||||||
|
{children}
|
||||||
|
</ThirdwebSDKProvider>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
import { Chain as WagmiChain } from "wagmi";
|
||||||
|
import { Chain } from "@thirdweb-dev/chains";
|
||||||
|
|
||||||
|
export function transformChainToMinimalWagmiChain(chain: Chain): WagmiChain {
|
||||||
|
return {
|
||||||
|
id: chain.chainId,
|
||||||
|
name: chain.name,
|
||||||
|
network: chain.slug,
|
||||||
|
nativeCurrency: {
|
||||||
|
name: chain.nativeCurrency.name,
|
||||||
|
symbol: chain.nativeCurrency.symbol,
|
||||||
|
decimals: chain.nativeCurrency.decimals as 18,
|
||||||
|
},
|
||||||
|
testnet: chain.testnet,
|
||||||
|
rpcUrls: {
|
||||||
|
default: {
|
||||||
|
http: chain.rpc as string[],
|
||||||
|
},
|
||||||
|
public: {
|
||||||
|
http: chain.rpc as string[],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
blockExplorers: chain.explorers?.reduce((prev, explorer: {
|
||||||
|
name: string;
|
||||||
|
url: string;
|
||||||
|
standard: string;
|
||||||
|
}) => {
|
||||||
|
return {
|
||||||
|
...prev,
|
||||||
|
[explorer.name]: {
|
||||||
|
name: explorer.name,
|
||||||
|
url: explorer.url,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}, { default: { name: chain.explorers[0].name, url: chain.explorers[0].url } })
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export * from "./evm";
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"extends": "@thirdweb-dev/tsconfig/react-native-library.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"outDir": "./dist",
|
||||||
|
"baseUrl": "./src",
|
||||||
|
"rootDir": "./src"
|
||||||
|
},
|
||||||
|
"typeRoots": ["../node_modules/@types"],
|
||||||
|
"include": ["./src/**/*.ts", "./src/**/*.tsx"],
|
||||||
|
"exclude": ["node_modules", "**/*.test.ts", "**/*.test.tsx"]
|
||||||
|
}
|
||||||
@@ -1,5 +1,18 @@
|
|||||||
# @thirdweb-dev/react
|
# @thirdweb-dev/react
|
||||||
|
|
||||||
|
## 3.9.1
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- [#599](https://github.com/thirdweb-dev/js/pull/599) [`f580b8a`](https://github.com/thirdweb-dev/js/commit/f580b8ac06534df24b0194cbc632b4a8fd447611) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Fix readonly chain mismatch
|
||||||
|
|
||||||
|
- [#588](https://github.com/thirdweb-dev/js/pull/588) [`f0de81d`](https://github.com/thirdweb-dev/js/commit/f0de81d4b1ba33b2ac73ed16cfdea8fd4eb5da9e) Thanks [@adam-maj](https://github.com/adam-maj)! - Update to use new Auth
|
||||||
|
|
||||||
|
- Updated dependencies [[`f0de81d`](https://github.com/thirdweb-dev/js/commit/f0de81d4b1ba33b2ac73ed16cfdea8fd4eb5da9e), [`f580b8a`](https://github.com/thirdweb-dev/js/commit/f580b8ac06534df24b0194cbc632b4a8fd447611)]:
|
||||||
|
- @thirdweb-dev/react-core@3.9.1
|
||||||
|
- @thirdweb-dev/chains@0.1.1
|
||||||
|
- @thirdweb-dev/wallets@0.2.2
|
||||||
|
|
||||||
## 3.9.0
|
## 3.9.0
|
||||||
|
|
||||||
### Minor Changes
|
### Minor Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@thirdweb-dev/react",
|
"name": "@thirdweb-dev/react",
|
||||||
"version": "3.9.0",
|
"version": "3.9.1",
|
||||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react",
|
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react",
|
||||||
"author": "thirdweb eng <[email protected]>",
|
"author": "thirdweb eng <[email protected]>",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
|||||||
@@ -405,7 +405,8 @@ export const ThirdwebProvider = <
|
|||||||
<ThirdwebSDKProviderWagmiWrapper
|
<ThirdwebSDKProviderWagmiWrapper
|
||||||
queryClient={queryClient}
|
queryClient={queryClient}
|
||||||
sdkOptions={sdkOptions}
|
sdkOptions={sdkOptions}
|
||||||
supportedChains={supportedChains}
|
// @ts-expect-error - we are passing the wrong type here, but it's ok because we are passing the correct type to the provider
|
||||||
|
supportedChains={mergedChains}
|
||||||
// desiredChainId is deprecated, we will remove it in the future but still need to pass it here for now
|
// desiredChainId is deprecated, we will remove it in the future but still need to pass it here for now
|
||||||
activeChain={activeChainId || desiredChainId}
|
activeChain={activeChainId || desiredChainId}
|
||||||
storageInterface={storageInterface}
|
storageInterface={storageInterface}
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
# @thirdweb-dev/sdk
|
# @thirdweb-dev/sdk
|
||||||
|
|
||||||
|
## 3.9.1
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [[`300fe4a`](https://github.com/thirdweb-dev/js/commit/300fe4a933f83ac59f89ff019f173cdfc6a2cdff), [`f580b8a`](https://github.com/thirdweb-dev/js/commit/f580b8ac06534df24b0194cbc632b4a8fd447611)]:
|
||||||
|
- @thirdweb-dev/storage@1.0.9
|
||||||
|
- @thirdweb-dev/chains@0.1.1
|
||||||
|
|
||||||
## 3.9.0
|
## 3.9.0
|
||||||
|
|
||||||
### Minor Changes
|
### Minor Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@thirdweb-dev/sdk",
|
"name": "@thirdweb-dev/sdk",
|
||||||
"version": "3.9.0",
|
"version": "3.9.1",
|
||||||
"description": "The main thirdweb SDK.",
|
"description": "The main thirdweb SDK.",
|
||||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/sdk",
|
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/sdk",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
# @thirdweb-dev/storage
|
# @thirdweb-dev/storage
|
||||||
|
|
||||||
|
## 1.0.9
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- [#597](https://github.com/thirdweb-dev/js/pull/597) [`300fe4a`](https://github.com/thirdweb-dev/js/commit/300fe4a933f83ac59f89ff019f173cdfc6a2cdff) Thanks [@adam-maj](https://github.com/adam-maj)! - Update storage to take metadata
|
||||||
|
|
||||||
## 1.0.8
|
## 1.0.8
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@thirdweb-dev/storage",
|
"name": "@thirdweb-dev/storage",
|
||||||
"version": "1.0.8",
|
"version": "1.0.9",
|
||||||
"main": "dist/thirdweb-dev-storage.cjs.js",
|
"main": "dist/thirdweb-dev-storage.cjs.js",
|
||||||
"module": "dist/thirdweb-dev-storage.esm.js",
|
"module": "dist/thirdweb-dev-storage.esm.js",
|
||||||
"exports": {
|
"exports": {
|
||||||
|
|||||||
@@ -159,7 +159,10 @@ export class IpfsUploader implements IStorageUploader<IpfsUploadBatchOptions> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const metadata = { name: `Storage SDK`, keyvalues: {} };
|
const metadata = {
|
||||||
|
name: `Storage SDK`,
|
||||||
|
keyvalues: { ...options?.metadata },
|
||||||
|
};
|
||||||
form.append("pinataMetadata", JSON.stringify(metadata));
|
form.append("pinataMetadata", JSON.stringify(metadata));
|
||||||
|
|
||||||
if (options?.uploadWithoutDirectory) {
|
if (options?.uploadWithoutDirectory) {
|
||||||
|
|||||||
@@ -74,4 +74,8 @@ export type IpfsUploadBatchOptions = {
|
|||||||
* If specified, will upload a single file without wrapping it in a directory
|
* If specified, will upload a single file without wrapping it in a directory
|
||||||
*/
|
*/
|
||||||
uploadWithoutDirectory?: boolean;
|
uploadWithoutDirectory?: boolean;
|
||||||
|
/**
|
||||||
|
* Optional metadata to associate with this upload
|
||||||
|
*/
|
||||||
|
metadata?: Record<string, string>;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
# @thirdweb-dev/tsconfig
|
# @thirdweb-dev/tsconfig
|
||||||
|
|
||||||
|
## 0.1.5
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- [#522](https://github.com/thirdweb-dev/js/pull/522) [`18ba6b3`](https://github.com/thirdweb-dev/js/commit/18ba6b381ee5c72e0fe599ab9b32f2ef66443d5f) Thanks [@iketw](https://github.com/iketw)! - [React Native SDK] init package
|
||||||
|
|
||||||
## 0.1.4
|
## 0.1.4
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@thirdweb-dev/tsconfig",
|
"name": "@thirdweb-dev/tsconfig",
|
||||||
"version": "0.1.4",
|
"version": "0.1.5",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"files": [
|
"files": [
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json.schemastore.org/tsconfig",
|
||||||
|
"display": "React Native Library",
|
||||||
|
"compilerOptions": {
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"allowSyntheticDefaultImports": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"isolatedModules": false,
|
||||||
|
"jsx": "react",
|
||||||
|
"lib": ["es6", "es2015", "es2016", "es2017", "es2018"],
|
||||||
|
"noUnusedParameters": true,
|
||||||
|
"declaration": true,
|
||||||
|
"noUnusedLocals": true,
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"strict": true,
|
||||||
|
"target": "es5",
|
||||||
|
"skipLibCheck": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,5 +1,15 @@
|
|||||||
# @thirdweb-dev/unity-js-bridge
|
# @thirdweb-dev/unity-js-bridge
|
||||||
|
|
||||||
|
## 0.2.9
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [[`f0de81d`](https://github.com/thirdweb-dev/js/commit/f0de81d4b1ba33b2ac73ed16cfdea8fd4eb5da9e), [`300fe4a`](https://github.com/thirdweb-dev/js/commit/300fe4a933f83ac59f89ff019f173cdfc6a2cdff)]:
|
||||||
|
- @thirdweb-dev/auth@3.0.5
|
||||||
|
- @thirdweb-dev/storage@1.0.9
|
||||||
|
- @thirdweb-dev/sdk@3.9.1
|
||||||
|
- @thirdweb-dev/wallets@0.2.2
|
||||||
|
|
||||||
## 0.2.8
|
## 0.2.8
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@thirdweb-dev/unity-js-bridge",
|
"name": "@thirdweb-dev/unity-js-bridge",
|
||||||
"version": "0.2.8",
|
"version": "0.2.9",
|
||||||
"main": "dist/thirdweb-unity-bridge.js",
|
"main": "dist/thirdweb-unity-bridge.js",
|
||||||
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/unity-js-bridge",
|
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/unity-js-bridge",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
# @thirdweb-dev/wallets
|
# @thirdweb-dev/wallets
|
||||||
|
|
||||||
|
## 0.2.2
|
||||||
|
|
||||||
## 0.2.1
|
## 0.2.1
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@thirdweb-dev/wallets",
|
"name": "@thirdweb-dev/wallets",
|
||||||
"version": "0.2.1",
|
"version": "0.2.2",
|
||||||
"main": "dist/thirdweb-dev-wallets.cjs.js",
|
"main": "dist/thirdweb-dev-wallets.cjs.js",
|
||||||
"module": "dist/thirdweb-dev-wallets.esm.js",
|
"module": "dist/thirdweb-dev-wallets.esm.js",
|
||||||
"exports": {
|
"exports": {
|
||||||
|
|||||||
@@ -36,6 +36,14 @@
|
|||||||
"outputs": ["dist/**", "evm/**", "solana/**"],
|
"outputs": ["dist/**", "evm/**", "solana/**"],
|
||||||
"dependsOn": ["^build"]
|
"dependsOn": ["^build"]
|
||||||
},
|
},
|
||||||
|
"@thirdweb-dev/react-native#build": {
|
||||||
|
"outputs": ["dist/**"],
|
||||||
|
"dependsOn": ["^build"]
|
||||||
|
},
|
||||||
|
"@thirdweb-dev/react-native-compat#build": {
|
||||||
|
"outputs": ["src/**"],
|
||||||
|
"dependsOn": ["^build"]
|
||||||
|
},
|
||||||
"@thirdweb-dev/auth#build": {
|
"@thirdweb-dev/auth#build": {
|
||||||
"outputs": [
|
"outputs": [
|
||||||
"dist/**",
|
"dist/**",
|
||||||
|
|||||||
Reference in New Issue
Block a user