Socket
Socket
Sign inDemoInstall

@alchemy/aa-accounts

Package Overview
Dependencies
17
Maintainers
2
Versions
93
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.8.2-alpha.1 to 3.9.0

13

dist/cjs/src/light-account/accounts/base.js

@@ -6,3 +6,2 @@ "use strict";

const viem_1 = require("viem");
const erc1271_js_1 = require("../../utils/erc1271/erc1271.js");
const utils_js_1 = require("../utils.js");

@@ -56,10 +55,2 @@ var SignatureType;

};
const { signMessage: signMessageV2, signTypedData: signTypedDataV2 } = (0, erc1271_js_1.getErc1271SigningFunctions)({
accountAddress,
accountName: type,
accountVersion: "2",
chainId: chain.id,
signer,
wrapperTypeName: "LightAccountMessage",
});
const account = await (0, aa_core_1.toSmartContractAccount)({

@@ -104,3 +95,3 @@ transport,

case "v2.0.0":
const signature = await signMessageV2({ message });
const signature = await signWith1271WrapperV1((0, viem_1.hashMessage)(message));
return (0, viem_1.concat)([SignatureType.EOA, signature]);

@@ -120,3 +111,3 @@ default:

case "v2.0.0":
const signature = await signTypedDataV2(params);
const signature = await signWith1271WrapperV1((0, viem_1.hashTypedData)(params));
return (0, viem_1.concat)([SignatureType.EOA, signature]);

@@ -123,0 +114,0 @@ default:

8

dist/cjs/src/msca/plugins/multi-owner/signer.d.ts

@@ -9,3 +9,3 @@ import type { Address, BundlerClient, SmartAccountSigner } from "@alchemy/aa-core";

}): Promise<`0x${string}`>;
signTypedData: <const typedData extends {
signTypedData: <const typedData extends Record<string, unknown> | {
[x: string]: readonly import("viem").TypedDataParameter[];

@@ -31,2 +31,3 @@ [x: `string[${string}]`]: undefined;

[x: `bytes27[${string}]`]: undefined;
[x: `bytes22[${string}]`]: undefined;
[x: `bytes8[${string}]`]: undefined;

@@ -44,3 +45,2 @@ [x: `bytes10[${string}]`]: undefined;

[x: `bytes21[${string}]`]: undefined;
[x: `bytes22[${string}]`]: undefined;
[x: `bytes23[${string}]`]: undefined;

@@ -135,2 +135,3 @@ [x: `bytes24[${string}]`]: undefined;

bytes27?: undefined;
bytes22?: undefined;
bytes8?: undefined;

@@ -148,3 +149,2 @@ bytes10?: undefined;

bytes21?: undefined;
bytes22?: undefined;
bytes23?: undefined;

@@ -219,3 +219,3 @@ bytes24?: undefined;

uint248?: undefined;
} | Record<string, unknown>, primaryType extends "EIP712Domain" | keyof typedData = keyof typedData>(typedDataDefinition: TypedDataDefinition<typedData, primaryType>) => Promise<Hex>;
}, primaryType extends "EIP712Domain" | keyof typedData = keyof typedData>(typedDataDefinition: TypedDataDefinition<typedData, primaryType>) => Promise<Hex>;
};

@@ -16,3 +16,3 @@ import type { Address, BundlerClient, SmartAccountSigner } from "@alchemy/aa-core";

}): Promise<Hex>;
signTypedData: <const typedData extends {
signTypedData: <const typedData extends Record<string, unknown> | {
[x: string]: readonly import("viem").TypedDataParameter[];

@@ -38,2 +38,3 @@ [x: `string[${string}]`]: undefined;

[x: `bytes27[${string}]`]: undefined;
[x: `bytes22[${string}]`]: undefined;
[x: `bytes8[${string}]`]: undefined;

@@ -51,3 +52,2 @@ [x: `bytes10[${string}]`]: undefined;

[x: `bytes21[${string}]`]: undefined;
[x: `bytes22[${string}]`]: undefined;
[x: `bytes23[${string}]`]: undefined;

@@ -142,2 +142,3 @@ [x: `bytes24[${string}]`]: undefined;

bytes27?: undefined;
bytes22?: undefined;
bytes8?: undefined;

@@ -155,3 +156,2 @@ bytes10?: undefined;

bytes21?: undefined;
bytes22?: undefined;
bytes23?: undefined;

@@ -226,4 +226,4 @@ bytes24?: undefined;

uint248?: undefined;
} | Record<string, unknown>, primaryType extends "EIP712Domain" | keyof typedData = keyof typedData>(typedDataDefinition: TypedDataDefinition<typedData, primaryType>) => Promise<Hex>;
}, primaryType extends "EIP712Domain" | keyof typedData = keyof typedData>(typedDataDefinition: TypedDataDefinition<typedData, primaryType>) => Promise<Hex>;
};
export {};

@@ -10,3 +10,3 @@ import { type GetEntryPointFromAccount, type SmartContractAccount, type UserOperationRequest } from "@alchemy/aa-core";

};
export declare const splitAggregatedSignature: <TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined>({ aggregatedSignature, threshold, account, request, }: SplitAggregateSignatureParams<TAccount, GetEntryPointFromAccount<TAccount, SmartContractAccount<string, keyof import("@alchemy/aa-core").EntryPointRegistryBase<unknown>>>>) => Promise<{
export declare const splitAggregatedSignature: <TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined>(args: SplitAggregateSignatureParams<TAccount, GetEntryPointFromAccount<TAccount, SmartContractAccount<string, keyof import("@alchemy/aa-core").EntryPointRegistryBase<unknown>>>>) => Promise<{
upperLimitPvg: Hex;

@@ -13,0 +13,0 @@ upperLimitMaxFeePerGas: Hex;

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

const errors_js_1 = require("../../../errors.js");
const splitAggregatedSignature = async ({ aggregatedSignature, threshold, account, request, }) => {
const splitAggregatedSignature = async (args) => {
const { aggregatedSignature, threshold, account, request } = args;
if (aggregatedSignature.length < 192 + (65 * threshold - 1)) {

@@ -10,0 +11,0 @@ throw new errors_js_1.InvalidAggregatedSignatureError();

@@ -45,2 +45,3 @@ import { LocalAccountSigner, type SmartAccountSigner } from "@alchemy/aa-core";

[x: `bytes27[${string}]`]: undefined;
[x: `bytes22[${string}]`]: undefined;
[x: `bytes8[${string}]`]: undefined;

@@ -58,3 +59,2 @@ [x: `bytes10[${string}]`]: undefined;

[x: `bytes21[${string}]`]: undefined;
[x: `bytes22[${string}]`]: undefined;
[x: `bytes23[${string}]`]: undefined;

@@ -149,2 +149,3 @@ [x: `bytes24[${string}]`]: undefined;

bytes27?: undefined;
bytes22?: undefined;
bytes8?: undefined;

@@ -162,3 +163,2 @@ bytes10?: undefined;

bytes21?: undefined;
bytes22?: undefined;
bytes23?: undefined;

@@ -165,0 +165,0 @@ bytes24?: undefined;

@@ -5,3 +5,4 @@ "use strict";

const aa_core_1 = require("@alchemy/aa-core");
const transferOwnership = async (client, { newOwner, waitForTxn = false, account: account_ = client.account }) => {
const transferOwnership = async (client, args) => {
const { newOwner, waitForTxn = false, account: account_ = client.account, } = args;
if (!account_) {

@@ -8,0 +9,0 @@ throw new aa_core_1.AccountNotFoundError();

import { FailedToGetStorageSlotError, createBundlerClient, toSmartContractAccount, } from "@alchemy/aa-core";
import { concat, encodeFunctionData, fromHex, hashMessage, hashTypedData, trim, } from "viem";
import { getErc1271SigningFunctions } from "../../utils/erc1271/erc1271.js";
import { AccountVersionRegistry } from "../utils.js";

@@ -52,10 +51,2 @@ var SignatureType;

};
const { signMessage: signMessageV2, signTypedData: signTypedDataV2 } = getErc1271SigningFunctions({
accountAddress,
accountName: type,
accountVersion: "2",
chainId: chain.id,
signer,
wrapperTypeName: "LightAccountMessage",
});
const account = await toSmartContractAccount({

@@ -100,3 +91,3 @@ transport,

case "v2.0.0":
const signature = await signMessageV2({ message });
const signature = await signWith1271WrapperV1(hashMessage(message));
return concat([SignatureType.EOA, signature]);

@@ -116,3 +107,3 @@ default:

case "v2.0.0":
const signature = await signTypedDataV2(params);
const signature = await signWith1271WrapperV1(hashTypedData(params));
return concat([SignatureType.EOA, signature]);

@@ -119,0 +110,0 @@ default:

@@ -9,3 +9,3 @@ import type { Address, BundlerClient, SmartAccountSigner } from "@alchemy/aa-core";

}): Promise<`0x${string}`>;
signTypedData: <const typedData extends {
signTypedData: <const typedData extends Record<string, unknown> | {
[x: string]: readonly import("viem").TypedDataParameter[];

@@ -31,2 +31,3 @@ [x: `string[${string}]`]: undefined;

[x: `bytes27[${string}]`]: undefined;
[x: `bytes22[${string}]`]: undefined;
[x: `bytes8[${string}]`]: undefined;

@@ -44,3 +45,2 @@ [x: `bytes10[${string}]`]: undefined;

[x: `bytes21[${string}]`]: undefined;
[x: `bytes22[${string}]`]: undefined;
[x: `bytes23[${string}]`]: undefined;

@@ -135,2 +135,3 @@ [x: `bytes24[${string}]`]: undefined;

bytes27?: undefined;
bytes22?: undefined;
bytes8?: undefined;

@@ -148,3 +149,2 @@ bytes10?: undefined;

bytes21?: undefined;
bytes22?: undefined;
bytes23?: undefined;

@@ -219,3 +219,3 @@ bytes24?: undefined;

uint248?: undefined;
} | Record<string, unknown>, primaryType extends "EIP712Domain" | keyof typedData = keyof typedData>(typedDataDefinition: TypedDataDefinition<typedData, primaryType>) => Promise<Hex>;
}, primaryType extends "EIP712Domain" | keyof typedData = keyof typedData>(typedDataDefinition: TypedDataDefinition<typedData, primaryType>) => Promise<Hex>;
};

@@ -16,3 +16,3 @@ import type { Address, BundlerClient, SmartAccountSigner } from "@alchemy/aa-core";

}): Promise<Hex>;
signTypedData: <const typedData extends {
signTypedData: <const typedData extends Record<string, unknown> | {
[x: string]: readonly import("viem").TypedDataParameter[];

@@ -38,2 +38,3 @@ [x: `string[${string}]`]: undefined;

[x: `bytes27[${string}]`]: undefined;
[x: `bytes22[${string}]`]: undefined;
[x: `bytes8[${string}]`]: undefined;

@@ -51,3 +52,2 @@ [x: `bytes10[${string}]`]: undefined;

[x: `bytes21[${string}]`]: undefined;
[x: `bytes22[${string}]`]: undefined;
[x: `bytes23[${string}]`]: undefined;

@@ -142,2 +142,3 @@ [x: `bytes24[${string}]`]: undefined;

bytes27?: undefined;
bytes22?: undefined;
bytes8?: undefined;

@@ -155,3 +156,2 @@ bytes10?: undefined;

bytes21?: undefined;
bytes22?: undefined;
bytes23?: undefined;

@@ -226,4 +226,4 @@ bytes24?: undefined;

uint248?: undefined;
} | Record<string, unknown>, primaryType extends "EIP712Domain" | keyof typedData = keyof typedData>(typedDataDefinition: TypedDataDefinition<typedData, primaryType>) => Promise<Hex>;
}, primaryType extends "EIP712Domain" | keyof typedData = keyof typedData>(typedDataDefinition: TypedDataDefinition<typedData, primaryType>) => Promise<Hex>;
};
export {};

@@ -10,3 +10,3 @@ import { type GetEntryPointFromAccount, type SmartContractAccount, type UserOperationRequest } from "@alchemy/aa-core";

};
export declare const splitAggregatedSignature: <TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined>({ aggregatedSignature, threshold, account, request, }: SplitAggregateSignatureParams<TAccount, GetEntryPointFromAccount<TAccount, SmartContractAccount<string, keyof import("@alchemy/aa-core").EntryPointRegistryBase<unknown>>>>) => Promise<{
export declare const splitAggregatedSignature: <TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined>(args: SplitAggregateSignatureParams<TAccount, GetEntryPointFromAccount<TAccount, SmartContractAccount<string, keyof import("@alchemy/aa-core").EntryPointRegistryBase<unknown>>>>) => Promise<{
upperLimitPvg: Hex;

@@ -13,0 +13,0 @@ upperLimitMaxFeePerGas: Hex;

import { takeBytes, } from "@alchemy/aa-core";
import { fromHex, hashMessage, recoverAddress } from "viem";
import { InvalidAggregatedSignatureError } from "../../../errors.js";
export const splitAggregatedSignature = async ({ aggregatedSignature, threshold, account, request, }) => {
export const splitAggregatedSignature = async (args) => {
const { aggregatedSignature, threshold, account, request } = args;
if (aggregatedSignature.length < 192 + (65 * threshold - 1)) {

@@ -6,0 +7,0 @@ throw new InvalidAggregatedSignatureError();

@@ -45,2 +45,3 @@ import { LocalAccountSigner, type SmartAccountSigner } from "@alchemy/aa-core";

[x: `bytes27[${string}]`]: undefined;
[x: `bytes22[${string}]`]: undefined;
[x: `bytes8[${string}]`]: undefined;

@@ -58,3 +59,2 @@ [x: `bytes10[${string}]`]: undefined;

[x: `bytes21[${string}]`]: undefined;
[x: `bytes22[${string}]`]: undefined;
[x: `bytes23[${string}]`]: undefined;

@@ -149,2 +149,3 @@ [x: `bytes24[${string}]`]: undefined;

bytes27?: undefined;
bytes22?: undefined;
bytes8?: undefined;

@@ -162,3 +163,2 @@ bytes10?: undefined;

bytes21?: undefined;
bytes22?: undefined;
bytes23?: undefined;

@@ -165,0 +165,0 @@ bytes24?: undefined;

import { AccountNotFoundError, IncompatibleClientError, isSmartAccountClient, } from "@alchemy/aa-core";
export const transferOwnership = async (client, { newOwner, waitForTxn = false, account: account_ = client.account }) => {
export const transferOwnership = async (client, args) => {
const { newOwner, waitForTxn = false, account: account_ = client.account, } = args;
if (!account_) {

@@ -4,0 +5,0 @@ throw new AccountNotFoundError();

@@ -23,11 +23,15 @@ import { type EntryPointVersion, type GetAccountParameter, type OneOf, type SmartAccountSigner } from "@alchemy/aa-core";

"v1.1.0": AccountVersionDef<"LightAccount", "v1.1.0", "0.6.0">;
/** LightAccount v2 Changelog.
/**
* LightAccount v2 Changelog.
* It is recommended to use v2.0.0
* https://alchemotion.notion.site/External-Light-Account-v2-Changelog-725b306ab1e04eb0a3e596521dd8f0bd */
* https://alchemotion.notion.site/External-Light-Account-v2-Changelog-725b306ab1e04eb0a3e596521dd8f0bd
*/
"v2.0.0": AccountVersionDef<"LightAccount", "v2.0.0", "0.7.0">;
};
MultiOwnerLightAccount: {
/** MultiOwnerLightAccount v2 Changelog
/**
* MultiOwnerLightAccount v2 Changelog
* It is recommended to use v2.0.0
* https://alchemotion.notion.site/External-Light-Account-v2-Changelog-725b306ab1e04eb0a3e596521dd8f0bd */
* https://alchemotion.notion.site/External-Light-Account-v2-Changelog-725b306ab1e04eb0a3e596521dd8f0bd
*/
"v2.0.0": AccountVersionDef<"MultiOwnerLightAccount", "v2.0.0", "0.7.0">;

@@ -34,0 +38,0 @@ };

@@ -9,3 +9,3 @@ import type { Address, BundlerClient, SmartAccountSigner } from "@alchemy/aa-core";

}): Promise<`0x${string}`>;
signTypedData: <const typedData extends {
signTypedData: <const typedData extends Record<string, unknown> | {
[x: string]: readonly import("viem").TypedDataParameter[];

@@ -31,2 +31,3 @@ [x: `string[${string}]`]: undefined;

[x: `bytes27[${string}]`]: undefined;
[x: `bytes22[${string}]`]: undefined;
[x: `bytes8[${string}]`]: undefined;

@@ -44,3 +45,2 @@ [x: `bytes10[${string}]`]: undefined;

[x: `bytes21[${string}]`]: undefined;
[x: `bytes22[${string}]`]: undefined;
[x: `bytes23[${string}]`]: undefined;

@@ -135,2 +135,3 @@ [x: `bytes24[${string}]`]: undefined;

bytes27?: undefined;
bytes22?: undefined;
bytes8?: undefined;

@@ -148,3 +149,2 @@ bytes10?: undefined;

bytes21?: undefined;
bytes22?: undefined;
bytes23?: undefined;

@@ -219,4 +219,4 @@ bytes24?: undefined;

uint248?: undefined;
} | Record<string, unknown>, primaryType extends "EIP712Domain" | keyof typedData = keyof typedData>(typedDataDefinition: TypedDataDefinition<typedData, primaryType>) => Promise<Hex>;
}, primaryType extends "EIP712Domain" | keyof typedData = keyof typedData>(typedDataDefinition: TypedDataDefinition<typedData, primaryType>) => Promise<Hex>;
};
//# sourceMappingURL=signer.d.ts.map

@@ -16,3 +16,3 @@ import type { Address, BundlerClient, SmartAccountSigner } from "@alchemy/aa-core";

}): Promise<Hex>;
signTypedData: <const typedData extends {
signTypedData: <const typedData extends Record<string, unknown> | {
[x: string]: readonly import("viem").TypedDataParameter[];

@@ -38,2 +38,3 @@ [x: `string[${string}]`]: undefined;

[x: `bytes27[${string}]`]: undefined;
[x: `bytes22[${string}]`]: undefined;
[x: `bytes8[${string}]`]: undefined;

@@ -51,3 +52,2 @@ [x: `bytes10[${string}]`]: undefined;

[x: `bytes21[${string}]`]: undefined;
[x: `bytes22[${string}]`]: undefined;
[x: `bytes23[${string}]`]: undefined;

@@ -142,2 +142,3 @@ [x: `bytes24[${string}]`]: undefined;

bytes27?: undefined;
bytes22?: undefined;
bytes8?: undefined;

@@ -155,3 +156,2 @@ bytes10?: undefined;

bytes21?: undefined;
bytes22?: undefined;
bytes23?: undefined;

@@ -226,5 +226,5 @@ bytes24?: undefined;

uint248?: undefined;
} | Record<string, unknown>, primaryType extends "EIP712Domain" | keyof typedData = keyof typedData>(typedDataDefinition: TypedDataDefinition<typedData, primaryType>) => Promise<Hex>;
}, primaryType extends "EIP712Domain" | keyof typedData = keyof typedData>(typedDataDefinition: TypedDataDefinition<typedData, primaryType>) => Promise<Hex>;
};
export {};
//# sourceMappingURL=signer.d.ts.map

@@ -13,6 +13,10 @@ import { type GetEntryPointFromAccount, type SmartContractAccount, type UserOperationRequest } from "@alchemy/aa-core";

*
* @param aggregatedSignature - aggregated signature containing PVG || maxFeePerGas || maxPriorityFeePerGas || N-1 Signatures || [0, N-1] Contract Data
* @param threshold - the account's required threshold of signatures
* @param args - the arguments for the split
* @param args.aggregateSignature - the aggregated signature to split
* @param args.threshold - the threshold for the signature
* @param args.account - the account which the signature is valid for
* @param args.request - the user operation request that the signature is for
* @returns the signature split into its upper limits and current signatures
*/
export declare const splitAggregatedSignature: <TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined>({ aggregatedSignature, threshold, account, request, }: SplitAggregateSignatureParams<TAccount, GetEntryPointFromAccount<TAccount, SmartContractAccount<string, keyof import("@alchemy/aa-core").EntryPointRegistryBase<unknown>>>>) => Promise<{
export declare const splitAggregatedSignature: <TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined>(args: SplitAggregateSignatureParams<TAccount, GetEntryPointFromAccount<TAccount, SmartContractAccount<string, keyof import("@alchemy/aa-core").EntryPointRegistryBase<unknown>>>>) => Promise<{
upperLimitPvg: Hex;

@@ -19,0 +23,0 @@ upperLimitMaxFeePerGas: Hex;

@@ -50,2 +50,3 @@ import { LocalAccountSigner, type SmartAccountSigner } from "@alchemy/aa-core";

[x: `bytes27[${string}]`]: undefined;
[x: `bytes22[${string}]`]: undefined;
[x: `bytes8[${string}]`]: undefined;

@@ -63,3 +64,2 @@ [x: `bytes10[${string}]`]: undefined;

[x: `bytes21[${string}]`]: undefined;
[x: `bytes22[${string}]`]: undefined;
[x: `bytes23[${string}]`]: undefined;

@@ -154,2 +154,3 @@ [x: `bytes24[${string}]`]: undefined;

bytes27?: undefined;
bytes22?: undefined;
bytes8?: undefined;

@@ -167,3 +168,2 @@ bytes10?: undefined;

bytes21?: undefined;
bytes22?: undefined;
bytes23?: undefined;

@@ -170,0 +170,0 @@ bytes24?: undefined;

@@ -9,5 +9,4 @@ import { type GetAccountParameter, type SmartAccountSigner } from "@alchemy/aa-core";

* @param client - the client to use to send the transaction
* @param newOwner - the new owner of the account
* @param waitForTxn - whether or not to wait for the transaction to be mined
* @returns {Hash} the userOperation hash, or transaction hash if `waitForTxn` is true
* @param args - the arguments for the transfer
* @returns the userOperation hash, or transaction hash if `waitForTxn` is true
*/

@@ -14,0 +13,0 @@ export declare const transferOwnership: <TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TSigner extends SmartAccountSigner = SmartAccountSigner, TAccount extends NaniAccount | undefined = NaniAccount | undefined>(client: Client<TTransport, TChain, TAccount>, args: {

{
"name": "@alchemy/aa-accounts",
"version": "3.8.2-alpha.1",
"version": "3.9.0",
"description": "A collection of ERC-4337 compliant smart contract account interfaces",

@@ -75,5 +75,5 @@ "author": "Alchemy",

"homepage": "https://github.com/alchemyplatform/aa-sdk#readme",
"gitHead": "2ae8c95d453b9f3c68d647a05b6094b19babbb28",
"gitHead": "823f89dc5e3c1f133196be6398255a77f87dcc87",
"dependencies": {
"@alchemy/aa-core": "^3.8.2-alpha.1",
"@alchemy/aa-core": "^3.9.0",
"viem": "2.8.6"

@@ -80,0 +80,0 @@ },

@@ -25,3 +25,2 @@ import {

} from "viem";
import { getErc1271SigningFunctions } from "../../utils/erc1271/erc1271.js";
import type {

@@ -193,12 +192,2 @@ AccountVersionDef,

const { signMessage: signMessageV2, signTypedData: signTypedDataV2 } =
getErc1271SigningFunctions({
accountAddress,
accountName: type,
accountVersion: "2",
chainId: chain.id,
signer,
wrapperTypeName: "LightAccountMessage",
});
const account = await toSmartContractAccount({

@@ -247,3 +236,3 @@ transport,

case "v2.0.0":
const signature = await signMessageV2({ message });
const signature = await signWith1271WrapperV1(hashMessage(message));
// TODO: handle case where signer is an SCA.

@@ -268,3 +257,3 @@ return concat([SignatureType.EOA, signature]);

case "v2.0.0":
const signature = await signTypedDataV2(params);
const signature = await signWith1271WrapperV1(hashTypedData(params));
// TODO: handle case where signer is an SCA.

@@ -271,0 +260,0 @@ return concat([SignatureType.EOA, signature]);

@@ -45,11 +45,15 @@ import {

"v1.1.0": AccountVersionDef<"LightAccount", "v1.1.0", "0.6.0">;
/** LightAccount v2 Changelog.
/**
* LightAccount v2 Changelog.
* It is recommended to use v2.0.0
* https://alchemotion.notion.site/External-Light-Account-v2-Changelog-725b306ab1e04eb0a3e596521dd8f0bd */
* https://alchemotion.notion.site/External-Light-Account-v2-Changelog-725b306ab1e04eb0a3e596521dd8f0bd
*/
"v2.0.0": AccountVersionDef<"LightAccount", "v2.0.0", "0.7.0">;
};
MultiOwnerLightAccount: {
/** MultiOwnerLightAccount v2 Changelog
/**
* MultiOwnerLightAccount v2 Changelog
* It is recommended to use v2.0.0
* https://alchemotion.notion.site/External-Light-Account-v2-Changelog-725b306ab1e04eb0a3e596521dd8f0bd */
* https://alchemotion.notion.site/External-Light-Account-v2-Changelog-725b306ab1e04eb0a3e596521dd8f0bd
*/
"v2.0.0": AccountVersionDef<"MultiOwnerLightAccount", "v2.0.0", "0.7.0">;

@@ -56,0 +60,0 @@ };

@@ -25,4 +25,8 @@ import {

*
* @param aggregatedSignature - aggregated signature containing PVG || maxFeePerGas || maxPriorityFeePerGas || N-1 Signatures || [0, N-1] Contract Data
* @param threshold - the account's required threshold of signatures
* @param args - the arguments for the split
* @param args.aggregateSignature - the aggregated signature to split
* @param args.threshold - the threshold for the signature
* @param args.account - the account which the signature is valid for
* @param args.request - the user operation request that the signature is for
* @returns the signature split into its upper limits and current signatures
*/

@@ -33,8 +37,5 @@ export const splitAggregatedSignature = async <

| undefined
>({
aggregatedSignature,
threshold,
account,
request,
}: SplitAggregateSignatureParams<TAccount>): Promise<{
>(
args: SplitAggregateSignatureParams<TAccount>
): Promise<{
upperLimitPvg: Hex;

@@ -45,2 +46,3 @@ upperLimitMaxFeePerGas: Hex;

}> => {
const { aggregatedSignature, threshold, account, request } = args;
if (aggregatedSignature.length < 192 + (65 * threshold - 1)) {

@@ -47,0 +49,0 @@ throw new InvalidAggregatedSignatureError();

@@ -77,3 +77,3 @@ import {

*
* @returns {Address} the on-chain owner of the account
* @returns the on-chain owner of the account
*/

@@ -169,3 +169,3 @@ async getOwnerAddress(): Promise<Address> {

* @param data - the data to be passed to the function call
* @returns {Hex} the encoded function call
* @returns the encoded function call
*/

@@ -184,3 +184,3 @@ static encodeExecuteDelegate(delegate: Address, data: Hex): Hex {

* @param newOwner - the new owner of the account
* @returns {Hex} the encoded function call
* @returns the encoded function call
*/

@@ -187,0 +187,0 @@ static encodeTransferOwnership(newOwner: Address): Hex {

@@ -16,5 +16,4 @@ import {

* @param client - the client to use to send the transaction
* @param newOwner - the new owner of the account
* @param waitForTxn - whether or not to wait for the transaction to be mined
* @returns {Hash} the userOperation hash, or transaction hash if `waitForTxn` is true
* @param args - the arguments for the transfer
* @returns the userOperation hash, or transaction hash if `waitForTxn` is true
*/

@@ -32,6 +31,8 @@ export const transferOwnership: <

} & GetAccountParameter<TAccount>
) => Promise<Hex> = async (
client,
{ newOwner, waitForTxn = false, account: account_ = client.account }
): Promise<Hex> => {
) => Promise<Hex> = async (client, args): Promise<Hex> => {
const {
newOwner,
waitForTxn = false,
account: account_ = client.account,
} = args;
if (!account_) {

@@ -38,0 +39,0 @@ throw new AccountNotFoundError();

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

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc