@alchemy/common 0.0.0-alpha.21 → 0.0.0-alpha.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +36 -0
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +2 -2
- package/src/version.ts +1 -1
package/LICENSE
CHANGED
package/README.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# @alchemy/common
|
|
2
|
+
|
|
3
|
+
Shared foundation for the Alchemy Smart Wallets SDK. Provides the core interfaces and utilities used by all other `@alchemy/*` packages.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @alchemy/common viem
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Key Exports
|
|
12
|
+
|
|
13
|
+
- **`alchemyTransport`** - viem-compatible HTTP transport for Alchemy APIs (supports API key, JWT, or direct URL auth)
|
|
14
|
+
- **Chain registry** - `getAlchemyRpcUrl`, `isChainSupported`, `getSupportedChainIds`
|
|
15
|
+
- **Custom chain definitions** (via `@alchemy/common/chains`) - chains not yet in viem
|
|
16
|
+
- **`AlchemyRestClient`** - typed REST client for non-JSON-RPC Alchemy APIs
|
|
17
|
+
- **Error classes** - `BaseError`, `ChainNotFoundError`, `AccountNotFoundError`, `ConnectionConfigError`, etc.
|
|
18
|
+
- **Logging** - `createLogger`, `setGlobalLoggerConfig`, `LogLevel`
|
|
19
|
+
- **Utilities** - `bigIntMultiply`, `bigIntMax`, `lowerAddress`, `assertNever`
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
import { alchemyTransport } from "@alchemy/common";
|
|
25
|
+
import { sepolia } from "viem/chains";
|
|
26
|
+
import { createPublicClient } from "viem";
|
|
27
|
+
|
|
28
|
+
const client = createPublicClient({
|
|
29
|
+
chain: sepolia,
|
|
30
|
+
transport: alchemyTransport({ apiKey: "YOUR_API_KEY" }),
|
|
31
|
+
});
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## License
|
|
35
|
+
|
|
36
|
+
MIT
|
package/dist/esm/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "0.0.0-alpha.
|
|
1
|
+
export declare const VERSION = "0.0.0-alpha.21";
|
package/dist/esm/version.js
CHANGED
package/dist/esm/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,yBAAyB;AACzB,MAAM,CAAC,MAAM,OAAO,GAAG,gBAAgB,CAAC","sourcesContent":["// This file is autogenerated by inject-version.ts. Any changes will be\n// overwritten on commit!\nexport const VERSION = \"0.0.0-alpha.
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,yBAAyB;AACzB,MAAM,CAAC,MAAM,OAAO,GAAG,gBAAgB,CAAC","sourcesContent":["// This file is autogenerated by inject-version.ts. Any changes will be\n// overwritten on commit!\nexport const VERSION = \"0.0.0-alpha.21\";\n"]}
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.0.0-alpha.
|
|
1
|
+
export declare const VERSION = "0.0.0-alpha.21";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alchemy/common",
|
|
3
|
-
"version": "0.0.0-alpha.
|
|
3
|
+
"version": "0.0.0-alpha.22",
|
|
4
4
|
"description": "A collection of interfaces and utilities to be used by other Alchemy packages",
|
|
5
5
|
"author": "Alchemy",
|
|
6
6
|
"license": "MIT",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"url": "https://github.com/alchemyplatform/aa-sdk/issues"
|
|
62
62
|
},
|
|
63
63
|
"homepage": "https://github.com/alchemyplatform/aa-sdk#readme",
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "10e989504f15718c4c6b66e6856e509dfb3e6cfe"
|
|
65
65
|
}
|
package/src/version.ts
CHANGED