Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@alchemy/aa-alchemy

Package Overview
Dependencies
Maintainers
2
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alchemy/aa-alchemy - npm Package Compare versions

Comparing version 0.1.0-alpha.24 to 0.1.0-alpha.25

2

dist/cjs/index.d.ts

@@ -5,2 +5,2 @@ export { withAlchemyGasFeeEstimator } from "./middleware/gas-fees.js";

export { AlchemyProvider } from "./provider.js";
export type { AlchemyProviderConfig } from "./provider.js";
export type { AlchemyProviderConfig, ConnectionConfig } from "./provider.js";
import { BaseSmartContractAccount, SmartAccountProvider, type AccountMiddlewareFn, type SmartAccountProviderOpts } from "@alchemy/aa-core";
import type { Address, Chain, HttpTransport } from "viem";
import { type Address, type Chain, type HttpTransport } from "viem";
import type { ClientWithAlchemyMethods } from "./middleware/client.js";
import { type AlchemyGasManagerConfig } from "./middleware/gas-manager.js";
import type { ClientWithAlchemyMethods } from "./middleware/client.js";
type ConnectionConfig = {
export type ConnectionConfig = {
rpcUrl?: never;
apiKey: string;
rpcUrl?: undefined;
jwt?: never;
} | {
rpcUrl: string;
apiKey?: undefined;
apiKey?: never;
jwt?: never;
} | {
rpcUrl: string;
apiKey?: never;
jwt: string;
};

@@ -31,2 +37,1 @@ export type AlchemyProviderConfig = {

}
export {};

@@ -7,4 +7,4 @@ "use strict";

const chains_js_1 = require("./chains.js");
const gas_fees_js_1 = require("./middleware/gas-fees.js");
const gas_manager_js_1 = require("./middleware/gas-manager.js");
const gas_fees_js_1 = require("./middleware/gas-fees.js");
class AlchemyProvider extends aa_core_1.SmartAccountProvider {

@@ -19,3 +19,14 @@ constructor({ chain, entryPointAddress, account, opts, feeOpts, ...connectionConfig }) {

: connectionConfig.rpcUrl;
super(rpcUrl, entryPointAddress, _chain, account, opts);
const client = (0, aa_core_1.createPublicErc4337Client)({
chain: _chain,
rpcUrl,
...(connectionConfig.jwt != null && {
fetchOptions: {
headers: {
Authorization: `Bearer ${connectionConfig.jwt}`,
},
},
}),
});
super(client, entryPointAddress, _chain, account, opts);
Object.defineProperty(this, "alchemyClient", {

@@ -22,0 +33,0 @@ enumerable: true,

@@ -5,2 +5,2 @@ export { withAlchemyGasFeeEstimator } from "./middleware/gas-fees.js";

export { AlchemyProvider } from "./provider.js";
export type { AlchemyProviderConfig } from "./provider.js";
export type { AlchemyProviderConfig, ConnectionConfig } from "./provider.js";
import { BaseSmartContractAccount, SmartAccountProvider, type AccountMiddlewareFn, type SmartAccountProviderOpts } from "@alchemy/aa-core";
import type { Address, Chain, HttpTransport } from "viem";
import { type Address, type Chain, type HttpTransport } from "viem";
import type { ClientWithAlchemyMethods } from "./middleware/client.js";
import { type AlchemyGasManagerConfig } from "./middleware/gas-manager.js";
import type { ClientWithAlchemyMethods } from "./middleware/client.js";
type ConnectionConfig = {
export type ConnectionConfig = {
rpcUrl?: never;
apiKey: string;
rpcUrl?: undefined;
jwt?: never;
} | {
rpcUrl: string;
apiKey?: undefined;
apiKey?: never;
jwt?: never;
} | {
rpcUrl: string;
apiKey?: never;
jwt: string;
};

@@ -31,2 +37,1 @@ export type AlchemyProviderConfig = {

}
export {};

@@ -1,6 +0,7 @@

import { BaseSmartContractAccount, SmartAccountProvider, deepHexlify, resolveProperties, } from "@alchemy/aa-core";
import { BaseSmartContractAccount, SmartAccountProvider, createPublicErc4337Client, deepHexlify, resolveProperties, } from "@alchemy/aa-core";
import {} from "viem";
import { arbitrum, arbitrumGoerli, optimism, optimismGoerli, } from "viem/chains";
import { SupportedChains } from "./chains.js";
import { withAlchemyGasManager, alchemyPaymasterAndDataMiddleware, } from "./middleware/gas-manager.js";
import { withAlchemyGasFeeEstimator } from "./middleware/gas-fees.js";
import { alchemyPaymasterAndDataMiddleware, withAlchemyGasManager, } from "./middleware/gas-manager.js";
export class AlchemyProvider extends SmartAccountProvider {

@@ -15,3 +16,14 @@ constructor({ chain, entryPointAddress, account, opts, feeOpts, ...connectionConfig }) {

: connectionConfig.rpcUrl;
super(rpcUrl, entryPointAddress, _chain, account, opts);
const client = createPublicErc4337Client({
chain: _chain,
rpcUrl,
...(connectionConfig.jwt != null && {
fetchOptions: {
headers: {
Authorization: `Bearer ${connectionConfig.jwt}`,
},
},
}),
});
super(client, entryPointAddress, _chain, account, opts);
Object.defineProperty(this, "alchemyClient", {

@@ -18,0 +30,0 @@ enumerable: true,

@@ -5,3 +5,3 @@ export { withAlchemyGasFeeEstimator } from "./middleware/gas-fees.js";

export { AlchemyProvider } from "./provider.js";
export type { AlchemyProviderConfig } from "./provider.js";
export type { AlchemyProviderConfig, ConnectionConfig } from "./provider.js";
//# sourceMappingURL=index.d.ts.map
import { BaseSmartContractAccount, SmartAccountProvider, type AccountMiddlewareFn, type SmartAccountProviderOpts } from "@alchemy/aa-core";
import type { Address, Chain, HttpTransport } from "viem";
import { type Address, type Chain, type HttpTransport } from "viem";
import type { ClientWithAlchemyMethods } from "./middleware/client.js";
import { type AlchemyGasManagerConfig } from "./middleware/gas-manager.js";
import type { ClientWithAlchemyMethods } from "./middleware/client.js";
type ConnectionConfig = {
export type ConnectionConfig = {
rpcUrl?: never;
apiKey: string;
rpcUrl?: undefined;
jwt?: never;
} | {
rpcUrl: string;
apiKey?: undefined;
apiKey?: never;
jwt?: never;
} | {
rpcUrl: string;
apiKey?: never;
jwt: string;
};

@@ -48,3 +54,2 @@ export type AlchemyProviderConfig = {

}
export {};
//# sourceMappingURL=provider.d.ts.map
{
"name": "@alchemy/aa-alchemy",
"version": "0.1.0-alpha.24",
"version": "0.1.0-alpha.25",
"description": "adapters for @alchemy/aa-core for interacting with alchemy services",

@@ -42,3 +42,3 @@ "author": "Alchemy",

"devDependencies": {
"@alchemy/aa-core": "^0.1.0-alpha.24",
"@alchemy/aa-core": "^0.1.0-alpha.25",
"typescript": "^5.0.4",

@@ -66,3 +66,3 @@ "typescript-template": "*",

"homepage": "https://github.com/alchemyplatform/aa-sdk#readme",
"gitHead": "362a155e01fdea975c10d57e6fa1165da476ffb3"
"gitHead": "de3d8dec80a3b696988ff49ba2b52c500eb4e67f"
}

@@ -10,2 +10,2 @@ export { withAlchemyGasFeeEstimator } from "./middleware/gas-fees.js";

export { AlchemyProvider } from "./provider.js";
export type { AlchemyProviderConfig } from "./provider.js";
export type { AlchemyProviderConfig, ConnectionConfig } from "./provider.js";
import {
BaseSmartContractAccount,
SmartAccountProvider,
createPublicErc4337Client,
deepHexlify,

@@ -9,3 +10,3 @@ resolveProperties,

} from "@alchemy/aa-core";
import type { Address, Chain, HttpTransport } from "viem";
import { type Address, type Chain, type HttpTransport } from "viem";
import {

@@ -18,16 +19,14 @@ arbitrum,

import { SupportedChains } from "./chains.js";
import type { ClientWithAlchemyMethods } from "./middleware/client.js";
import { withAlchemyGasFeeEstimator } from "./middleware/gas-fees.js";
import {
alchemyPaymasterAndDataMiddleware,
withAlchemyGasManager,
type AlchemyGasManagerConfig,
alchemyPaymasterAndDataMiddleware,
} from "./middleware/gas-manager.js";
import { withAlchemyGasFeeEstimator } from "./middleware/gas-fees.js";
import type { ClientWithAlchemyMethods } from "./middleware/client.js";
type ConnectionConfig =
| {
apiKey: string;
rpcUrl?: undefined;
}
| { rpcUrl: string; apiKey?: undefined };
export type ConnectionConfig =
| { rpcUrl?: never; apiKey: string; jwt?: never }
| { rpcUrl: string; apiKey?: never; jwt?: never }
| { rpcUrl: string; apiKey?: never; jwt: string };

@@ -87,4 +86,16 @@ export type AlchemyProviderConfig = {

super(rpcUrl, entryPointAddress, _chain, account, opts);
const client = createPublicErc4337Client({
chain: _chain,
rpcUrl,
...(connectionConfig.jwt != null && {
fetchOptions: {
headers: {
Authorization: `Bearer ${connectionConfig.jwt}`,
},
},
}),
});
super(client, entryPointAddress, _chain, account, opts);
this.alchemyClient = this.rpcClient as ClientWithAlchemyMethods;

@@ -91,0 +102,0 @@ withAlchemyGasFeeEstimator(

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc