Skip to content

Latest commit

 

History

History
609 lines (369 loc) · 11 KB

CHANGELOG.md

File metadata and controls

609 lines (369 loc) · 11 KB

@turnkey/ethers

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

  • a6502e6: Add support for new Turnkey Client types

1.0.4

Patch Changes

1.0.3

Patch Changes

1.0.2

Patch Changes

1.0.1

Patch Changes

1.0.0

Major Changes

Updates @turnkey/ethers package and examples to use ethers v6. Refer to https://docs.ethers.org/v6/migrating for full migration instructions.

✨Summary of Changes✨

getBalance is no longer a method on the signer. It must be obtained via the provider instance. Additionally, it requires an address to be passed in:

// before
const balance = await connectedSigner.getBalance();

// after
// first get the address
const address = await connectedSigner.getAddress()
// then pass it in
const balance = await connectedSigner.provider?.getBalance(address)

getChainId is no longer a method on the signer. It must be obtained via the network object on the provider instance:

// before
const chainId = await connectedSigner.getChainId();

// after
const chainId = (await connectedSigner.provider?.getNetwork())?.chainId;

getTransactionCount is no longer a method on the signer. It must be obtained via the provider instance. Additionally, it requires an address to be passed in:

// before
const transactionCount = await connectedSigner.getTransactionCount();

// after
// first get the address
const address = await connectedSigner.getAddress()
// then pass it in
const transactionCount = await connectedSigner.provider?.getTransactionCount(address);

getFeeData is no longer a method on the signer. It must be obtained via the provider instance:

// before
const feeData = await connectedSigner.getFeeData();

// after
const feeData = await connectedSigner.provider?.getFeeData();

BigNumber -> bigint: numerical values such as, chainId, fee data, balance now use new ES6 primitive bigint instead of BigNumber. For example, when checking if the balance is 0, bigint must now be used for comparison:

// before
if (balance.isZero()) {...}

// after
if (balance === 0n) {...}

0.19.9

Patch Changes

0.19.8

Patch Changes

0.19.7

Patch Changes

0.19.6

Patch Changes

0.19.5

Patch Changes

0.19.4

Patch Changes

0.19.3

Patch Changes

0.19.2

Patch Changes

0.19.1

Patch Changes

0.19.0

Minor Changes

  • Use rollup to build ESM and CommonJS, fix ESM support (#174)

Patch Changes

0.18.3

Patch Changes

0.18.2

Patch Changes

0.18.1

Patch Changes

0.18.0

Minor Changes

  • cf8631a: Update interface to support signWith

This change supports signing with wallet account addresses, private key addresses, or private key IDs. See below for an example:

const turnkeyClient = new TurnkeyClient(
  {
    baseUrl: "https://api.turnkey.com",
  },
  // This uses API key credentials.
  // If you're using passkeys, use `@turnkey/webauthn-stamper` to collect webauthn signatures:
  // new WebauthnStamper({...options...})
  new ApiKeyStamper({
    apiPublicKey: "...",
    apiPrivateKey: "...",
  })
);

// Initialize a Turnkey Signer
const turnkeySigner = new TurnkeySigner({
  client: turnkeyClient,
  organizationId: "...",
  signWith: "...",
});

0.17.4

Patch Changes

0.17.3

Patch Changes

0.17.2

Patch Changes

0.17.1

Patch Changes

  • Update documentation as follows:
  • ebf87a9: This breaking change adds support for stampers (@turnkey/api-key-stamper / @turnkey/webauthn-stamper) to integrate with API keys or passkeys, bringing it to parity with our Viem package. See the following examples for sample usage:

0.17.0

Minor Changes

  • Add support for stampers (@turnkey/api-key-stamper / @turnkey/webauthn-stamper) to integrate with API keys or passkeys.

0.16.8

Patch Changes

0.16.7

Patch Changes

0.16.6

Patch Changes

0.16.5

Patch Changes

0.16.4

Patch Changes

  • 46473ec: This breaking change updates generated code to be shorter and more intuitive to read:

    • generated fetchers do not include the HTTP method in their name. For example useGetGetActivity is now useGetActivity, and usePostSignTransaction is useSignTransaction.
    • input types follow the same convention (no HTTP method in the name): TPostCreatePrivateKeysInput is now TCreatePrivateKeysInput.
    • the "federated" request helpers introduced in 0.18.0 are now named "signed" requests to better reflect what they are. FederatedRequest is now SignedRequest, and generated types follow. For example: federatedPostCreatePrivateKeys is now signCreatePrivateKeys, federatedGetGetActivity is now signGetActivity, and so on.

    The name updates should be automatically suggested if you use VSCode since the new names are simply shorter versions of the old one.

  • Updated dependencies [46473ec]

  • Updated dependencies [38b424f]

0.16.3

Patch Changes

0.16.2

Patch Changes

0.16.1

Patch Changes

0.16.0

Minor Changes

  • No public facing changes

Patch Changes

0.15.0

Minor Changes

  • No public facing changes

Patch Changes

  • Updated dependencies
    • @turnkey/[email protected]
      • Fix .postGetPrivateKey(...)'s underlying path, while adding @deprecated .postGetPrivateKeyBackwardsCompat(...) for backward compatibility

0.14.1

Patch Changes

0.14.0

Minor Changes

  • signTransaction(...) now verifies and drops tx.from if present

Patch Changes

0.13.2

Patch Changes

  • New TurnkeyRequestError error class that contains rich error details
  • Updated dependencies

0.13.1

Patch Changes

  • Error messages now contain Turnkey-specific error details
  • Updated dependencies

0.13.0

Minor Changes

  • No public facing changes

Patch Changes

0.12.0

Minor Changes

  • Error messages now contain Turnkey-specific error code and message

Patch Changes

0.11.0

Minor Changes

  • TurnkeySigner now conforms to ethers' TypedDataSigner interface

Patch Changes

0.10.0

Minor Changes

  • Added EIP-712 support for signing typed data to Ethers.
  • Update Gnosis example to make use of new signing functionality.

Patch Changes

0.9.0

Minor Changes

  • Improved support for React Native runtime (tkhq#37)

Patch Changes

0.8.1

Patch Changes

  • Switched from undici to cross-fetch to improve bundler compatibility
  • Updated dependencies

0.8.0

Minor Changes

  • Added browser runtime support — @turnkey/ethers is now a universal (isomorphic) package
  • Dropped support for Node.js v14; we recommend using Node v18+

Patch Changes

0.7.0

Minor Changes

  • No public facing changes

Patch Changes

0.6.0

Minor Changes

  • #signMessage(...): move encoding and hashing logic to client side, eth_sign style

Patch Changes

0.5.0

Minor Changes

  • Arbitrary message signing

Patch Changes

0.4.0

Minor Changes

  • timestamp -> timestampMs

Patch Changes

0.3.1

Patch Changes

0.3.0

Minor Changes

  • keyId -> privateKeyId everywhere

Patch Changes

0.2.0

Minor Changes

  • Change parameter from keyId to privateKeyId
  • Bump API version to latest Beta

Patch Changes

0.1.3

Patch Changes

0.1.2

Patch Changes

0.1.1

Patch Changes