Compare commits

...
11 changed files with 102 additions and 48 deletions
+2
View File
@@ -1,5 +1,7 @@
# @thirdweb-dev/auth
## 2.0.10
## 2.0.9
## 2.0.8
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/auth",
"version": "2.0.9",
"version": "2.0.10",
"exports": {
"./package.json": "./package.json",
"./express": {
+7
View File
@@ -1,5 +1,12 @@
# thirdweb
## 0.7.21
### Patch Changes
- Updated dependencies [[`666ff5f`](https://github.com/thirdweb-dev/js/commit/666ff5f694f1e146150ddb9fa3233f00533b6d60), [`0dade96`](https://github.com/thirdweb-dev/js/commit/0dade96d0d2553d25b386d822e534eb7ed0aefa9), [`c295a47`](https://github.com/thirdweb-dev/js/commit/c295a47144cd722c6f8861c1ec567b53a05ea0bf)]:
- @thirdweb-dev/sdk@3.1.1
## 0.7.20
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "thirdweb",
"main": "dist/cli/index.js",
"version": "0.7.20",
"version": "0.7.21",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/cli",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
+6
View File
@@ -1,5 +1,11 @@
# @thirdweb-dev/react
## 3.1.1
### Patch Changes
- [#221](https://github.com/thirdweb-dev/js/pull/221) [`c295a47`](https://github.com/thirdweb-dev/js/commit/c295a47144cd722c6f8861c1ec567b53a05ea0bf) Thanks [@jnsdls](https://github.com/jnsdls)! - fix esm exports
## 3.1.0
### Minor Changes
+16 -1
View File
@@ -1,12 +1,27 @@
{
"name": "@thirdweb-dev/react",
"version": "3.1.0",
"version": "3.1.1",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
"main": "dist/thirdweb-dev-react.cjs.js",
"types": "dist/thirdweb-dev-react.cjs.d.ts",
"module": "dist/thirdweb-dev-react.esm.js",
"exports": {
"./package.json": "./package.json",
".": {
"module": "./dist/thirdweb-dev-react.esm.js",
"default": "./dist/thirdweb-dev-react.cjs.js"
},
"./solana": {
"module": "./solana/dist/thirdweb-dev-react-solana.esm.js",
"default": "./solana/dist/thirdweb-dev-react-solana.cjs.js"
},
"./evm": {
"module": "./evm/dist/thirdweb-dev-react-evm.esm.js",
"default": "./evm/dist/thirdweb-dev-react-evm.cjs.js"
}
},
"files": [
"dist/",
"evm/",
+10
View File
@@ -1,5 +1,15 @@
# @thirdweb-dev/sdk
## 3.1.1
### Patch Changes
- [#222](https://github.com/thirdweb-dev/js/pull/222) [`666ff5f`](https://github.com/thirdweb-dev/js/commit/666ff5f694f1e146150ddb9fa3233f00533b6d60) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - [SOL] expose ThirdwebSDK.fromPrivateKey()
- [#224](https://github.com/thirdweb-dev/js/pull/224) [`0dade96`](https://github.com/thirdweb-dev/js/commit/0dade96d0d2553d25b386d822e534eb7ed0aefa9) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - [EVM] Ensure that factory/proxy flags are set before deploying via proxy
- [#221](https://github.com/thirdweb-dev/js/pull/221) [`c295a47`](https://github.com/thirdweb-dev/js/commit/c295a47144cd722c6f8861c1ec567b53a05ea0bf) Thanks [@jnsdls](https://github.com/jnsdls)! - fix esm exports
## 3.1.0
### Minor Changes
+24 -4
View File
@@ -1,11 +1,30 @@
{
"name": "@thirdweb-dev/sdk",
"version": "3.1.0",
"version": "3.1.1",
"description": "The main thirdweb SDK.",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/sdk",
"license": "Apache-2.0",
"main": "dist/thirdweb-dev-sdk.cjs.js",
"module": "dist/thirdweb-dev-sdk.esm.js",
"exports": {
"./package.json": "./package.json",
".": {
"module": "./dist/thirdweb-dev-sdk.esm.js",
"default": "./dist/thirdweb-dev-sdk.cjs.js"
},
"./solana": {
"module": "./solana/dist/thirdweb-dev-sdk-solana.esm.js",
"default": "./solana/dist/thirdweb-dev-sdk-solana.cjs.js"
},
"./solana/server": {
"module": "./solana/server/dist/thirdweb-dev-sdk-solana-server.esm.js",
"default": "./solana/server/dist/thirdweb-dev-sdk-solana-server.cjs.js"
},
"./evm": {
"module": "./evm/dist/thirdweb-dev-sdk-evm.esm.js",
"default": "./evm/dist/thirdweb-dev-sdk-evm.cjs.js"
}
},
"files": [
"dist/",
"evm/",
@@ -40,10 +59,10 @@
"push": "yalc push"
},
"devDependencies": {
"@metaplex-foundation/amman": "^0.10.0",
"@metaplex-foundation/amman-client": "^0.2.1",
"@esbuild-plugins/node-modules-polyfill": "^0.1.4",
"@gmrchk/cli-testing-library": "^0.1.2",
"@metaplex-foundation/amman": "^0.10.0",
"@metaplex-foundation/amman-client": "^0.2.1",
"@microsoft/api-documenter": "^7.19.4",
"@microsoft/api-extractor": "^7.29.2",
"@microsoft/tsdoc": "^0.14.1",
@@ -82,7 +101,6 @@
"ethers": "^5"
},
"dependencies": {
"bn.js": "^5.2.1",
"@metaplex-foundation/js": "^0.15.0",
"@metaplex-foundation/mpl-token-metadata": "^2.2.2",
"@project-serum/anchor": "^0.25.0",
@@ -90,6 +108,8 @@
"@solana/web3.js": "^1.50.1",
"@thirdweb-dev/contracts-js": "*",
"@thirdweb-dev/storage": "*",
"bn.js": "^5.2.1",
"bs58": "^5.0.0",
"cbor-web": "^8.1.0",
"cross-fetch": "^3.1.5",
"eventemitter3": "^4.0.7",
@@ -594,7 +594,11 @@ export class ContractDeployer extends RPCConnectionHandler {
// not a factory deployment, ignore
}
const forceDirectDeploy = options?.forceDirectDeploy || false;
if (factoryDeploymentData && !forceDirectDeploy) {
if (
factoryDeploymentData &&
(isDeployableViaProxy || isDeployableViaFactory) &&
!forceDirectDeploy
) {
const chainId = (await this.getProvider().getNetwork()).chainId;
invariant(
factoryDeploymentData.implementationAddresses,
+26 -1
View File
@@ -14,8 +14,9 @@ import {
Program as AnchorProgram,
setProvider,
} from "@project-serum/anchor";
import { Connection } from "@solana/web3.js";
import { Connection, Keypair } from "@solana/web3.js";
import { IpfsUploader, ThirdwebStorage } from "@thirdweb-dev/storage";
import Bs58 from "bs58";
/**
* The main entry-point for the thirdweb Solana SDK.
@@ -33,6 +34,12 @@ import { IpfsUploader, ThirdwebStorage } from "@thirdweb-dev/storage";
* @public
*/
export class ThirdwebSDK {
/**
* Create a new SDK instance for the specified network
* @param network - The network to connect to
* @param storage - The storage provider to use or IPFS by default
* @returns an SDK instance
*/
static fromNetwork(network: Network, storage?: ThirdwebStorage): ThirdwebSDK {
return new ThirdwebSDK(
new Connection(getUrlForNetwork(network), {
@@ -43,6 +50,24 @@ export class ThirdwebSDK {
);
}
/**
* reate a new SDK instance connected with the given private key
* @param network - The network to connect to
* @param privateKey - The private key to use
* @param storage - The storage provider to use or IPFS by default
* @returns an SDK instance
*/
static fromPrivateKey(
network: Network,
privateKey: string,
storage?: ThirdwebStorage,
): ThirdwebSDK {
const sdk = ThirdwebSDK.fromNetwork(network, storage);
const keypair = Keypair.fromSecretKey(Bs58.decode(privateKey));
sdk.wallet.connect(keypair);
return sdk;
}
private connection: Connection;
private metaplex: Metaplex;
private anchorProvider: AnchorProvider;
+4 -39
View File
@@ -2719,12 +2719,7 @@
jju "~1.4.0"
resolve "~1.19.0"
"@microsoft/[email protected]":
version "0.14.1"
resolved "https://registry.yarnpkg.com/@microsoft/tsdoc/-/tsdoc-0.14.1.tgz#155ef21065427901994e765da8a0ba0eaae8b8bd"
integrity sha512-6Wci+Tp3CgPt/B9B0a3J4s3yMgLNSku6w5TV6mN+61C71UqsRBv2FUibBf3tPGlNxebgPHMEUzKpb1ggE8KCKw==
"@microsoft/[email protected]", "@microsoft/tsdoc@^0.14.1":
"@microsoft/[email protected]", "@microsoft/[email protected]", "@microsoft/tsdoc@^0.14.1":
version "0.14.2"
resolved "https://registry.yarnpkg.com/@microsoft/tsdoc/-/tsdoc-0.14.2.tgz#c3ec604a0b54b9a9b87e9735dfc59e1a5da6a5fb"
integrity sha512-9b8mPpKrfeGRuhFH5iO1iwCLeIIsV6+H1sRfxbkoGXIyQE2BTsPd9zqSqQJ+pv5sJ/hT5M1zvOFL02MnEezFug==
@@ -6290,27 +6285,7 @@ [email protected]:
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f"
integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==
[email protected]:
version "4.11.6"
resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215"
integrity sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==
[email protected]:
version "4.11.8"
resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f"
integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==
[email protected]:
version "5.2.0"
resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.0.tgz#358860674396c6997771a9d051fcc1b57d4ae002"
integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==
bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.0, bn.js@^4.11.6, bn.js@^4.11.8, bn.js@^4.11.9:
version "4.12.0"
resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88"
integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==
bn.js@^5.0.0, bn.js@^5.1.1, bn.js@^5.1.2, bn.js@^5.2.0, bn.js@^5.2.1:
[email protected], [email protected], [email protected], [email protected], bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.0, bn.js@^4.11.6, bn.js@^4.11.8, bn.js@^4.11.9, bn.js@^5.0.0, bn.js@^5.1.1, bn.js@^5.1.2, bn.js@^5.2.0, bn.js@^5.2.1:
version "5.2.1"
resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70"
integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==
@@ -12182,12 +12157,7 @@ nan@^2.14.0, nan@^2.14.2:
resolved "https://registry.yarnpkg.com/nan/-/nan-2.16.0.tgz#664f43e45460fb98faf00edca0bb0d7b8dce7916"
integrity sha512-UdAqHyFngu7TfQKsCBgAA6pWDkT8MAO7d0jyOecVhN5354xbLqdn8mV9Tat9gepAupm0bt2DbeaSC8vS52MuFA==
[email protected]:
version "3.3.3"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25"
integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==
nanoid@^3.3.4:
[email protected], nanoid@^3.1.31, nanoid@^3.3.4:
version "3.3.4"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab"
integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==
@@ -15402,16 +15372,11 @@ [email protected], typedarray-to-buffer@^3.1.5:
dependencies:
is-typedarray "^1.0.0"
typescript@^4.6.2, typescript@^4.7.4:
typescript@^4.6.2, typescript@^4.7.4, typescript@~4.7.4:
version "4.8.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.3.tgz#d59344522c4bc464a65a730ac695007fdb66dd88"
integrity sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==
typescript@~4.7.4:
version "4.7.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235"
integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==
typical@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/typical/-/typical-4.0.0.tgz#cbeaff3b9d7ae1e2bbfaf5a4e6f11eccfde94fc4"