presign-guard-wallet 0.25.0 → 0.26.0
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/README.md +1 -1
- package/index.js +1 -1
- package/limits.js +5 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -85,7 +85,7 @@ Every other method (`getAddresses`, `extend`, `sendRawTransaction` for a transac
|
|
|
85
85
|
| `onSpend` | | `(entry) => void` after each signed spend, e.g. for a log |
|
|
86
86
|
| `store` | in memory | Where spending is kept; `fileStore(path)` from `presign-guard-wallet/file-store`, or your own |
|
|
87
87
|
|
|
88
|
-
Chains: Ethereum (1), Optimism (10), BNB Chain (56), Polygon (137), Base (8453), Arbitrum (42161), Robinhood Chain (4663).
|
|
88
|
+
Chains: Ethereum (1), Optimism (10), BNB Chain (56), Polygon (137), Base (8453), Arbitrum (42161), Robinhood Chain (4663), Avalanche C-Chain (43114).
|
|
89
89
|
|
|
90
90
|
**Tempo** (4217, and the Moderato testnet 42431) is not covered by presign-guard. There the wallet signs exactly one thing, checked locally: a TIP-20 `transfer` or `transferWithMemo` of USDC.e (pathUSD on the testnet), with no value attached, counted toward your `USDC` limits. Anything else on Tempo is refused (`unsupported_chain`). Guard a Tempo wallet client next to your main one with `guarded.wrap(tempoWalletClient)`: both share the same limits, pause and purchase records.
|
|
91
91
|
|
package/index.js
CHANGED
|
@@ -75,7 +75,7 @@ export { memoryStore };
|
|
|
75
75
|
|
|
76
76
|
export const PRESIGN_URL = "https://presign-guard.fizzl.eu";
|
|
77
77
|
export const PRESIGN_SIGNERS = ["0xf084Ea47Ca4D99BB4De3ECB0332b316bE6521EaE"];
|
|
78
|
-
export const SUPPORTED_CHAINS = [1, 10, 56, 137, 8453, 42161, 4663];
|
|
78
|
+
export const SUPPORTED_CHAINS = [1, 10, 56, 137, 8453, 42161, 4663, 43114];
|
|
79
79
|
// Tempo: the stablecoins the wallet may send there (the ones the USDC limit covers).
|
|
80
80
|
export const TEMPO_TOKENS = {
|
|
81
81
|
4217: ["0x20c000000000000000000000b9537d11c60e8b50"],
|
package/limits.js
CHANGED
|
@@ -43,12 +43,14 @@ const USDC = {
|
|
|
43
43
|
// Robinhood Chain has no Circle USDC: its dollar is Paxos' USDG (Global Dollar), counted like RLUSD (a dollar is a
|
|
44
44
|
// dollar). A token there called "USDC" (0x11d0…991e, 18 decimals) is a copy and stays outside the budget.
|
|
45
45
|
4663: [["0x5fc5360d0400a0fd4f2af552add042d716f1d168", 6]],
|
|
46
|
+
// Avalanche C-Chain: Circle's USDC, and the bridged USDC.e.
|
|
47
|
+
43114: [["0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e", 6], ["0xa7d7079b0fead91f3e65f86e8915cb59c1a4c664", 6]],
|
|
46
48
|
// Tempo: USDC.e (bridged USDC, what MPP charges in), and pathUSD on the Moderato testnet.
|
|
47
49
|
4217: [["0x20c000000000000000000000b9537d11c60e8b50", 6]],
|
|
48
50
|
42431: [["0x20c0000000000000000000000000000000000000", 6]],
|
|
49
51
|
};
|
|
50
|
-
const NATIVE_SYMBOL = { 1: "ETH", 10: "ETH", 8453: "ETH", 42161: "ETH", 4663: "ETH", 56: "BNB", 137: "POL", "xrpl:0": "XRP", "xrpl:1": "XRP", ...Object.fromEntries(Object.keys(SOLANA_USDC).map((n) => [n, "SOL"])), ...Object.fromEntries(Object.keys(ALGORAND_USDC).map((n) => [n, "ALGO"])) };
|
|
51
|
-
export const KNOWN_TOKENS = ["USDC", "ETH", "BNB", "POL", "XRP", "SOL", "ALGO"];
|
|
52
|
+
const NATIVE_SYMBOL = { 1: "ETH", 10: "ETH", 8453: "ETH", 42161: "ETH", 4663: "ETH", 56: "BNB", 137: "POL", 43114: "AVAX", "xrpl:0": "XRP", "xrpl:1": "XRP", ...Object.fromEntries(Object.keys(SOLANA_USDC).map((n) => [n, "SOL"])), ...Object.fromEntries(Object.keys(ALGORAND_USDC).map((n) => [n, "ALGO"])) };
|
|
53
|
+
export const KNOWN_TOKENS = ["USDC", "ETH", "BNB", "POL", "AVAX", "XRP", "SOL", "ALGO"];
|
|
52
54
|
|
|
53
55
|
// XRP Ledger networks and the RLUSD issuer on each (Ripple's).
|
|
54
56
|
export const XRPL_RLUSD_ISSUERS = { "xrpl:0": "rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De", "xrpl:1": "rQhWct2fv4Vc4KRjRgMrxa8xPN9Zx9iLKV" };
|
|
@@ -109,7 +111,7 @@ export function normalizeLimits(limits) {
|
|
|
109
111
|
for (const net of Object.keys(SOLANA_USDC)) put(`${net}:${NATIVE}`, { budget: name, decimals: 9 });
|
|
110
112
|
} else if (symbol === "ALGO") {
|
|
111
113
|
for (const net of Object.keys(ALGORAND_USDC)) put(`${net}:${NATIVE}`, { budget: name, decimals: 6 });
|
|
112
|
-
} else if (["ETH", "BNB", "POL"].includes(symbol)) {
|
|
114
|
+
} else if (["ETH", "BNB", "POL", "AVAX"].includes(symbol)) {
|
|
113
115
|
for (const [chain, s] of Object.entries(NATIVE_SYMBOL)) if (s === symbol) put(`${chain}:${NATIVE}`, { budget: name, decimals: 18 });
|
|
114
116
|
} else {
|
|
115
117
|
const m = /^(?:(\d+):)?(0x[0-9a-fA-F]{40})$/.exec(name);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "presign-guard-wallet",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"description": "A wallet for AI agents (viem on EVM chains, Solana and Algorand) that asks presign-guard ($0.01 over x402) before every transaction, contract write and signature, refuses to sign red, and keeps to per-token spending limits, with approval from your phone over the limit (Telegram, or signed in your own wallet over AC2).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|