Skip to content

Commit

Permalink
Merge branch 'main' into rob/doc-eoa
Browse files Browse the repository at this point in the history
  • Loading branch information
RobChangCA authored Jan 28, 2025
2 parents 36b24c0 + 8acd2d8 commit b7a2708
Show file tree
Hide file tree
Showing 35 changed files with 180 additions and 49 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,23 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [4.10.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.9.0...v4.10.0) (2025-01-28)

### Bug Fixes

- add logoUrlDark for auth0 provider logos ([#1298](https://github.com/alchemyplatform/aa-sdk/issues/1298)) ([80a0132](https://github.com/alchemyplatform/aa-sdk/commit/80a0132916cd1c89c8c622f5dfafca0b7a1a9508))
- don't cache anvil state in CI and limit parallelism ([#1290](https://github.com/alchemyplatform/aa-sdk/issues/1290)) ([82ce8ca](https://github.com/alchemyplatform/aa-sdk/commit/82ce8ca483693137937eec1abc99583f23537839))
- otp new styles and flow ([#1250](https://github.com/alchemyplatform/aa-sdk/issues/1250)) ([7295249](https://github.com/alchemyplatform/aa-sdk/commit/72952498d91056fdf4086557ed3963c18a5d5879))
- remove unnecessary getTransaction call ([#1299](https://github.com/alchemyplatform/aa-sdk/issues/1299)) ([359669c](https://github.com/alchemyplatform/aa-sdk/commit/359669ce61946b1b715e2a5e235c5a14394172d9))

### Features

- add oauth support to react native signer ([#1273](https://github.com/alchemyplatform/aa-sdk/issues/1273)) ([61984bd](https://github.com/alchemyplatform/aa-sdk/commit/61984bdd65d5432a0abf8b5ce3549423438abe4e))
- adding delay after OTP code validation ([#1288](https://github.com/alchemyplatform/aa-sdk/issues/1288)) ([afc60ad](https://github.com/alchemyplatform/aa-sdk/commit/afc60ad795c04e30d4728d3d9cc1fb428d722e7a))
- address bar tooltip ([#1188](https://github.com/alchemyplatform/aa-sdk/issues/1188)) ([fe67cfa](https://github.com/alchemyplatform/aa-sdk/commit/fe67cfac61585104323b83b0b8bbac0516f6d543))
- enable discord social auth ([#1281](https://github.com/alchemyplatform/aa-sdk/issues/1281)) ([1772da9](https://github.com/alchemyplatform/aa-sdk/commit/1772da972f2cc78dde3786fb9ebe3ec19f01e78b))
- enable twitter social auth ([#1230](https://github.com/alchemyplatform/aa-sdk/issues/1230)) ([f4e8533](https://github.com/alchemyplatform/aa-sdk/commit/f4e8533ae0d79e22c939b4fa84da6801f6626bec))

# [4.9.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.8.0...v4.9.0) (2025-01-13)

### Features
Expand Down
6 changes: 6 additions & 0 deletions aa-sdk/core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [4.10.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.9.0...v4.10.0) (2025-01-28)

### Bug Fixes

- remove unnecessary getTransaction call ([#1299](https://github.com/alchemyplatform/aa-sdk/issues/1299)) ([359669c](https://github.com/alchemyplatform/aa-sdk/commit/359669ce61946b1b715e2a5e235c5a14394172d9))

# [4.9.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.8.0...v4.9.0) (2025-01-13)

### Features
Expand Down
2 changes: 1 addition & 1 deletion aa-sdk/core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@aa-sdk/core",
"license": "MIT",
"version": "4.9.0",
"version": "4.10.0",
"description": "viem based SDK that enables interactions with ERC-4337 Smart Accounts. ABIs are based off the definitions generated in @account-abstraction/contracts",
"author": "Alchemy",
"type": "module",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { Chain, Client, Hex, Transport } from "viem";
import { getTransaction } from "viem/actions";
import { isBaseSmartAccountClient } from "../../client/isSmartAccountClient.js";
import { IncompatibleClientError } from "../../errors/client.js";
import { FailedToFindTransactionError } from "../../errors/transaction.js";
Expand Down Expand Up @@ -72,9 +71,7 @@ export const waitForUserOperationTransaction: <
});

if (receipt) {
return getTransaction(client, {
hash: receipt.receipt.transactionHash,
}).then((x) => x.hash);
return receipt?.receipt.transactionHash;
}
}

Expand Down
2 changes: 1 addition & 1 deletion aa-sdk/core/src/version.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// This file is autogenerated by inject-version.ts. Any changes will be
// overwritten on commit!
export const VERSION = "4.9.0";
export const VERSION = "4.10.0";
4 changes: 4 additions & 0 deletions aa-sdk/ethers/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [4.10.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.9.0...v4.10.0) (2025-01-28)

**Note:** Version bump only for package @aa-sdk/ethers

# [4.9.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.8.0...v4.9.0) (2025-01-13)

**Note:** Version bump only for package @aa-sdk/ethers
Expand Down
6 changes: 3 additions & 3 deletions aa-sdk/ethers/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@aa-sdk/ethers",
"license": "MIT",
"version": "4.9.0",
"version": "4.10.0",
"description": "Ethers.js wrapper for @aa-sdk/core",
"author": "Alchemy",
"type": "module",
Expand Down Expand Up @@ -42,15 +42,15 @@
"test:run": "vitest run"
},
"devDependencies": {
"@account-kit/smart-contracts": "^4.9.0",
"@account-kit/smart-contracts": "^4.10.0",
"alchemy-sdk": "^3.0.0",
"dotenv": "^16.0.3",
"typescript": "^5.0.4",
"typescript-template": "*",
"vitest": "^2.0.4"
},
"dependencies": {
"@aa-sdk/core": "^4.9.0",
"@aa-sdk/core": "^4.10.0",
"@ethersproject/abi": "^5.7.0",
"@ethersproject/abstract-signer": "^5.7.0",
"@ethersproject/bytes": "^5.7.0",
Expand Down
4 changes: 4 additions & 0 deletions account-kit/core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [4.10.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.9.0...v4.10.0) (2025-01-28)

**Note:** Version bump only for package @account-kit/core

# [4.9.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.8.0...v4.9.0) (2025-01-13)

**Note:** Version bump only for package @account-kit/core
Expand Down
10 changes: 5 additions & 5 deletions account-kit/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@account-kit/core",
"version": "4.9.0",
"version": "4.10.0",
"description": "Core library for account kit that provides state management and framework indepednent abstractions across infra, Alchemy Signer, and Smart Contracts",
"author": "Alchemy",
"license": "MIT",
Expand Down Expand Up @@ -46,10 +46,10 @@
"vitest": "^2.0.4"
},
"dependencies": {
"@account-kit/infra": "^4.9.0",
"@account-kit/logging": "^4.9.0",
"@account-kit/signer": "^4.9.0",
"@account-kit/smart-contracts": "^4.9.0",
"@account-kit/infra": "^4.10.0",
"@account-kit/logging": "^4.10.0",
"@account-kit/signer": "^4.10.0",
"@account-kit/smart-contracts": "^4.10.0",
"js-cookie": "^3.0.5",
"zod": "^3.22.4",
"zustand": "^5.0.0-rc.2"
Expand Down
2 changes: 1 addition & 1 deletion account-kit/core/src/version.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// This file is autogenerated by inject-version.ts. Any changes will be
// overwritten on commit!
export const VERSION = "4.9.0";
export const VERSION = "4.10.0";
4 changes: 4 additions & 0 deletions account-kit/infra/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [4.10.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.9.0...v4.10.0) (2025-01-28)

**Note:** Version bump only for package @account-kit/infra

# [4.9.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.8.0...v4.9.0) (2025-01-13)

### Features
Expand Down
6 changes: 3 additions & 3 deletions account-kit/infra/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@account-kit/infra",
"version": "4.9.0",
"version": "4.10.0",
"description": "adapters for @aa-sdk/core for interacting with alchemy services",
"author": "Alchemy",
"license": "MIT",
Expand Down Expand Up @@ -45,8 +45,8 @@
"vitest": "^2.0.4"
},
"dependencies": {
"@aa-sdk/core": "^4.9.0",
"@account-kit/logging": "^4.9.0",
"@aa-sdk/core": "^4.10.0",
"@account-kit/logging": "^4.10.0",
"eventemitter3": "^5.0.1",
"zod": "^3.22.4"
},
Expand Down
2 changes: 1 addition & 1 deletion account-kit/infra/src/version.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// This file is autogenerated by inject-version.ts. Any changes will be
// overwritten on commit!
export const VERSION = "4.9.0";
export const VERSION = "4.10.0";
4 changes: 4 additions & 0 deletions account-kit/logging/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [4.10.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.9.0...v4.10.0) (2025-01-28)

**Note:** Version bump only for package @account-kit/logging

# [4.9.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.8.0...v4.9.0) (2025-01-13)

**Note:** Version bump only for package @account-kit/logging
Expand Down
2 changes: 1 addition & 1 deletion account-kit/logging/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@account-kit/logging",
"version": "4.9.0",
"version": "4.10.0",
"description": "Core logging library for Account Kit packages",
"author": "Alchemy",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion account-kit/logging/src/version.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// This file is autogenerated by inject-version.ts. Any changes will be
// overwritten on commit!
export const VERSION = "4.9.0";
export const VERSION = "4.10.0";
4 changes: 4 additions & 0 deletions account-kit/plugingen/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [4.10.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.9.0...v4.10.0) (2025-01-28)

**Note:** Version bump only for package @account-kit/plugingen

# [4.9.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.8.0...v4.9.0) (2025-01-13)

**Note:** Version bump only for package @account-kit/plugingen
Expand Down
4 changes: 2 additions & 2 deletions account-kit/plugingen/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@account-kit/plugingen",
"version": "4.9.0",
"version": "4.10.0",
"description": "A CLI tool that enables you to generate TS code for your ERC-6900 plugins",
"author": "Alchemy",
"license": "MIT",
Expand Down Expand Up @@ -61,7 +61,7 @@
},
"homepage": "https://github.com/alchemyplatform/aa-sdk#readme",
"dependencies": {
"@aa-sdk/core": "^4.9.0",
"@aa-sdk/core": "^4.10.0",
"bundle-require": "^4.0.2",
"cac": "^6.7.14",
"change-case": "^5.4.3",
Expand Down
2 changes: 1 addition & 1 deletion account-kit/plugingen/src/version.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// This file is autogenerated by inject-version.ts. Any changes will be
// overwritten on commit!
export const VERSION = "4.9.0";
export const VERSION = "4.10.0";
13 changes: 13 additions & 0 deletions account-kit/react/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [4.10.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.9.0...v4.10.0) (2025-01-28)

### Bug Fixes

- add logoUrlDark for auth0 provider logos ([#1298](https://github.com/alchemyplatform/aa-sdk/issues/1298)) ([80a0132](https://github.com/alchemyplatform/aa-sdk/commit/80a0132916cd1c89c8c622f5dfafca0b7a1a9508))
- otp new styles and flow ([#1250](https://github.com/alchemyplatform/aa-sdk/issues/1250)) ([7295249](https://github.com/alchemyplatform/aa-sdk/commit/72952498d91056fdf4086557ed3963c18a5d5879))

### Features

- adding delay after OTP code validation ([#1288](https://github.com/alchemyplatform/aa-sdk/issues/1288)) ([afc60ad](https://github.com/alchemyplatform/aa-sdk/commit/afc60ad795c04e30d4728d3d9cc1fb428d722e7a))
- enable discord social auth ([#1281](https://github.com/alchemyplatform/aa-sdk/issues/1281)) ([1772da9](https://github.com/alchemyplatform/aa-sdk/commit/1772da972f2cc78dde3786fb9ebe3ec19f01e78b))
- enable twitter social auth ([#1230](https://github.com/alchemyplatform/aa-sdk/issues/1230)) ([f4e8533](https://github.com/alchemyplatform/aa-sdk/commit/f4e8533ae0d79e22c939b4fa84da6801f6626bec))

# [4.9.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.8.0...v4.9.0) (2025-01-13)

**Note:** Version bump only for package @account-kit/react
Expand Down
10 changes: 5 additions & 5 deletions account-kit/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@account-kit/react",
"version": "4.9.0",
"version": "4.10.0",
"description": "React components and hooks for using Account Kit",
"author": "Alchemy",
"license": "MIT",
Expand Down Expand Up @@ -68,10 +68,10 @@
"vitest": "^2.0.4"
},
"dependencies": {
"@account-kit/core": "^4.9.0",
"@account-kit/infra": "^4.9.0",
"@account-kit/logging": "^4.9.0",
"@account-kit/signer": "^4.9.0",
"@account-kit/core": "^4.10.0",
"@account-kit/infra": "^4.10.0",
"@account-kit/logging": "^4.10.0",
"@account-kit/signer": "^4.10.0",
"@tanstack/react-form": "^0.33.0",
"@tanstack/zod-form-adapter": "^0.33.0",
"@wagmi/connectors": "^5.1.15",
Expand Down
4 changes: 2 additions & 2 deletions account-kit/react/src/components/auth/card/loading/otp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ import { AuthStepStatus, useAuthContext } from "../../context.js";
import { useAuthenticate } from "../../../../hooks/useAuthenticate.js";
import { useSignerStatus } from "../../../../hooks/useSignerStatus.js";

const AUTH_DELAY = 3000;
const AUTH_DELAY = 1000;

export const LoadingOtp = () => {
const { isConnected } = useSignerStatus();
const { setAuthStep, authStep } = useAuthContext("otp_verify");
const [otpCode, setOtpCode] = useState<OTPCodeType>(initialOTPValue);
const [errorText, setErrorText] = useState(authStep.error?.message || "");
const [titleText, setTitleText] = useState(ls.loadingOtp.title);
// const { setAuthStep } = useAuthContext();

const resetOTP = (errorText = "") => {
setOtpCode(initialOTPValue);
setErrorText(errorText);
Expand Down
15 changes: 14 additions & 1 deletion account-kit/react/src/components/auth/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,20 @@ export function useAuthContext<
TType extends AuthStep["type"] | undefined = AuthStep["type"] | undefined
>(type?: TType): AuthContextType<TType>;

export function useAuthContext(
/**
* A custom hook that provides the authentication context based on the specified authentication step type. It ensures that the hook is used within an `AuthModalProvider` and throws an error if the context is not available or if the current auth step type does not match the expected type.
*
* @example
* ```tsx twoslash
* import { useAuthContext } from "@account-kit/react";
*
* const { authStep } = useAuthContext();
* ```
*
* @param {AuthStep["type"]} [type] Optional type of authentication step to validate against the current context
* @returns {AuthContextType} The authentication context for the current component
* @throws Will throw an error if the hook is not used within an `AuthModalProvider` or if the current auth step type does not match the expected type
*/ export function useAuthContext(
type?: AuthStep["type"] | undefined
): AuthContextType {
const context = useOptionalAuthContext();
Expand Down
1 change: 1 addition & 0 deletions account-kit/react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,4 @@ export { Dialog } from "./components/dialog/dialog.js";
export { AuthCard } from "./components/auth/card/index.js";
export type * from "./components/auth/types.js";
export { useAuthModal } from "./hooks/useAuthModal.js";
export { useAuthContext } from "./components/auth/context.js";
2 changes: 1 addition & 1 deletion account-kit/react/src/version.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// This file is autogenerated by inject-version.ts. Any changes will be
// overwritten on commit!
export const VERSION = "4.9.0";
export const VERSION = "4.10.0";
6 changes: 6 additions & 0 deletions account-kit/rn-signer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [4.10.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.9.0...v4.10.0) (2025-01-28)

### Features

- add oauth support to react native signer ([#1273](https://github.com/alchemyplatform/aa-sdk/issues/1273)) ([61984bd](https://github.com/alchemyplatform/aa-sdk/commit/61984bdd65d5432a0abf8b5ce3549423438abe4e))

# [4.9.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.8.0...v4.9.0) (2025-01-13)

### Features
Expand Down
6 changes: 3 additions & 3 deletions account-kit/rn-signer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@account-kit/react-native-signer",
"version": "4.9.0",
"version": "4.10.0",
"author": "Alchemy",
"description": "React Native compatible Account Kit signer",
"source": "./src/index.tsx",
Expand Down Expand Up @@ -149,8 +149,8 @@
"version": "0.42.2"
},
"dependencies": {
"@aa-sdk/core": "^4.9.0",
"@account-kit/signer": "^4.9.0",
"@aa-sdk/core": "^4.10.0",
"@account-kit/signer": "^4.10.0",
"viem": "^2.21.40"
}
}
6 changes: 6 additions & 0 deletions account-kit/signer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [4.10.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.9.0...v4.10.0) (2025-01-28)

### Features

- add oauth support to react native signer ([#1273](https://github.com/alchemyplatform/aa-sdk/issues/1273)) ([61984bd](https://github.com/alchemyplatform/aa-sdk/commit/61984bdd65d5432a0abf8b5ce3549423438abe4e))

# [4.9.0](https://github.com/alchemyplatform/aa-sdk/compare/v4.8.0...v4.9.0) (2025-01-13)

**Note:** Version bump only for package @account-kit/signer
Expand Down
6 changes: 3 additions & 3 deletions account-kit/signer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@account-kit/signer",
"version": "4.9.0",
"version": "4.10.0",
"description": "Core interfaces and clients for interfacing with the Alchemy Signer API",
"author": "Alchemy",
"license": "MIT",
Expand Down Expand Up @@ -49,8 +49,8 @@
"vitest": "^2.0.4"
},
"dependencies": {
"@aa-sdk/core": "^4.9.0",
"@account-kit/logging": "^4.9.0",
"@aa-sdk/core": "^4.10.0",
"@account-kit/logging": "^4.10.0",
"@turnkey/http": "^2.6.2",
"@turnkey/iframe-stamper": "^1.0.0",
"@turnkey/viem": "^0.4.8",
Expand Down
2 changes: 1 addition & 1 deletion account-kit/signer/src/version.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// This file is autogenerated by inject-version.ts. Any changes will be
// overwritten on commit!
export const VERSION = "4.9.0";
export const VERSION = "4.10.0";
Loading

0 comments on commit b7a2708

Please sign in to comment.