@anywalletkit/protocol-swap2-wrap 0.0.0-stage → 0.1.3

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.
@@ -0,0 +1,31 @@
1
+ import { CrossChainProvider } from '@anywalletkit/protocol-swap2-core/types';
2
+
3
+ /**
4
+ * The chain's canonical wrapped native token (WETH9-style `deposit()` /
5
+ * `withdraw(uint256)`). Every entry was checked on-chain 2026-10-12: symbol,
6
+ * 18 decimals, non-zero supply, and `deposit()` succeeding for a funded sender.
7
+ * The provider re-checks symbol + decimals once per chain before quoting.
8
+ */
9
+ declare const WRAPPED_NATIVE: Readonly<Record<number, {
10
+ address: `0x${string}`;
11
+ symbol: string;
12
+ }>>;
13
+ interface WrapProviderConfig {
14
+ enabled?: boolean;
15
+ /** JSON-RPC endpoints per EVM chain id (on-chain token check + receipt tracking). */
16
+ rpcUrls: Readonly<Record<number, readonly string[]>>;
17
+ /** Override the wrapped tokens (tests, new chains). Still verified on-chain before use. */
18
+ wrapped?: Readonly<Record<number, {
19
+ address: `0x${string}`;
20
+ symbol: string;
21
+ }>>;
22
+ }
23
+ /**
24
+ * Native ↔ wrapped native as a swap2 venue: `deposit()` with value to wrap,
25
+ * `withdraw(amount)` to unwrap. 1:1, no pool, no slippage, no approval. WETH9
26
+ * credits and pays `msg.sender`, so the recipient must be the sender — a wrap
27
+ * "to someone else" is refused rather than silently paid to the wrong place.
28
+ */
29
+ declare function wrapProvider(config: WrapProviderConfig): CrossChainProvider;
30
+
31
+ export { WRAPPED_NATIVE, type WrapProviderConfig, wrapProvider };
@@ -0,0 +1,31 @@
1
+ import { CrossChainProvider } from '@anywalletkit/protocol-swap2-core/types';
2
+
3
+ /**
4
+ * The chain's canonical wrapped native token (WETH9-style `deposit()` /
5
+ * `withdraw(uint256)`). Every entry was checked on-chain 2026-10-12: symbol,
6
+ * 18 decimals, non-zero supply, and `deposit()` succeeding for a funded sender.
7
+ * The provider re-checks symbol + decimals once per chain before quoting.
8
+ */
9
+ declare const WRAPPED_NATIVE: Readonly<Record<number, {
10
+ address: `0x${string}`;
11
+ symbol: string;
12
+ }>>;
13
+ interface WrapProviderConfig {
14
+ enabled?: boolean;
15
+ /** JSON-RPC endpoints per EVM chain id (on-chain token check + receipt tracking). */
16
+ rpcUrls: Readonly<Record<number, readonly string[]>>;
17
+ /** Override the wrapped tokens (tests, new chains). Still verified on-chain before use. */
18
+ wrapped?: Readonly<Record<number, {
19
+ address: `0x${string}`;
20
+ symbol: string;
21
+ }>>;
22
+ }
23
+ /**
24
+ * Native ↔ wrapped native as a swap2 venue: `deposit()` with value to wrap,
25
+ * `withdraw(amount)` to unwrap. 1:1, no pool, no slippage, no approval. WETH9
26
+ * credits and pays `msg.sender`, so the recipient must be the sender — a wrap
27
+ * "to someone else" is refused rather than silently paid to the wrong place.
28
+ */
29
+ declare function wrapProvider(config: WrapProviderConfig): CrossChainProvider;
30
+
31
+ export { WRAPPED_NATIVE, type WrapProviderConfig, wrapProvider };
@@ -0,0 +1,9 @@
1
+ import {
2
+ WRAPPED_NATIVE,
3
+ wrapProvider
4
+ } from "./chunk-AVEVP6OU.js";
5
+ export {
6
+ WRAPPED_NATIVE,
7
+ wrapProvider
8
+ };
9
+ //# sourceMappingURL=provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/module.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "@anywalletkit/protocol-swap2-wrap",
3
+ "type": "swap2",
4
+ "chains": [
5
+ "eip155:1",
6
+ "eip155:10",
7
+ "eip155:100",
8
+ "eip155:130",
9
+ "eip155:1329",
10
+ "eip155:137",
11
+ "eip155:14",
12
+ "eip155:143",
13
+ "eip155:146",
14
+ "eip155:196",
15
+ "eip155:2818",
16
+ "eip155:324",
17
+ "eip155:42161",
18
+ "eip155:43114",
19
+ "eip155:4326",
20
+ "eip155:480",
21
+ "eip155:5000",
22
+ "eip155:534352",
23
+ "eip155:56",
24
+ "eip155:57073",
25
+ "eip155:59144",
26
+ "eip155:747474",
27
+ "eip155:80094",
28
+ "eip155:8453",
29
+ "eip155:9745",
30
+ "eip155:98866",
31
+ "eip155:999"
32
+ ],
33
+ "tier": "core",
34
+ "maintainers": [
35
+ "@ultratestbro"
36
+ ],
37
+ "conformance": "0.x",
38
+ "repo": "https://github.com/ultratestbro/anywalletkit",
39
+ "path": "packages/protocol-swap2-wrap",
40
+ "description": "Native ↔ wrapped native (WETH9 deposit/withdraw) as a same-chain swap2 venue on every EVM chain with a pinned wrapped native; 1:1, no approval, tokens verified on-chain.",
41
+ "addedAt": "2026-10-12"
42
+ }
package/package.json CHANGED
@@ -1,6 +1,72 @@
1
1
  {
2
2
  "name": "@anywalletkit/protocol-swap2-wrap",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.3",
4
+ "description": "Wrap and unwrap the native coin (ETH↔WETH, BNB↔WBNB, POL↔WPOL…) on 13 EVM chains as a swap2 venue: 1:1, no pool, wrapped tokens verified on-chain.",
5
+ "license": "Apache-2.0",
6
+ "homepage": "https://docs.anywallet.tech",
7
+ "bugs": {
8
+ "url": "https://github.com/ultratestbro/anywalletkit/issues"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/ultratestbro/anywalletkit.git",
13
+ "directory": "packages/protocol-swap2-wrap"
14
+ },
15
+ "type": "module",
16
+ "sideEffects": false,
17
+ "main": "./dist/index.cjs",
18
+ "module": "./dist/index.js",
19
+ "types": "./dist/index.d.ts",
20
+ "exports": {
21
+ ".": {
22
+ "types": "./dist/index.d.ts",
23
+ "import": "./dist/index.js",
24
+ "require": "./dist/index.cjs"
25
+ },
26
+ "./provider": {
27
+ "types": "./dist/provider.d.ts",
28
+ "import": "./dist/provider.js",
29
+ "require": "./dist/provider.cjs"
30
+ },
31
+ "./protocol": {
32
+ "types": "./dist/protocol.d.ts",
33
+ "import": "./dist/protocol.js",
34
+ "require": "./dist/protocol.cjs"
35
+ },
36
+ "./package.json": "./package.json"
37
+ },
38
+ "files": [
39
+ "dist",
40
+ "README.md",
41
+ "module.json"
42
+ ],
43
+ "dependencies": {
44
+ "viem": "^2.57.2",
45
+ "@anywalletkit/protocol-swap2-core": "0.3.1",
46
+ "@anywalletkit/swap2-assets": "0.1.3"
47
+ },
48
+ "peerDependencies": {
49
+ "@anywalletkit/core": "0.3.1"
50
+ },
51
+ "devDependencies": {
52
+ "@types/node": "^22",
53
+ "vitest": "^5.0.3",
54
+ "@anywalletkit/conformance": "0.3.1",
55
+ "@anywalletkit/core": "0.3.1"
56
+ },
57
+ "keywords": [
58
+ "wrap",
59
+ "weth",
60
+ "permissionless"
61
+ ],
62
+ "publishConfig": {
63
+ "access": "public",
64
+ "provenance": true
65
+ },
66
+ "scripts": {
67
+ "build": "tsup",
68
+ "typecheck": "tsc --noEmit",
69
+ "test": "vitest run",
70
+ "lint": "echo ok"
71
+ }
6
72
  }