Skip to content

Commit

Permalink
Merge branch 'main' into iyk/update-rn-signer-example-usage
Browse files Browse the repository at this point in the history
  • Loading branch information
iykazrji authored Jan 6, 2025
2 parents 9a2ce3e + 6546664 commit 9e9e6bf
Show file tree
Hide file tree
Showing 47 changed files with 9,977 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/on-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ jobs:
fetch-depth: "0"
submodules: "recursive"

- name: free disk space
run: |
sudo swapoff -a
sudo rm -f /swapfile
sudo apt clean
docker rmi $(docker image ls -aq)
df -h
- name: Setup
uses: ./.github/actions/setup

Expand Down
2 changes: 1 addition & 1 deletion .vitest/src/instances.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const local060Instance = defineInstance({

export const local070Instance = defineInstance({
chain: localhost,
forkBlockNumber: 6381303,
forkBlockNumber: 7303015,
forkUrl:
process.env.VITEST_SEPOLIA_FORK_URL ??
"https://ethereum-sepolia-rpc.publicnode.com",
Expand Down
2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @moldy530 @rthomare @dancoombs @mokok123 @avasisht23 @dphilipson @linnall
* @moldy530 @rthomare @dancoombs @mokok123 @dphilipson @linnall @adamegyed @howydev @zer0dot @jaypaik @blu-j
50 changes: 50 additions & 0 deletions aa-sdk/core/src/errors/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,53 @@ export class ChainNotFoundError extends BaseError {
super("No chain supplied to the client");
}
}

/**
* Error class denoting that the provided entity id is invalid because it's too large.
*/
export class InvalidEntityIdError extends BaseError {
override name = "InvalidEntityIdError";

/**
* Initializes a new instance of the error message with a default message indicating that the entity id is invalid because it's too large.
*
* @param {number} entityId the invalid entityId used
*/
constructor(entityId: number) {
super(
`Entity ID used is ${entityId}, but must be less than or equal to uint32.max`
);
}
}

/**
* Error class denoting that the nonce key is invalid because its too large.
*/
export class InvalidNonceKeyError extends BaseError {
override name = "InvalidNonceKeyError";

/**
* Initializes a new instance of the error message with a default message indicating that the nonce key is invalid.
*
* @param {bigint} nonceKey the invalid nonceKey used
*/
constructor(nonceKey: bigint) {
super(
`Nonce key is ${nonceKey} but has to be less than or equal to 2**152`
);
}
}

/**
* Error class denoting that the provided entity id is invalid because it's overriding the native entity id.
*/
export class EntityIdOverrideError extends BaseError {
override name = "EntityIdOverrideError";

/**
* Initializes a new instance of the error message with a default message indicating that the nonce key is invalid.
*/
constructor() {
super(`EntityId of 0 is reserved for the owner and cannot be used`);
}
}
3 changes: 3 additions & 0 deletions aa-sdk/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ export {
ChainNotFoundError,
IncompatibleClientError,
InvalidRpcUrlError,
InvalidEntityIdError,
InvalidNonceKeyError,
EntityIdOverrideError,
} from "./errors/client.js";
export {
EntryPointNotFoundError,
Expand Down
48 changes: 48 additions & 0 deletions account-kit/smart-contracts/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,51 @@ export {
getMAInitializationData,
getMSCAUpgradeToData,
} from "./msca/utils.js";

// ma v2 exports
export { accountFactoryAbi } from "./ma-v2/abis/accountFactoryAbi.js";
export { modularAccountAbi } from "./ma-v2/abis/modularAccountAbi.js";
export { semiModularAccountBytecodeAbi } from "./ma-v2/abis/semiModularAccountBytecodeAbi.js";
export { semiModularAccountStorageAbi } from "./ma-v2/abis/semiModularAccountStorageAbi.js";

export { nativeSMASigner } from "./ma-v2/account/nativeSMASigner.js";
export type * from "./ma-v2/account/semiModularAccountV2.js";
export { createSMAV2Account } from "./ma-v2/account/semiModularAccountV2.js";

export type {
ModuleEntity,
ValidationConfig,
HookConfig,
ValidationData,
} from "./ma-v2/actions/common/types.js";
export { HookType } from "./ma-v2/actions/common/types.js";
export {
serializeValidationConfig,
serializeHookConfig,
serializeModuleEntity,
} from "./ma-v2/actions/common/utils.js";
export type * from "./ma-v2/actions/install-validation/installValidation.js";
export { installValidationActions } from "./ma-v2/actions/install-validation/installValidation.js";

export type * from "./ma-v2/client/client.js";
export { createSMAV2AccountClient } from "./ma-v2/client/client.js";

export {
getDefaultAllowlistModuleAddress,
getDefaultNativeTokenLimitModuleAddress,
getDefaultPaymasterGuardModuleAddress,
getDefaultSingleSignerValidationModuleAddress,
getDefaultTimeRangeModuleAddress,
getDefaultWebauthnValidationModuleAddress,
} from "./ma-v2/modules/utils.js";
export { allowlistModuleAbi } from "./ma-v2/modules/allowlist-module/abis/allowlistModuleAbi.js";
export { AllowlistModule } from "./ma-v2/modules/allowlist-module/module.js";
export { nativeTokenLimitModuleAbi } from "./ma-v2/modules/native-token-limit-module/abis/nativeTokenLimitModuleAbi.js";
export { NativeTokenLimitModule } from "./ma-v2/modules/native-token-limit-module/module.js";
export { paymasterGuardModuleAbi } from "./ma-v2/modules/paymaster-guard-module/abis/paymasterGuardModuleAbi.js";
export { PaymasterGuardModule } from "./ma-v2/modules/paymaster-guard-module/module.js";
export { singleSignerValidationModuleAbi } from "./ma-v2/modules/single-signer-validation/abis/singleSignerValidationModuleAbi.js";
export { SingleSignerValidationModule } from "./ma-v2/modules/single-signer-validation/module.js";
export { timeRangeModuleAbi } from "./ma-v2/modules/time-range-module/abis/timeRangeModuleAbi.js";
export { TimeRangeModule } from "./ma-v2/modules/time-range-module/module.js";
export { webauthnValidationModuleAbi } from "./ma-v2/modules/webauthn-validation/abis/webauthnValidationAbi.js";
Loading

0 comments on commit 9e9e6bf

Please sign in to comment.