walletcap 0.2.3__tar.gz → 0.3.0__tar.gz
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.
- {walletcap-0.2.3 → walletcap-0.3.0}/.circleci/config.yml +7 -0
- walletcap-0.3.0/.github/workflows/ci.yml +83 -0
- walletcap-0.3.0/.github/workflows/mcp-registry.yml +47 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/.github/workflows/publish.yml +35 -4
- walletcap-0.3.0/CHANGELOG.md +211 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/PKG-INFO +156 -56
- {walletcap-0.2.3 → walletcap-0.3.0}/README.md +153 -53
- {walletcap-0.2.3 → walletcap-0.3.0}/SECURITY.md +8 -6
- walletcap-0.3.0/crash-test/README.md +124 -0
- walletcap-0.3.0/crash-test/agent.mjs +100 -0
- walletcap-0.3.0/crash-test/agentkit-agent.mjs +87 -0
- walletcap-0.3.0/crash-test/ci/check-agentkit.mjs +18 -0
- walletcap-0.3.0/crash-test/cli.mjs +269 -0
- walletcap-0.3.0/crash-test/contracts/build.mjs +94 -0
- walletcap-0.3.0/crash-test/contracts/coinbase-base-mainnet.json +27 -0
- walletcap-0.3.0/crash-test/contracts/walletcap.json +501 -0
- walletcap-0.3.0/crash-test/package.json +75 -0
- walletcap-0.3.0/crash-test/spend-permissions.mjs +180 -0
- walletcap-0.3.0/crash-test/spend-store.mjs +86 -0
- walletcap-0.3.0/crash-test/test/crash-test.test.mjs +143 -0
- walletcap-0.3.0/docs/_config.yml +19 -0
- walletcap-0.3.0/docs/coinbase-agentic-wallet-budget.md +95 -0
- walletcap-0.3.0/docs/coinbase-agentkit-spending-limit.md +73 -0
- walletcap-0.3.0/docs/coinbase-cdp-spend-controls.md +93 -0
- walletcap-0.3.0/docs/coinbase-spend-permissions-cap.md +79 -0
- walletcap-0.3.0/docs/index.md +93 -0
- walletcap-0.3.0/docs/llms.txt +39 -0
- walletcap-0.3.0/docs/python-agent-spending-limit.md +89 -0
- walletcap-0.3.0/docs/social-preview.png +0 -0
- walletcap-0.3.0/docs/threat-model.md +62 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/docs/vendor-disclosure.md +1 -1
- walletcap-0.3.0/docs/x402-spending-limit.md +86 -0
- walletcap-0.3.0/glama.json +6 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/js/README.md +16 -4
- walletcap-0.3.0/js/_clock.mjs +20 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/js/agentic.mjs +156 -48
- {walletcap-0.2.3 → walletcap-0.3.0}/js/cdp.mjs +49 -28
- {walletcap-0.2.3 → walletcap-0.3.0}/js/cli.mjs +61 -4
- walletcap-0.3.0/js/errors.mjs +66 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/js/index.d.ts +78 -15
- {walletcap-0.2.3 → walletcap-0.3.0}/js/index.mjs +62 -32
- walletcap-0.3.0/js/ledger.mjs +786 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/js/money.mjs +91 -27
- {walletcap-0.2.3 → walletcap-0.3.0}/js/package.json +15 -4
- walletcap-0.3.0/js/tests/agentic.test.mjs +564 -0
- walletcap-0.3.0/js/tests/budget.test.mjs +429 -0
- walletcap-0.3.0/js/tests/cdp.test.mjs +203 -0
- walletcap-0.3.0/js/tests/cli.test.mjs +172 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/js/tests/money.test.mjs +32 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/js/tests/processes.test.mjs +25 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/js/tests/support/fake-awal/dist/ipcClient.js +4 -3
- walletcap-0.3.0/js/tests/x402.test.mjs +249 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/js/x402.mjs +112 -26
- walletcap-0.3.0/llms.txt +39 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/pyproject.toml +15 -3
- {walletcap-0.2.3 → walletcap-0.3.0}/scripts/ci.sh +6 -0
- walletcap-0.3.0/server.json +53 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/solidity/evm/package.json +1 -1
- walletcap-0.3.0/spec/vectors/money.json +297 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/src/walletcap/__init__.py +6 -2
- {walletcap-0.2.3 → walletcap-0.3.0}/src/walletcap/__main__.py +93 -6
- walletcap-0.3.0/src/walletcap/_clock.py +21 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/src/walletcap/budget.py +122 -24
- {walletcap-0.2.3 → walletcap-0.3.0}/src/walletcap/errors.py +17 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/src/walletcap/ledger.py +463 -81
- {walletcap-0.2.3 → walletcap-0.3.0}/src/walletcap/money.py +144 -30
- walletcap-0.3.0/tests/test_budget.py +681 -0
- walletcap-0.3.0/tests/test_ledger.py +389 -0
- walletcap-0.3.0/tests/test_money.py +109 -0
- walletcap-0.2.3/.github/workflows/ci.yml +0 -47
- walletcap-0.2.3/CHANGELOG.md +0 -58
- walletcap-0.2.3/docs/threat-model.md +0 -54
- walletcap-0.2.3/js/errors.mjs +0 -40
- walletcap-0.2.3/js/ledger.mjs +0 -519
- walletcap-0.2.3/js/tests/agentic.test.mjs +0 -288
- walletcap-0.2.3/js/tests/budget.test.mjs +0 -219
- walletcap-0.2.3/js/tests/cdp.test.mjs +0 -117
- walletcap-0.2.3/js/tests/cli.test.mjs +0 -80
- walletcap-0.2.3/js/tests/x402.test.mjs +0 -124
- walletcap-0.2.3/tests/test_budget.py +0 -332
- walletcap-0.2.3/tests/test_ledger.py +0 -277
- walletcap-0.2.3/tests/test_money.py +0 -36
- {walletcap-0.2.3 → walletcap-0.3.0}/.gitignore +0 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/LICENSE +0 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/NOTICE +0 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/examples/quickstart/README.md +0 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/examples/quickstart/quickstart.mjs +0 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/examples/quickstart/quickstart.py +0 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/js/LICENSE +0 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/js/NOTICE +0 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/js/_keccak.mjs +0 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/js/tests/agentkit.test.mjs +0 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/js/tests/cdp-sdk.test.mjs +0 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/js/tests/keccak.test.mjs +0 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/js/tests/support/fake-awal/dist/index.js +0 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/js/tests/support/fake-awal/package.json +0 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/js/tests/support/fake-payments-mcp.mjs +0 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/js/tests/support/payer.mjs +0 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/js/tests/support/race.mjs +0 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/js/tests/support/x402-kit.mjs +0 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/js/tests/support/x402-payer.mjs +0 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/js/tests/types/agentkit.d.ts +0 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/js/tests/types/recipe.ts +0 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/js/tests/types/subclass.ts +0 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/js/tests/x402-fetch.test.mjs +0 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/pytest.ini +0 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/solidity/README.md +0 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/solidity/evm/check.mjs +0 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/solidity/foundry.toml +0 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/solidity/src/AccountCapSpender.sol +0 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/solidity/test/AccountCapSpender.t.sol +0 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/solidity/test/Mocks.sol +0 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/src/walletcap/_keccak.py +0 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/src/walletcap/py.typed +0 -0
- {walletcap-0.2.3 → walletcap-0.3.0}/tests/test_keccak.py +0 -0
|
@@ -33,6 +33,13 @@ jobs:
|
|
|
33
33
|
cd solidity/evm
|
|
34
34
|
npm install --no-audit --no-fund --no-package-lock
|
|
35
35
|
node check.mjs ..
|
|
36
|
+
- run:
|
|
37
|
+
name: Crash test
|
|
38
|
+
command: |
|
|
39
|
+
cd crash-test
|
|
40
|
+
npm install --no-save --no-audit --no-fund --no-package-lock ../js
|
|
41
|
+
node contracts/build.mjs --check
|
|
42
|
+
node --test
|
|
36
43
|
|
|
37
44
|
workflows:
|
|
38
45
|
ci:
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
javascript:
|
|
13
|
+
name: JavaScript
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
container: node:22-bookworm
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
18
|
+
- name: Install the test dependencies
|
|
19
|
+
run: npm install --no-audit --no-fund
|
|
20
|
+
working-directory: js
|
|
21
|
+
- name: Run the suite
|
|
22
|
+
run: node --test
|
|
23
|
+
working-directory: js
|
|
24
|
+
|
|
25
|
+
python:
|
|
26
|
+
name: Python
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
container: node:22-bookworm
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
31
|
+
- uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e
|
|
32
|
+
- name: Run the suite
|
|
33
|
+
# Node is on PATH here, so the cross-language tests run rather than skip.
|
|
34
|
+
run: uv run --with pytest --python 3.12 pytest -q
|
|
35
|
+
|
|
36
|
+
solidity:
|
|
37
|
+
name: Solidity
|
|
38
|
+
runs-on: ubuntu-latest
|
|
39
|
+
container: node:22-bookworm
|
|
40
|
+
steps:
|
|
41
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
42
|
+
- name: Install the check's dependencies
|
|
43
|
+
run: npm install --no-audit --no-fund
|
|
44
|
+
working-directory: solidity/evm
|
|
45
|
+
- name: Drive the contract on an EVM
|
|
46
|
+
run: node check.mjs ..
|
|
47
|
+
working-directory: solidity/evm
|
|
48
|
+
|
|
49
|
+
crash-test:
|
|
50
|
+
name: Crash test
|
|
51
|
+
runs-on: ubuntu-latest
|
|
52
|
+
container: node:22-bookworm
|
|
53
|
+
steps:
|
|
54
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
55
|
+
# One install, so the walletcap the crash test depends on comes from this checkout and is
|
|
56
|
+
# never looked up on npm (a release's walletcap isn't published until the PR merges).
|
|
57
|
+
- name: Install the crash test, on this checkout's walletcap
|
|
58
|
+
run: npm install --no-save --no-audit --no-fund --no-package-lock ../js
|
|
59
|
+
working-directory: crash-test
|
|
60
|
+
- name: Check the shipped contracts match their sources
|
|
61
|
+
run: node contracts/build.mjs --check
|
|
62
|
+
working-directory: crash-test
|
|
63
|
+
- name: Run it
|
|
64
|
+
run: node --test
|
|
65
|
+
working-directory: crash-test
|
|
66
|
+
|
|
67
|
+
crash-test-agentkit:
|
|
68
|
+
name: Crash test (AgentKit)
|
|
69
|
+
runs-on: ubuntu-latest
|
|
70
|
+
container: node:22-bookworm
|
|
71
|
+
steps:
|
|
72
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
73
|
+
- name: Pack the crash test and this checkout's walletcap
|
|
74
|
+
run: |
|
|
75
|
+
npm pack --pack-destination "$RUNNER_TEMP"
|
|
76
|
+
(cd ../js && npm pack --pack-destination "$RUNNER_TEMP")
|
|
77
|
+
working-directory: crash-test
|
|
78
|
+
# As users run it, from the packed tarballs, with AgentKit installed alongside. walletcap is
|
|
79
|
+
# this checkout's: the version the crash test depends on isn't on npm until it is released.
|
|
80
|
+
- name: Run it with Coinbase AgentKit alongside
|
|
81
|
+
run: npx -y -p "$RUNNER_TEMP"/walletcap-crash-test-*.tgz -p "$RUNNER_TEMP"/walletcap-[0-9]*.tgz -p @coinbase/agentkit@0.10.4 walletcap-crash-test --agentkit --json > "$RUNNER_TEMP/agentkit.json"
|
|
82
|
+
- name: Check the AgentKit row
|
|
83
|
+
run: node crash-test/ci/check-agentkit.mjs "$RUNNER_TEMP/agentkit.json"
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
# Publish server.json to the official MCP Registry (registry.modelcontextprotocol.io), by hand.
|
|
3
|
+
# Run it once the npm release that server.json names is out: the registry checks that
|
|
4
|
+
# walletcap@<version> on npm carries "mcpName": "io.github.coriolislabs/walletcap".
|
|
5
|
+
# GitHub OIDC proves the io.github.coriolislabs namespace, so no token is stored.
|
|
6
|
+
# (mcp-publisher's interactive GitHub login can't publish to an organization namespace.)
|
|
7
|
+
name: MCP Registry
|
|
8
|
+
|
|
9
|
+
on:
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
id-token: write
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
publish:
|
|
18
|
+
name: Publish server.json
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
env:
|
|
21
|
+
MCP_PUBLISHER_VERSION: v1.8.7
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
24
|
+
- name: Check server.json names the npm package's version and mcpName
|
|
25
|
+
run: |
|
|
26
|
+
test "$(jq -r .version server.json)" = "$(jq -r .version js/package.json)"
|
|
27
|
+
test "$(jq -r '.packages[0].version' server.json)" = "$(jq -r .version js/package.json)"
|
|
28
|
+
test "$(jq -r .name server.json)" = "$(jq -r .mcpName js/package.json)"
|
|
29
|
+
- uses: sigstore/cosign-installer@6f9f17788090df1f26f669e9d70d6ae9567deba6 # v4.1.2
|
|
30
|
+
- name: Download mcp-publisher and verify its Sigstore bundle
|
|
31
|
+
run: |
|
|
32
|
+
set -euo pipefail
|
|
33
|
+
archive=mcp-publisher_linux_amd64.tar.gz
|
|
34
|
+
base_url="https://github.com/modelcontextprotocol/registry/releases/download/${MCP_PUBLISHER_VERSION}"
|
|
35
|
+
curl --fail --location --silent --show-error --output "$archive" "$base_url/$archive"
|
|
36
|
+
curl --fail --location --silent --show-error --output "$archive.sigstore.json" "$base_url/$archive.sigstore.json"
|
|
37
|
+
cosign verify-blob \
|
|
38
|
+
--bundle "$archive.sigstore.json" \
|
|
39
|
+
--certificate-identity "https://github.com/modelcontextprotocol/registry/.github/workflows/release.yml@refs/tags/${MCP_PUBLISHER_VERSION}" \
|
|
40
|
+
--certificate-oidc-issuer "https://token.actions.githubusercontent.com" \
|
|
41
|
+
"$archive"
|
|
42
|
+
tar xzf "$archive" mcp-publisher
|
|
43
|
+
rm -f "$archive" "$archive.sigstore.json"
|
|
44
|
+
- name: Log in to the registry with GitHub OIDC
|
|
45
|
+
run: ./mcp-publisher login github-oidc
|
|
46
|
+
- name: Publish server.json
|
|
47
|
+
run: ./mcp-publisher publish
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
-
# Publish
|
|
3
|
-
#
|
|
2
|
+
# Publish when a GitHub Release is published, or by hand.
|
|
3
|
+
# - A release tagged v<version> publishes walletcap to PyPI and npm.
|
|
4
|
+
# - A release tagged crash-test-v<version> publishes walletcap-crash-test to npm, and nothing else.
|
|
5
|
+
# Everything uses trusted publishing, so no token is stored. PyPI matches this repository,
|
|
4
6
|
# the workflow filename (publish.yml) and the "pypi" environment, and attaches PEP 740
|
|
5
|
-
# attestations. npm matches this repository, publish.yml and the "npm" environment,
|
|
6
|
-
# and attaches provenance.
|
|
7
|
+
# attestations. npm matches this repository, publish.yml and the "npm" environment, for
|
|
8
|
+
# each of the two packages, and attaches provenance.
|
|
7
9
|
name: Publish
|
|
8
10
|
|
|
9
11
|
on:
|
|
@@ -18,6 +20,7 @@ permissions:
|
|
|
18
20
|
jobs:
|
|
19
21
|
pypi:
|
|
20
22
|
name: PyPI
|
|
23
|
+
if: github.event_name != 'release' || !startsWith(github.event.release.tag_name, 'crash-test-v')
|
|
21
24
|
runs-on: ubuntu-latest
|
|
22
25
|
environment: pypi
|
|
23
26
|
steps:
|
|
@@ -43,6 +46,7 @@ jobs:
|
|
|
43
46
|
|
|
44
47
|
npm:
|
|
45
48
|
name: npm
|
|
49
|
+
if: github.event_name != 'release' || !startsWith(github.event.release.tag_name, 'crash-test-v')
|
|
46
50
|
runs-on: ubuntu-latest
|
|
47
51
|
environment: npm
|
|
48
52
|
steps:
|
|
@@ -67,3 +71,30 @@ jobs:
|
|
|
67
71
|
- name: Publish to npm with provenance
|
|
68
72
|
working-directory: js
|
|
69
73
|
run: npm publish --provenance
|
|
74
|
+
|
|
75
|
+
crash-test:
|
|
76
|
+
name: npm (crash test)
|
|
77
|
+
if: github.event_name == 'release' && startsWith(github.event.release.tag_name, 'crash-test-v')
|
|
78
|
+
runs-on: ubuntu-latest
|
|
79
|
+
environment: npm
|
|
80
|
+
steps:
|
|
81
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
82
|
+
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
|
83
|
+
with:
|
|
84
|
+
node-version: "22"
|
|
85
|
+
registry-url: "https://registry.npmjs.org"
|
|
86
|
+
package-manager-cache: false
|
|
87
|
+
- name: Use an npm that supports trusted publishing (11.5.1 or later)
|
|
88
|
+
run: npm install --global npm@11.21.1
|
|
89
|
+
- name: Check the release tag matches the package version
|
|
90
|
+
env:
|
|
91
|
+
TAG: ${{ github.event.release.tag_name }}
|
|
92
|
+
run: test "$TAG" = "crash-test-v$(node -p "require('./crash-test/package.json').version")"
|
|
93
|
+
- name: Run the crash test on the walletcap users get from npm
|
|
94
|
+
working-directory: crash-test
|
|
95
|
+
run: |
|
|
96
|
+
npm install --no-audit --no-fund --no-package-lock
|
|
97
|
+
node --test
|
|
98
|
+
- name: Publish to npm with provenance
|
|
99
|
+
working-directory: crash-test
|
|
100
|
+
run: npm publish --provenance
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
<!-- SPDX-License-Identifier: Apache-2.0 -->
|
|
2
|
+
# Changelog
|
|
3
|
+
|
|
4
|
+
## 0.3.0 — 2026-11-06
|
|
5
|
+
|
|
6
|
+
This release fixes ways past walletcap's own cap that reviewers reproduced, and ways its
|
|
7
|
+
JavaScript and Python packages read the same input differently. It removes public options,
|
|
8
|
+
changes what an error does to a payment and upgrades the budget file, so it is a minor release,
|
|
9
|
+
not a patch.
|
|
10
|
+
|
|
11
|
+
### Breaking
|
|
12
|
+
|
|
13
|
+
- An error never settles a payment. When the payment function throws an error not tagged
|
|
14
|
+
`notSent()` (Python: `NotSent`), the payment stays in flight, marked unknown, instead of being
|
|
15
|
+
committed. It counts until one window past its `settlesBy`, or, without one, until its owner
|
|
16
|
+
releases it. `status()` shows it as in flight, not spent. The Agentic Wallet wrapper does the
|
|
17
|
+
same for a send or paid x402 payment whose outcome is unknown.
|
|
18
|
+
- A commit never shortens a hold. A payment committed from a reservation with a settle-by time
|
|
19
|
+
counts until one window past the later of the commit and that time, so a payee's own word that
|
|
20
|
+
a payment settled can't free the budget while its authorization can still be redeemed.
|
|
21
|
+
- The budget file is schema 2. 0.3 upgrades a 0.2.x file when it first opens it: a budget kept
|
|
22
|
+
under another spelling of a wallet (checksummed, uppercase, CAIP-10) moves to the lowercase
|
|
23
|
+
name, merged with any budget there with the tighter of every limit and every payment.
|
|
24
|
+
`declare()` with other limits than a merged budget's says what the upgrade merged. A budget in
|
|
25
|
+
another unit than the wallet's can't be merged: it stays under its 0.2.x name, and the wallet
|
|
26
|
+
is frozen, with the reason in its refusals, until its owner unfreezes it; the rest of the file
|
|
27
|
+
upgrades as usual. 0.2.x refuses a schema 2 file, so stop 0.2.x processes before upgrading.
|
|
28
|
+
- The `clock` option is gone from `openBudget`, `cdpStore` and `SharedBudgetStore`, and from
|
|
29
|
+
Python's `open_budget`, `Budget` and `Ledger`. The ledger reads the system clock. Passing a
|
|
30
|
+
clock is an error.
|
|
31
|
+
- Python's `Ledger` no longer takes `reservation_ttl_seconds`.
|
|
32
|
+
- A `settlesBy` that isn't after now is refused with a `BudgetError`.
|
|
33
|
+
- Python refuses a naive datetime for `settles_by`.
|
|
34
|
+
- A payment that went through, or may have, but couldn't be recorded raises
|
|
35
|
+
`PaymentNotRecorded`, not `BudgetError`. It is not a subclass of `BudgetError`, and it carries
|
|
36
|
+
the reservation id (`reservationId`, `reservation_id`) and the cause.
|
|
37
|
+
- `MAX_AMOUNT` is 10^15 micro-dollars ($1,000,000,000), not 2^63 − 1. A larger amount, cap or
|
|
38
|
+
per-payment limit is refused.
|
|
39
|
+
- The x402 guard pays only on terms whose `maxTimeoutSeconds` is a whole number of seconds up to
|
|
40
|
+
3600 (`MAX_PAYMENT_TIMEOUT_SECONDS`), as Coinbase's CDP spend controls do. It passes over
|
|
41
|
+
longer terms for shorter ones on offer, and refuses before signing, with the reason
|
|
42
|
+
`'timeout'`, when none are.
|
|
43
|
+
- The Agentic Wallet wrapper hands the wallet only the terms it can price that are valid an hour
|
|
44
|
+
or less, and refuses a paid x402 request, before the wallet is asked, when none are left
|
|
45
|
+
(reason `'asset'` or `'timeout'`).
|
|
46
|
+
- `guard(client, { assets })` and the Agentic Wallet wrapper's `assets` refuse an entry that
|
|
47
|
+
changes a built-in asset's decimals, and decimals that aren't an integer from 0 to 18.
|
|
48
|
+
- Amounts and windows take only the digits 0-9, and only ASCII whitespace is trimmed, in both
|
|
49
|
+
languages. `walletcap awal send` refuses an amount with trailing text, an exponent or a
|
|
50
|
+
separator. The wrapper refuses a send whose `amountAtomic` isn't plain digits or that has no
|
|
51
|
+
recipient, and passes the wallet only `recipient`, `amountAtomic`, `asset` and `chain`.
|
|
52
|
+
- Every ledger method names a budget the way `openBudget` does: an EVM address, bare or CAIP-10,
|
|
53
|
+
is lowercased after its EIP-55 check.
|
|
54
|
+
|
|
55
|
+
### Fixed
|
|
56
|
+
|
|
57
|
+
- A payment whose function threw was committed, so it counted for one window from the error. A
|
|
58
|
+
transfer whose receipt wait timed out and that was mined a day later let $300 through a $150
|
|
59
|
+
window.
|
|
60
|
+
- A payee could answer "settled" with a made-up hash, keep the authorization and redeem it later:
|
|
61
|
+
the commit had ended the count after one window. With a 30-day validity, five $0.15
|
|
62
|
+
authorizations passed a $0.15-a-day cap; with Permit2, $0.75 passed a $0.15-per-10-minutes cap
|
|
63
|
+
in 50 minutes. A payment now counts until one window past its authorization's expiry. The
|
|
64
|
+
guard reads it from the signed payload (EIP-3009 `validBefore`, Permit2 `deadline`), or takes
|
|
65
|
+
the signing time plus `maxTimeoutSeconds`. The Agentic Wallet wrapper takes the longest
|
|
66
|
+
`maxTimeoutSeconds` among the terms it hands the wallet, whatever their scheme.
|
|
67
|
+
- The CDP store counted a payment for one window from when CDP recorded it, though CDP signs it
|
|
68
|
+
after and lets the authorization be redeemed for up to an hour. It now counts until an hour
|
|
69
|
+
and a minute after the record, plus one window.
|
|
70
|
+
- A `settlesBy` already past was stored as given, so the reservation never counted and a second
|
|
71
|
+
full cap was reserved.
|
|
72
|
+
- The CDP store recorded a payment at the time in CDP's entry, so a backdated entry had already
|
|
73
|
+
aged out. It records at the ledger's own time.
|
|
74
|
+
- A process that waited for another's write lock dated its payment as much as the wait earlier,
|
|
75
|
+
so the payment stopped counting that much early. Both ledgers read the time once the lock is
|
|
76
|
+
held.
|
|
77
|
+
- A process whose clock ran a day ahead saw an empty budget and paid a second full cap.
|
|
78
|
+
- Python's `reservation_ttl_seconds` let a hold lapse while its payment could still settle: $300
|
|
79
|
+
on a $150 cap.
|
|
80
|
+
- `SharedBudgetStore` and Python's `Ledger` took a checksummed address as given, which opened a
|
|
81
|
+
second budget beside the lowercase one, with its own cap.
|
|
82
|
+
- Two near-maximum payments overflowed SQLite's `SUM`, and every later payment from the wallet
|
|
83
|
+
failed.
|
|
84
|
+
- Python read a naive `settles_by` as local time: 9 hours early in Tokyo.
|
|
85
|
+
- Code that retried on `BudgetError` could pay twice after "the payment went through but could
|
|
86
|
+
not be recorded".
|
|
87
|
+
- An asset override could price USDC at 18 decimals, counting $1 as a millionth of a cent.
|
|
88
|
+
- `walletcap awal send` read amounts with `parseFloat`: `100.5abc` was $100.50, and `0.29` was
|
|
89
|
+
289,999 atomic units.
|
|
90
|
+
- Python read Arabic-Indic and other Unicode digits as numbers (`١٢` was $12), and trimmed
|
|
91
|
+
`\x85` and other non-ASCII spaces, which JavaScript doesn't.
|
|
92
|
+
- A float of dollars converted differently in the two languages on about 0.5% of halfway values.
|
|
93
|
+
Both now read the shortest decimal that gives the float back and round it half up.
|
|
94
|
+
- Python rounded a `Decimal` amount at 28 digits before checking it was a whole number of
|
|
95
|
+
micro-dollars, and raised `ValueError`, not `BudgetError`, for an input over 4,300 digits.
|
|
96
|
+
|
|
97
|
+
### Changed
|
|
98
|
+
|
|
99
|
+
- `budget.holds()` (Python: `budget.holds()`, returning `Hold`s) and `walletcap holds` list the
|
|
100
|
+
open payments that still count: id, amount, reason (in flight, refused, unknown), age, and
|
|
101
|
+
when each stops counting. `walletcap release --all-unknown --older-than <24h|7d|30m>` gives
|
|
102
|
+
back every payment of unknown or refused outcome older than that, for an owner who has checked
|
|
103
|
+
the chain, except one whose settle-by time is still ahead: the payee could still settle it. One
|
|
104
|
+
with no settle-by time, which the wallet may have signed as it failed, goes only once it is an
|
|
105
|
+
hour and a minute old (`UNBOUNDED_HOLD_MS`).
|
|
106
|
+
- A budget or payment-count refusal names the open payments that take up the room, oldest
|
|
107
|
+
first, and says how to list and release them. `BudgetRefused.brief`, and `brief` beside
|
|
108
|
+
`message` in `budget.check()`, is the refusal without them. The x402 guard (and so AgentKit),
|
|
109
|
+
the CDP store and the Agentic Wallet wrapper, with its CLI and MCP proxy, tell the agent only
|
|
110
|
+
that.
|
|
111
|
+
- Python's `pay()` takes `settles_by`, as JavaScript's `pay()` takes `settlesBy`. Python's
|
|
112
|
+
`Reservation` and `Ledger` have `annotate()`.
|
|
113
|
+
- The Agentic Wallet wrapper:
|
|
114
|
+
- It hands the wallet, as `paymentRequirements`, the terms it can price that are valid an hour
|
|
115
|
+
or less, from the caller's or the ones walletcap discovered, with the 402's extensions unless
|
|
116
|
+
the caller gave some. The wallet then skips its own discovery and signs only a term equal to
|
|
117
|
+
one of them. A `discover` option of one's own may return the 402 answer or its list of terms.
|
|
118
|
+
- Once the wallet answers, a paid request counts until the longest `maxTimeoutSeconds` among
|
|
119
|
+
the terms it was handed (a Solana term at least two minutes, the life of its blockhash), plus
|
|
120
|
+
a minute, after that answer, plus one window, instead of until it is released. That holds for
|
|
121
|
+
one the payee calls settled too. One the wallet never answered counts until it is released.
|
|
122
|
+
- A free endpoint's one-unit hold is released unless the payee confirms a payment, so a free
|
|
123
|
+
endpoint that fails can't use up `maxPayments`.
|
|
124
|
+
- Every ledger write after the wallet answers raises `PaymentNotRecorded` if it fails.
|
|
125
|
+
- `cdpStore()` and `SharedBudgetStore` refuse options they don't take. The docs ask for CDP
|
|
126
|
+
1.60.0 or later, whose published source refuses a `maxTimeoutSeconds` over 3600. A payment CDP
|
|
127
|
+
rolls back counts as long as it would have settled, an hour and a minute after CDP recorded it
|
|
128
|
+
plus one window, instead of until it is released.
|
|
129
|
+
- The docs no longer say machines can share a budget through a shared volume. The budget file
|
|
130
|
+
serves one host: SQLite's locks aren't reliable over NFS, SMB or Docker Desktop bind mounts,
|
|
131
|
+
and multiple hosts need a shared service, which isn't shipped yet.
|
|
132
|
+
- `spec/vectors/money.json` holds the amounts both test suites must read the same way, or refuse.
|
|
133
|
+
- `walletcap-crash-test` 0.3.1 depends on walletcap `^0.3.0`. In its AgentKit row, walletcap now
|
|
134
|
+
passes over the merchant's first-listed $1.00, valid 4 days, and the offer left is the 1¢ one
|
|
135
|
+
the agent approved, where it refused the payment before. walletcap limits the amount, not which
|
|
136
|
+
offer is paid; the row passes only if walletcap signs the approved offer or nothing.
|
|
137
|
+
|
|
138
|
+
## 0.2.4 — 2026-11-06
|
|
139
|
+
|
|
140
|
+
### Added
|
|
141
|
+
|
|
142
|
+
- `mcpName` in the npm package and a `server.json`, so `walletcap awal-mcp` can be listed in the
|
|
143
|
+
official MCP Registry as `io.github.coriolislabs/walletcap`. `glama.json` names the maintainer
|
|
144
|
+
for Glama.
|
|
145
|
+
- A docs site, https://coriolislabs.github.io/WalletCap/, with one page per integration, and
|
|
146
|
+
`llms.txt`.
|
|
147
|
+
|
|
148
|
+
### Fixed
|
|
149
|
+
|
|
150
|
+
- The `create` doc comment in `index.d.ts` said it defaulted to true. It defaults to false.
|
|
151
|
+
|
|
152
|
+
### Changed
|
|
153
|
+
|
|
154
|
+
- Package descriptions and search keywords on npm and PyPI, and a README that leads with the
|
|
155
|
+
crash test.
|
|
156
|
+
|
|
157
|
+
## 0.2.3 — 2026-11-06
|
|
158
|
+
|
|
159
|
+
### Changed
|
|
160
|
+
|
|
161
|
+
- Releases are published from GitHub Actions with trusted publishing: npm with provenance,
|
|
162
|
+
PyPI with PEP 740 attestations. No token is stored. A GitHub Release whose tag doesn't
|
|
163
|
+
match the package version is refused.
|
|
164
|
+
|
|
165
|
+
### Fixed
|
|
166
|
+
|
|
167
|
+
- `AccountCapSpender` no longer locks an account after a burst of payments. An unbounded log
|
|
168
|
+
made the first payment after 3,000 tiny ones cost about 17.7M gas, past the 2^24
|
|
169
|
+
per-transaction cap. The window is now counted in 24 buckets in a fixed ring of 25 slots, so
|
|
170
|
+
every `pay` costs the same gas. A payment counts for up to one bucket (window/24) past its
|
|
171
|
+
window, never less. The window must be a multiple of 24 seconds.
|
|
172
|
+
- `walletcap awal-mcp` ran `npx -y @coinbase/payments-mcp`, which is Coinbase's installer, not
|
|
173
|
+
the MCP server. It now runs the installed server, `~/.payments-mcp/bundle.js`, and says how to
|
|
174
|
+
install it when it is missing.
|
|
175
|
+
- `walletcap awal-mcp` forwarded every tool it didn't count. It now passes through only the
|
|
176
|
+
tools that move no money, and counts `send` and `make_http_request_with_x402`. It refuses
|
|
177
|
+
everything else, `trade` included, and leaves those tools out of `tools/list`, unless the
|
|
178
|
+
owner names one with `--allow-tool`. JSON-RPC batches and lines that aren't JSON are refused.
|
|
179
|
+
|
|
180
|
+
### Added
|
|
181
|
+
|
|
182
|
+
- `budget.guardAgentKit(provider)` puts the budget on every x402 client an AgentKit
|
|
183
|
+
`X402ActionProvider` builds. The README's subclass recipe didn't compile in TypeScript,
|
|
184
|
+
where `createX402Client` is private. `tsc` now checks the recipe against AgentKit's declared
|
|
185
|
+
types in the test suite.
|
|
186
|
+
|
|
187
|
+
## 0.2.2 — 2026-11-05
|
|
188
|
+
|
|
189
|
+
### Changed
|
|
190
|
+
|
|
191
|
+
- A mixed-case EVM address is checked against EIP-55 before it is accepted. A bad
|
|
192
|
+
checksum is refused; all-lowercase and all-uppercase hex are still accepted.
|
|
193
|
+
- A Solana CAIP-10 address is reduced to its address, so it and the bare address
|
|
194
|
+
share one budget.
|
|
195
|
+
- Numeric `window` values are milliseconds in Python too, matching JavaScript.
|
|
196
|
+
|
|
197
|
+
### Fixed
|
|
198
|
+
|
|
199
|
+
- The rolling window cannot be shortened once the budget has spend. An edit can
|
|
200
|
+
change the cap and the per-payment limit, but it cannot reset the count by
|
|
201
|
+
shrinking the window.
|
|
202
|
+
|
|
203
|
+
### Added
|
|
204
|
+
|
|
205
|
+
- `SECURITY.md`, `docs/threat-model.md`, `docs/vendor-disclosure.md`, and the
|
|
206
|
+
Solidity audit status in `solidity/README.md`.
|
|
207
|
+
- `examples/quickstart/` in JavaScript and Python, run in CI. No wallet, chain,
|
|
208
|
+
keys or network.
|
|
209
|
+
- EIP-55, Solana CAIP-10, and window-freeze tests in both languages.
|
|
210
|
+
|
|
211
|
+
## 0.2.1 — 2026-11-05
|