Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit 331aa9c

Browse files
authored
7202 account abstraction (#7311)
* AA package structure * pkg config * aa types * aa class * utils * exports * readme chnglog and configs update * allow local provider if different * export * tests * updated tests * package config * docs update * doc update * doc update
1 parent ed85cce commit 331aa9c

31 files changed

+2628
-22
lines changed

docs/docusaurus.config.js

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ const packages = [
3737
'web3-providers-http',
3838
'web3-providers-ws',
3939
'web3-providers-ipc',
40+
'web3-account-abstraction',
4041
];
4142

4243
/** @type {import('@docusaurus/types').Config} */
@@ -109,7 +110,7 @@ const config = {
109110
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
110111
({
111112
navbar: {
112-
title: 'Web3.js Docs',
113+
title: 'Web3.js Docs',
113114
logo: {
114115
src: 'img/web3js.svg',
115116
},
@@ -184,19 +185,43 @@ const config = {
184185
*/
185186
playgroundPosition: 'bottom',
186187
},
187-
image:"https://pbs.twimg.com/profile_images/1746099108937363456/duG_Pqem_400x400.jpg",
188+
image: 'https://pbs.twimg.com/profile_images/1746099108937363456/duG_Pqem_400x400.jpg',
188189
metadata: [
189-
{ name: 'keywords', content: 'web3.js, web3, web3js, ethereum, ethereum json rpc, blockchain development, smart contracts, dapps, dApp development' },
190-
{ name: 'description', content: 'Collection of comprehensive TypeScript libraries for Interaction with the Ethereum JSON RPC API and utility functions.' },
190+
{
191+
name: 'keywords',
192+
content:
193+
'web3.js, web3, web3js, ethereum, ethereum json rpc, blockchain development, smart contracts, dapps, dApp development',
194+
},
195+
{
196+
name: 'description',
197+
content:
198+
'Collection of comprehensive TypeScript libraries for Interaction with the Ethereum JSON RPC API and utility functions.',
199+
},
191200
{ name: 'og:title', content: 'Web3.js Documentation' },
192-
{ name: 'og:description', content: 'Collection of comprehensive TypeScript libraries for Interaction with the Ethereum JSON RPC API and utility functions.' },
201+
{
202+
name: 'og:description',
203+
content:
204+
'Collection of comprehensive TypeScript libraries for Interaction with the Ethereum JSON RPC API and utility functions.',
205+
},
193206
{ name: 'og:type', content: 'website' },
194207
{ name: 'og:url', content: 'https://docs.web3js.org' },
195-
{ name: 'og:image', content: 'https://pbs.twimg.com/profile_images/1746099108937363456/duG_Pqem_400x400.jpg' },
208+
{
209+
name: 'og:image',
210+
content:
211+
'https://pbs.twimg.com/profile_images/1746099108937363456/duG_Pqem_400x400.jpg',
212+
},
196213
{ name: 'twitter:card', content: 'summary_large_image' },
197214
{ name: 'twitter:title', content: 'Web3.js Documentation' },
198-
{ name: 'twitter:description', content: 'Official documentation for web3.js, the Type/JavaScript library for interacting with the Ethereum blockchain.' },
199-
{ name: 'twitter:image', content: 'https://raw.githubusercontent.com/web3/web3.js/4.x/assets/logo/web3js.jpg' },
215+
{
216+
name: 'twitter:description',
217+
content:
218+
'Official documentation for web3.js, the Type/JavaScript library for interacting with the Ethereum blockchain.',
219+
},
220+
{
221+
name: 'twitter:image',
222+
content:
223+
'https://raw.githubusercontent.com/web3/web3.js/4.x/assets/logo/web3js.jpg',
224+
},
200225
],
201226
}),
202227
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../templates/.eslintignore.tmpl
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
extends: '../../.eslintrc.js',
3+
parserOptions: {
4+
project: './tsconfig.esm.json',
5+
tsconfigRootDir: __dirname,
6+
},
7+
};

packages/web3-account-abstraction/.gitignore

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../templates/.npmignore.tmpl
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../templates/.npmrc.tmpl
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../templates/.prettierignore.tmpl
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../templates/.prettierrc.json.tmpl
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
<!-- EXAMPLE
9+
10+
## [1.0.0]
11+
12+
### Added
13+
14+
- I've added feature XY (#1000)
15+
16+
### Changed
17+
18+
- I've cleaned up XY (#1000)
19+
20+
### Deprecated
21+
22+
- I've deprecated XY (#1000)
23+
24+
### Removed
25+
26+
- I've removed XY (#1000)
27+
28+
### Fixed
29+
30+
- I've fixed XY (#1000)
31+
32+
### Security
33+
34+
- I've improved the security in XY (#1000)
35+
36+
-->
37+
38+
## [Unreleased]
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<p align="center">
2+
<img src="assets/logo/web3js.jpg" width="500" alt="web3.js" />
3+
</p>
4+
5+
# web3.js - Account Abstraction
6+
7+
![ES Version](https://img.shields.io/badge/ES-2020-yellow)
8+
![Node Version](https://img.shields.io/badge/node-14.x-green)
9+
[![NPM Package][npm-image]][npm-url]
10+
[![Downloads][downloads-image]][npm-url]
11+
12+
This is a sub-package of [web3.js][repo].
13+
14+
`web3-account-abstraction` contains the ideal setup for a Web3.js package.
15+
16+
## Installation
17+
18+
You can install the package either using [NPM](https://www.npmjs.com/package/web3-account-abstraction) or using [Yarn](https://yarnpkg.com/package/web3-account-abstraction)
19+
20+
### Using NPM
21+
22+
```bash
23+
npm install web3-account-abstraction
24+
```
25+
26+
### Using Yarn
27+
28+
```bash
29+
yarn add web3-account-abstraction
30+
```
31+
32+
## Getting Started
33+
34+
- :writing_hand: If you have questions [submit an issue](https://github.com/ChainSafe/web3.js/issues/new) or join us on [Discord](https://discord.gg/yjyvFRP)
35+
![Discord](https://img.shields.io/discord/593655374469660673.svg?label=Discord&logo=discord)
36+
37+
## Prerequisites
38+
39+
- :gear: [NodeJS](https://nodejs.org/) (LTS/Fermium)
40+
- :toolbox: [Yarn](https://yarnpkg.com/)/[Lerna](https://lerna.js.org/)
41+
42+
## Package.json Scripts
43+
44+
| Script | Description |
45+
| ---------------- | -------------------------------------------------- |
46+
| clean | Uses `rimraf` to remove `dist/` |
47+
| build | Uses `tsc` to build package and dependent packages |
48+
| lint | Uses `eslint` to lint package |
49+
| lint:fix | Uses `eslint` to check and fix any warnings |
50+
| format | Uses `prettier` to format the code |
51+
| test | Uses `jest` to run unit tests |
52+
| test:integration | Uses `jest` to run tests under `/test/integration` |
53+
| test:unit | Uses `jest` to run tests under `/test/unit` |
54+
55+
[docs]: https://docs.web3js.org/
56+
[repo]: https://github.com/web3/web3.js/tree/4.x/tools/web3-account-abstraction
57+
[npm-image]: https://img.shields.io/github/package-json/v/web3/web3.js/4.x?filename=tools%2Fweb3-account-abstraction%2Fpackage.json
58+
[npm-url]: https://npmjs.org/package/web3-account-abstraction
59+
[downloads-image]: https://img.shields.io/npm/dm/web3-account-abstraction?label=npm%20downloads

0 commit comments

Comments
 (0)