Files
github-actions[bot]andgithub-actions[bot] c9b0131acd Version Packages (#1478)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-10 15:51:09 -07:00

62 KiB

@thirdweb-dev/wallets

1.1.13

Patch Changes

1.1.12

Patch Changes

1.1.11

Patch Changes

1.1.10

Patch Changes

1.1.9

Patch Changes

1.1.8

Patch Changes

1.1.7

Patch Changes

1.1.6

Patch Changes

  • #1421 fbde927a Thanks @iketw! - Add private methods transform plugin to the wallets package for ReactNative support

1.1.5

Patch Changes

1.1.4

Patch Changes

1.1.3

Patch Changes

1.1.2

Patch Changes

1.1.1

Patch Changes

1.1.0

Minor Changes

  • #1316 d8447146 Thanks @iketw! - 1. Adds new clientId / secretKey option to access thirdweb's services

    You can create a free clientId / secretKey pair on the thirdweb Dashboard

    // For wallets used on the client-side (i.e. react, react-native) you should
    // pass a `clientId`
    const metamaskWallet = new MetaMaskWallet({
      clientId: "your-client-id",
    });
    
    // For wallets used on the backend-side (i.e. node, express) you should
    // pass a `secretKey`
    const localWallet = new LocalWallet({
      secretKey: "your-secret-key",
    });
    
    1. Paper wallet's clientId is renamed to paperClientId.

    The clientId option is reserved for thirdweb's `clientId``

    const paperWallet = new PaperWallet({
      clientId: "your-thirdweb-client-id",
      paperClientId: "your-paper-client-id",
    });
    

Patch Changes

1.0.12

Patch Changes

1.0.11

Patch Changes

1.0.10

Patch Changes

1.0.9

Patch Changes

1.0.8

Patch Changes

1.0.7

Patch Changes

1.0.6

Patch Changes

1.0.5

Patch Changes

1.0.4

Patch Changes

1.0.3

Patch Changes

1.0.2

Patch Changes

1.0.1

Patch Changes

  • #1259 efb3546e Thanks @iketw! - Fix. Respecting passed wallets if less then 50, otherwhise use defaults chains.

1.0.0

Major Changes

Patch Changes

0.3.3

Patch Changes

  • #1237 536b0f12 Thanks @iketw! - [React] Add Rainbow Wallet (implementing the WalletConnect wallet)

    import { ThirdwebProvider, rainbowWallet } from "@thirdweb-dev/react";
    
    const activeChain = "ethereum";
    
    <ThirdwebProvider
      activeChain={activeChain}
      supportedWallets={[rainbowWallet()]}
    >
      <App />
    </ThirdwebProvider>;
    
  • #1236 b626782b Thanks @iketw! - [Wallets/React] Add Trust Wallet

    import { ThirdwebProvider, trustWallet } from "@thirdweb-dev/react";
    
    const activeChain = "mumbai";
    
    <ThirdwebProvider
      activeChain={activeChain}
      autoSwitch={true}
      supportedWallets={[trustWallet()]}
    >
      <App />
    </ThirdwebProvider>;
    
  • Updated dependencies [d498c79a, 9af346ee]:

0.3.2

Patch Changes

0.3.1

Patch Changes

0.3.0

Minor Changes

Patch Changes

0.2.26

Patch Changes

0.2.25

Patch Changes

0.2.24

Patch Changes

0.2.23

Patch Changes

  • #1010 bba9767a Thanks @iketw! - [ReactNative-Wallets] Enables SmartWallet to connect to an app, with implementation in React Native

    • Wallets package
    1. Smart Wallet now supports connecting an external app to it. It acts as an actual wallet implementing the WC protocol
    2. There are two WalletConnect handlers to manage V1 and V2 WC connections
    3. Creates a synchronous storage interface used in WCV1
    4. To have your connector support WC, you need to implement the interface: IWalletConnectReceiver.
    5. You can now pass the flag enableConnectApp to the smart wallet config to enable a new field in our modal to connect an app to your smart wallet
    smartWallet({
        factoryAddress: "..."
        thirdwebApiKey: "apiKey"
        gasless: true,
        personalWallets: [localWallet()],
        enableConnectApp: true,
    }),
    
    • React Native
    1. Creates new modals for WC SessionRequests and SessionApprovals
    2. Implements SyncStorage using MMKV
  • #1065 bd86661f Thanks @iketw! - [ReactNative] Add support for signing in with email/phone using magic sdk

    Devs can now add a new supportedWallet:

    import { Goerli } from '@thirdweb-dev/chains';
    import { ThirdwebProvider, magicWallet } from '@thirdweb-dev/react-native';
    
    <ThirdwebProvider
        activeChain={Goerli}
        supportedWallets={[
        magicWallet({
            apiKey: 'magic_api_key',
        }),
    ]}>
    
  • #1070 68fa1896 Thanks @joaquim-verges! - Expose smartWallet.deploy() and smartWallet.isDeployed()

  • #1085 292a321a Thanks @MananTank! - Fix Metamask disconnection on switch chain

  • #1073 f3b2ae3f Thanks @ciaranightingale! - Update Smart Wallet "getAddress" with "data" arg

  • #1088 4f99ccb4 Thanks @iketw! - [RN/Wallets] Adds send_transaction support for wcv1 Connect to App feature

  • #1064 c85810ee Thanks @MananTank! - Do not cache signer in wallets

  • #1087 35984362 Thanks @adam-maj! - Add proper on-chain signing for Safe

  • Updated dependencies [2f1df0b5, 189daf02, afae0873, c6e74ef0, ee4c7de2, f7b352a5, 4a1d7581, bdabbef7, 59206233, 98efd090, 8eecf4c2, bd86661f, d5651006, da576108, c85810ee, 6fd10f94, 5f1e6abb, a034b032]:

0.2.22

Patch Changes

0.2.21

Patch Changes

0.2.20

Patch Changes

0.2.19

Patch Changes

0.2.18

Patch Changes

  • #973 93bdec06 Thanks @MananTank! - - Fix PaperWallet.connect() error

    • Fix return type of Wallet.autoConnect()
  • #981 ea0f9479 Thanks @iketw! - ## [ReactNative] Allow custom wallets be added to the ConnectWallet button modal

    With this new API you can build your own wallet and wallet UI and integrate it into our ConnectWallet modal:

    import type { ConfiguredWallet, ConnectUIProps } from '@thirdweb-dev/react-native';
    import { createAsyncLocalStorage, ConnectUIProps } from '@thirdweb-dev/react-native';
    import { WalletOptions } from '@thirdweb-dev/wallets';
    
    const WALLET_ID = "my-wallet-id";
    
    export const myWallet = (): ConfiguredWallet => {
      const asyncStorage = createAsyncLocalStorage(WALLET_ID);
      const configuredWallet = {
        id: WALLET_ID,
        meta: {
            id: WALLET_ID,
            name: "My Custom Wallet", // This will be displayed in the connect wallet modal
            iconURL: "ipfs or https url to an image or svg" // This will be used to fetch the icon to show in the connect wallet modal
        },
        create: (options: WalletOptions) =>
          new MyWallet({
            ...options,
            walletStorage: asyncStorage,
          }),
        connectUI(props: ConnectUIProps) {
          return <MyWalletUI {...props} />; // This will show up in the modal after the user selects your wallet
        },
      };
    
      return configuredWallet;
    };
    

    You can then add the wallet to your supportedWallets in the ThirdwebProvider:

    import { Goerli } from '@thirdweb-dev/chains';
    import {
      ThirdwebProvider,
      metamaskWallet,
    } from '@thirdweb-dev/react-native';
    
    const activeChain = Goerli;
    
    const App = () => {
      return (
        <ThirdwebProvider
          activeChain={activeChain}
          supportedChains={[activeChain]}
          supportedWallets={[
            myWallet(),
            metamaskWallet(),
          ]}>
          <AppInner />
        </ThirdwebProvider>
      );
    };
    

    This new version exposes some utility functions:

    1. formatWalletConnectDisplayUri

    Formats the wallet connect wc:// url for usage with custom wallet links

    1. shortenWalletAddress

    Shortens a wallet address for display purposes

    1. createAsyncLocalStorage and createSecureStorage

    You can use these methods to get wallet compatible storage types.

    • createAsyncLocalStorage uses MMKV in the background
    • createSecureStorage uses Expo SecureStore in the background
  • #978 05ebbc15 Thanks @joaquim-verges! - Export ethers and private key wallets top level

  • #974 4ca557ae Thanks @iketw! - [Wallet] Rename Connector to WagmiConnector and TWConnector to Connector

  • #967 7d7685e3 Thanks @MananTank! - - Fix type of connect() for magic wallet

    • enforce smsLogin, emailLogin restriction for magic wallet
    • update the icon for local wallet
  • #977 93bd5733 Thanks @MananTank! - Fix Connect Wallet Open/Close issues

  • Updated dependencies [5305b42d, eb521d24, af4b5356, 93bd5733, a2df187b, aa9b6acc]:

0.2.17

Patch Changes

0.2.16

Patch Changes

0.2.15

Patch Changes

  • #868 b616dca7 Thanks @iketw! - - Updates base wallet classes names

    • Makes InjectedWallet params optional
    • Removes connector storage constructor param from Injected and MetaMask wallets
  • #872 2545a440 Thanks @nachoiacovino! - Rename Wallet Connect to WalletConnect

  • #859 229a4741 Thanks @MananTank! - Fix Error when connecting to Safe in Vite

0.2.14

Patch Changes

0.2.13

Patch Changes

  • #851 c5c2d947 Thanks @MananTank! - Fix wallet autoconnect issues

    Fixes

    • infinite loading spinner on connect wallet button when wallet is locked or connection to app is closed
    • network switch popup on page load when wallet is connected to different network than it was previously connected
    • removed autoconnect timeout - don't need it anymore
  • #855 2dd192a5 Thanks @MananTank! - Add auth in Connect Wallet button

0.2.12

Patch Changes

0.2.11

Patch Changes

0.2.10

Patch Changes

0.2.9

Patch Changes

  • #584 d01b135d Thanks @MananTank! - [Wallets, RN, React, ReactCore] New Wallets SDK implementation

    Breaking changes:

    React and React Native

    1. Replaced walletConnectors with supportedWallets in the ThirdwebProvider.
      import { coinbaseWallet, metamaskWallet, ThirdwebProvider } from "@thirdweb-dev/react";
    
      const App = () => {
      - return <ThirdwebProvider walletConnectors={["metamask", "coinbaseWallet"]}>{...}</ThirdwebProvider>
      + return <ThirdwebProvider supportedWallets={[metamaskWallet(), coinbaseWallet()]}>{...}</ThirdwebProvider>
      }
    
    1. magicLinkConnector not yet implemented in this version

    2. Removed desiredChainId, use activeChain instead

    3. DAppMetaData type now requires the url field to be passed in

    4. Removed chainRpc prop from the ThirdwebProvider. You can pass custom rpcs in the Chain object through the activeChain and supportedChains props.

    5. Replaced the useNetwork hook for useChain and useSwitchChain

    6. Updated ConnectWallet button in React:

    • Removed accentColor and colorMode
    • Added a theme prop with dark and light values
    1. Updated the Web3Button button in React:
    • Removed accentColor and colorMode
    • Added a theme prop with dark and light values

    Patch Changes

    • You can now pass a theme prop to the ThirdwebProvider. Values are light and dark
      import { ThirdwebProvider } from "@thirdweb-dev/react";
    
      const App = () => {
      return <ThirdwebProvider theme='light'>{...}</ThirdwebProvider>
      }
    
    • New wallet hooks added

      • useWallet()
      • useConenct()
      • useConnectionStatus()
      • useSwitchChain()
    • Removed wagmi dependency from the react-native-compat package and updated shims

    • New ConnectWallet and Web3Button components in React Native

    • New wallets package with support for the most common wallets. MetaMask, Coinbase, WalletConnect V1 and V2 and PaperWallet

    • Added autoSwitch prop to the ThirdwebProvider to control whether or not to automatically switch to wallet's network to active chain

      import { ThirdwebProvider } from "@thirdweb-dev/react";
    
      const App = () => {
      return <ThirdwebProvider autoSwitch>{...}</ThirdwebProvider>
      }
    
  • #760 93eca1de Thanks @jnsdls! - keep @coinbase/wallet-sdk as a full dependency instead of peer dependency

  • #794 a6fce0f6 Thanks @shift4id! - Minor copy changes

  • #825 4bdeefe6 Thanks @iketw! - [Core,React,RN,Wallets] Allow for wallets to be created without props where possible

    You can now create wallets without having to worry about it's params. We provide sensible defaults.

    const w = new WalletConnectV1();
      w.connect();
    
    const w1 = new WalletConnect();
    w1.connect();
    
    const cb = new CoinbaseWallet()
    w1.connect();
    
    const safe = new SafeWallet();
    
    const device = new DeviceBrowserWallet();
    
  • #702 33d1cc7f Thanks @jnsdls! - enable browser export

  • #833 83e99dbf Thanks @MananTank! - Fix paper wallet autoconnect issue

  • #824 95bcfa6d Thanks @iketw! - [Wallets] Add autoconnect capabilities

    • You can now call .autoConnect on your wallets and it will check if the wallet is connected. If it's not, it will not trigger the connect flow
  • #802 4d07b4b4 Thanks @iketw! - [ReactCore/Wallets] ReactCore manages all coordination for wallet reconnection

  • #739 4d5fdda9 Thanks @jnsdls! - Add Safe connector and wallet

  • #835 6b31a9bc Thanks @iketw! - [Wallets] set qrcode prop correctly

  • #764 4b77bc9b Thanks @MananTank! - paper wallet, do not save device wallet password

  • #584 d01b135d Thanks @MananTank! - [Wallets] New and updated wallets. [RN] UI Components and Wallets support.

  • #832 e47ceafe Thanks @MananTank! - - Fix wallet.addListener "connect", "disconnect" event emit issue

    • update the paper sdk
  • #778 6c0c6538 Thanks @joaquim-verges! - Device wallet input cleanup

  • #786 ddc1c33a Thanks @MananTank! - Gnosis Safe

  • #748 2221f97d Thanks @MananTank! - [ReactCore] Inject api key to chains

  • Updated dependencies [d01b135d, e3161e59, 33d1cc7f, 6b145d4b, e2ec70c4, 1baed0b1, 2221f97d, 5c7c0923, 9a4a542c, b2d0ffb0]:

0.2.8

Patch Changes

0.2.7

Patch Changes

0.2.6

0.2.5

0.2.4

0.2.3

Patch Changes

0.2.2

0.2.1

Patch Changes

0.2.0

Minor Changes

  • #460 a6c074c Thanks @adam-maj! - Wallets abstraction along with major Auth upgrade. Wallets split into EVM and Solana entrypoints along with GenericAuthWallet implementation.

    Additionally, AWSKmsWallet and AWSSecretsManager wallets have been moved into the @thirdweb-dev/wallets/evm entrypoint from the SDK.

0.1.1

Patch Changes

0.1.0

Minor Changes