@account-kit/core
Advanced tools
Comparing version 4.0.0-beta.3 to 4.0.0-beta.4
@@ -29,3 +29,3 @@ import { ConnectionConfigSchema } from "@aa-sdk/core"; | ||
export const createConfig = (params) => { | ||
const { chain, iframeConfig, rootOrgId, rpId, sessionConfig, signerConnection, ssr, storage, connectors, ...connectionConfig } = params; | ||
const { chain, iframeConfig, rootOrgId, rpId, sessionConfig, signerConnection, ssr, storage, connectors, enablePopupOauth, ...connectionConfig } = params; | ||
const connections = []; | ||
@@ -65,2 +65,3 @@ if (connectionConfig.connections != null) { | ||
rpId, | ||
enablePopupOauth, | ||
}, | ||
@@ -67,0 +68,0 @@ sessionConfig, |
@@ -137,2 +137,12 @@ import { createAlchemyPublicRpcClient } from "@account-kit/infra"; | ||
} | ||
else if (search.has("alchemy-bundle")) { | ||
signer.authenticate({ | ||
type: "oauthReturn", | ||
bundle: search.get("alchemy-bundle"), | ||
orgId: search.get("alchemy-org-id"), | ||
}); | ||
} | ||
if (client.enablePopupOauth) { | ||
signer.preparePopupOauth(); | ||
} | ||
return signer; | ||
@@ -139,0 +149,0 @@ }; |
@@ -72,4 +72,12 @@ import type { ConnectionConfig } from "@aa-sdk/core"; | ||
connectors?: CreateConnectorFn[]; | ||
/** | ||
* If set, calls `preparePopupOauth` immediately upon initializing the signer. | ||
* If you intend to use popup-based OAuth login, you must either set this | ||
* option to true or manually ensure that you call | ||
* `signer.preparePopupOauth()` at some point before the user interaction that | ||
* triggers the OAuth authentication flow. | ||
*/ | ||
enablePopupOauth?: boolean; | ||
} & Omit<PartialBy<Exclude<AlchemySignerParams["client"], AlchemySignerWebClient>, "iframeConfig">, "connection">; | ||
export type AlchemyClientState = StoredState; | ||
export {}; |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "4.0.0-beta.3"; | ||
export declare const VERSION = "4.0.0-beta.4"; |
// This file is autogenerated by inject-version.ts. Any changes will be | ||
// overwritten on commit! | ||
export const VERSION = "4.0.0-beta.3"; | ||
export const VERSION = "4.0.0-beta.4"; | ||
//# sourceMappingURL=version.js.map |
@@ -72,2 +72,10 @@ import type { ConnectionConfig } from "@aa-sdk/core"; | ||
connectors?: CreateConnectorFn[]; | ||
/** | ||
* If set, calls `preparePopupOauth` immediately upon initializing the signer. | ||
* If you intend to use popup-based OAuth login, you must either set this | ||
* option to true or manually ensure that you call | ||
* `signer.preparePopupOauth()` at some point before the user interaction that | ||
* triggers the OAuth authentication flow. | ||
*/ | ||
enablePopupOauth?: boolean; | ||
} & Omit<PartialBy<Exclude<AlchemySignerParams["client"], AlchemySignerWebClient>, "iframeConfig">, "connection">; | ||
@@ -74,0 +82,0 @@ export type AlchemyClientState = StoredState; |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "4.0.0-beta.3"; | ||
export declare const VERSION = "4.0.0-beta.4"; | ||
//# sourceMappingURL=version.d.ts.map |
{ | ||
"name": "@account-kit/core", | ||
"version": "4.0.0-beta.3", | ||
"version": "4.0.0-beta.4", | ||
"description": "Core library for account kit that provides state management and framework indepednent abstractions across infra, Alchemy Signer, and Smart Contracts", | ||
@@ -49,5 +49,5 @@ "author": "Alchemy", | ||
"dependencies": { | ||
"@account-kit/infra": "^4.0.0-beta.3", | ||
"@account-kit/signer": "^4.0.0-beta.3", | ||
"@account-kit/smart-contracts": "^4.0.0-beta.3", | ||
"@account-kit/infra": "^4.0.0-beta.4", | ||
"@account-kit/signer": "^4.0.0-beta.4", | ||
"@account-kit/smart-contracts": "^4.0.0-beta.4", | ||
"js-cookie": "^3.0.5", | ||
@@ -73,3 +73,3 @@ "zod": "^3.22.4", | ||
"homepage": "https://github.com/alchemyplatform/aa-sdk#readme", | ||
"gitHead": "533a73e15838e1c66bdee2fdc278b96c90f00ba7", | ||
"gitHead": "90a0eaaa921d05a15fae72a4786d458bcd702217", | ||
"optionalDependencies": { | ||
@@ -76,0 +76,0 @@ "alchemy-sdk": "^3.0.0" |
@@ -48,2 +48,3 @@ import { ConnectionConfigSchema } from "@aa-sdk/core"; | ||
connectors, | ||
enablePopupOauth, | ||
...connectionConfig | ||
@@ -85,2 +86,3 @@ } = params; | ||
rpId, | ||
enablePopupOauth, | ||
}, | ||
@@ -87,0 +89,0 @@ sessionConfig, |
@@ -193,4 +193,14 @@ import type { NoUndefined } from "@aa-sdk/core"; | ||
signer.authenticate({ type: "email", bundle: search.get("bundle")! }); | ||
} else if (search.has("alchemy-bundle")) { | ||
signer.authenticate({ | ||
type: "oauthReturn", | ||
bundle: search.get("alchemy-bundle")!, | ||
orgId: search.get("alchemy-org-id")!, | ||
}); | ||
} | ||
if (client.enablePopupOauth) { | ||
signer.preparePopupOauth(); | ||
} | ||
return signer; | ||
@@ -197,0 +207,0 @@ }; |
@@ -106,2 +106,11 @@ import type { ConnectionConfig } from "@aa-sdk/core"; | ||
connectors?: CreateConnectorFn[]; | ||
/** | ||
* If set, calls `preparePopupOauth` immediately upon initializing the signer. | ||
* If you intend to use popup-based OAuth login, you must either set this | ||
* option to true or manually ensure that you call | ||
* `signer.preparePopupOauth()` at some point before the user interaction that | ||
* triggers the OAuth authentication flow. | ||
*/ | ||
enablePopupOauth?: boolean; | ||
} & Omit< | ||
@@ -108,0 +117,0 @@ PartialBy< |
// This file is autogenerated by inject-version.ts. Any changes will be | ||
// overwritten on commit! | ||
export const VERSION = "4.0.0-beta.3"; | ||
export const VERSION = "4.0.0-beta.4"; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
332439
4953