@agenttrust-sdk/mcp 0.2.0 → 0.2.2
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/dist/embedded-data/devnet-attestor-trace.json +32 -0
- package/dist/embedded-data/devnet-chained-validation.json +52 -0
- package/dist/embedded-data/devnet-counterparties.json +53 -0
- package/dist/embedded-data/devnet-demo-policies.json +46 -0
- package/dist/embedded-data/devnet-namespaces.json +107 -0
- package/dist/embedded-data/devnet-smoke.json +24 -0
- package/dist/embedded-docs/getting-started/architecture-overview.mdx +85 -0
- package/dist/embedded-docs/getting-started/quickstart.mdx +100 -0
- package/dist/embedded-docs/index.mdx +64 -0
- package/dist/embedded-docs/integration-guides/capability-namespaces.mdx +15 -0
- package/dist/embedded-docs/integration-guides/custom-attestor.mdx +15 -0
- package/dist/embedded-docs/integration-guides/facilitator-adapters.mdx +85 -0
- package/dist/embedded-docs/integration-guides/pay-sh-adapter.mdx +110 -0
- package/dist/embedded-docs/integration-guides/x402-facilitator.mdx +79 -0
- package/dist/embedded-docs/programs/policy-vault/counterparty-tier-policy.mdx +15 -0
- package/dist/embedded-docs/programs/policy-vault/index.mdx +68 -0
- package/dist/embedded-docs/programs/policy-vault/kill-switch-policy.mdx +15 -0
- package/dist/embedded-docs/programs/policy-vault/require-validation-policy.mdx +15 -0
- package/dist/embedded-docs/programs/policy-vault/spending-policy.mdx +15 -0
- package/dist/embedded-docs/programs/policy-vault/velocity-policy.mdx +15 -0
- package/dist/embedded-docs/programs/trustgate.mdx +53 -0
- package/dist/embedded-docs/programs/validation-registry.mdx +49 -0
- package/dist/embedded-docs/reference/byte-offset-reference.mdx +20 -0
- package/dist/embedded-docs/reference/changelog.mdx +19 -0
- package/dist/embedded-docs/reference/devnet-program-ids.mdx +24 -0
- package/dist/embedded-docs/reference/discriminator-constants.mdx +16 -0
- package/dist/embedded-docs/reference/formal-verification.mdx +19 -0
- package/dist/embedded-docs/reference/mainnet-program-ids.mdx +16 -0
- package/dist/embedded-docs/reference/quantu-agent-registry.mdx +15 -0
- package/dist/embedded-docs/sdk/atomic-tx-invariant.mdx +37 -0
- package/dist/embedded-docs/sdk/gate-payment.mdx +22 -0
- package/dist/embedded-docs/sdk/index.mdx +73 -0
- package/dist/embedded-docs/sdk/mount-trustgate.mdx +15 -0
- package/dist/embedded-examples/attestor-demo/README.md +100 -0
- package/dist/embedded-examples/pay-sh-demo/README.md +136 -0
- package/dist/embedded-examples/pay-sh-demo/src/deps-real.ts +150 -0
- package/dist/embedded-examples/pay-sh-demo/src/deps.ts +150 -0
- package/dist/embedded-examples/pay-sh-demo/src/index.ts +471 -0
- package/dist/embedded-examples/pay-sh-demo/src/middleware.ts +198 -0
- package/dist/embedded-examples/pay-sh-demo/src/policy.ts +247 -0
- package/dist/embedded-examples/pay-sh-demo/src/x402.ts +140 -0
- package/dist/index.js +73 -18
- package/dist/index.js.map +1 -1
- package/dist/resources/docs.js +68 -46
- package/dist/resources/docs.js.map +1 -1
- package/dist/server.js +6 -1
- package/dist/server.js.map +1 -1
- package/dist/tools/discovery/docs.js +6 -0
- package/dist/tools/discovery/docs.js.map +1 -1
- package/dist/tools/discovery/facilitator-walkthrough.js +43 -18
- package/dist/tools/discovery/facilitator-walkthrough.js.map +1 -1
- package/dist/tools/read/demo-state.js +7 -4
- package/dist/tools/read/demo-state.js.map +1 -1
- package/dist/tools/read/simulate-payment.js +13 -1
- package/dist/tools/read/simulate-payment.js.map +1 -1
- package/dist/trustgate/server/src/facilitators/README.md +241 -0
- package/package.json +2 -2
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"network": "solana-devnet",
|
|
3
|
+
"program": "Cx4RFa6ysw3qXYhugPkF8pFSWBkmKq59h2dWgF2tKhtv",
|
|
4
|
+
"facilitator": "4tSEHc2vCLqnYd8nK9jRa44vnn8JnPxUgxheEmhWQhRG",
|
|
5
|
+
"attestor": "5xys6GcL3SeJmA9evUH6d3pADkD22DWxRNAdpytwxcYy",
|
|
6
|
+
"subjectAsset": "C6cuZeDT4kmCC1RXw8mzaoLGwmAMe5fHDvutAjicVi8B",
|
|
7
|
+
"capabilityName": "usdc-payment-policy.v1",
|
|
8
|
+
"capturedAt": "2026-05-06T17:53:59.262Z",
|
|
9
|
+
"steps": {
|
|
10
|
+
"registerNamespace": {
|
|
11
|
+
"skipped": true,
|
|
12
|
+
"pda": "34gonn86FjxzXZMGd43RSvQVyH1r6PrGV9xnHXjjkEwR",
|
|
13
|
+
"explorer": "https://explorer.solana.com/address/34gonn86FjxzXZMGd43RSvQVyH1r6PrGV9xnHXjjkEwR?cluster=devnet"
|
|
14
|
+
},
|
|
15
|
+
"registerAttestor": {
|
|
16
|
+
"skipped": true,
|
|
17
|
+
"pda": "GTzWJzV5htNi1Ntqwq2e2ydu9h4rArnKQwzv2sJjC9zP",
|
|
18
|
+
"explorer": "https://explorer.solana.com/address/GTzWJzV5htNi1Ntqwq2e2ydu9h4rArnKQwzv2sJjC9zP?cluster=devnet"
|
|
19
|
+
},
|
|
20
|
+
"requestValidation": {
|
|
21
|
+
"signature": "4GtUt5qbevHsjKRtD3Fwi2LzPBsyy2QAGm33Dsq4PW4mTHfE8Z7NQ98yAkS6a3qdjf38xMHqhNv8Zoh2Y9U5NgCn",
|
|
22
|
+
"explorer": "https://explorer.solana.com/tx/4GtUt5qbevHsjKRtD3Fwi2LzPBsyy2QAGm33Dsq4PW4mTHfE8Z7NQ98yAkS6a3qdjf38xMHqhNv8Zoh2Y9U5NgCn?cluster=devnet",
|
|
23
|
+
"pda": "HDiDpr7sqM7D8ZdkaGfnnpXaDfryqoFBG3ZJwJ6UgiBF",
|
|
24
|
+
"requester": "5WP1RUQXFyvBNuiyg4b14FknHMTwsDt5Eqdq7UP72nw"
|
|
25
|
+
},
|
|
26
|
+
"respondToValidation": {
|
|
27
|
+
"skipped": true,
|
|
28
|
+
"pda": "C6Yr7oKcZ6sDVibR35SWbFnGCXyfQjLeRCiPbjxYq6vY",
|
|
29
|
+
"explorer": "https://explorer.solana.com/address/C6Yr7oKcZ6sDVibR35SWbFnGCXyfQjLeRCiPbjxYq6vY?cluster=devnet"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"network": "solana-devnet",
|
|
3
|
+
"capturedAt": "2026-05-07T15:27:03.326Z",
|
|
4
|
+
"capability": {
|
|
5
|
+
"name": "kyc.tier-1.v1",
|
|
6
|
+
"hash": "366c075140aa69746625d4b733b55e267fc5c28387fd6d1c24901976ee3ddc42",
|
|
7
|
+
"pda": "4ryEbb5iSiXHN2bJ59s9Pjdi2xxRkty1WohaRTqUt8wW"
|
|
8
|
+
},
|
|
9
|
+
"actors": {
|
|
10
|
+
"facilitator": "4tSEHc2vCLqnYd8nK9jRa44vnn8JnPxUgxheEmhWQhRG",
|
|
11
|
+
"attestor": "5xys6GcL3SeJmA9evUH6d3pADkD22DWxRNAdpytwxcYy",
|
|
12
|
+
"policyAgent": "6QdWe1EAy2WyZeeTxLsm59eGEnkbbAE8SPuvxvcfoQXR",
|
|
13
|
+
"payee": "2LH5VR3AzKndcHkPQAwZ2mAKuW9FmXDAtmcvsmkZvjVE"
|
|
14
|
+
},
|
|
15
|
+
"policy": {
|
|
16
|
+
"pda": "3TAUqhtowPfb1HEVm72HLwVR9sHB6WdChrvTzsP2zHxk",
|
|
17
|
+
"pdaExplorer": "https://explorer.solana.com/address/3TAUqhtowPfb1HEVm72HLwVR9sHB6WdChrvTzsP2zHxk?cluster=devnet",
|
|
18
|
+
"enabledKinds": "KIND_KILLSWITCH | KIND_VALIDATION",
|
|
19
|
+
"bitmask": "0x11",
|
|
20
|
+
"requiredCapabilityHash": "366c075140aa69746625d4b733b55e267fc5c28387fd6d1c24901976ee3ddc42",
|
|
21
|
+
"acceptedAttestors": [
|
|
22
|
+
"5xys6GcL3SeJmA9evUH6d3pADkD22DWxRNAdpytwxcYy",
|
|
23
|
+
"11111111111111111111111111111111"
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
"chain": {
|
|
27
|
+
"gateBeforeAttestation": {
|
|
28
|
+
"signature": "3oKW7QugBLJ7kH2QbLLWEuEn3MyNmLWCj3XovCSdDQNmq5HriwNKvPMUR9TQByZPBAPbvprDfdeYDZvh7ofntRRh",
|
|
29
|
+
"explorer": "https://explorer.solana.com/tx/3oKW7QugBLJ7kH2QbLLWEuEn3MyNmLWCj3XovCSdDQNmq5HriwNKvPMUR9TQByZPBAPbvprDfdeYDZvh7ofntRRh?cluster=devnet",
|
|
30
|
+
"decisionKind": "RequireValidation",
|
|
31
|
+
"note": "validation_attestation account not provided → policy KIND_VALIDATION returns RequireValidation in return data"
|
|
32
|
+
},
|
|
33
|
+
"requestValidation": {
|
|
34
|
+
"signature": "2KbXYCF67D2f2fKHk5yTzrkFBr1mV47Q3Yb1veH5e3PX4PuLa66suodAUc7uTBnr6Y44NGV1TfHHMtAZiFSnbbRF",
|
|
35
|
+
"explorer": "https://explorer.solana.com/tx/2KbXYCF67D2f2fKHk5yTzrkFBr1mV47Q3Yb1veH5e3PX4PuLa66suodAUc7uTBnr6Y44NGV1TfHHMtAZiFSnbbRF?cluster=devnet",
|
|
36
|
+
"pda": "oAA3TRPWRyCnVG1htRnv2E1UHPXEweDPp9zcYjw6GFZ",
|
|
37
|
+
"requester": "Ajc1wxYLM1RnyJeiGUbSqV4vDHrZphcCXDDaSHxgHQxz"
|
|
38
|
+
},
|
|
39
|
+
"respondToValidation": {
|
|
40
|
+
"signature": "67CzMS9GEtUBesNznKpT2UWqvjEBzhgZd7AVkhXKQ5SoqRoBotcaYf1sTF8sHxj55TNT9k847nj7FQdrwAqKussp",
|
|
41
|
+
"explorer": "https://explorer.solana.com/tx/67CzMS9GEtUBesNznKpT2UWqvjEBzhgZd7AVkhXKQ5SoqRoBotcaYf1sTF8sHxj55TNT9k847nj7FQdrwAqKussp?cluster=devnet",
|
|
42
|
+
"pda": "8YKqUeNktUGwGewrc9ghmjJj5oB3Y5dcFuaBLrVnxt2q"
|
|
43
|
+
},
|
|
44
|
+
"gateAfterAttestation": {
|
|
45
|
+
"signature": "dEXkCEeSn8uiVAa14u7EusdFufSuUQttmcTdLHMSq5J3VSARM4KMRCfwpRSkVmYBc1yRQuyvPMCebifCf1dmrmC",
|
|
46
|
+
"explorer": "https://explorer.solana.com/tx/dEXkCEeSn8uiVAa14u7EusdFufSuUQttmcTdLHMSq5J3VSARM4KMRCfwpRSkVmYBc1yRQuyvPMCebifCf1dmrmC?cluster=devnet",
|
|
47
|
+
"decisionKind": "Allow",
|
|
48
|
+
"validationAttestation": "8YKqUeNktUGwGewrc9ghmjJj5oB3Y5dcFuaBLrVnxt2q",
|
|
49
|
+
"note": "validation_attestation provided → policy KIND_VALIDATION verifies and returns Allow"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"network": "solana-devnet",
|
|
3
|
+
"programs": {
|
|
4
|
+
"agentRegistry": "8oo4J9tBB3Hna1jRQ3rWvJjojqM5DYTDJo5cejUuJy3C",
|
|
5
|
+
"atomEngine": "AToMufS4QD6hEXvcvBDg9m1AHeCLpmZQsyfYa5h9MwAF"
|
|
6
|
+
},
|
|
7
|
+
"baseCollection": "6CTyGPcn8dMwKEqgtvx2XCpkGUd7uqCVK6937RSM5bhA",
|
|
8
|
+
"rootConfig": "GGQfKNpXq8HchNxecLfXi8D7xz9PDppdPAPgr5Fx4Nvd",
|
|
9
|
+
"atomConfig": "4XeDhpmZ5GbfSbqgTcD3t6FKRXpMg8jixbqWDbthDSrk",
|
|
10
|
+
"registryConfig": "Djy4TKPvFyEumcVTDCqJUHWErKqcaeRj4ULWwaPkedor",
|
|
11
|
+
"counterparties": [
|
|
12
|
+
{
|
|
13
|
+
"id": 1,
|
|
14
|
+
"label": "tier-0 untrusted",
|
|
15
|
+
"demoTier": 0,
|
|
16
|
+
"asset": "5n3PqYDYGJcPEjTbhASmMU915k8pqaffYwgRwu2Uf7ms",
|
|
17
|
+
"agentAccount": "C9pYqwnCVpwg7MwEbQa4XcmVVYsUcPwqHMYs999KB3dR",
|
|
18
|
+
"atomStats": "B3z3Tbwz5hSQAktb96GVRGC5nTX5BuzXZvkgNSqyqbtk",
|
|
19
|
+
"owner": "4tSEHc2vCLqnYd8nK9jRa44vnn8JnPxUgxheEmhWQhRG",
|
|
20
|
+
"registerSig": "4Vb37HGeAtNsjjYcNcE1nbqFtHd8HRmGSP4XD5f22BvvKYLwYEW8i2zUGYMFHEsaNAS1x2Qy3qFKe1qKrGs9ZsJe",
|
|
21
|
+
"initializeStatsSig": "n1cjWXzg5roEAZGPfQpbp11M7J9qgMgbQLEb4cRMFPgwSeSZMSWAnVpi39ALYdqHdhqB4LCmURFC1XVWwWFkpfK",
|
|
22
|
+
"registeredAtSlot": 460465233,
|
|
23
|
+
"initializedAtSlot": 460465235
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"id": 2,
|
|
27
|
+
"label": "tier-1 low-trust",
|
|
28
|
+
"demoTier": 1,
|
|
29
|
+
"asset": "BTcgiDauqVHoGMiXujytE5wycfncDEmNnXJiUZ4s4oWL",
|
|
30
|
+
"agentAccount": "9894Sh7F79yDzTi4Pvfm5Jy5VmLpx2XkyhS14BFwpyrd",
|
|
31
|
+
"atomStats": "DcqfJGjKfub8PvKKmQxVz6FTe1QBhbvZzksmhPmhKu2u",
|
|
32
|
+
"owner": "4tSEHc2vCLqnYd8nK9jRa44vnn8JnPxUgxheEmhWQhRG",
|
|
33
|
+
"registerSig": "4ovG6hoFoNaG2aSMki4Y2ijTEVpxPPmsaz9rFksoLeBjUrAvu1sjchBH5bY5WosDTBSnJ9wymKH2woX8iuMwojGj",
|
|
34
|
+
"initializeStatsSig": "53UnwEp2L5Turg97LzokJYs8XVFMtRqNL9s3HMHSzXyr28mkUz9Y7wURXMocKDyT4MdkAvoVDYXoydkRtywyTMwt",
|
|
35
|
+
"registeredAtSlot": 460465240,
|
|
36
|
+
"initializedAtSlot": 460465242
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"id": 3,
|
|
40
|
+
"label": "tier-3 trusted",
|
|
41
|
+
"demoTier": 3,
|
|
42
|
+
"asset": "C6cuZeDT4kmCC1RXw8mzaoLGwmAMe5fHDvutAjicVi8B",
|
|
43
|
+
"agentAccount": "5PfaofvEUf3adtJwMho7zzbfvgxwxbvp2V5moqhtLK8y",
|
|
44
|
+
"atomStats": "4z9RiK6B49QZbmqPM9yNZWgfxYD3tvQ3NETU6X89f5mv",
|
|
45
|
+
"owner": "4tSEHc2vCLqnYd8nK9jRa44vnn8JnPxUgxheEmhWQhRG",
|
|
46
|
+
"registerSig": "4HxNAVDLwC1BQTRaTiYQ1c1EpUcYcsjdQ3yNc9aWd4ayuzr1VwTbXiWdej3ekHpcwjehqpe5kAm8zZ8XMrg7W31w",
|
|
47
|
+
"initializeStatsSig": "5JZXZ8Q9X1pLdtZe2mU2KqQLFmhURr3qkfUMiDvb2bNEU1A51y94fuCdcp8qjhN9hRo2VU2mzmor3NaVUjzdvGbK",
|
|
48
|
+
"registeredAtSlot": 460465247,
|
|
49
|
+
"initializedAtSlot": 460465249
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"updatedAt": "2026-05-06T10:30:21.168Z"
|
|
53
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"capturedAt": "2026-05-07T17:38:06.078Z",
|
|
3
|
+
"policyId": 1,
|
|
4
|
+
"minTier": 2,
|
|
5
|
+
"agents": [
|
|
6
|
+
{
|
|
7
|
+
"label": "tier-3",
|
|
8
|
+
"agent": "5PfaofvEUf3adtJwMho7zzbfvgxwxbvp2V5moqhtLK8y",
|
|
9
|
+
"policyAccount": "975DgYCYFB143Xodu6tRyQjVZBsbKSu5Xot2VSWKYqGW",
|
|
10
|
+
"velocityLedger": "GXRfJjjoToi73qLwjnbpkWYnhh166VxAUg7noBT3Dx82",
|
|
11
|
+
"policyAuthority": "951KQaY4bSwCbSoCBrixLfacW2AHwKru2aaCTbuAQPFw",
|
|
12
|
+
"killSwitchState": "9BheN4YzgM3jNANxRXYEbG2i9JjEtQACGdFJ3ZEucPYg",
|
|
13
|
+
"txs": {
|
|
14
|
+
"initAuthority": "4tJfmiw2qy3HFs5XjCjrFwThaetrNGsPek7N38aH5AdpG8X9wVfUdhMVk3yLdZwfM3QktPBceHCmpm8p2Muqkmco",
|
|
15
|
+
"initKillswitch": "5s28mwBaSCqqAGiMopYpvqH5fQDLyjMUaSdXC7maVChph3d9srHRGLxzgYgX4GYissr7Erkuh19L9A3bH7c8kMjg",
|
|
16
|
+
"initPolicy": "2UvSB66xqBNftbuz4p25W38yLweskKCPzJnveL56GPLvpWi625eKHDmfSj4V5omsKGDB3pPRAyD6skWWVRe2QPhJ"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"label": "tier-1",
|
|
21
|
+
"agent": "9894Sh7F79yDzTi4Pvfm5Jy5VmLpx2XkyhS14BFwpyrd",
|
|
22
|
+
"policyAccount": "C8NRWtSF3PnrDBV72jiKskp9JAQ5vEFqCs7JD45QYpfP",
|
|
23
|
+
"velocityLedger": "8V6XaLAY1GMF3qZBVhXQ9deRa6t1hgFoejBuhUr2w7DJ",
|
|
24
|
+
"policyAuthority": "9N4uJiRQU9fdEfmMYqy8qpyoEEsDknEa3KuEn7LhAXSv",
|
|
25
|
+
"killSwitchState": "EJW6frkZ6DgnEpgQPpjUsrzcXXsqunam4fVfV7goNLax",
|
|
26
|
+
"txs": {
|
|
27
|
+
"initAuthority": "4hForh7HB96jXThP946Ydtr7QV3N2nkRxAPGXNqnLMaphz8BtQYp1gMKkteAw95dZZfLRUMwkPeajAMxu4LZBJir",
|
|
28
|
+
"initKillswitch": "NsJx62L8ipddCFUvGz9wzqsZKa5QaaowPJAfqv3qB6o6BSzmp34E6QmwHerQzZ4mNWWSYJdKDDvt3DGRQ1b2TZX",
|
|
29
|
+
"initPolicy": "2wa8aETQLNFYkM2w2dNqCTRBpPuobdTSdyUwLefZZ4NtZpPSS4DgxD7jEkUNeSyLL2EAbHaNby8shC1WAMUTg9DU"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"label": "tier-0",
|
|
34
|
+
"agent": "C9pYqwnCVpwg7MwEbQa4XcmVVYsUcPwqHMYs999KB3dR",
|
|
35
|
+
"policyAccount": "D23WyGLLcYYRthazJQMidngTw5jRCtRP5AiBdJFMZDxu",
|
|
36
|
+
"velocityLedger": "7VNxDdrVREfottLjXPYcFdMDY3gnSUC6XXX5cjFyPXkT",
|
|
37
|
+
"policyAuthority": "HAAYMhBEgRAdm5cKPVyAABxPtaa5zR6Vf37S9cU3cRmn",
|
|
38
|
+
"killSwitchState": "33BqvXUZbyRmdPb63wdLDnHwUBDWGF6BssWMrCJednJK",
|
|
39
|
+
"txs": {
|
|
40
|
+
"initAuthority": "5CQEnQshumcnLqWBvAnxpfG3km4v44tRjRq8osGivH6NqaP2roPr4GutzJ24X9c4TUzB6RybrVDMZvgBcuYowEv3",
|
|
41
|
+
"initKillswitch": "3DyAL9SKQSxVa5KwD8BSzn8tBTgG9QW6unryx7jNENUXnG3WVWtpC3kxCXR5U88GUBTvjuCrNrepeC2p3dy9ueFF",
|
|
42
|
+
"initPolicy": "9YWho41GEX3B9956yq6oZtK1VdpgefJvhMkwqcjHADYtdtu7XB6RFKfCytkhQV93swDdfY4De24EE8SwCsSMX5u"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
{
|
|
2
|
+
"network": "solana-devnet",
|
|
3
|
+
"program": "Cx4RFa6ysw3qXYhugPkF8pFSWBkmKq59h2dWgF2tKhtv",
|
|
4
|
+
"facilitator": "4tSEHc2vCLqnYd8nK9jRa44vnn8JnPxUgxheEmhWQhRG",
|
|
5
|
+
"capturedAt": "2026-05-07T15:08:37.863Z",
|
|
6
|
+
"namespaceCount": 10,
|
|
7
|
+
"namespaces": [
|
|
8
|
+
{
|
|
9
|
+
"name": "kyc.tier-1.v1",
|
|
10
|
+
"description": "Identity-verified individual (basic KYC).",
|
|
11
|
+
"pda": "4ryEbb5iSiXHN2bJ59s9Pjdi2xxRkty1WohaRTqUt8wW",
|
|
12
|
+
"capabilityHash": "366c075140aa69746625d4b733b55e267fc5c28387fd6d1c24901976ee3ddc42",
|
|
13
|
+
"signature": "5jBmV36b89kMxzqPPtzFTWJD12vvB6TznMBGwZWtKNSApfuPzoPmJVAG2ed8bRWMkTfZ6QF3Ks21KESaTxU7Mb1W",
|
|
14
|
+
"signatureExplorer": "https://explorer.solana.com/tx/5jBmV36b89kMxzqPPtzFTWJD12vvB6TznMBGwZWtKNSApfuPzoPmJVAG2ed8bRWMkTfZ6QF3Ks21KESaTxU7Mb1W?cluster=devnet",
|
|
15
|
+
"pdaExplorer": "https://explorer.solana.com/address/4ryEbb5iSiXHN2bJ59s9Pjdi2xxRkty1WohaRTqUt8wW?cluster=devnet",
|
|
16
|
+
"status": "newly-registered"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "kyc.tier-2.v1",
|
|
20
|
+
"description": "Identity + address verified.",
|
|
21
|
+
"pda": "HdAABUX5ojFZXocxSbTwvdNLXHGLaHnqCrKSKpeKXGCv",
|
|
22
|
+
"capabilityHash": "2ad4289070be21da32adda7025437390a78827c69caba13f2807c65a9689efc8",
|
|
23
|
+
"signature": "3tBAqxVnyqDj23P1Jyk1atdunUrsm4M54g4NDUKgAFJyeMLjfbpXe6ZR6QKcBMmRpA4HxfTVbVnD3pavcQtB3R81",
|
|
24
|
+
"signatureExplorer": "https://explorer.solana.com/tx/3tBAqxVnyqDj23P1Jyk1atdunUrsm4M54g4NDUKgAFJyeMLjfbpXe6ZR6QKcBMmRpA4HxfTVbVnD3pavcQtB3R81?cluster=devnet",
|
|
25
|
+
"pdaExplorer": "https://explorer.solana.com/address/HdAABUX5ojFZXocxSbTwvdNLXHGLaHnqCrKSKpeKXGCv?cluster=devnet",
|
|
26
|
+
"status": "newly-registered"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "kyc.tier-3.v1",
|
|
30
|
+
"description": "Enhanced due diligence (regulated counterparties).",
|
|
31
|
+
"pda": "6gjTXCJE4qWybYGjTAg5ckYWBgBtt4ebvr39uU5YK5xL",
|
|
32
|
+
"capabilityHash": "8fdd7707b57ba8362d5545827f4d52793d6fbd3c04fa6b790bcf7652726d093e",
|
|
33
|
+
"signature": "3LH2WNYn6ifYaXmF7WPcD5bsJB9T3HT3NgpeX13Jf1jg6eyfjQG8PBRqQjBQxT2HexTgzEvRJjcmonsRPXVmwGMp",
|
|
34
|
+
"signatureExplorer": "https://explorer.solana.com/tx/3LH2WNYn6ifYaXmF7WPcD5bsJB9T3HT3NgpeX13Jf1jg6eyfjQG8PBRqQjBQxT2HexTgzEvRJjcmonsRPXVmwGMp?cluster=devnet",
|
|
35
|
+
"pdaExplorer": "https://explorer.solana.com/address/6gjTXCJE4qWybYGjTAg5ckYWBgBtt4ebvr39uU5YK5xL?cluster=devnet",
|
|
36
|
+
"status": "newly-registered"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "audit.smart-contract.v1",
|
|
40
|
+
"description": "Audit attestation against a deployed program.",
|
|
41
|
+
"pda": "HygALr1ZSqrYZTLBQUQ97vMSzAiuZRpKYovRhfyGtKkF",
|
|
42
|
+
"capabilityHash": "e61adaa34c65dc69ababec20b8cb67865c0ce8ddce3e1e796729f3c07bf5e586",
|
|
43
|
+
"signature": "319AFhK4wpWmhauHqsVUoqUdx3gadHcGsMNyAvt7Hgoau7ceAohViHAGRtvLP3PStF1Sqz5UkSCJy11nAqNJrRQa",
|
|
44
|
+
"signatureExplorer": "https://explorer.solana.com/tx/319AFhK4wpWmhauHqsVUoqUdx3gadHcGsMNyAvt7Hgoau7ceAohViHAGRtvLP3PStF1Sqz5UkSCJy11nAqNJrRQa?cluster=devnet",
|
|
45
|
+
"pdaExplorer": "https://explorer.solana.com/address/HygALr1ZSqrYZTLBQUQ97vMSzAiuZRpKYovRhfyGtKkF?cluster=devnet",
|
|
46
|
+
"status": "newly-registered"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "audit.attestor-firm.v1",
|
|
50
|
+
"description": "Per-firm audit identity (Halborn / OtterSec / etc.).",
|
|
51
|
+
"pda": "A5rrMRYxezaNUnSgqyyNjJUqHf4TH7GKNsvUifWjUESi",
|
|
52
|
+
"capabilityHash": "17926cb4f3241807a5115f454e2c1d5f6eb9a4b822a42e9e7135a5bd225abb39",
|
|
53
|
+
"signature": "5KQG73FhBjixhaK3jE3XvsVJh4Xcd8kWMWphwuj9dHkTLTMhxwYB4BMzGw1TF8ZGnY6ZXTLY4CbeBZhF6nTobrNo",
|
|
54
|
+
"signatureExplorer": "https://explorer.solana.com/tx/5KQG73FhBjixhaK3jE3XvsVJh4Xcd8kWMWphwuj9dHkTLTMhxwYB4BMzGw1TF8ZGnY6ZXTLY4CbeBZhF6nTobrNo?cluster=devnet",
|
|
55
|
+
"pdaExplorer": "https://explorer.solana.com/address/A5rrMRYxezaNUnSgqyyNjJUqHf4TH7GKNsvUifWjUESi?cluster=devnet",
|
|
56
|
+
"status": "newly-registered"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "model-card.v1",
|
|
60
|
+
"description": "LLM model-version provenance attestation.",
|
|
61
|
+
"pda": "DZ7eneZtKsN39q771ruHvBXoTUDRzxKqDipTLbeRGa4o",
|
|
62
|
+
"capabilityHash": "d90347d0a0a7108b147c06a9dfe427e7a4700fb0cf752a32d3752dae91b83e06",
|
|
63
|
+
"signature": "gmHvwe6NBB6vjMNPrMppfm2SVjvhizubUX8pACBJTZZ8rnbRaBFaLYuGqoa4TtApK2JqDFrUggZj8WS87xXGds6",
|
|
64
|
+
"signatureExplorer": "https://explorer.solana.com/tx/gmHvwe6NBB6vjMNPrMppfm2SVjvhizubUX8pACBJTZZ8rnbRaBFaLYuGqoa4TtApK2JqDFrUggZj8WS87xXGds6?cluster=devnet",
|
|
65
|
+
"pdaExplorer": "https://explorer.solana.com/address/DZ7eneZtKsN39q771ruHvBXoTUDRzxKqDipTLbeRGa4o?cluster=devnet",
|
|
66
|
+
"status": "newly-registered"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "jurisdiction.v1",
|
|
70
|
+
"description": "Regulatory-jurisdiction stamp (EU MiCA, US, etc.).",
|
|
71
|
+
"pda": "Cd4sp8isN3CF8KiRchDNoMhsVERSpswEnufvBR21Jrnu",
|
|
72
|
+
"capabilityHash": "ce281890788155a04e7ed91966697ba45aaaad7495d193359d38295311f80685",
|
|
73
|
+
"signature": "5fUkGfziyLWbMeqp6pfZXrWMBf2mc3VzMZEsHUYjsynvANQSzjQtAkakVxXJNvPPQaCBEg8YnErk82VLbSHxSUMV",
|
|
74
|
+
"signatureExplorer": "https://explorer.solana.com/tx/5fUkGfziyLWbMeqp6pfZXrWMBf2mc3VzMZEsHUYjsynvANQSzjQtAkakVxXJNvPPQaCBEg8YnErk82VLbSHxSUMV?cluster=devnet",
|
|
75
|
+
"pdaExplorer": "https://explorer.solana.com/address/Cd4sp8isN3CF8KiRchDNoMhsVERSpswEnufvBR21Jrnu?cluster=devnet",
|
|
76
|
+
"status": "newly-registered"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": "compliance.payments.v1",
|
|
80
|
+
"description": "Payment-network compliance attestation (Mastercard FACT-aligned, etc.).",
|
|
81
|
+
"pda": "Cn54CpSdfrME7epZ2VTSwhuTbcwH3ZttpcwjZADc5yrZ",
|
|
82
|
+
"capabilityHash": "0a8984a645e7389b9a323a14550f549509fbf4f75a5553f7cabaa45e48c59e0b",
|
|
83
|
+
"signature": "5B3ZfMMAjDSyrTnhGzXCCNcdg4yEeRepb8v1d8fK299WiyJpex5RbiW7ahha1VxPJfVSixyfXtb7R4wSFfd11Wm4",
|
|
84
|
+
"signatureExplorer": "https://explorer.solana.com/tx/5B3ZfMMAjDSyrTnhGzXCCNcdg4yEeRepb8v1d8fK299WiyJpex5RbiW7ahha1VxPJfVSixyfXtb7R4wSFfd11Wm4?cluster=devnet",
|
|
85
|
+
"pdaExplorer": "https://explorer.solana.com/address/Cn54CpSdfrME7epZ2VTSwhuTbcwH3ZttpcwjZADc5yrZ?cluster=devnet",
|
|
86
|
+
"status": "newly-registered"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "agent-source.v1",
|
|
90
|
+
"description": "Provenance: which dev shop authored the agent.",
|
|
91
|
+
"pda": "DqSwaqENQhjPUajxfmzsjTcfTcnNXtNN22f3kYyAHvSJ",
|
|
92
|
+
"capabilityHash": "2328df178dc6bf6b0ad54c656865dc01cda1e38714b9260ac4ceae01fd7fede3",
|
|
93
|
+
"signature": "52mqFEk5gpytgYjhsq4j7yML4tEcxg7jQhwb5Z6xqmx3cecX8vXP4C5NN6PRyXPSGtnTeSVZ8nBVaaYimU4NP4nH",
|
|
94
|
+
"signatureExplorer": "https://explorer.solana.com/tx/52mqFEk5gpytgYjhsq4j7yML4tEcxg7jQhwb5Z6xqmx3cecX8vXP4C5NN6PRyXPSGtnTeSVZ8nBVaaYimU4NP4nH?cluster=devnet",
|
|
95
|
+
"pdaExplorer": "https://explorer.solana.com/address/DqSwaqENQhjPUajxfmzsjTcfTcnNXtNN22f3kYyAHvSJ?cluster=devnet",
|
|
96
|
+
"status": "newly-registered"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"name": "usdc-payment-policy.v1",
|
|
100
|
+
"description": "USDC payment policy capability — Phase D attestor demo.",
|
|
101
|
+
"pda": "34gonn86FjxzXZMGd43RSvQVyH1r6PrGV9xnHXjjkEwR",
|
|
102
|
+
"capabilityHash": "a968ecd0b93d9bfe57aa62c56d1e439717cf51d1dfe0ec413267834f2ca08375",
|
|
103
|
+
"pdaExplorer": "https://explorer.solana.com/address/34gonn86FjxzXZMGd43RSvQVyH1r6PrGV9xnHXjjkEwR?cluster=devnet",
|
|
104
|
+
"status": "already-registered"
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"network": "solana-devnet",
|
|
3
|
+
"facilitator": "4tSEHc2vCLqnYd8nK9jRa44vnn8JnPxUgxheEmhWQhRG",
|
|
4
|
+
"payer": "9APHgkXz4Zqb7ZBtK9ZzdiBCaVWkozpMJ8VVuuAwnpZ5",
|
|
5
|
+
"mint": "2EGGN4fB5nkhuJQJ1mE9DrCBqmuCECSAvocMU4xbNqMY",
|
|
6
|
+
"transferAmount": "1000",
|
|
7
|
+
"signedTransfer": {
|
|
8
|
+
"signature": "uXL2Kk1C9JQPSQ8gY4VpRUyKNP2muP4ouF1kToz6BoAdNygVrbxaqwy9xHPCLupczAKsYHKyFkTvHEZ1P5ZDyhs",
|
|
9
|
+
"explorer": "https://explorer.solana.com/tx/uXL2Kk1C9JQPSQ8gY4VpRUyKNP2muP4ouF1kToz6BoAdNygVrbxaqwy9xHPCLupczAKsYHKyFkTvHEZ1P5ZDyhs?cluster=devnet"
|
|
10
|
+
},
|
|
11
|
+
"emitFeedback": {
|
|
12
|
+
"signature": "jMobmWJUAXuL8FmQujfxW9NmeMbzADUoABzqjiMeuc5m3YXyeuZeUw1ZJc29JGsqyWQGDY8q3vrtBdamhKXraag",
|
|
13
|
+
"explorer": "https://explorer.solana.com/tx/jMobmWJUAXuL8FmQujfxW9NmeMbzADUoABzqjiMeuc5m3YXyeuZeUw1ZJc29JGsqyWQGDY8q3vrtBdamhKXraag?cluster=devnet",
|
|
14
|
+
"logPda": "HB4BBi9jaD3VPcZkQQaH3DxukSqBiXfW8RejtaLa8bF3",
|
|
15
|
+
"slot": 460466788
|
|
16
|
+
},
|
|
17
|
+
"counterpartyAgent": {
|
|
18
|
+
"agentAccount": "5PfaofvEUf3adtJwMho7zzbfvgxwxbvp2V5moqhtLK8y",
|
|
19
|
+
"asset": "C6cuZeDT4kmCC1RXw8mzaoLGwmAMe5fHDvutAjicVi8B",
|
|
20
|
+
"atomStats": "4z9RiK6B49QZbmqPM9yNZWgfxYD3tvQ3NETU6X89f5mv"
|
|
21
|
+
},
|
|
22
|
+
"facilitatorBalanceSol": "8.905693",
|
|
23
|
+
"capturedAt": "2026-05-06T17:53:48.313Z"
|
|
24
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Architecture overview
|
|
3
|
+
description: How AgentTrust composes x402 facilitators, Solana policy, settlement, and feedback.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
AgentTrust has three on-chain programs, one TypeScript SDK, and one facilitator-adapter layer. Pay.sh is the first concrete adapter. The design keeps protocol-specific wire shapes outside the policy and feedback path.
|
|
7
|
+
|
|
8
|
+
## Current flow
|
|
9
|
+
|
|
10
|
+
```txt
|
|
11
|
+
agent request
|
|
12
|
+
-> x402 facilitator (Pay.sh today)
|
|
13
|
+
-> FacilitatorAdapter.parseRequest
|
|
14
|
+
-> VerifyContext
|
|
15
|
+
-> PolicyVault gate_payment
|
|
16
|
+
-> Allow | Deny | RequireValidation
|
|
17
|
+
-> signed settlement path
|
|
18
|
+
-> SPL transfer
|
|
19
|
+
-> TrustGate emit_feedback
|
|
20
|
+
-> Quantu agent_registry_8004 give_feedback
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Components
|
|
24
|
+
|
|
25
|
+
| Component | Location | Responsibility |
|
|
26
|
+
| --- | --- | --- |
|
|
27
|
+
| PolicyVault | `programs/policy-vault` | compose five policy kinds and return a decision |
|
|
28
|
+
| TrustGate | `programs/trustgate` | sign feedback CPI as the facilitator PDA |
|
|
29
|
+
| ValidationRegistry | `programs/validation-registry` | store capability attestations read by PolicyVault |
|
|
30
|
+
| Facilitator adapters | `trustgate/server/src/facilitators` | translate Pay.sh / Dexter / atxp_ai / MCPay wire shapes into `VerifyContext` |
|
|
31
|
+
| SDK | `trustgate/sdk` | expose client helpers and Express routes |
|
|
32
|
+
|
|
33
|
+
## Why adapters exist
|
|
34
|
+
|
|
35
|
+
Every x402 facilitator carries the same payment intent but differs in headers, body shape, proof payload, retry behavior, and settlement metadata. AgentTrust isolates those differences in five adapter methods:
|
|
36
|
+
|
|
37
|
+
| Method | Responsibility |
|
|
38
|
+
| --- | --- |
|
|
39
|
+
| `parseRequest` | turn a facilitator request into `VerifyContext` |
|
|
40
|
+
| `formatChallenge` | render Allow / Deny / RequireValidation back into that facilitator's wire shape |
|
|
41
|
+
| `formatSettlement` | produce settlement metadata or an unsigned transaction skeleton |
|
|
42
|
+
| `validatePaymentProof` | verify proof shape and cross-check transfer context |
|
|
43
|
+
| `emitFeedback` | call the feedback CPI idempotently |
|
|
44
|
+
|
|
45
|
+
Routes, policy logic, and registry reads do not branch on a facilitator name.
|
|
46
|
+
|
|
47
|
+
## Decision path
|
|
48
|
+
|
|
49
|
+
PolicyVault is deliberately fail-fast:
|
|
50
|
+
|
|
51
|
+
1. `KillSwitch`
|
|
52
|
+
2. `Spending`
|
|
53
|
+
3. `Velocity`
|
|
54
|
+
4. `CounterpartyTier`
|
|
55
|
+
5. `RequireValidation`
|
|
56
|
+
|
|
57
|
+
State changes are applied only on `Allow`. `Deny` and `RequireValidation` return a decision without mutating spending or velocity counters.
|
|
58
|
+
|
|
59
|
+
## Trust reads
|
|
60
|
+
|
|
61
|
+
PolicyVault reads foreign PDAs defensively:
|
|
62
|
+
|
|
63
|
+
| Data | Parser | Locked offset |
|
|
64
|
+
| --- | --- | --- |
|
|
65
|
+
| Quantu `AtomStats.risk_score` | `policy-vault/src/ext/atom_engine.rs` | byte `549` |
|
|
66
|
+
| Quantu `AtomStats.trust_tier` | `policy-vault/src/ext/atom_engine.rs` | byte `551` |
|
|
67
|
+
| Quantu `AtomStats.confidence` | `policy-vault/src/ext/atom_engine.rs` | bytes `557..558` |
|
|
68
|
+
| AgentTrust attestation subject | `policy-vault/src/ext/validation_registry.rs` | byte `8` |
|
|
69
|
+
| AgentTrust attestation expiry | `policy-vault/src/ext/validation_registry.rs` | byte `208` |
|
|
70
|
+
|
|
71
|
+
## Verification boundary
|
|
72
|
+
|
|
73
|
+
<KaniProofBadge />
|
|
74
|
+
|
|
75
|
+
The Kani harnesses target the pure Rust policy/composer layer rather than the Anchor wrappers. That keeps proofs short, deterministic, and tied to the code that makes decisions.
|
|
76
|
+
|
|
77
|
+
## Atomic settlement boundary
|
|
78
|
+
|
|
79
|
+
For production settlement, the policy check, SPL transfer, and feedback emission must share the same signed transaction path. If one part fails, the user should not get a successful payment with missing feedback or feedback for a missing payment.
|
|
80
|
+
|
|
81
|
+
The Pay.sh demo uses stubs for RPC and CPI so local tests run quickly. Those seams are the same seams a production factory fills with devnet programs and SPL transfer parsing.
|
|
82
|
+
|
|
83
|
+
## Deployment boundary
|
|
84
|
+
|
|
85
|
+
The docs and SDK default to devnet program IDs. Quantu mainnet IDs are used for local validator cloning and reference-grade byte layouts.
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Quickstart
|
|
3
|
+
description: Run AgentTrust with Pay.sh in under 10 minutes.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
This page gets you from a clean checkout to a Pay.sh + AgentTrust server you can hit locally. It shows the x402 challenge, the Pay.sh retry, the AgentTrust decision, and the feedback receipt path.
|
|
7
|
+
|
|
8
|
+
## 1. Install
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
pnpm install
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
The public SDK package is `@agenttrust-sdk/trustgate`. The Pay.sh demo imports the server workspace package directly so it can exercise the adapter layer before packaging.
|
|
15
|
+
|
|
16
|
+
## 2. Build the demo
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pnpm --filter ./examples/pay-sh-demo build
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## 3. Start the server
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
pnpm --filter ./examples/pay-sh-demo dev
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
The server listens on `:3402` and exposes:
|
|
29
|
+
|
|
30
|
+
| Route | Purpose |
|
|
31
|
+
| --- | --- |
|
|
32
|
+
| `GET /health` | deterministic demo counterparties and facilitator key |
|
|
33
|
+
| `GET /protected` | Pay.sh-gated resource |
|
|
34
|
+
|
|
35
|
+
## 4. Drive the Pay.sh path
|
|
36
|
+
|
|
37
|
+
Without a payment proof, `/protected` returns `402 Payment Required` with a base64 x402 v2 challenge.
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
curl -i https://demo.agenttrust.tech/protected
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
With Pay.sh installed, let the CLI pay and retry.
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
pay --sandbox curl https://demo.agenttrust.tech/protected
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
For a deterministic Allow path, use the tier-3 demo counterparty.
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
PAYER=$(curl -s https://demo.agenttrust.tech/health | jq -r '.counterparties[2].agent')
|
|
53
|
+
pay --sandbox curl -H "X-Demo-Payer-Agent: $PAYER" https://demo.agenttrust.tech/protected
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
For a deterministic Deny path, use tier 0.
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
PAYER=$(curl -s https://demo.agenttrust.tech/health | jq -r '.counterparties[0].agent')
|
|
60
|
+
pay --sandbox curl -H "X-Demo-Payer-Agent: $PAYER" https://demo.agenttrust.tech/protected
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## 5. Run the same flow without the CLI
|
|
64
|
+
|
|
65
|
+
The integration tests synthesize Pay.sh proof bodies and drive the same Express route in-process.
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
pnpm --filter ./examples/pay-sh-demo test
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## What happens inside
|
|
72
|
+
|
|
73
|
+
```ts
|
|
74
|
+
adapter.parseRequest(req)
|
|
75
|
+
-> VerifyContext
|
|
76
|
+
-> decide(ctx)
|
|
77
|
+
-> adapter.formatChallenge(decision, ctx)
|
|
78
|
+
-> adapter.validatePaymentProof(proof, ctx)
|
|
79
|
+
-> adapter.emitFeedback(ctx, settlement)
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
The local demo stubs RPC and CPI so CI can run without devnet. The server package carries the real Anchor path: `trustgate/server/src/chain.ts` loads the deployed devnet programs, `/verify` simulates `gate_payment`, and `/settle` delegates proof validation plus feedback emission through the active adapter.
|
|
83
|
+
|
|
84
|
+
Production fills these same dependency seams:
|
|
85
|
+
|
|
86
|
+
| Seam | Demo implementation | Production implementation |
|
|
87
|
+
| --- | --- |
|
|
88
|
+
| `decide(ctx)` | static tier table | `simulateGatePayment` against devnet programs |
|
|
89
|
+
| `validateOnChainTx` | synthetic confirmed tx | RPC + SPL transfer parser |
|
|
90
|
+
| `emitFeedbackCpi` | synthetic feedback signature | Anchor call into `trustgate::emit_feedback` |
|
|
91
|
+
|
|
92
|
+
## Pinned devnet IDs
|
|
93
|
+
|
|
94
|
+
<ProgramIdsTable />
|
|
95
|
+
|
|
96
|
+
## Read next
|
|
97
|
+
|
|
98
|
+
- [Pay.sh adapter](/integration-guides/pay-sh-adapter)
|
|
99
|
+
- [Facilitator adapters](/integration-guides/facilitator-adapters)
|
|
100
|
+
- [Atomic-tx invariant](/sdk/atomic-tx-invariant)
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Introduction
|
|
3
|
+
description: AgentTrust is the Solana policy and feedback layer for x402 facilitators.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
AgentTrust is the Solana policy and feedback layer for x402 facilitators.
|
|
7
|
+
|
|
8
|
+
Pay.sh is the first concrete adapter: an AgentTrust-aware service can emit a Pay.sh x402 challenge, verify the SERVICE signature, run the policy decision, and settle with feedback tied to the same payment context. The same adapter contract is designed for Dexter, atxp_ai, MCPay, and the next facilitator without rewriting the routes.
|
|
9
|
+
|
|
10
|
+
<KaniProofBadge />
|
|
11
|
+
|
|
12
|
+
## What AgentTrust ships today
|
|
13
|
+
|
|
14
|
+
AgentTrust ships as three Anchor programs, a TypeScript SDK, and a facilitator-adapter layer.
|
|
15
|
+
|
|
16
|
+
| Part | Reads | Writes | Result |
|
|
17
|
+
| --- | --- | --- | --- |
|
|
18
|
+
| PolicyVault | payer and payee trust data | policy counters and velocity ledgers | `Allow`, `Deny`, or `RequireValidation` |
|
|
19
|
+
| TrustGate | PolicyVault decisions | Quantu feedback logs | x402 status and ERC-8004 feedback |
|
|
20
|
+
| ValidationRegistry | attestor profiles and attestations | capability attestations | reusable validation evidence |
|
|
21
|
+
| Pay.sh adapter | x402 v2 `PaymentRequirements` | SERVICE-signed challenge and feedback receipt | live Pay.sh integration path |
|
|
22
|
+
|
|
23
|
+
## Facilitator status
|
|
24
|
+
|
|
25
|
+
| Facilitator | Status | Notes |
|
|
26
|
+
| --- | --- | --- |
|
|
27
|
+
| Pay.sh | live | First concrete adapter; launch announced by Solana Foundation with Google Cloud on May 5, 2026. |
|
|
28
|
+
| Dexter | in flight | Worked example for the next adapter path; current repo carries a roadmap stub until full wiring lands. |
|
|
29
|
+
| atxp_ai | roadmap | Stubbed explicitly so callers see a planned integration, not an accidental absence. |
|
|
30
|
+
| MCPay | roadmap | Stubbed explicitly for the same adapter contract. |
|
|
31
|
+
|
|
32
|
+
Pay.sh launch reference: [Solana Foundation launch note](https://solana.com/news/solana-foundation-launches-pay-sh-in-collaboration-with-google-cloud).
|
|
33
|
+
|
|
34
|
+
## Devnet deployment
|
|
35
|
+
|
|
36
|
+
The current Frontier build is deployed on Solana devnet and keeps the same adapter boundary for mainnet rollout.
|
|
37
|
+
|
|
38
|
+
<ProgramIdsTable />
|
|
39
|
+
|
|
40
|
+
## The shortest path
|
|
41
|
+
|
|
42
|
+
Run the Pay.sh demo, then copy the adapter shape into your own facilitator.
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pnpm --filter ./examples/pay-sh-demo dev
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
pay --sandbox curl https://demo.agenttrust.tech/protected
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Read next
|
|
53
|
+
|
|
54
|
+
<Cards>
|
|
55
|
+
<Card title="Quickstart" href="/getting-started/quickstart">
|
|
56
|
+
Run the Pay.sh demo and inspect Allow / Deny paths.
|
|
57
|
+
</Card>
|
|
58
|
+
<Card title="Pay.sh adapter" href="/integration-guides/pay-sh-adapter">
|
|
59
|
+
Walk through the live adapter end to end.
|
|
60
|
+
</Card>
|
|
61
|
+
<Card title="Architecture overview" href="/getting-started/architecture-overview">
|
|
62
|
+
See why the adapter layer exists and how it composes with the programs.
|
|
63
|
+
</Card>
|
|
64
|
+
</Cards>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Capability namespaces
|
|
3
|
+
description: Naming and hashing convention for validation capabilities.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
`In progress`
|
|
7
|
+
|
|
8
|
+
Capability namespaces let facilitators ask for a specific validation artifact without coupling the payment route to one attestor. The ValidationRegistry stores the namespace and the attestation PDA stores the capability hash.
|
|
9
|
+
|
|
10
|
+
| Source | Path |
|
|
11
|
+
| --- | --- |
|
|
12
|
+
| namespace state | [`programs/validation-registry/src/state/capability_namespace.rs`](https://github.com/agenttrust-labs/agenttrust/blob/main/programs/validation-registry/src/state/capability_namespace.rs) |
|
|
13
|
+
| register instruction | [`programs/validation-registry/src/instructions/register_namespace.rs`](https://github.com/agenttrust-labs/agenttrust/blob/main/programs/validation-registry/src/instructions/register_namespace.rs) |
|
|
14
|
+
| x402 header | [`trustgate/sdk/src/x402.ts`](https://github.com/agenttrust-labs/agenttrust/blob/main/trustgate/sdk/src/x402.ts) |
|
|
15
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Custom attestor
|
|
3
|
+
description: How third-party attestors plug into the ValidationRegistry path.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
`In progress`
|
|
7
|
+
|
|
8
|
+
A custom attestor registers a profile, responds to validation requests, and can revoke an attestation it issued. PolicyVault then reads the resulting PDA by fixed byte offsets.
|
|
9
|
+
|
|
10
|
+
| Source | Path |
|
|
11
|
+
| --- | --- |
|
|
12
|
+
| attestor profile | [`programs/validation-registry/src/state/attestor_profile.rs`](https://github.com/agenttrust-labs/agenttrust/blob/main/programs/validation-registry/src/state/attestor_profile.rs) |
|
|
13
|
+
| response instruction | [`programs/validation-registry/src/instructions/respond_to_validation.rs`](https://github.com/agenttrust-labs/agenttrust/blob/main/programs/validation-registry/src/instructions/respond_to_validation.rs) |
|
|
14
|
+
| revoke instruction | [`programs/validation-registry/src/instructions/revoke_validation.rs`](https://github.com/agenttrust-labs/agenttrust/blob/main/programs/validation-registry/src/instructions/revoke_validation.rs) |
|
|
15
|
+
|