@t3foundry/tasra-sdk 0.0.0-stage → 0.3.1-next.1

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.
Files changed (322) hide show
  1. package/CHANGELOG.md +148 -0
  2. package/LICENSE +202 -0
  3. package/NOTICE +94 -0
  4. package/README.md +137 -2
  5. package/SECURITY.md +115 -0
  6. package/dist/app/approvals.d.ts +50 -0
  7. package/dist/app/approvals.js +90 -0
  8. package/dist/app/authorization.d.ts +19 -0
  9. package/dist/app/authorization.js +20 -0
  10. package/dist/app/client.d.ts +231 -0
  11. package/dist/app/client.js +272 -0
  12. package/dist/app/creation.d.ts +73 -0
  13. package/dist/app/creation.js +77 -0
  14. package/dist/app/deployment.d.ts +36 -0
  15. package/dist/app/deployment.js +18 -0
  16. package/dist/app/identity.d.ts +211 -0
  17. package/dist/app/identity.js +287 -0
  18. package/dist/app/index.d.ts +22 -0
  19. package/dist/app/index.js +12 -0
  20. package/dist/app/manifest.d.ts +74 -0
  21. package/dist/app/manifest.js +120 -0
  22. package/dist/app/node.d.ts +30 -0
  23. package/dist/app/node.js +159 -0
  24. package/dist/app/ready-slot.d.ts +157 -0
  25. package/dist/app/ready-slot.js +199 -0
  26. package/dist/app/tasra-client.d.ts +125 -0
  27. package/dist/app/tasra-client.js +79 -0
  28. package/dist/app/viem.d.ts +10 -0
  29. package/dist/app/viem.js +32 -0
  30. package/dist/app/wallet.d.ts +126 -0
  31. package/dist/app/wallet.js +137 -0
  32. package/dist/auth/dpop.d.ts +86 -0
  33. package/dist/auth/dpop.js +142 -0
  34. package/dist/auth/holderProof.d.ts +102 -0
  35. package/dist/auth/holderProof.js +161 -0
  36. package/dist/auth/identityScope.d.ts +19 -0
  37. package/dist/auth/identityScope.js +82 -0
  38. package/dist/auth/index.d.ts +11 -0
  39. package/dist/auth/index.js +13 -0
  40. package/dist/auth/oid4vp.d.ts +230 -0
  41. package/dist/auth/oid4vp.js +780 -0
  42. package/dist/auth/rego/wasm/PINS.json +11 -0
  43. package/dist/auth/rego/wasm/keykeeper_rego_wasm.d.ts +76 -0
  44. package/dist/auth/rego/wasm/keykeeper_rego_wasm.js +379 -0
  45. package/dist/auth/rego/wasm/keykeeper_rego_wasm_bg.wasm +0 -0
  46. package/dist/auth/rego.d.ts +192 -0
  47. package/dist/auth/rego.js +492 -0
  48. package/dist/auth/verifier.d.ts +166 -0
  49. package/dist/auth/verifier.js +211 -0
  50. package/dist/chain/abis/accountantSetRegistry.d.ts +441 -0
  51. package/dist/chain/abis/accountantSetRegistry.js +574 -0
  52. package/dist/chain/abis/accountantSlashing.d.ts +2071 -0
  53. package/dist/chain/abis/accountantSlashing.js +2670 -0
  54. package/dist/chain/abis/bondingCurve.d.ts +398 -0
  55. package/dist/chain/abis/bondingCurve.js +521 -0
  56. package/dist/chain/abis/equivocationSlasher.d.ts +292 -0
  57. package/dist/chain/abis/equivocationSlasher.js +379 -0
  58. package/dist/chain/abis/fixedTasraPriceOracle.d.ts +52 -0
  59. package/dist/chain/abis/fixedTasraPriceOracle.js +72 -0
  60. package/dist/chain/abis/index.d.ts +12801 -0
  61. package/dist/chain/abis/index.js +64 -0
  62. package/dist/chain/abis/keeperShareRegistry.d.ts +519 -0
  63. package/dist/chain/abis/keeperShareRegistry.js +675 -0
  64. package/dist/chain/abis/keyRegistry.d.ts +2421 -0
  65. package/dist/chain/abis/keyRegistry.js +3114 -0
  66. package/dist/chain/abis/livenessRegistry.d.ts +402 -0
  67. package/dist/chain/abis/livenessRegistry.js +524 -0
  68. package/dist/chain/abis/mockEurc.d.ts +210 -0
  69. package/dist/chain/abis/mockEurc.js +276 -0
  70. package/dist/chain/abis/nodeRegistry.d.ts +1630 -0
  71. package/dist/chain/abis/nodeRegistry.js +2113 -0
  72. package/dist/chain/abis/platformExecutor.d.ts +328 -0
  73. package/dist/chain/abis/platformExecutor.js +429 -0
  74. package/dist/chain/abis/prevrandaoSaltBeacon.d.ts +16 -0
  75. package/dist/chain/abis/prevrandaoSaltBeacon.js +24 -0
  76. package/dist/chain/abis/serviceRegistry.d.ts +556 -0
  77. package/dist/chain/abis/serviceRegistry.js +719 -0
  78. package/dist/chain/abis/settlement.d.ts +1624 -0
  79. package/dist/chain/abis/settlement.js +2096 -0
  80. package/dist/chain/abis/tasraSwapRouter.d.ts +92 -0
  81. package/dist/chain/abis/tasraSwapRouter.js +122 -0
  82. package/dist/chain/abis/tasraToken.d.ts +455 -0
  83. package/dist/chain/abis/tasraToken.js +599 -0
  84. package/dist/chain/abis/tasraVestingVault.d.ts +165 -0
  85. package/dist/chain/abis/tasraVestingVault.js +215 -0
  86. package/dist/chain/abis/thresholdRandomBeacon.d.ts +378 -0
  87. package/dist/chain/abis/thresholdRandomBeacon.js +494 -0
  88. package/dist/chain/abis/treasury.d.ts +301 -0
  89. package/dist/chain/abis/treasury.js +390 -0
  90. package/dist/chain/abis/verifierSetRegistry.d.ts +445 -0
  91. package/dist/chain/abis/verifierSetRegistry.js +579 -0
  92. package/dist/chain/client.d.ts +212 -0
  93. package/dist/chain/client.js +576 -0
  94. package/dist/chain/commitmentRecovery.d.ts +21 -0
  95. package/dist/chain/commitmentRecovery.js +44 -0
  96. package/dist/chain/committeeClient.d.ts +102 -0
  97. package/dist/chain/committeeClient.js +137 -0
  98. package/dist/chain/deployments.d.ts +56 -0
  99. package/dist/chain/deployments.js +269 -0
  100. package/dist/chain/discovery.d.ts +49 -0
  101. package/dist/chain/discovery.js +107 -0
  102. package/dist/chain/events.d.ts +58 -0
  103. package/dist/chain/events.js +125 -0
  104. package/dist/chain/format.d.ts +25 -0
  105. package/dist/chain/format.js +51 -0
  106. package/dist/chain/index.d.ts +41 -0
  107. package/dist/chain/index.js +56 -0
  108. package/dist/chain/manifest.d.ts +165 -0
  109. package/dist/chain/manifest.js +132 -0
  110. package/dist/chain/network-profiles.json +75 -0
  111. package/dist/chain/networks.d.ts +73 -0
  112. package/dist/chain/networks.js +62 -0
  113. package/dist/chain/node.d.ts +44 -0
  114. package/dist/chain/node.js +176 -0
  115. package/dist/chain/offchain.d.ts +149 -0
  116. package/dist/chain/offchain.js +73 -0
  117. package/dist/chain/provisionRule.d.ts +164 -0
  118. package/dist/chain/provisionRule.js +212 -0
  119. package/dist/chain/registeredAgent.d.ts +64 -0
  120. package/dist/chain/registeredAgent.js +140 -0
  121. package/dist/chain/registeredOperation.d.ts +49 -0
  122. package/dist/chain/registeredOperation.js +136 -0
  123. package/dist/chain/registeredRelay.d.ts +206 -0
  124. package/dist/chain/registeredRelay.js +312 -0
  125. package/dist/chain/revertReason.d.ts +14 -0
  126. package/dist/chain/revertReason.js +62 -0
  127. package/dist/chain/ruleAmendment.d.ts +80 -0
  128. package/dist/chain/ruleAmendment.js +195 -0
  129. package/dist/chain/ruleAmendmentCore.d.ts +129 -0
  130. package/dist/chain/ruleAmendmentCore.js +152 -0
  131. package/dist/chain/ruleInput.d.ts +10 -0
  132. package/dist/chain/ruleInput.js +13 -0
  133. package/dist/chain/serviceIdentity.d.ts +176 -0
  134. package/dist/chain/serviceIdentity.js +237 -0
  135. package/dist/chain/serviceProfiles.d.ts +39 -0
  136. package/dist/chain/serviceProfiles.js +74 -0
  137. package/dist/chain/services.d.ts +141 -0
  138. package/dist/chain/services.js +79 -0
  139. package/dist/chain/slotClient.d.ts +55 -0
  140. package/dist/chain/slotClient.js +62 -0
  141. package/dist/chain/slotSeed.d.ts +31 -0
  142. package/dist/chain/slotSeed.js +98 -0
  143. package/dist/chain/write.d.ts +431 -0
  144. package/dist/chain/write.js +958 -0
  145. package/dist/client/client.d.ts +112 -0
  146. package/dist/client/client.js +111 -0
  147. package/dist/client/index.d.ts +3 -0
  148. package/dist/client/index.js +2 -0
  149. package/dist/client/session.d.ts +67 -0
  150. package/dist/client/session.js +238 -0
  151. package/dist/committee/client.d.ts +284 -0
  152. package/dist/committee/client.js +351 -0
  153. package/dist/committee/dual-sign.d.ts +110 -0
  154. package/dist/committee/dual-sign.js +202 -0
  155. package/dist/committee/ecdsa.d.ts +36 -0
  156. package/dist/committee/ecdsa.js +45 -0
  157. package/dist/committee/extraction.d.ts +82 -0
  158. package/dist/committee/extraction.js +96 -0
  159. package/dist/committee/index.d.ts +19 -0
  160. package/dist/committee/index.js +13 -0
  161. package/dist/committee/oauth.d.ts +51 -0
  162. package/dist/committee/oauth.js +90 -0
  163. package/dist/committee/receipts.d.ts +51 -0
  164. package/dist/committee/receipts.js +59 -0
  165. package/dist/committee/request.d.ts +264 -0
  166. package/dist/committee/request.js +305 -0
  167. package/dist/committee/token.d.ts +274 -0
  168. package/dist/committee/token.js +418 -0
  169. package/dist/crypto/constants.d.ts +10 -0
  170. package/dist/crypto/constants.js +32 -0
  171. package/dist/crypto/detect.d.ts +20 -0
  172. package/dist/crypto/detect.js +44 -0
  173. package/dist/crypto/envelope.d.ts +60 -0
  174. package/dist/crypto/envelope.js +243 -0
  175. package/dist/crypto/frost.d.ts +49 -0
  176. package/dist/crypto/frost.js +152 -0
  177. package/dist/crypto/hex.d.ts +7 -0
  178. package/dist/crypto/hex.js +24 -0
  179. package/dist/crypto/ibe-blob.d.ts +114 -0
  180. package/dist/crypto/ibe-blob.js +208 -0
  181. package/dist/crypto/ibe.d.ts +88 -0
  182. package/dist/crypto/ibe.js +262 -0
  183. package/dist/crypto/index.d.ts +12 -0
  184. package/dist/crypto/index.js +12 -0
  185. package/dist/crypto/kem.d.ts +55 -0
  186. package/dist/crypto/kem.js +241 -0
  187. package/dist/decryption/client.d.ts +64 -0
  188. package/dist/decryption/client.js +82 -0
  189. package/dist/decryption/index.d.ts +2 -0
  190. package/dist/decryption/index.js +2 -0
  191. package/dist/errors.d.ts +124 -0
  192. package/dist/errors.js +167 -0
  193. package/dist/index.d.ts +43 -0
  194. package/dist/index.js +98 -0
  195. package/dist/keys/index.d.ts +1 -0
  196. package/dist/keys/index.js +4 -0
  197. package/dist/keys/node-client.d.ts +27 -0
  198. package/dist/keys/node-client.js +97 -0
  199. package/dist/oid4vp/binding.d.ts +76 -0
  200. package/dist/oid4vp/binding.js +118 -0
  201. package/dist/oid4vp/did-web.d.ts +49 -0
  202. package/dist/oid4vp/did-web.js +57 -0
  203. package/dist/oid4vp/index.d.ts +9 -0
  204. package/dist/oid4vp/index.js +10 -0
  205. package/dist/oid4vp/jose.d.ts +166 -0
  206. package/dist/oid4vp/jose.js +242 -0
  207. package/dist/oid4vp/jwe.d.ts +30 -0
  208. package/dist/oid4vp/jwe.js +93 -0
  209. package/dist/oid4vp/oid4vci.d.ts +84 -0
  210. package/dist/oid4vp/oid4vci.js +85 -0
  211. package/dist/oid4vp/request-object.d.ts +109 -0
  212. package/dist/oid4vp/request-object.js +96 -0
  213. package/dist/oid4vp/sd-jwt.d.ts +177 -0
  214. package/dist/oid4vp/sd-jwt.js +208 -0
  215. package/dist/oid4vp/verifier-agent.d.ts +161 -0
  216. package/dist/oid4vp/verifier-agent.js +132 -0
  217. package/dist/oid4vp/wallet.d.ts +116 -0
  218. package/dist/oid4vp/wallet.js +108 -0
  219. package/dist/recipient/store.d.ts +67 -0
  220. package/dist/recipient/store.js +98 -0
  221. package/dist/signing/ecdsa.d.ts +49 -0
  222. package/dist/signing/ecdsa.js +79 -0
  223. package/dist/signing/frost.d.ts +88 -0
  224. package/dist/signing/frost.js +145 -0
  225. package/dist/signing/index.d.ts +4 -0
  226. package/dist/signing/index.js +3 -0
  227. package/dist/slots/faucet.d.ts +23 -0
  228. package/dist/slots/faucet.js +35 -0
  229. package/dist/slots/index.d.ts +2 -0
  230. package/dist/slots/index.js +4 -0
  231. package/dist/verifier-agent/index.d.ts +241 -0
  232. package/dist/verifier-agent/index.js +411 -0
  233. package/docs/DEVELOPER-EXPERIENCE.md +62 -0
  234. package/docs/README.md +33 -0
  235. package/docs/access-control.md +76 -0
  236. package/docs/ai-development.md +292 -0
  237. package/docs/api.md +338 -0
  238. package/docs/application-api.md +335 -0
  239. package/docs/architecture.md +65 -0
  240. package/docs/basics.md +48 -0
  241. package/docs/capabilities.md +86 -0
  242. package/docs/chain.md +153 -0
  243. package/docs/compatibility.md +36 -0
  244. package/docs/consumer-migrations.md +80 -0
  245. package/docs/create-slot.md +104 -0
  246. package/docs/document-signing.md +243 -0
  247. package/docs/encrypted-notes.md +129 -0
  248. package/docs/encryption.md +100 -0
  249. package/docs/errors.md +76 -0
  250. package/docs/flows.md +289 -0
  251. package/docs/fuji.md +127 -0
  252. package/docs/funding.md +126 -0
  253. package/docs/getting-started.md +94 -0
  254. package/docs/glossary.md +44 -0
  255. package/docs/installation.md +132 -0
  256. package/docs/manage-slot.md +95 -0
  257. package/docs/native-approvals.md +124 -0
  258. package/docs/prerequisites.md +137 -0
  259. package/docs/read-slot.md +41 -0
  260. package/docs/reference/README.md +30 -0
  261. package/docs/reference/app-node.md +102 -0
  262. package/docs/reference/app.md +1737 -0
  263. package/docs/reference/chain-node.md +159 -0
  264. package/docs/reference/chain.md +3609 -0
  265. package/docs/reference/committee.md +2176 -0
  266. package/docs/reference/main.md +4068 -0
  267. package/docs/reference/oid4vp.md +2547 -0
  268. package/docs/reference/verifier-agent.md +498 -0
  269. package/docs/shared-account.md +168 -0
  270. package/docs/signing-and-encryption.md +52 -0
  271. package/docs/signing.md +172 -0
  272. package/examples/committee-slot.ts +16 -0
  273. package/examples/connect-fuji.ts +41 -0
  274. package/examples/connect-network.ts +14 -0
  275. package/examples/credential-approvals.ts +46 -0
  276. package/examples/document-signing/README.md +59 -0
  277. package/examples/document-signing/backend.ts +132 -0
  278. package/examples/document-signing/build.mjs +19 -0
  279. package/examples/document-signing/config.ts +34 -0
  280. package/examples/document-signing/gitignore.template +9 -0
  281. package/examples/document-signing/model.ts +140 -0
  282. package/examples/document-signing/network.ts +58 -0
  283. package/examples/document-signing/package.json +25 -0
  284. package/examples/document-signing/public/index.html +27 -0
  285. package/examples/document-signing/public/sample.pdf +31 -0
  286. package/examples/document-signing/public/styles.css +531 -0
  287. package/examples/document-signing/server.ts +358 -0
  288. package/examples/document-signing/setup.ts +111 -0
  289. package/examples/document-signing/store.ts +105 -0
  290. package/examples/document-signing/tsconfig.json +24 -0
  291. package/examples/document-signing/verify.ts +24 -0
  292. package/examples/document-signing/web/app.ts +312 -0
  293. package/examples/document-signing/web/preview.ts +67 -0
  294. package/examples/document-signing/web/wallet.ts +146 -0
  295. package/examples/document-signing/workflow.test.ts +228 -0
  296. package/examples/document-signing/workflow.ts +241 -0
  297. package/examples/document-signing.ts +96 -0
  298. package/examples/encrypted-notes.ts +86 -0
  299. package/examples/ethers-signer.ts +204 -0
  300. package/examples/fund-slot.ts +73 -0
  301. package/examples/getting-started.ts +25 -0
  302. package/examples/learning-authorize.ts +23 -0
  303. package/examples/learning-cancel-slot.ts +11 -0
  304. package/examples/learning-context.ts +28 -0
  305. package/examples/learning-create-slot.ts +25 -0
  306. package/examples/learning-read-slot.ts +8 -0
  307. package/examples/learning-renew-slot.ts +12 -0
  308. package/examples/learning-sign.ts +8 -0
  309. package/examples/live-config.ts +71 -0
  310. package/examples/minimal.ts +6 -0
  311. package/examples/native-approvals.ts +57 -0
  312. package/examples/network.ts +58 -0
  313. package/examples/offline.ts +16 -0
  314. package/examples/personal-vault.ts +20 -0
  315. package/examples/provision-slot.ts +47 -0
  316. package/examples/shared-account.ts +46 -0
  317. package/examples/slot-address.ts +13 -0
  318. package/examples/slot-creation.ts +9 -0
  319. package/examples/tutorial-negative.ts +26 -0
  320. package/examples/tutorial-support.ts +76 -0
  321. package/examples/viem-account.ts +203 -0
  322. package/package.json +303 -4
@@ -0,0 +1,2547 @@
1
+ # @t3foundry/tasra-sdk/oid4vp
2
+
3
+ Generated from public TypeScript exports.
4
+
5
+ [SDK reference](README.md) · [Task guides](../README.md) · [Errors](../errors.md)
6
+
7
+ ## Classes
8
+
9
+ Clients, adapters and error classes.
10
+
11
+ <details>
12
+ <summary>Browse 1 classes</summary>
13
+
14
+ - [VerifierAgentSessionError](#verifieragentsessionerror)
15
+
16
+ </details>
17
+
18
+ ### VerifierAgentSessionError
19
+
20
+ A Verifier Agent session did not produce a compound token. `kind` says why;
21
+ `retryable` is true only for `timeout` and `unavailable` - the session may
22
+ still complete, so poll again. Extends ` TasraError `.
23
+
24
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/verifier-agent/index.ts#L134)
25
+
26
+ Import: `import {VerifierAgentSessionError} from '@t3foundry/tasra-sdk/oid4vp'`
27
+
28
+ ```ts
29
+ declare class VerifierAgentSessionError {
30
+ constructor(kind: VerifierAgentSessionErrorKind, correlation: string, message: string, httpStatus?: number);
31
+ }
32
+ ```
33
+
34
+ - ` readonly kind: VerifierAgentSessionErrorKind; ` — Failure category used to select recovery behavior.
35
+
36
+ - ` readonly correlation: string; ` — The session id - safe to show and to log.
37
+
38
+ - ` readonly httpStatus?: number; ` — The HTTP status that produced a `protocol`/`unavailable` error, when there was one.
39
+
40
+ - ` readonly retryable: boolean; ` — `false` when retrying the identical request cannot succeed.
41
+
42
+ - ` name: string; `
43
+
44
+ - ` message: string; `
45
+
46
+ - ` stack?: string; `
47
+
48
+ - ` cause?: unknown; `
49
+
50
+ ## Functions
51
+
52
+ Operations you can import and call.
53
+
54
+ <details>
55
+ <summary>Browse 64 functions</summary>
56
+
57
+ - [assertCompoundTokenWire](#assertcompoundtokenwire)
58
+ - [awaitVerifierAgentResult](#awaitverifieragentresult)
59
+ - [b64url](#b64url)
60
+ - [b64urlDecode](#b64urldecode)
61
+ - [base58Decode](#base58decode)
62
+ - [base58Encode](#base58encode)
63
+ - [buildResponse](#buildresponse)
64
+ - [concatKdf](#concatkdf)
65
+ - [createOid4vpSession](#createoid4vpsession)
66
+ - [decodeJson](#decodejson)
67
+ - [decryptJwe](#decryptjwe)
68
+ - [decryptPayloadDigest](#decryptpayloaddigest)
69
+ - [defaultKeyResolver](#defaultkeyresolver)
70
+ - [derivedNonce](#derivednonce)
71
+ - [didJwk](#didjwk)
72
+ - [didJwkIssuer](#didjwkissuer)
73
+ - [didWebUrl](#didweburl)
74
+ - [disclosureDigest](#disclosuredigest)
75
+ - [ed25519DidKey](#ed25519didkey)
76
+ - [ed25519FromDidKey](#ed25519fromdidkey)
77
+ - [ed25519HolderKey](#ed25519holderkey)
78
+ - [encryptJwe](#encryptjwe)
79
+ - [fetchRequestObject](#fetchrequestobject)
80
+ - [fromUtf8](#fromutf8)
81
+ - [holderCnf](#holdercnf)
82
+ - [holderSigner](#holdersigner)
83
+ - [issueSdJwtVc](#issuesdjwtvc)
84
+ - [jwkFromDid](#jwkfromdid)
85
+ - [nextPollDelay](#nextpolldelay)
86
+ - [openVerifierAgentSession](#openverifieragentsession)
87
+ - [p256DidKey](#p256didkey)
88
+ - [p256DidKeyIssuer](#p256didkeyissuer)
89
+ - [p256HolderKey](#p256holderkey)
90
+ - [p256PublicJwk](#p256publicjwk)
91
+ - [parseCredentialOfferUri](#parsecredentialofferuri)
92
+ - [parseOpenid4vpUri](#parseopenid4vpuri)
93
+ - [parseSdJwt](#parsesdjwt)
94
+ - [payloadDigest](#payloaddigest)
95
+ - [payloadDigestFor](#payloaddigestfor)
96
+ - [peekSdJwt](#peeksdjwt)
97
+ - [planPresentation](#planpresentation)
98
+ - [pollOid4vpSession](#polloid4vpsession)
99
+ - [presentationOperationTypedData](#presentationoperationtypeddata)
100
+ - [presentSdJwt](#presentsdjwt)
101
+ - [presentToRequestUri](#presenttorequesturi)
102
+ - [randomHolderKey](#randomholderkey)
103
+ - [receiveCredential](#receivecredential)
104
+ - [requestedClaimNames](#requestedclaimnames)
105
+ - [requestHash](#requesthash)
106
+ - [resolveDidWeb](#resolvedidweb)
107
+ - [responseEncryptionKey](#responseencryptionkey)
108
+ - [sdHash](#sdhash)
109
+ - [sdJwtClaims](#sdjwtclaims)
110
+ - [sdJwtCredentialView](#sdjwtcredentialview)
111
+ - [signCompactJws](#signcompactjws)
112
+ - [submitResponse](#submitresponse)
113
+ - [utf8](#utf8)
114
+ - [verificationKey](#verificationkey)
115
+ - [verifierAgentResult](#verifieragentresult)
116
+ - [verifierAgentVerifierProofs](#verifieragentverifierproofs)
117
+ - [verifyCompactJws](#verifycompactjws)
118
+ - [verifyKbJwt](#verifykbjwt)
119
+ - [verifyRequestObject](#verifyrequestobject)
120
+ - [waitForSession](#waitforsession)
121
+
122
+ </details>
123
+
124
+ ### assertCompoundTokenWire
125
+
126
+ The compound token the verifier-agent hands back must be the wire shape the keepers verify -
127
+ checked field by field before anything is built on it.
128
+
129
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/verifier-agent/index.ts#L162)
130
+
131
+ Import: `import {assertCompoundTokenWire} from '@t3foundry/tasra-sdk/oid4vp'`
132
+
133
+ ```ts
134
+ declare function assertCompoundTokenWire(raw: unknown, correlation: string): Record<string, unknown>;
135
+ ```
136
+
137
+ | Parameter | Type | Description |
138
+ |---|---|---|
139
+ | ` raw ` | ` unknown ` | - Untrusted compound_token response value. |
140
+ | ` correlation ` | ` string ` | - Session identifier used to correlate validation errors. |
141
+
142
+ Returns: ` Record<string, unknown> `.
143
+
144
+ ### awaitVerifierAgentResult
145
+
146
+ Poll until the wallet has presented and the committee answered. Rejects with an
147
+ `VerifierAgentSessionError` whose `kind` the UI explains - `refused` (the verifier-agent's `error` names the
148
+ refusing side), `timeout`, `unavailable`, `protocol`, `cancelled` - and whose
149
+ `correlation` is the session id. A token that binds another request than this session
150
+ opened, or one whose proofs are malformed, is a `protocol` refusal: nothing is built on it.
151
+
152
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/verifier-agent.ts#L196)
153
+
154
+ Import: `import {awaitVerifierAgentResult} from '@t3foundry/tasra-sdk/oid4vp'`
155
+
156
+ ```ts
157
+ declare function awaitVerifierAgentResult(session: Pick<OpenedVerifierAgentSession, 'verifierAgentUrl' | 'sessionId' | 'pollSecret' | 'requestHash'>, opts?: {
158
+ intervalMs?: number;
159
+ timeoutMs?: number;
160
+ } & WaitOpts): Promise<VerifierAgentResult>;
161
+ ```
162
+
163
+ | Parameter | Type | Description |
164
+ |---|---|---|
165
+ | ` session ` | ` Pick<OpenedVerifierAgentSession, 'verifierAgentUrl' \| 'sessionId' \| 'pollSecret' \| 'requestHash'> ` | - Opened session credentials and expected request-binding hash. |
166
+ | ` opts? ` | ` { intervalMs?: number; timeoutMs?: number; } & WaitOpts ` | - Polling intervals, timeout, cancellation and progress callback. |
167
+
168
+ Returns: ` Promise<VerifierAgentResult> `.
169
+
170
+ ### b64url
171
+
172
+ Encode bytes or UTF-8 text as unpadded base64url.
173
+
174
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/jose.ts#L28)
175
+
176
+ Import: `import {b64url} from '@t3foundry/tasra-sdk/oid4vp'`
177
+
178
+ ```ts
179
+ declare function b64url(bytes: Uint8Array | string): string;
180
+ ```
181
+
182
+ | Parameter | Type | Description |
183
+ |---|---|---|
184
+ | ` bytes ` | ` Uint8Array \| string ` | - Raw bytes, or text encoded as UTF-8 before conversion. |
185
+
186
+ Returns: ` string `.
187
+
188
+ ### b64urlDecode
189
+
190
+ Decode base64url text into bytes.
191
+
192
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/jose.ts#L39)
193
+
194
+ Import: `import {b64urlDecode} from '@t3foundry/tasra-sdk/oid4vp'`
195
+
196
+ ```ts
197
+ declare function b64urlDecode(s: string): Uint8Array;
198
+ ```
199
+
200
+ | Parameter | Type | Description |
201
+ |---|---|---|
202
+ | ` s ` | ` string ` | - Base64url-encoded text, with optional padding. |
203
+
204
+ Returns: ` Uint8Array `.
205
+
206
+ ### base58Decode
207
+
208
+ Decode base58btc text, preserving leading zero bytes and rejecting invalid characters.
209
+
210
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/jose.ts#L173)
211
+
212
+ Import: `import {base58Decode} from '@t3foundry/tasra-sdk/oid4vp'`
213
+
214
+ ```ts
215
+ declare function base58Decode(s: string): Uint8Array;
216
+ ```
217
+
218
+ | Parameter | Type | Description |
219
+ |---|---|---|
220
+ | ` s ` | ` string ` | - Base58btc text to decode. |
221
+
222
+ Returns: ` Uint8Array `.
223
+
224
+ ### base58Encode
225
+
226
+ Encode bytes as base58btc, preserving leading zero bytes.
227
+
228
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/jose.ts#L154)
229
+
230
+ Import: `import {base58Encode} from '@t3foundry/tasra-sdk/oid4vp'`
231
+
232
+ ```ts
233
+ declare function base58Encode(bytes: Uint8Array): string;
234
+ ```
235
+
236
+ | Parameter | Type | Description |
237
+ |---|---|---|
238
+ | ` bytes ` | ` Uint8Array ` | - Bytes to encode, including any leading zeros. |
239
+
240
+ Returns: ` string `.
241
+
242
+ ### buildResponse
243
+
244
+ Bind the chosen credential to the request (KB-JWT) and wrap it as the verifier-agent expects it.
245
+
246
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/wallet.ts#L119)
247
+
248
+ Import: `import {buildResponse} from '@t3foundry/tasra-sdk/oid4vp'`
249
+
250
+ ```ts
251
+ declare function buildResponse(opts: BuildResponseOpts): BuiltResponse;
252
+ ```
253
+
254
+ | Parameter | Type | Description |
255
+ |---|---|---|
256
+ | ` opts ` | ` BuildResponseOpts ` | - Verified request, chosen credential, holder key and disclosure settings. |
257
+
258
+ Returns: ` BuiltResponse `.
259
+
260
+ ### concatKdf
261
+
262
+ Concat KDF (NIST SP 800-56A, single-pass SHA-256) - AlgorithmID = `enc` for ECDH-ES direct.
263
+
264
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/jwe.ts#L33)
265
+
266
+ Import: `import {concatKdf} from '@t3foundry/tasra-sdk/oid4vp'`
267
+
268
+ ```ts
269
+ declare function concatKdf(z: Uint8Array, alg: string, apu: Uint8Array, apv: Uint8Array, keyLen: number): Uint8Array;
270
+ ```
271
+
272
+ | Parameter | Type | Description |
273
+ |---|---|---|
274
+ | ` z ` | ` Uint8Array ` | - ECDH shared secret bytes. |
275
+ | ` alg ` | ` string ` | - Algorithm identifier included in the KDF context. |
276
+ | ` apu ` | ` Uint8Array ` | - Producer party information. |
277
+ | ` apv ` | ` Uint8Array ` | - Recipient party information. |
278
+ | ` keyLen ` | ` number ` | - Derived key length in bytes. |
279
+
280
+ Returns: ` Uint8Array `.
281
+
282
+ ### createOid4vpSession
283
+
284
+ Create an OID4VP session on the Verifier Agent.
285
+
286
+ The verifier-agent derives a nonce, generates an ECDH key for JWE, and returns a QR
287
+ payload the wallet scans. The session ID and poll secret are used to poll
288
+ for the result.
289
+
290
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/verifier-agent/index.ts#L238)
291
+
292
+ Import: `import {createOid4vpSession} from '@t3foundry/tasra-sdk/oid4vp'`
293
+
294
+ ```ts
295
+ declare function createOid4vpSession(verifierAgentUrl: string, params: CreateSessionParams): Promise<CreateSessionResult>;
296
+ ```
297
+
298
+ | Parameter | Type | Description |
299
+ |---|---|---|
300
+ | ` verifierAgentUrl ` | ` string ` | - Verifier-agent HTTP base URL from the selected network manifest. |
301
+ | ` params ` | ` CreateSessionParams ` | - Signed operation, optional delegation and raw payload. |
302
+
303
+ Returns: ` Promise<CreateSessionResult> `.
304
+
305
+ ### decodeJson
306
+
307
+ Decode a base64url JSON value. The generic type is a caller assertion, not runtime validation.
308
+
309
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/jose.ts#L48)
310
+
311
+ Import: `import {decodeJson} from '@t3foundry/tasra-sdk/oid4vp'`
312
+
313
+ ```ts
314
+ declare function decodeJson<T = unknown>(b64: string): T;
315
+ ```
316
+
317
+ | Parameter | Type | Description |
318
+ |---|---|---|
319
+ | ` b64 ` | ` string ` | - Base64url-encoded JSON text. |
320
+
321
+ Returns: ` T `.
322
+
323
+ ### decryptJwe
324
+
325
+ Decrypt a compact JWE produced by [encryptJwe](#encryptjwe) (or a wallet) with the recipient's private scalar.
326
+
327
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/jwe.ts#L80)
328
+
329
+ Import: `import {decryptJwe} from '@t3foundry/tasra-sdk/oid4vp'`
330
+
331
+ ```ts
332
+ declare function decryptJwe(compact: string, recipientPrivateKey: Uint8Array): string;
333
+ ```
334
+
335
+ | Parameter | Type | Description |
336
+ |---|---|---|
337
+ | ` compact ` | ` string ` | - Compact JWE using ECDH-ES and a supported AES-GCM algorithm. |
338
+ | ` recipientPrivateKey ` | ` Uint8Array ` | - Recipient 32-byte P-256 private scalar. |
339
+
340
+ Returns: ` string `.
341
+
342
+ ### decryptPayloadDigest
343
+
344
+ The `decrypt` action's digest, mirroring the reference decrypt digest:
345
+ `sha256(DOMAIN || len(u) u64 LE || u || len(aead_ct) u64 LE || aead_ct)` - the AEAD nonce is
346
+ deliberately excluded (it is not authorised content).
347
+
348
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/binding.ts#L149)
349
+
350
+ Import: `import {decryptPayloadDigest} from '@t3foundry/tasra-sdk/oid4vp'`
351
+
352
+ ```ts
353
+ declare function decryptPayloadDigest(u: Uint8Array, aeadCt: Uint8Array): Uint8Array;
354
+ ```
355
+
356
+ | Parameter | Type | Description |
357
+ |---|---|---|
358
+ | ` u ` | ` Uint8Array ` | - Ephemeral public key bytes from the group ciphertext. |
359
+ | ` aeadCt ` | ` Uint8Array ` | - Authenticated ciphertext bytes, including the tag. |
360
+
361
+ Returns: ` Uint8Array `.
362
+
363
+ ### defaultKeyResolver
364
+
365
+ Create a signing-key resolver that fetches did:web keys and decodes did:key or did:jwk keys.
366
+
367
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/request-object.ts#L85)
368
+
369
+ Import: `import {defaultKeyResolver} from '@t3foundry/tasra-sdk/oid4vp'`
370
+
371
+ ```ts
372
+ declare function defaultKeyResolver(opts?: ResolveOpts): KeyResolver;
373
+ ```
374
+
375
+ | Parameter | Type | Description |
376
+ |---|---|---|
377
+ | ` opts? ` | ` ResolveOpts ` | - Fetch override and optional loopback HTTP permission. |
378
+
379
+ Returns: ` KeyResolver `.
380
+
381
+ ### derivedNonce
382
+
383
+ `base64url(keccak256(NONCE_DOMAIN || request_hash || random || epoch u64 BE || snapshot_root ||
384
+ registry_size u32 BE || committee u32 BE || quorum u32 BE || operation_exp i64 BE))` - the
385
+ nonce a KB-JWT must carry (the reference vp-nonce derivation, domain v2).
386
+
387
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/binding.ts#L89)
388
+
389
+ Import: `import {derivedNonce} from '@t3foundry/tasra-sdk/oid4vp'`
390
+
391
+ ```ts
392
+ declare function derivedNonce(reqHash: Uint8Array, random: Uint8Array, ctx: NonceContext): string;
393
+ ```
394
+
395
+ | Parameter | Type | Description |
396
+ |---|---|---|
397
+ | ` reqHash ` | ` Uint8Array ` | - 32-byte request-binding hash. |
398
+ | ` random ` | ` Uint8Array ` | - 32 fresh random bytes. |
399
+ | ` ctx ` | ` NonceContext ` | - Beacon epoch, verifier snapshot, committee policy and operation expiry to bind. |
400
+
401
+ Returns: ` string `.
402
+
403
+ ### didJwk
404
+
405
+ `did:jwk` of a JWK - the JSON is serialised in `kty, crv, x, y` order, the vault's convention.
406
+
407
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/jose.ts#L118)
408
+
409
+ Import: `import {didJwk} from '@t3foundry/tasra-sdk/oid4vp'`
410
+
411
+ ```ts
412
+ declare function didJwk(jwk: Jwk): string;
413
+ ```
414
+
415
+ | Parameter | Type | Description |
416
+ |---|---|---|
417
+ | ` jwk ` | ` Jwk ` | - Public P-256 or Ed25519 JSON Web Key. |
418
+
419
+ Returns: ` string `.
420
+
421
+ ### didJwkIssuer
422
+
423
+ A P-256/ES256 `did:jwk` issuer from a private scalar. Other issuer algorithms are not supported by this helper.
424
+
425
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/sd-jwt.ts#L217)
426
+
427
+ Import: `import {didJwkIssuer} from '@t3foundry/tasra-sdk/oid4vp'`
428
+
429
+ ```ts
430
+ declare function didJwkIssuer(privateKey: Uint8Array, alg?: 'ES256'): SdJwtIssuer;
431
+ ```
432
+
433
+ | Parameter | Type | Description |
434
+ |---|---|---|
435
+ | ` privateKey ` | ` Uint8Array ` | - 32-byte P-256 private scalar. |
436
+ | ` alg? ` | ` 'ES256' ` | - Signing algorithm; this helper accepts only ES256. |
437
+
438
+ Returns: ` SdJwtIssuer `.
439
+
440
+ ### didWebUrl
441
+
442
+ The HTTPS URL a `did:web` resolves from (W3C did:web method).
443
+
444
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/did-web.ts#L23)
445
+
446
+ Import: `import {didWebUrl} from '@t3foundry/tasra-sdk/oid4vp'`
447
+
448
+ ```ts
449
+ declare function didWebUrl(did: string): string;
450
+ ```
451
+
452
+ | Parameter | Type | Description |
453
+ |---|---|---|
454
+ | ` did ` | ` string ` | - did:web identifier, with an optional fragment. |
455
+
456
+ Returns: ` string `.
457
+
458
+ ### disclosureDigest
459
+
460
+ Compute the base64url SHA-256 digest of an encoded SD-JWT disclosure.
461
+
462
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/sd-jwt.ts#L48)
463
+
464
+ Import: `import {disclosureDigest} from '@t3foundry/tasra-sdk/oid4vp'`
465
+
466
+ ```ts
467
+ declare function disclosureDigest(encoded: string): string;
468
+ ```
469
+
470
+ | Parameter | Type | Description |
471
+ |---|---|---|
472
+ | ` encoded ` | ` string ` | - Base64url-encoded SD-JWT disclosure string. |
473
+
474
+ Returns: ` string `.
475
+
476
+ ### ed25519DidKey
477
+
478
+ `did:key` of an Ed25519 public key (multicodec 0xed01).
479
+
480
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/jose.ts#L198)
481
+
482
+ Import: `import {ed25519DidKey} from '@t3foundry/tasra-sdk/oid4vp'`
483
+
484
+ ```ts
485
+ declare function ed25519DidKey(publicKey: Uint8Array): string;
486
+ ```
487
+
488
+ | Parameter | Type | Description |
489
+ |---|---|---|
490
+ | ` publicKey ` | ` Uint8Array ` | - 32-byte Ed25519 public key. |
491
+
492
+ Returns: ` string `.
493
+
494
+ ### ed25519FromDidKey
495
+
496
+ The 32-byte Ed25519 key inside a `did:key:z6Mk...`; throws for any other key type.
497
+
498
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/jose.ts#L215)
499
+
500
+ Import: `import {ed25519FromDidKey} from '@t3foundry/tasra-sdk/oid4vp'`
501
+
502
+ ```ts
503
+ declare function ed25519FromDidKey(did: string): Uint8Array;
504
+ ```
505
+
506
+ | Parameter | Type | Description |
507
+ |---|---|---|
508
+ | ` did ` | ` string ` | - Ed25519 did:key identifier. |
509
+
510
+ Returns: ` Uint8Array `.
511
+
512
+ ### ed25519HolderKey
513
+
514
+ An Ed25519 holder key from a 32-byte seed - the shape `tasra-cli vc issue-sd-jwt` binds.
515
+
516
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/jose.ts#L137)
517
+
518
+ Import: `import {ed25519HolderKey} from '@t3foundry/tasra-sdk/oid4vp'`
519
+
520
+ ```ts
521
+ declare function ed25519HolderKey(seed: Uint8Array): HolderKey;
522
+ ```
523
+
524
+ | Parameter | Type | Description |
525
+ |---|---|---|
526
+ | ` seed ` | ` Uint8Array ` | - 32-byte Ed25519 secret seed. |
527
+
528
+ Returns: ` HolderKey `.
529
+
530
+ ### encryptJwe
531
+
532
+ Encrypt `plaintext` to the recipient's ephemeral P-256 JWK (the JAR's `client_metadata.jwks.keys[0]`)
533
+ as `header..iv.ciphertext.tag`. A fresh sender key per call; `kid` echoed when the recipient key has one.
534
+
535
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/jwe.ts#L58)
536
+
537
+ Import: `import {encryptJwe} from '@t3foundry/tasra-sdk/oid4vp'`
538
+
539
+ ```ts
540
+ declare function encryptJwe(plaintext: string, recipient: EcJwk, enc?: JweEnc, random?: (n: number) => Uint8Array): string;
541
+ ```
542
+
543
+ | Parameter | Type | Description |
544
+ |---|---|---|
545
+ | ` plaintext ` | ` string ` | - UTF-8 plaintext to encrypt. |
546
+ | ` recipient ` | ` EcJwk ` | - Recipient public P-256 key. |
547
+ | ` enc? ` | ` JweEnc ` | - AES-GCM content encryption algorithm. |
548
+ | ` random? ` | ` (n: number) => Uint8Array ` | - Cryptographically secure random byte generator; defaults to Web Crypto. |
549
+
550
+ Returns: ` string `.
551
+
552
+ ### fetchRequestObject
553
+
554
+ Fetch a JAR from `request_uri` (`Accept: application/oauth-authz-req+jwt`) and verify it.
555
+
556
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/request-object.ts#L149)
557
+
558
+ Import: `import {fetchRequestObject} from '@t3foundry/tasra-sdk/oid4vp'`
559
+
560
+ ```ts
561
+ declare function fetchRequestObject(requestUri: string, opts?: VerifyRequestObjectOpts & {
562
+ fetchImpl?: typeof fetch;
563
+ }): Promise<VerifiedRequestObject>;
564
+ ```
565
+
566
+ | Parameter | Type | Description |
567
+ |---|---|---|
568
+ | ` requestUri ` | ` string ` | - URL from the OpenID4VP request_uri parameter. |
569
+ | ` opts? ` | ` VerifyRequestObjectOpts & { fetchImpl?: typeof fetch; } ` | - Request signature verification settings and optional fetch implementation. |
570
+
571
+ Returns: ` Promise<VerifiedRequestObject> `.
572
+
573
+ ### fromUtf8
574
+
575
+ Decode UTF-8 bytes into text using replacement characters for invalid sequences.
576
+
577
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/jose.ts#L21)
578
+
579
+ Import: `import {fromUtf8} from '@t3foundry/tasra-sdk/oid4vp'`
580
+
581
+ ```ts
582
+ declare function fromUtf8(b: Uint8Array): string;
583
+ ```
584
+
585
+ | Parameter | Type | Description |
586
+ |---|---|---|
587
+ | ` b ` | ` Uint8Array ` | - UTF-8 bytes to decode. |
588
+
589
+ Returns: ` string `.
590
+
591
+ ### holderCnf
592
+
593
+ The `cnf` a holder key binds to: `{kid: "<did:jwk>#0"}`, exactly as the Hovi wallet presents.
594
+
595
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/sd-jwt.ts#L193)
596
+
597
+ Import: `import {holderCnf} from '@t3foundry/tasra-sdk/oid4vp'`
598
+
599
+ ```ts
600
+ declare function holderCnf(holder: Pick<HolderKey, 'did'>): {
601
+ kid: string;
602
+ };
603
+ ```
604
+
605
+ | Parameter | Type | Description |
606
+ |---|---|---|
607
+ | ` holder ` | ` Pick<HolderKey, 'did'> ` | - Holder did:jwk identifier to reference in the credential binding. |
608
+
609
+ Returns:
610
+
611
+ ```ts
612
+ {
613
+ kid: string;
614
+ }
615
+ ```
616
+
617
+ ### holderSigner
618
+
619
+ How to sign for this holder. P-256 keys sign ES256, Ed25519 keys EdDSA - a credential is bound to
620
+ one key, and the KB-JWT it is presented with has to be signed by that key's own algorithm. Issuers
621
+ outside the P-256 profile exist: `tasra-cli vc issue-sd-jwt` binds an Ed25519 holder key.
622
+
623
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/jose.ts#L100)
624
+
625
+ Import: `import {holderSigner} from '@t3foundry/tasra-sdk/oid4vp'`
626
+
627
+ ```ts
628
+ declare function holderSigner(holder: HolderKey): JwsSigner;
629
+ ```
630
+
631
+ | Parameter | Type | Description |
632
+ |---|---|---|
633
+ | ` holder ` | ` HolderKey ` | - Holder private key and public JWK identifying its signing algorithm. |
634
+
635
+ Returns: ` JwsSigner `.
636
+
637
+ ### issueSdJwtVc
638
+
639
+ Mint a compact SD-JWT VC `issuer~d1~...~` with one disclosure per selectively disclosable claim.
640
+
641
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/sd-jwt.ts#L158)
642
+
643
+ Import: `import {issueSdJwtVc} from '@t3foundry/tasra-sdk/oid4vp'`
644
+
645
+ ```ts
646
+ declare function issueSdJwtVc(opts: IssueSdJwtVcOpts): string;
647
+ ```
648
+
649
+ | Parameter | Type | Description |
650
+ |---|---|---|
651
+ | ` opts ` | ` IssueSdJwtVcOpts ` | - Issuer key, claim values, holder binding and credential lifetime. |
652
+
653
+ Returns: ` string `.
654
+
655
+ ### jwkFromDid
656
+
657
+ The public JWK inside a `did:jwk` or a `did:key` (Ed25519 / P-256); a `#fragment` is ignored.
658
+
659
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/jose.ts#L228)
660
+
661
+ Import: `import {jwkFromDid} from '@t3foundry/tasra-sdk/oid4vp'`
662
+
663
+ ```ts
664
+ declare function jwkFromDid(did: string): Jwk;
665
+ ```
666
+
667
+ | Parameter | Type | Description |
668
+ |---|---|---|
669
+ | ` did ` | ` string ` | - P-256 or Ed25519 did:key or did:jwk identifier; an optional fragment is ignored. |
670
+
671
+ Returns: ` Jwk `.
672
+
673
+ ### nextPollDelay
674
+
675
+ The next polling delay: geometric growth (times1.5) capped at `max`, plus or minus20 % full jitter.
676
+ Pure, so the schedule is testable without timers.
677
+
678
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/verifier-agent/index.ts#L499)
679
+
680
+ Import: `import {nextPollDelay} from '@t3foundry/tasra-sdk/oid4vp'`
681
+
682
+ ```ts
683
+ declare function nextPollDelay(previousMs: number, baseMs: number, maxMs: number, random?: () => number): number;
684
+ ```
685
+
686
+ | Parameter | Type | Description |
687
+ |---|---|---|
688
+ | ` previousMs ` | ` number ` | - Previous polling delay in milliseconds, or zero before the first poll. |
689
+ | ` baseMs ` | ` number ` | - Initial polling interval in milliseconds. |
690
+ | ` maxMs ` | ` number ` | - Maximum interval before jitter is applied. |
691
+ | ` random? ` | ` () => number ` | - Random source returning a value between zero and one. |
692
+
693
+ Returns: ` number `.
694
+
695
+ ### openVerifierAgentSession
696
+
697
+ Sign the operation and open a session; hand `qrPayload` to the wallet.
698
+
699
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/verifier-agent.ts#L138)
700
+
701
+ Import: `import {openVerifierAgentSession} from '@t3foundry/tasra-sdk/oid4vp'`
702
+
703
+ ```ts
704
+ declare function openVerifierAgentSession(opts: OpenVerifierAgentSessionOpts): Promise<OpenedVerifierAgentSession>;
705
+ ```
706
+
707
+ | Parameter | Type | Description |
708
+ |---|---|---|
709
+ | ` opts ` | ` OpenVerifierAgentSessionOpts ` | - Operation details, signing wallet and verifier-agent endpoint. |
710
+
711
+ Returns: ` Promise<OpenedVerifierAgentSession> `.
712
+
713
+ ### p256DidKey
714
+
715
+ `did:key` of a P-256 public key (multicodec 0x1200 to varint `80 24`, compressed point) - Hovi's issuer shape.
716
+
717
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/jose.ts#L206)
718
+
719
+ Import: `import {p256DidKey} from '@t3foundry/tasra-sdk/oid4vp'`
720
+
721
+ ```ts
722
+ declare function p256DidKey(publicKeyUncompressedOrCompressed: Uint8Array): string;
723
+ ```
724
+
725
+ | Parameter | Type | Description |
726
+ |---|---|---|
727
+ | ` publicKeyUncompressedOrCompressed ` | ` Uint8Array ` | - SEC1-encoded P-256 public key in compressed or uncompressed form. |
728
+
729
+ Returns: ` string `.
730
+
731
+ ### p256DidKeyIssuer
732
+
733
+ A P-256 issuer as `did:key` (Hovi Studio's issuer shape) from a private scalar.
734
+
735
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/sd-jwt.ts#L203)
736
+
737
+ Import: `import {p256DidKeyIssuer} from '@t3foundry/tasra-sdk/oid4vp'`
738
+
739
+ ```ts
740
+ declare function p256DidKeyIssuer(privateKey: Uint8Array, opts?: {
741
+ fragmentKid?: boolean;
742
+ }): SdJwtIssuer;
743
+ ```
744
+
745
+ | Parameter | Type | Description |
746
+ |---|---|---|
747
+ | ` privateKey ` | ` Uint8Array ` | - 32-byte P-256 private scalar. |
748
+ | ` opts? ` | ` { fragmentKid?: boolean; } ` | - Whether kid should contain only the DID fragment. |
749
+
750
+ Returns: ` SdJwtIssuer `.
751
+
752
+ ### p256HolderKey
753
+
754
+ Construct a holder identity from a 32-byte P-256 private scalar.
755
+
756
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/jose.ts#L127)
757
+
758
+ Import: `import {p256HolderKey} from '@t3foundry/tasra-sdk/oid4vp'`
759
+
760
+ ```ts
761
+ declare function p256HolderKey(privateKey: Uint8Array): HolderKey;
762
+ ```
763
+
764
+ | Parameter | Type | Description |
765
+ |---|---|---|
766
+ | ` privateKey ` | ` Uint8Array ` | - 32-byte P-256 private scalar. |
767
+
768
+ Returns: ` HolderKey `.
769
+
770
+ ### p256PublicJwk
771
+
772
+ Derive a public P-256 JSON Web Key from a private scalar.
773
+
774
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/jose.ts#L109)
775
+
776
+ Import: `import {p256PublicJwk} from '@t3foundry/tasra-sdk/oid4vp'`
777
+
778
+ ```ts
779
+ declare function p256PublicJwk(privateKey: Uint8Array): EcJwk;
780
+ ```
781
+
782
+ | Parameter | Type | Description |
783
+ |---|---|---|
784
+ | ` privateKey ` | ` Uint8Array ` | - 32-byte P-256 private scalar. |
785
+
786
+ Returns: ` EcJwk `.
787
+
788
+ ### parseCredentialOfferUri
789
+
790
+ Parse an `openid-credential-offer://?credential_offer=...` or `...?credential_offer_uri=...` URI.
791
+
792
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/oid4vci.ts#L27)
793
+
794
+ Import: `import {parseCredentialOfferUri} from '@t3foundry/tasra-sdk/oid4vp'`
795
+
796
+ ```ts
797
+ declare function parseCredentialOfferUri(uri: string): {
798
+ offer?: CredentialOffer;
799
+ offerUri?: string;
800
+ };
801
+ ```
802
+
803
+ | Parameter | Type | Description |
804
+ |---|---|---|
805
+ | ` uri ` | ` string ` | - OpenID4VCI credential-offer URI containing an offer or offer URL. |
806
+
807
+ Returns:
808
+
809
+ ```ts
810
+ {
811
+ offer?: CredentialOffer;
812
+ offerUri?: string;
813
+ }
814
+ ```
815
+
816
+ ### parseOpenid4vpUri
817
+
818
+ `openid4vp://?client_id=...&request_uri=...` (a QR payload or deep link) to its two parameters.
819
+
820
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/request-object.ts#L69)
821
+
822
+ Import: `import {parseOpenid4vpUri} from '@t3foundry/tasra-sdk/oid4vp'`
823
+
824
+ ```ts
825
+ declare function parseOpenid4vpUri(uri: string): {
826
+ clientId?: string;
827
+ requestUri: string;
828
+ };
829
+ ```
830
+
831
+ | Parameter | Type | Description |
832
+ |---|---|---|
833
+ | ` uri ` | ` string ` | - Wallet deep link or QR payload containing request_uri. |
834
+
835
+ Returns:
836
+
837
+ ```ts
838
+ {
839
+ clientId?: string;
840
+ requestUri: string;
841
+ }
842
+ ```
843
+
844
+ ### parseSdJwt
845
+
846
+ Parse a compact SD-JWT and check each disclosed claim against the issuer payload's disclosure hashes. This does not verify the issuer signature.
847
+
848
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/sd-jwt.ts#L64)
849
+
850
+ Import: `import {parseSdJwt} from '@t3foundry/tasra-sdk/oid4vp'`
851
+
852
+ ```ts
853
+ declare function parseSdJwt(compact: string): ParsedSdJwt;
854
+ ```
855
+
856
+ | Parameter | Type | Description |
857
+ |---|---|---|
858
+ | ` compact ` | ` string ` | - Compact SD-JWT credential or presentation. |
859
+
860
+ Returns: ` ParsedSdJwt `.
861
+
862
+ ### payloadDigest
863
+
864
+ Compute the `payload_digest` for a given action and message.
865
+
866
+ For `sign` and `ibe-extract`, this is `sha256(message_bytes)` as 0x-hex.
867
+ Other actions should supply the digest directly.
868
+
869
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/verifier-agent/index.ts#L215)
870
+
871
+ Import: `import {payloadDigest} from '@t3foundry/tasra-sdk/oid4vp'`
872
+
873
+ ```ts
874
+ declare function payloadDigest(action: string, messageHex: string): string;
875
+ ```
876
+
877
+ | Parameter | Type | Description |
878
+ |---|---|---|
879
+ | ` action ` | ` string ` | - Operation name: sign and ibe-extract hash the supplied bytes. |
880
+ | ` messageHex ` | ` string ` | - Hexadecimal message bytes or an already computed digest for other actions. |
881
+
882
+ Returns: ` string `.
883
+
884
+ ### payloadDigestFor
885
+
886
+ The per-action `payload_digest` the keeper recomputes at `enforce_request_binding`:
887
+ `sign` = sha256(message), `ibe-extract` = sha256(identity), `decrypt` = the ciphertext
888
+ digest ([decryptPayloadDigest](#decryptpayloaddigest)), `dual-approve` = the digest the caller already
889
+ holds. Pass exactly one of the inputs the action needs.
890
+
891
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/binding.ts#L119)
892
+
893
+ Import: `import {payloadDigestFor} from '@t3foundry/tasra-sdk/oid4vp'`
894
+
895
+ ```ts
896
+ declare function payloadDigestFor(action: CommitteeAction, args: {
897
+ message?: Uint8Array;
898
+ identity?: string;
899
+ payloadDigest?: Uint8Array;
900
+ }): Uint8Array;
901
+ ```
902
+
903
+ | Parameter | Type | Description |
904
+ |---|---|---|
905
+ | ` action ` | ` CommitteeAction ` | - Operation whose payload will be bound. |
906
+ | ` args ` | ` { message?: Uint8Array; identity?: string; payloadDigest?: Uint8Array; } ` | - Message, identity or precomputed digest required by that operation. |
907
+
908
+ Returns: ` Uint8Array `.
909
+
910
+ ### peekSdJwt
911
+
912
+ Decode (no verification) the issuer JWT's payload of a compact SD-JWT - for display.
913
+
914
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/sd-jwt.ts#L295)
915
+
916
+ Import: `import {peekSdJwt} from '@t3foundry/tasra-sdk/oid4vp'`
917
+
918
+ ```ts
919
+ declare function peekSdJwt(compact: string): {
920
+ iss?: string;
921
+ vct?: string;
922
+ exp?: number;
923
+ sub?: string;
924
+ };
925
+ ```
926
+
927
+ | Parameter | Type | Description |
928
+ |---|---|---|
929
+ | ` compact ` | ` string ` | - Compact SD-JWT credential or presentation to inspect without signature verification. |
930
+
931
+ Returns:
932
+
933
+ ```ts
934
+ {
935
+ iss?: string;
936
+ vct?: string;
937
+ exp?: number;
938
+ sub?: string;
939
+ }
940
+ ```
941
+
942
+ ### planPresentation
943
+
944
+ Match held SD-JWT VCs against the request's `dcql_query`. Expired credentials are skipped.
945
+ Advisory: the drawn verifiers decide; a wrong local answer costs a wasted request, never access.
946
+
947
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/wallet.ts#L50)
948
+
949
+ Import: `import {planPresentation} from '@t3foundry/tasra-sdk/oid4vp'`
950
+
951
+ ```ts
952
+ declare function planPresentation(ro: Pick<VerifiedRequestObject, 'claims'>, held: readonly HeldSdJwt[], nowSecs?: number): PresentationPlan;
953
+ ```
954
+
955
+ | Parameter | Type | Description |
956
+ |---|---|---|
957
+ | ` ro ` | ` Pick<VerifiedRequestObject, 'claims'> ` | - Verified request claims containing the DCQL query. |
958
+ | ` held ` | ` readonly HeldSdJwt[] ` | - Held SD-JWT credentials to consider. |
959
+ | ` nowSecs? ` | ` number ` | - Current time in Unix seconds for excluding expired credentials. |
960
+
961
+ Returns: ` PresentationPlan `.
962
+
963
+ ### pollOid4vpSession
964
+
965
+ Fetch and validate one authorization session status. Transport failures and HTTP 502, 503 or 504 produce an unavailable error; malformed or other failed replies produce a protocol error. The polling secret is sent in the Authorization header.
966
+
967
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/verifier-agent/index.ts#L424)
968
+
969
+ Import: `import {pollOid4vpSession} from '@t3foundry/tasra-sdk/oid4vp'`
970
+
971
+ ```ts
972
+ declare function pollOid4vpSession(verifierAgentUrl: string, sessionId: string, pollSecret: string): Promise<SessionStatusResult>;
973
+ ```
974
+
975
+ | Parameter | Type | Description |
976
+ |---|---|---|
977
+ | ` verifierAgentUrl ` | ` string ` | - Verifier-agent HTTP base URL. |
978
+ | ` sessionId ` | ` string ` | - Opened session identifier. |
979
+ | ` pollSecret ` | ` string ` | - Secret returned at session creation; do not expose it in logs. |
980
+
981
+ Returns: ` Promise<SessionStatusResult> `.
982
+
983
+ ### presentationOperationTypedData
984
+
985
+ The typed data a creator (or delegate) signs, plus the wire operation and the verifier-agent's `message_hex`.
986
+
987
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/verifier-agent.ts#L78)
988
+
989
+ Import: `import {presentationOperationTypedData} from '@t3foundry/tasra-sdk/oid4vp'`
990
+
991
+ ```ts
992
+ declare function presentationOperationTypedData(input: OperationInput): {
993
+ typedData: Parameters<TypedDataSigner['signTypedData']>[0];
994
+ operation: PresentationOperation;
995
+ messageHex: string;
996
+ payloadDigest: Uint8Array;
997
+ };
998
+ ```
999
+
1000
+ | Parameter | Type | Description |
1001
+ |---|---|---|
1002
+ | ` input ` | ` OperationInput ` | - Network, slot, operation payload, description and authorization lifetime. |
1003
+
1004
+ Returns:
1005
+
1006
+ ```ts
1007
+ {
1008
+ typedData: Parameters<TypedDataSigner['signTypedData']>[0];
1009
+ operation: PresentationOperation;
1010
+ messageHex: string;
1011
+ payloadDigest: Uint8Array;
1012
+ }
1013
+ ```
1014
+
1015
+ ### presentSdJwt
1016
+
1017
+ Build the presentation `issuer~selected...~kb-jwt`, the KB-JWT signed by the holder's own key.
1018
+
1019
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/sd-jwt.ts#L248)
1020
+
1021
+ Import: `import {presentSdJwt} from '@t3foundry/tasra-sdk/oid4vp'`
1022
+
1023
+ ```ts
1024
+ declare function presentSdJwt(opts: PresentSdJwtOpts): string;
1025
+ ```
1026
+
1027
+ | Parameter | Type | Description |
1028
+ |---|---|---|
1029
+ | ` opts ` | ` PresentSdJwtOpts ` | - Parsed credential, disclosure selection, holder key, nonce and audience. |
1030
+
1031
+ Returns: ` string `.
1032
+
1033
+ ### presentToRequestUri
1034
+
1035
+ The whole wallet flow for one QR / deep link: fetch + verify the JAR, plan, let the caller
1036
+ choose (consent screen), bind, encrypt, POST.
1037
+
1038
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/wallet.ts#L171)
1039
+
1040
+ Import: `import {presentToRequestUri} from '@t3foundry/tasra-sdk/oid4vp'`
1041
+
1042
+ ```ts
1043
+ declare function presentToRequestUri(requestUriOrOpenid4vp: string, held: readonly HeldSdJwt[], holder: HolderKey, opts?: PresentOpts): Promise<{
1044
+ ro: VerifiedRequestObject;
1045
+ plan: PresentationPlan;
1046
+ built: BuiltResponse;
1047
+ redirectUri?: string;
1048
+ }>;
1049
+ ```
1050
+
1051
+ | Parameter | Type | Description |
1052
+ |---|---|---|
1053
+ | ` requestUriOrOpenid4vp ` | ` string ` | - Request-object URL or OpenID4VP deep link. |
1054
+ | ` held ` | ` readonly HeldSdJwt[] ` | - Held SD-JWT credentials available for selection. |
1055
+ | ` holder ` | ` HolderKey ` | - Holder key that matches the selected credential binding. |
1056
+ | ` opts? ` | ` PresentOpts ` | - Verification, consent selection and disclosure settings. |
1057
+
1058
+ Returns:
1059
+
1060
+ ```ts
1061
+ Promise<{
1062
+ ro: VerifiedRequestObject;
1063
+ plan: PresentationPlan;
1064
+ built: BuiltResponse;
1065
+ redirectUri?: string;
1066
+ }>
1067
+ ```
1068
+
1069
+ ### randomHolderKey
1070
+
1071
+ Generate a random P-256 holder key and its did:jwk identifier.
1072
+
1073
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/jose.ts#L143)
1074
+
1075
+ Import: `import {randomHolderKey} from '@t3foundry/tasra-sdk/oid4vp'`
1076
+
1077
+ ```ts
1078
+ declare function randomHolderKey(): HolderKey;
1079
+ ```
1080
+
1081
+ Returns: ` HolderKey `.
1082
+
1083
+ ### receiveCredential
1084
+
1085
+ Run the pre-authorized code flow end to end and return the issued credential.
1086
+
1087
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/oid4vci.ts#L92)
1088
+
1089
+ Import: `import {receiveCredential} from '@t3foundry/tasra-sdk/oid4vp'`
1090
+
1091
+ ```ts
1092
+ declare function receiveCredential(opts: ReceiveCredentialOpts): Promise<ReceivedCredential>;
1093
+ ```
1094
+
1095
+ | Parameter | Type | Description |
1096
+ |---|---|---|
1097
+ | ` opts ` | ` ReceiveCredentialOpts ` | - Credential offer, holder key, optional transaction code and transport settings. |
1098
+
1099
+ Returns: ` Promise<ReceivedCredential> `.
1100
+
1101
+ ### requestedClaimNames
1102
+
1103
+ The top-level claim names a credential query asks to see.
1104
+
1105
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/wallet.ts#L81)
1106
+
1107
+ Import: `import {requestedClaimNames} from '@t3foundry/tasra-sdk/oid4vp'`
1108
+
1109
+ ```ts
1110
+ declare function requestedClaimNames(query: Query, queryId: string): string[];
1111
+ ```
1112
+
1113
+ | Parameter | Type | Description |
1114
+ |---|---|---|
1115
+ | ` query ` | ` Query ` | - Parsed DCQL query. |
1116
+ | ` queryId ` | ` string ` | - Identifier of the credential query to inspect. |
1117
+
1118
+ Returns: ` string[] `.
1119
+
1120
+ ### requestHash
1121
+
1122
+ `keccak256(DOMAIN || chain_id u64 BE || slot_id || len(action) u32 BE || action || payload_digest)` -
1123
+ the ONE binding hash the verifier-agent, the JAR signer, every drawn verifier, the keeper, the
1124
+ accountant audit and this SDK compute. The wallet's request body is deliberately NOT in it.
1125
+
1126
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/binding.ts#L51)
1127
+
1128
+ Import: `import {requestHash} from '@t3foundry/tasra-sdk/oid4vp'`
1129
+
1130
+ ```ts
1131
+ declare function requestHash(chainId: number | bigint, slotId: Uint8Array, action: CommitteeAction, payloadDigest: Uint8Array): Uint8Array;
1132
+ ```
1133
+
1134
+ | Parameter | Type | Description |
1135
+ |---|---|---|
1136
+ | ` chainId ` | ` number \| bigint ` | - EVM chain identifier. |
1137
+ | ` slotId ` | ` Uint8Array ` | - 32-byte slot identifier. |
1138
+ | ` action ` | ` CommitteeAction ` | - Operation name bound into the request. |
1139
+ | ` payloadDigest ` | ` Uint8Array ` | - 32-byte action-specific payload digest. |
1140
+
1141
+ Returns: ` Uint8Array `.
1142
+
1143
+ ### resolveDidWeb
1144
+
1145
+ Fetch and minimally validate a `did:web` document.
1146
+
1147
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/did-web.ts#L46)
1148
+
1149
+ Import: `import {resolveDidWeb} from '@t3foundry/tasra-sdk/oid4vp'`
1150
+
1151
+ ```ts
1152
+ declare function resolveDidWeb(did: string, opts?: ResolveOpts): Promise<DidDocument>;
1153
+ ```
1154
+
1155
+ | Parameter | Type | Description |
1156
+ |---|---|---|
1157
+ | ` did ` | ` string ` | - did:web identifier to resolve. |
1158
+ | ` opts? ` | ` ResolveOpts ` | - Fetch override and optional loopback HTTP permission. |
1159
+
1160
+ Returns: ` Promise<DidDocument> `.
1161
+
1162
+ ### responseEncryptionKey
1163
+
1164
+ The ephemeral P-256 key the wallet must encrypt its response to, when the verifier-agent served one.
1165
+
1166
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/request-object.ts#L138)
1167
+
1168
+ Import: `import {responseEncryptionKey} from '@t3foundry/tasra-sdk/oid4vp'`
1169
+
1170
+ ```ts
1171
+ declare function responseEncryptionKey(ro: Pick<VerifiedRequestObject, 'claims'>): EcJwk | undefined;
1172
+ ```
1173
+
1174
+ | Parameter | Type | Description |
1175
+ |---|---|---|
1176
+ | ` ro ` | ` Pick<VerifiedRequestObject, 'claims'> ` | - Verified request claims containing optional recipient encryption keys. |
1177
+
1178
+ Returns: ` EcJwk | undefined `.
1179
+
1180
+ ### sdHash
1181
+
1182
+ `base64url(sha256(prefix))` where `prefix` is everything before the KB-JWT, trailing `~` included.
1183
+
1184
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/sd-jwt.ts#L114)
1185
+
1186
+ Import: `import {sdHash} from '@t3foundry/tasra-sdk/oid4vp'`
1187
+
1188
+ ```ts
1189
+ declare function sdHash(prefix: string): string;
1190
+ ```
1191
+
1192
+ | Parameter | Type | Description |
1193
+ |---|---|---|
1194
+ | ` prefix ` | ` string ` | - Presentation prefix before the key-binding JWT, including the trailing tilde. |
1195
+
1196
+ Returns: ` string `.
1197
+
1198
+ ### sdJwtClaims
1199
+
1200
+ The credential's claims as the verifier sees them: plain payload claims + disclosed ones.
1201
+
1202
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/sd-jwt.ts#L88)
1203
+
1204
+ Import: `import {sdJwtClaims} from '@t3foundry/tasra-sdk/oid4vp'`
1205
+
1206
+ ```ts
1207
+ declare function sdJwtClaims(parsed: ParsedSdJwt): Record<string, unknown>;
1208
+ ```
1209
+
1210
+ | Parameter | Type | Description |
1211
+ |---|---|---|
1212
+ | ` parsed ` | ` ParsedSdJwt ` | - Parsed credential with disclosure hashes already checked. |
1213
+
1214
+ Returns: ` Record<string, unknown> `.
1215
+
1216
+ ### sdJwtCredentialView
1217
+
1218
+ A ` CredentialView ` for the DCQL evaluator: format `dc+sd-jwt`, `types` = [`vct`].
1219
+
1220
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/sd-jwt.ts#L103)
1221
+
1222
+ Import: `import {sdJwtCredentialView} from '@t3foundry/tasra-sdk/oid4vp'`
1223
+
1224
+ ```ts
1225
+ declare function sdJwtCredentialView(parsed: ParsedSdJwt): CredentialView;
1226
+ ```
1227
+
1228
+ | Parameter | Type | Description |
1229
+ |---|---|---|
1230
+ | ` parsed ` | ` ParsedSdJwt ` | - Parsed credential to expose for advisory DCQL matching. |
1231
+
1232
+ Returns: ` CredentialView `.
1233
+
1234
+ ### signCompactJws
1235
+
1236
+ Sign a JSON payload as compact JWS. Set the header algorithm from the supplied signer.
1237
+
1238
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/jose.ts#L262)
1239
+
1240
+ Import: `import {signCompactJws} from '@t3foundry/tasra-sdk/oid4vp'`
1241
+
1242
+ ```ts
1243
+ declare function signCompactJws(header: Record<string, unknown>, payload: Record<string, unknown>, signer: JwsSigner): string;
1244
+ ```
1245
+
1246
+ | Parameter | Type | Description |
1247
+ |---|---|---|
1248
+ | ` header ` | ` Record<string, unknown> ` | - JOSE header fields; the signer determines alg. |
1249
+ | ` payload ` | ` Record<string, unknown> ` | - JSON claims to sign. |
1250
+ | ` signer ` | ` JwsSigner ` | - Private key and supported JWS algorithm. |
1251
+
1252
+ Returns: ` string `.
1253
+
1254
+ ### submitResponse
1255
+
1256
+ POST the built response to `response_uri`; returns the verifier-agent's `redirect_uri` when it gives one.
1257
+
1258
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/wallet.ts#L141)
1259
+
1260
+ Import: `import {submitResponse} from '@t3foundry/tasra-sdk/oid4vp'`
1261
+
1262
+ ```ts
1263
+ declare function submitResponse(ro: Pick<VerifiedRequestObject, 'claims'>, built: Pick<BuiltResponse, 'form'>, fetchImpl?: typeof fetch): Promise<{
1264
+ redirectUri?: string;
1265
+ }>;
1266
+ ```
1267
+
1268
+ | Parameter | Type | Description |
1269
+ |---|---|---|
1270
+ | ` ro ` | ` Pick<VerifiedRequestObject, 'claims'> ` | - Verified request containing the response endpoint. |
1271
+ | ` built ` | ` Pick<BuiltResponse, 'form'> ` | - Built form fields to submit. |
1272
+ | ` fetchImpl? ` | ` typeof fetch ` | - HTTP transport; defaults to the global fetch implementation. |
1273
+
1274
+ Returns:
1275
+
1276
+ ```ts
1277
+ Promise<{
1278
+ redirectUri?: string;
1279
+ }>
1280
+ ```
1281
+
1282
+ ### utf8
1283
+
1284
+ Encode text as UTF-8 bytes.
1285
+
1286
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/jose.ts#L15)
1287
+
1288
+ Import: `import {utf8} from '@t3foundry/tasra-sdk/oid4vp'`
1289
+
1290
+ ```ts
1291
+ declare function utf8(s: string): Uint8Array;
1292
+ ```
1293
+
1294
+ | Parameter | Type | Description |
1295
+ |---|---|---|
1296
+ | ` s ` | ` string ` | - Text to encode. |
1297
+
1298
+ Returns: ` Uint8Array `.
1299
+
1300
+ ### verificationKey
1301
+
1302
+ The JWK behind `kid` (a full DID URL or a `#fragment`) in `doc`.
1303
+
1304
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/did-web.ts#L63)
1305
+
1306
+ Import: `import {verificationKey} from '@t3foundry/tasra-sdk/oid4vp'`
1307
+
1308
+ ```ts
1309
+ declare function verificationKey(doc: DidDocument, kid: string): Jwk;
1310
+ ```
1311
+
1312
+ | Parameter | Type | Description |
1313
+ |---|---|---|
1314
+ | ` doc ` | ` DidDocument ` | - Resolved DID document containing public verification methods. |
1315
+ | ` kid ` | ` string ` | - Signing key identifier or fragment to locate. |
1316
+
1317
+ Returns: ` Jwk `.
1318
+
1319
+ ### verifierAgentResult
1320
+
1321
+ Validate request binding and proof encoding after either URL or registered-session polling.
1322
+
1323
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/verifier-agent.ts#L208)
1324
+
1325
+ Import: `import {verifierAgentResult} from '@t3foundry/tasra-sdk/oid4vp'`
1326
+
1327
+ ```ts
1328
+ declare function verifierAgentResult(session: Pick<OpenedVerifierAgentSession, 'sessionId' | 'requestHash'>, r: SessionStatusResult): VerifierAgentResult;
1329
+ ```
1330
+
1331
+ | Parameter | Type | Description |
1332
+ |---|---|---|
1333
+ | ` session ` | ` Pick<OpenedVerifierAgentSession, 'sessionId' \| 'requestHash'> ` | - Session identifier and expected request-binding hash. |
1334
+ | ` r ` | ` SessionStatusResult ` | - Completed session status to validate and decode. |
1335
+
1336
+ Returns: ` VerifierAgentResult `.
1337
+
1338
+ ### verifierAgentVerifierProofs
1339
+
1340
+ The verifier-agent's `verifier_proofs` DTO (`{verifier_index, operator, pubkey, proof}`) to the SDK shape.
1341
+
1342
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/verifier-agent.ts#L171)
1343
+
1344
+ Import: `import {verifierAgentVerifierProofs} from '@t3foundry/tasra-sdk/oid4vp'`
1345
+
1346
+ ```ts
1347
+ declare function verifierAgentVerifierProofs(raw: unknown): VerifierProof[] | undefined;
1348
+ ```
1349
+
1350
+ | Parameter | Type | Description |
1351
+ |---|---|---|
1352
+ | ` raw ` | ` unknown ` | - Verifier-agent verifier_proofs response value. |
1353
+
1354
+ Returns: ` VerifierProof[] | undefined `.
1355
+
1356
+ ### verifyCompactJws
1357
+
1358
+ Verify a compact JWS under `jwk` and return its decoded payload; throws on any failure.
1359
+
1360
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/jose.ts#L277)
1361
+
1362
+ Import: `import {verifyCompactJws} from '@t3foundry/tasra-sdk/oid4vp'`
1363
+
1364
+ ```ts
1365
+ declare function verifyCompactJws<T = Record<string, unknown>>(jws: string, jwk: Jwk): {
1366
+ header: Record<string, unknown>;
1367
+ payload: T;
1368
+ };
1369
+ ```
1370
+
1371
+ | Parameter | Type | Description |
1372
+ |---|---|---|
1373
+ | ` jws ` | ` string ` | - Compact JWS to verify. |
1374
+ | ` jwk ` | ` Jwk ` | - Public JSON Web Key trusted by the caller for this signature. |
1375
+
1376
+ Returns:
1377
+
1378
+ ```ts
1379
+ {
1380
+ header: Record<string, unknown>;
1381
+ payload: T;
1382
+ }
1383
+ ```
1384
+
1385
+ ### verifyKbJwt
1386
+
1387
+ Verify the holder signature, presentation hash, nonce and audience of a key-binding JWT. This does not verify the issuer signature, credential lifetime or issuer trust.
1388
+
1389
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/sd-jwt.ts#L272)
1390
+
1391
+ Import: `import {verifyKbJwt} from '@t3foundry/tasra-sdk/oid4vp'`
1392
+
1393
+ ```ts
1394
+ declare function verifyKbJwt(presentation: string, expected: {
1395
+ nonce: string;
1396
+ aud: string;
1397
+ }): {
1398
+ holderJwk: Jwk;
1399
+ claims: Record<string, unknown>;
1400
+ };
1401
+ ```
1402
+
1403
+ | Parameter | Type | Description |
1404
+ |---|---|---|
1405
+ | ` presentation ` | ` string ` | - Compact SD-JWT presentation including its key-binding JWT. |
1406
+ | ` expected ` | ` { nonce: string; aud: string; } ` | - Expected wallet challenge nonce and verifier audience. |
1407
+
1408
+ Returns:
1409
+
1410
+ ```ts
1411
+ {
1412
+ holderJwk: Jwk;
1413
+ claims: Record<string, unknown>;
1414
+ }
1415
+ ```
1416
+
1417
+ ### verifyRequestObject
1418
+
1419
+ Verify the request signature, JOSE type and agreement between client_id and the
1420
+ issuer DID. Check expiration only when exp is a number; absence or a nonnumeric
1421
+ value is not rejected by this helper. Require a nonce, response URI and DCQL query.
1422
+
1423
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/request-object.ts#L113)
1424
+
1425
+ Import: `import {verifyRequestObject} from '@t3foundry/tasra-sdk/oid4vp'`
1426
+
1427
+ ```ts
1428
+ declare function verifyRequestObject(jwt: string, opts?: VerifyRequestObjectOpts): Promise<VerifiedRequestObject>;
1429
+ ```
1430
+
1431
+ | Parameter | Type | Description |
1432
+ |---|---|---|
1433
+ | ` jwt ` | ` string ` | - Signed OpenID4VP request JWT. |
1434
+ | ` opts? ` | ` VerifyRequestObjectOpts ` | - Trusted key resolver, current time and expiration tolerance. |
1435
+
1436
+ Returns: ` Promise<VerifiedRequestObject> `.
1437
+
1438
+ ### waitForSession
1439
+
1440
+ Poll until the session reaches a terminal state (done or failed) - bounded by
1441
+ `timeoutMs`, with a growing jittered interval so many clients never poll in lock-step.
1442
+ A transient `unavailable` answer (a 503, a dropped connection) is retried within the
1443
+ deadline; a `protocol` answer stops at once; the deadline is a `timeout` error; the
1444
+ caller's `signal` is a `cancelled` error. A terminal `failed` is RETURNED (the caller
1445
+ decides how to explain it) - see `awaitVerifierAgentResult` for the version that throws `refused`.
1446
+
1447
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/verifier-agent/index.ts#L521)
1448
+
1449
+ Import: `import {waitForSession} from '@t3foundry/tasra-sdk/oid4vp'`
1450
+
1451
+ ```ts
1452
+ declare function waitForSession(verifierAgentUrl: string, sessionId: string, pollSecret: string, intervalMs?: number, timeoutMs?: number, opts?: WaitOpts): Promise<SessionStatusResult>;
1453
+ ```
1454
+
1455
+ | Parameter | Type | Description |
1456
+ |---|---|---|
1457
+ | ` verifierAgentUrl ` | ` string ` | - Verifier-agent HTTP base URL. |
1458
+ | ` sessionId ` | ` string ` | - Opened session identifier. |
1459
+ | ` pollSecret ` | ` string ` | - bearer token returned by `createOid4vpSession` |
1460
+ | ` intervalMs? ` | ` number ` | - initial polling interval in milliseconds (default 2000) |
1461
+ | ` timeoutMs? ` | ` number ` | - total deadline in milliseconds (default 300000 = 5 min) |
1462
+ | ` opts? ` | ` WaitOpts ` | - Cancellation, phase callback and polling backoff controls. |
1463
+
1464
+ Returns: ` Promise<SessionStatusResult> `.
1465
+
1466
+ ## Types
1467
+
1468
+ Options, data structures and return types.
1469
+
1470
+ <details>
1471
+ <summary>Browse 43 types</summary>
1472
+
1473
+ - [BuildResponseOpts](#buildresponseopts)
1474
+ - [BuiltResponse](#builtresponse)
1475
+ - [CommitteeAction](#committeeaction)
1476
+ - [CreateSessionParams](#createsessionparams)
1477
+ - [CreateSessionResult](#createsessionresult)
1478
+ - [CredentialOffer](#credentialoffer)
1479
+ - [DidDocument](#diddocument)
1480
+ - [Disclosure](#disclosure)
1481
+ - [EcJwk](#ecjwk)
1482
+ - [HeldSdJwt](#heldsdjwt)
1483
+ - [HolderKey](#holderkey)
1484
+ - [IssuerMetadata](#issuermetadata)
1485
+ - [IssueSdJwtVcOpts](#issuesdjwtvcopts)
1486
+ - [JweEnc](#jweenc)
1487
+ - [Jwk](#jwk)
1488
+ - [JwsAlg](#jwsalg)
1489
+ - [JwsSigner](#jwssigner)
1490
+ - [KeyResolver](#keyresolver)
1491
+ - [NonceContext](#noncecontext)
1492
+ - [OkpJwk](#okpjwk)
1493
+ - [OpenedVerifierAgentSession](#openedverifieragentsession)
1494
+ - [OpenVerifierAgentSessionOpts](#openverifieragentsessionopts)
1495
+ - [OperationInput](#operationinput)
1496
+ - [ParsedSdJwt](#parsedsdjwt)
1497
+ - [PresentationCandidate](#presentationcandidate)
1498
+ - [PresentationDelegation](#presentationdelegation)
1499
+ - [PresentationOperation](#presentationoperation)
1500
+ - [PresentationPlan](#presentationplan)
1501
+ - [PresentOpts](#presentopts)
1502
+ - [PresentSdJwtOpts](#presentsdjwtopts)
1503
+ - [ReceiveCredentialOpts](#receivecredentialopts)
1504
+ - [ReceivedCredential](#receivedcredential)
1505
+ - [RequestObjectClaims](#requestobjectclaims)
1506
+ - [ResolveOpts](#resolveopts)
1507
+ - [SdJwtIssuer](#sdjwtissuer)
1508
+ - [SessionPhase](#sessionphase)
1509
+ - [SessionStatusResult](#sessionstatusresult)
1510
+ - [TypedDataSigner](#typeddatasigner)
1511
+ - [VerifiedRequestObject](#verifiedrequestobject)
1512
+ - [VerifierAgentResult](#verifieragentresult-1)
1513
+ - [VerifierAgentSessionErrorKind](#verifieragentsessionerrorkind)
1514
+ - [VerifyRequestObjectOpts](#verifyrequestobjectopts)
1515
+ - [WaitOpts](#waitopts)
1516
+
1517
+ </details>
1518
+
1519
+ ### BuildResponseOpts
1520
+
1521
+ Verified request, selected credential, holder key and disclosure options for a wallet response.
1522
+
1523
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/wallet.ts#L87)
1524
+
1525
+ ```ts
1526
+ export interface BuildResponseOpts {
1527
+ ro: Pick<VerifiedRequestObject, 'claims'>;
1528
+ candidate: PresentationCandidate;
1529
+ holder: HolderKey;
1530
+ disclose?: 'all' | readonly string[];
1531
+ nowSecs?: number;
1532
+ enc?: JweEnc;
1533
+ }
1534
+ ```
1535
+
1536
+ Fields:
1537
+
1538
+ - **` ro `**: Verified request claims to bind the response to.
1539
+ - **` candidate `**: Credential selected for this presentation.
1540
+ - **` holder `**: Holder key matching the selected credential binding.
1541
+ - **` disclose `**: Override which disclosures to reveal (default: exactly the claims the query names).
1542
+ - **` nowSecs `**: Current time override in Unix seconds.
1543
+ - **` enc `**: Preferred content encryption when the verifier-agent lists several (default A256GCM).
1544
+
1545
+ ### BuiltResponse
1546
+
1547
+ Holder-bound presentation and form fields ready for submission to the verifier agent.
1548
+
1549
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/wallet.ts#L103)
1550
+
1551
+ ```ts
1552
+ export interface BuiltResponse {
1553
+ presentation: string;
1554
+ payload: string;
1555
+ form: Record<string, string>;
1556
+ encrypted: boolean;
1557
+ }
1558
+ ```
1559
+
1560
+ Fields:
1561
+
1562
+ - **` presentation `**: The presentation `issuer~disclosures~kb-jwt` that went into `vp_token`.
1563
+ - **` payload `**: The JARM payload `{vp_token: {<queryId>: [presentation]}, state}` as JSON.
1564
+ - **` form `**: The form body to POST: `response=<JWE>` when the verifier-agent served an encryption key, else the plain fields.
1565
+ - **` encrypted `**: Whether the form contains an encrypted JWE response.
1566
+
1567
+ ### CommitteeAction
1568
+
1569
+ Operation names accepted by the committee request-binding protocol.
1570
+
1571
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/binding.ts#L17)
1572
+
1573
+ ```ts
1574
+ export type CommitteeAction = 'sign' | 'decrypt' | 'ibe-extract' | 'dual-approve';
1575
+ ```
1576
+
1577
+ ### CreateSessionParams
1578
+
1579
+ Signed operation, optional delegation and payload submitted to the verifier agent.
1580
+
1581
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/verifier-agent/index.ts#L56)
1582
+
1583
+ ```ts
1584
+ export interface CreateSessionParams {
1585
+ operation: PresentationOperation;
1586
+ operationSig: string;
1587
+ delegation?: PresentationDelegation;
1588
+ messageHex: string;
1589
+ }
1590
+ ```
1591
+
1592
+ Fields:
1593
+
1594
+ - **` operation `**: Signed operation details presented for authorization.
1595
+ - **` operationSig `**: 0x-hex 65-byte EIP-712 signature over the operation
1596
+ - **` delegation `**: Optional EIP-712 delegation from the slot creator
1597
+ - **` messageHex `**: The raw payload as 0x-hex
1598
+
1599
+ ### CreateSessionResult
1600
+
1601
+ Wallet presentation link and polling credentials for an opened authorization session.
1602
+
1603
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/verifier-agent/index.ts#L68)
1604
+
1605
+ ```ts
1606
+ export interface CreateSessionResult {
1607
+ sessionId: string;
1608
+ pollSecret: string;
1609
+ qrPayload: string;
1610
+ requestUri: string;
1611
+ }
1612
+ ```
1613
+
1614
+ Fields:
1615
+
1616
+ - **` sessionId `**: Opened authorization session identifier.
1617
+ - **` pollSecret `**: Bearer token for polling - treat as a secret
1618
+ - **` qrPayload `**: OpenID4VP deep link for a wallet or QR code.
1619
+ - **` requestUri `**: URL from which the wallet retrieves the signed request.
1620
+
1621
+ ### CredentialOffer
1622
+
1623
+ Credential issuer, offered configurations and optional pre-authorized grant details.
1624
+
1625
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/oid4vci.ts#L13)
1626
+
1627
+ ```ts
1628
+ export interface CredentialOffer {
1629
+ credential_issuer: string;
1630
+ credential_configuration_ids: string[];
1631
+ grants?: Record<string, {
1632
+ 'pre-authorized_code'?: string;
1633
+ tx_code?: {
1634
+ input_mode?: string;
1635
+ length?: number;
1636
+ description?: string;
1637
+ };
1638
+ authorization_server?: string;
1639
+ }>;
1640
+ }
1641
+ ```
1642
+
1643
+ Fields:
1644
+
1645
+ - **` credential_issuer `**: Issuer identifier and metadata base URL.
1646
+ - **` credential_configuration_ids `**: Credential configurations available in the offer.
1647
+ - **` grants `**: Grant details, including any pre-authorized code and transaction code requirements.
1648
+
1649
+ ### DidDocument
1650
+
1651
+ DID document fields used to resolve a public verification key.
1652
+
1653
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/did-web.ts#L7)
1654
+
1655
+ ```ts
1656
+ export interface DidDocument {
1657
+ id: string;
1658
+ verificationMethod?: Array<{
1659
+ id: string;
1660
+ type?: string;
1661
+ controller?: string;
1662
+ publicKeyJwk?: Jwk;
1663
+ publicKeyMultibase?: string;
1664
+ }>;
1665
+ authentication?: Array<string | {
1666
+ id: string;
1667
+ }>;
1668
+ assertionMethod?: Array<string | {
1669
+ id: string;
1670
+ }>;
1671
+ }
1672
+ ```
1673
+
1674
+ Fields:
1675
+
1676
+ - **` id `**: DID identified by this document.
1677
+ - **` verificationMethod `**: Public keys and verification method identifiers.
1678
+ - **` authentication `**: Verification methods authorized for authentication.
1679
+ - **` assertionMethod `**: Verification methods authorized for assertions.
1680
+
1681
+ ### Disclosure
1682
+
1683
+ One top-level SD-JWT claim disclosure with its encoded value and digest.
1684
+
1685
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/sd-jwt.ts#L14)
1686
+
1687
+ ```ts
1688
+ export interface Disclosure {
1689
+ encoded: string;
1690
+ salt: string;
1691
+ name: string;
1692
+ value: unknown;
1693
+ digest: string;
1694
+ }
1695
+ ```
1696
+
1697
+ Fields:
1698
+
1699
+ - **` encoded `**: base64url(JSON([salt, name, value])) - what travels on the wire.
1700
+ - **` salt `**: Random salt decoded from the disclosure.
1701
+ - **` name `**: Top-level claim name.
1702
+ - **` value `**: Disclosed claim value.
1703
+ - **` digest `**: base64url(sha256(encoded)) - what the issuer JWT's `_sd` array holds.
1704
+
1705
+ ### EcJwk
1706
+
1707
+ Public P-256 JSON Web Key with base64url coordinates and optional JOSE metadata.
1708
+
1709
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/jose.ts#L53)
1710
+
1711
+ ```ts
1712
+ export interface EcJwk {
1713
+ kty: 'EC';
1714
+ crv: 'P-256';
1715
+ x: string;
1716
+ y: string;
1717
+ kid?: string;
1718
+ alg?: string;
1719
+ use?: string;
1720
+ }
1721
+ ```
1722
+
1723
+ Fields:
1724
+
1725
+ - **` kty `**: EC key type discriminator.
1726
+ - **` crv `**: P-256 curve identifier.
1727
+ - **` x `**: Base64url-encoded public x coordinate.
1728
+ - **` y `**: Base64url-encoded public y coordinate.
1729
+ - **` kid `**: Optional signing key identifier.
1730
+ - **` alg `**: JOSE signing algorithm identifier.
1731
+ - **` use `**: Optional JOSE key-use hint.
1732
+
1733
+ ### HeldSdJwt
1734
+
1735
+ A credential the wallet holds.
1736
+
1737
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/wallet.ts#L11)
1738
+
1739
+ ```ts
1740
+ export interface HeldSdJwt {
1741
+ sdJwt: string;
1742
+ label?: string;
1743
+ }
1744
+ ```
1745
+
1746
+ Fields:
1747
+
1748
+ - **` sdJwt `**: Compact SD-JWT credential stored by the wallet.
1749
+ - **` label `**: For the consent screen.
1750
+
1751
+ ### HolderKey
1752
+
1753
+ A holder key in the shape the Hovi profile presents: `cnf.kid = did:jwk:...#0`.
1754
+
1755
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/jose.ts#L84)
1756
+
1757
+ ```ts
1758
+ export interface HolderKey {
1759
+ privateKey: Uint8Array;
1760
+ publicJwk: Jwk;
1761
+ did: string;
1762
+ }
1763
+ ```
1764
+
1765
+ Fields:
1766
+
1767
+ - **` privateKey `**: 32 bytes: a P-256 private scalar, or an Ed25519 seed.
1768
+ - **` publicJwk `**: Public JSON Web Key for this holder.
1769
+ - **` did `**: `did:jwk:<base64url(JSON(publicJwk))>`
1770
+
1771
+ ### IssuerMetadata
1772
+
1773
+ Issuer endpoints and credential configurations used during credential issuance.
1774
+
1775
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/oid4vci.ts#L38)
1776
+
1777
+ ```ts
1778
+ export interface IssuerMetadata {
1779
+ credential_issuer: string;
1780
+ credential_endpoint: string;
1781
+ nonce_endpoint?: string;
1782
+ authorization_servers?: string[];
1783
+ credential_configurations_supported: Record<string, {
1784
+ format: string;
1785
+ vct?: string;
1786
+ [k: string]: unknown;
1787
+ }>;
1788
+ }
1789
+ ```
1790
+
1791
+ Fields:
1792
+
1793
+ - **` credential_issuer `**: Issuer identifier used as the proof audience.
1794
+ - **` credential_endpoint `**: Endpoint accepting credential issuance requests.
1795
+ - **` nonce_endpoint `**: Optional endpoint for obtaining a proof nonce.
1796
+ - **` authorization_servers `**: Authorization servers associated with this issuer.
1797
+ - **` credential_configurations_supported `**: Configuration identifiers mapped to credential formats and metadata.
1798
+
1799
+ ### IssueSdJwtVcOpts
1800
+
1801
+ Issuer, claims, holder binding and lifetime for a top-level selective-disclosure credential.
1802
+
1803
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/sd-jwt.ts#L130)
1804
+
1805
+ ```ts
1806
+ export interface IssueSdJwtVcOpts {
1807
+ issuer: SdJwtIssuer;
1808
+ vct: string;
1809
+ claims: Record<string, unknown>;
1810
+ plain?: string[];
1811
+ cnf: {
1812
+ kid: string;
1813
+ } | {
1814
+ jwk: Jwk;
1815
+ };
1816
+ sub?: string;
1817
+ nowSecs?: number;
1818
+ ttlSecs?: number;
1819
+ header?: Record<string, unknown>;
1820
+ random?: () => Uint8Array;
1821
+ }
1822
+ ```
1823
+
1824
+ Fields:
1825
+
1826
+ - **` issuer `**: Issuer identity and signing key.
1827
+ - **` vct `**: Verifiable credential type identifier.
1828
+ - **` claims `**: Every claim goes into a disclosure unless named in `plain` (which then travels in the clear).
1829
+ - **` plain `**: Claim names to include directly in the issuer JWT instead of selective disclosures.
1830
+ - **` cnf `**: The holder's key binding: `{kid: did:jwk...#0}` (Hovi's shape) or `{jwk}`.
1831
+ - **` sub `**: Subject DID, when the credential names one (`sub`); the verifier derives the holder from it first.
1832
+ - **` nowSecs `**: Current time override in Unix seconds.
1833
+ - **` ttlSecs `**: Credential lifetime in seconds; defaults to 365 days.
1834
+ - **` header `**: Extra header members (e.g. a `typ` override); `alg` and `kid` are set here.
1835
+ - **` random `**: Secure random bytes used to salt each disclosure; defaults to 16 Web Crypto bytes.
1836
+
1837
+ ### JweEnc
1838
+
1839
+ Supported AES-GCM content encryption algorithms for compact JWE.
1840
+
1841
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/jwe.ts#L9)
1842
+
1843
+ ```ts
1844
+ export type JweEnc = 'A256GCM' | 'A128GCM';
1845
+ ```
1846
+
1847
+ ### Jwk
1848
+
1849
+ Supported public JSON Web Key: P-256 or Ed25519.
1850
+
1851
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/jose.ts#L81)
1852
+
1853
+ ```ts
1854
+ export type Jwk = EcJwk | OkpJwk;
1855
+ ```
1856
+
1857
+ Fields:
1858
+
1859
+ - **` kty `**: EC key type discriminator. OKP key type discriminator.
1860
+ - **` crv `**: P-256 curve identifier. Ed25519 curve identifier.
1861
+ - **` x `**: Base64url-encoded public x coordinate. Base64url-encoded Ed25519 public key.
1862
+ - **` kid `**: Optional signing key identifier.
1863
+
1864
+ ### JwsAlg
1865
+
1866
+ Supported compact JWS algorithms: ES256 for P-256 or EdDSA for Ed25519.
1867
+
1868
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/jose.ts#L246)
1869
+
1870
+ ```ts
1871
+ export type JwsAlg = 'ES256' | 'EdDSA';
1872
+ ```
1873
+
1874
+ ### JwsSigner
1875
+
1876
+ A signer for a compact JWS: a raw private key of the named curve.
1877
+
1878
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/jose.ts#L248)
1879
+
1880
+ ```ts
1881
+ export interface JwsSigner {
1882
+ alg: JwsAlg;
1883
+ privateKey: Uint8Array;
1884
+ }
1885
+ ```
1886
+
1887
+ Fields:
1888
+
1889
+ - **` alg `**: JOSE signing algorithm identifier.
1890
+ - **` privateKey `**: 32-byte P-256 private scalar or Ed25519 secret seed, matching alg.
1891
+
1892
+ ### KeyResolver
1893
+
1894
+ Resolve the signing key a JAR's `kid` names: `did:web` documents online, `did:key`/`did:jwk` offline.
1895
+
1896
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/request-object.ts#L78)
1897
+
1898
+ ```ts
1899
+ export type KeyResolver = (did: string, kid: string | undefined) => Promise<Jwk>;
1900
+ ```
1901
+
1902
+ ### NonceContext
1903
+
1904
+ The authenticated context a wallet nonce binds beyond the request hash and the session
1905
+ random (the reference nonce context): the beacon epoch, the anchored verifier-set
1906
+ snapshot root and size, the slot's effective policy and the creator-signed operation's
1907
+ expiry. The verifier-agent, the JAR signer and every fan-out verifier rebuild it from their own reads;
1908
+ changing any field needs a new wallet proof. `snapshotRoot` is all-zero only where no
1909
+ verifier-set registry is configured (dev).
1910
+
1911
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/binding.ts#L65)
1912
+
1913
+ ```ts
1914
+ export interface NonceContext {
1915
+ epoch: number | bigint;
1916
+ snapshotRoot: Uint8Array;
1917
+ registrySize: number;
1918
+ committee: number;
1919
+ quorum: number;
1920
+ operationExp: number | bigint;
1921
+ }
1922
+ ```
1923
+
1924
+ Fields:
1925
+
1926
+ - **` epoch `**: Beacon epoch used for the verifier committee draw.
1927
+ - **` snapshotRoot `**: 32-byte anchored verifier snapshot root.
1928
+ - **` registrySize `**: Number of entries in the verifier registry.
1929
+ - **` committee `**: Number of verifiers selected for the committee.
1930
+ - **` quorum `**: Minimum required verifier signatures.
1931
+ - **` operationExp `**: Creator-signed operation expiry in Unix seconds.
1932
+
1933
+ ### OkpJwk
1934
+
1935
+ Public Ed25519 JSON Web Key with a base64url public key and optional key identifier.
1936
+
1937
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/jose.ts#L70)
1938
+
1939
+ ```ts
1940
+ export interface OkpJwk {
1941
+ kty: 'OKP';
1942
+ crv: 'Ed25519';
1943
+ x: string;
1944
+ kid?: string;
1945
+ }
1946
+ ```
1947
+
1948
+ Fields:
1949
+
1950
+ - **` kty `**: OKP key type discriminator.
1951
+ - **` crv `**: Ed25519 curve identifier.
1952
+ - **` x `**: Base64url-encoded Ed25519 public key.
1953
+ - **` kid `**: Optional signing key identifier.
1954
+
1955
+ ### OpenedVerifierAgentSession
1956
+
1957
+ Opened wallet session with its signed operation and expected request-binding hash.
1958
+
1959
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/verifier-agent.ts#L124)
1960
+
1961
+ ```ts
1962
+ export interface OpenedVerifierAgentSession extends CreateSessionResult {
1963
+ operation: PresentationOperation;
1964
+ requestHash: Uint8Array;
1965
+ verifierAgentUrl: string;
1966
+ }
1967
+ ```
1968
+
1969
+ Fields:
1970
+
1971
+ - **` operation `**: Signed operation details presented for authorization.
1972
+ - **` requestHash `**: The binding hash the token will carry - compare with the token's `request_hash`.
1973
+ - **` verifierAgentUrl `**: Verifier-agent HTTP base URL for the selected network.
1974
+ - **` sessionId `**: Opened authorization session identifier.
1975
+ - **` pollSecret `**: Bearer token for polling - treat as a secret
1976
+ - **` qrPayload `**: OpenID4VP deep link for a wallet or QR code.
1977
+ - **` requestUri `**: URL from which the wallet retrieves the signed request.
1978
+
1979
+ ### OpenVerifierAgentSessionOpts
1980
+
1981
+ Operation, signing wallet and verifier-agent endpoint for opening a presentation session.
1982
+
1983
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/verifier-agent.ts#L114)
1984
+
1985
+ ```ts
1986
+ export interface OpenVerifierAgentSessionOpts extends OperationInput {
1987
+ verifierAgentUrl: string;
1988
+ signer: TypedDataSigner;
1989
+ delegation?: PresentationDelegation;
1990
+ }
1991
+ ```
1992
+
1993
+ Fields:
1994
+
1995
+ - **` verifierAgentUrl `**: Verifier-agent HTTP base URL for the selected network.
1996
+ - **` signer `**: The slot creator's key, or a delegate's (with `delegation`).
1997
+ - **` delegation `**: Optional creator-signed delegation authorizing the signing wallet.
1998
+ - **` chainId `**: EVM chain identifier.
1999
+ - **` keyRegistry `**: The KeyRegistry address - the EIP-712 `verifyingContract`.
2000
+ - **` slotId `**: 32-byte slot identifier.
2001
+ - **` action `**: Operation whose payload and permission are being authorized.
2002
+ - **` message `**: `sign`: the message; `ibe-extract`: use `identity`; `decrypt`/`dual-approve`: use `payloadDigest`.
2003
+ - **` identity `**: Exact identity string for an IBE extraction operation.
2004
+ - **` payloadDigest `**: Precomputed 32-byte digest for decrypt or dual-approve.
2005
+ - **` description `**: Shown by the wallet as the operation's purpose.
2006
+ - **` ttlSecs `**: Seconds the authorization stays valid (default 600, the verifier-agent caps at 3600).
2007
+ - **` nowSecs `**: Current time override in Unix seconds.
2008
+
2009
+ ### OperationInput
2010
+
2011
+ Slot operation, payload context and authorization lifetime used to construct EIP-712 typed data.
2012
+
2013
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/verifier-agent.ts#L50)
2014
+
2015
+ ```ts
2016
+ export interface OperationInput {
2017
+ chainId: number;
2018
+ keyRegistry: `0x${string}`;
2019
+ slotId: `0x${string}` | Uint8Array;
2020
+ action: CommitteeAction;
2021
+ message?: Uint8Array;
2022
+ identity?: string;
2023
+ payloadDigest?: Uint8Array;
2024
+ description: string;
2025
+ ttlSecs?: number;
2026
+ nowSecs?: number;
2027
+ }
2028
+ ```
2029
+
2030
+ Fields:
2031
+
2032
+ - **` chainId `**: EVM chain identifier.
2033
+ - **` keyRegistry `**: The KeyRegistry address - the EIP-712 `verifyingContract`.
2034
+ - **` slotId `**: 32-byte slot identifier.
2035
+ - **` action `**: Operation whose payload and permission are being authorized.
2036
+ - **` message `**: `sign`: the message; `ibe-extract`: use `identity`; `decrypt`/`dual-approve`: use `payloadDigest`.
2037
+ - **` identity `**: Exact identity string for an IBE extraction operation.
2038
+ - **` payloadDigest `**: Precomputed 32-byte digest for decrypt or dual-approve.
2039
+ - **` description `**: Shown by the wallet as the operation's purpose.
2040
+ - **` ttlSecs `**: Seconds the authorization stays valid (default 600, the verifier-agent caps at 3600).
2041
+ - **` nowSecs `**: Current time override in Unix seconds.
2042
+
2043
+ ### ParsedSdJwt
2044
+
2045
+ Decoded SD-JWT components with disclosure hashes checked; issuer signature verification is separate.
2046
+
2047
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/sd-jwt.ts#L28)
2048
+
2049
+ ```ts
2050
+ export interface ParsedSdJwt {
2051
+ compact: string;
2052
+ issuerJwt: string;
2053
+ header: Record<string, unknown>;
2054
+ payload: Record<string, unknown>;
2055
+ disclosures: Disclosure[];
2056
+ kbJwt?: string;
2057
+ }
2058
+ ```
2059
+
2060
+ Fields:
2061
+
2062
+ - **` compact `**: Original compact SD-JWT credential or presentation.
2063
+ - **` issuerJwt `**: The issuer-signed JWT (first `~`-segment).
2064
+ - **` header `**: Decoded issuer JWT header; not authenticated by parsing alone.
2065
+ - **` payload `**: Decoded issuer JWT claims; not authenticated by parsing alone.
2066
+ - **` disclosures `**: Decoded claim disclosures whose hashes match the issuer payload.
2067
+ - **` kbJwt `**: The Key Binding JWT, when the compact carries one (a presentation).
2068
+
2069
+ ### PresentationCandidate
2070
+
2071
+ Held credential that matches a named DCQL query during local selection.
2072
+
2073
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/wallet.ts#L19)
2074
+
2075
+ ```ts
2076
+ export interface PresentationCandidate {
2077
+ held: HeldSdJwt;
2078
+ parsed: ParsedSdJwt;
2079
+ view: CredentialView;
2080
+ queryId: string;
2081
+ }
2082
+ ```
2083
+
2084
+ Fields:
2085
+
2086
+ - **` held `**: Original held credential and its display label.
2087
+ - **` parsed `**: Parsed SD-JWT credential with disclosure hashes checked.
2088
+ - **` view `**: Credential claims exposed for advisory DCQL matching.
2089
+ - **` queryId `**: The credential query id this credential answers.
2090
+
2091
+ ### PresentationDelegation
2092
+
2093
+ EIP-712 delegation from the slot creator to a delegate address.
2094
+
2095
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/verifier-agent/index.ts#L38)
2096
+
2097
+ ```ts
2098
+ export interface PresentationDelegation {
2099
+ chain_id: number;
2100
+ slot_ids: string[];
2101
+ delegate: string;
2102
+ actions: string[];
2103
+ exp: number;
2104
+ nonce: number;
2105
+ signature: string;
2106
+ }
2107
+ ```
2108
+
2109
+ Fields:
2110
+
2111
+ - **` chain_id `**: EVM chain identifier.
2112
+ - **` slot_ids `**: Slot identifiers covered by this delegation.
2113
+ - **` delegate `**: 0x-hex 20-byte delegate address
2114
+ - **` actions `**: Operation names the delegate may authorize.
2115
+ - **` exp `**: Expiration time in Unix seconds.
2116
+ - **` nonce `**: Delegation nonce included in the signed payload.
2117
+ - **` signature `**: 0x-hex 65-byte EIP-712 signature
2118
+
2119
+ ### PresentationOperation
2120
+
2121
+ Operation details signed by a slot creator or delegate for credential authorization.
2122
+
2123
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/verifier-agent/index.ts#L22)
2124
+
2125
+ ```ts
2126
+ export interface PresentationOperation {
2127
+ chain_id: number;
2128
+ slot_id: string;
2129
+ action: string;
2130
+ payload_digest: string;
2131
+ description: string;
2132
+ exp: number;
2133
+ }
2134
+ ```
2135
+
2136
+ Fields:
2137
+
2138
+ - **` chain_id `**: EVM chain identifier.
2139
+ - **` slot_id `**: 0x-hex 32-byte slot identifier
2140
+ - **` action `**: "sign" | "decrypt" | "ibe-extract" | "dual-approve"
2141
+ - **` payload_digest `**: 0x-hex 32-byte digest (sha256 of the message for sign/ibe-extract)
2142
+ - **` description `**: Human-readable description shown in transaction_data
2143
+ - **` exp `**: Unix timestamp - when the authorization expires
2144
+
2145
+ ### PresentationPlan
2146
+
2147
+ Advisory credential selection, available candidates and unmatched query identifiers.
2148
+
2149
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/wallet.ts#L31)
2150
+
2151
+ ```ts
2152
+ export interface PresentationPlan {
2153
+ satisfies: boolean;
2154
+ candidates: PresentationCandidate[];
2155
+ chosen?: PresentationCandidate;
2156
+ unmatched: string[];
2157
+ }
2158
+ ```
2159
+
2160
+ Fields:
2161
+
2162
+ - **` satisfies `**: Whether the local (advisory) selection found a credential that satisfies the request.
2163
+ - **` candidates `**: Every held credential that answers some query - the choice to offer the user.
2164
+ - **` chosen `**: The default choice (the evaluator's pick), when satisfied.
2165
+ - **` unmatched `**: Query ids nothing in the wallet answers.
2166
+
2167
+ ### PresentOpts
2168
+
2169
+ Request verification, credential selection and disclosure options for a wallet presentation.
2170
+
2171
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/wallet.ts#L153)
2172
+
2173
+ ```ts
2174
+ export interface PresentOpts extends VerifyRequestObjectOpts {
2175
+ fetchImpl?: typeof fetch;
2176
+ choose?: (plan: PresentationPlan) => PresentationCandidate | undefined | Promise<PresentationCandidate | undefined>;
2177
+ disclose?: 'all' | readonly string[];
2178
+ }
2179
+ ```
2180
+
2181
+ Fields:
2182
+
2183
+ - **` fetchImpl `**: HTTP transport override; defaults to the global fetch implementation.
2184
+ - **` choose `**: Pick among the candidates (default: the evaluator's choice). Return `undefined` to abort.
2185
+ - **` disclose `**: Claim names to disclose, or all; defaults to the selected query's requested claims.
2186
+ - **` resolveKey `**: Resolver supplying a trusted public key for the request issuer and key identifier.
2187
+ - **` nowSecs `**: Current time override in Unix seconds.
2188
+ - **` leewaySecs `**: Seconds of clock skew tolerated on `exp`.
2189
+
2190
+ ### PresentSdJwtOpts
2191
+
2192
+ Selected disclosures and holder key for a nonce-bound, audience-bound SD-JWT presentation.
2193
+
2194
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/sd-jwt.ts#L226)
2195
+
2196
+ ```ts
2197
+ export interface PresentSdJwtOpts {
2198
+ parsed: ParsedSdJwt;
2199
+ disclose: 'all' | readonly string[];
2200
+ holder: HolderKey;
2201
+ nonce: string;
2202
+ aud: string;
2203
+ nowSecs?: number;
2204
+ extraKbClaims?: Record<string, unknown>;
2205
+ }
2206
+ ```
2207
+
2208
+ Fields:
2209
+
2210
+ - **` parsed `**: Parsed SD-JWT credential with disclosure hashes checked.
2211
+ - **` disclose `**: Which disclosures to reveal: claim names, or `'all'`. Undisclosed claims stay hidden.
2212
+ - **` holder `**: Holder key matching the credential confirmation claim.
2213
+ - **` nonce `**: The JAR's `nonce`.
2214
+ - **` aud `**: The JAR's `client_id`, VERBATIM (prefix included).
2215
+ - **` nowSecs `**: Current time override in Unix seconds.
2216
+ - **` extraKbClaims `**: Extra KB-JWT claims (e.g. `transaction_data_hashes`).
2217
+
2218
+ ### ReceiveCredentialOpts
2219
+
2220
+ Credential offer, holder key and optional transaction code for pre-authorized issuance.
2221
+
2222
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/oid4vci.ts#L52)
2223
+
2224
+ ```ts
2225
+ export interface ReceiveCredentialOpts {
2226
+ offerUri?: string;
2227
+ offer?: CredentialOffer;
2228
+ holder: HolderKey;
2229
+ txCode?: string;
2230
+ credentialConfigurationId?: string;
2231
+ fetchImpl?: typeof fetch;
2232
+ nowSecs?: number;
2233
+ }
2234
+ ```
2235
+
2236
+ Fields:
2237
+
2238
+ - **` offerUri `**: The scanned URI, or an already-parsed offer.
2239
+ - **` offer `**: Already parsed credential offer; takes precedence over offerUri.
2240
+ - **` holder `**: Holder key used to prove possession during issuance.
2241
+ - **` txCode `**: The transaction code the issuer displayed, when the grant asks for one.
2242
+ - **` credentialConfigurationId `**: Which configuration to request (default: the offer's first).
2243
+ - **` fetchImpl `**: HTTP transport override; defaults to the global fetch implementation.
2244
+ - **` nowSecs `**: Current time override in Unix seconds.
2245
+
2246
+ ### ReceivedCredential
2247
+
2248
+ Issued compact credential with its selected configuration, format and issuer identifier.
2249
+
2250
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/oid4vci.ts#L70)
2251
+
2252
+ ```ts
2253
+ export interface ReceivedCredential {
2254
+ credential: string;
2255
+ configurationId: string;
2256
+ format: string;
2257
+ issuer: string;
2258
+ }
2259
+ ```
2260
+
2261
+ Fields:
2262
+
2263
+ - **` credential `**: The compact `dc+sd-jwt` (or whatever the configuration's format is).
2264
+ - **` configurationId `**: Credential configuration selected for issuance.
2265
+ - **` format `**: Credential format identifier.
2266
+ - **` issuer `**: Credential issuer identifier returned by metadata.
2267
+
2268
+ ### RequestObjectClaims
2269
+
2270
+ OpenID4VP request claims carrying the credential query and wallet response context.
2271
+
2272
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/request-object.ts#L17)
2273
+
2274
+ ```ts
2275
+ export interface RequestObjectClaims {
2276
+ iss: string;
2277
+ client_id: string;
2278
+ response_type?: string;
2279
+ response_mode?: string;
2280
+ response_uri: string;
2281
+ nonce: string;
2282
+ state: string;
2283
+ iat?: number;
2284
+ exp?: number;
2285
+ dcql_query: DcqlQuery;
2286
+ client_metadata?: {
2287
+ jwks?: {
2288
+ keys: Jwk[];
2289
+ };
2290
+ vp_formats_supported?: Record<string, unknown>;
2291
+ encrypted_response_enc_values_supported?: string[];
2292
+ [k: string]: unknown;
2293
+ };
2294
+ transaction_data?: string[];
2295
+ [k: string]: unknown;
2296
+ }
2297
+ ```
2298
+
2299
+ Fields:
2300
+
2301
+ - **` iss `**: DID of the request issuer.
2302
+ - **` client_id `**: Verifier client identifier, optionally prefixed with decentralized_identifier:.
2303
+ - **` response_type `**: Requested OpenID4VP response type.
2304
+ - **` response_mode `**: `direct_post.jwt` (the verifier-agent always) or `direct_post`.
2305
+ - **` response_uri `**: Endpoint receiving the wallet response.
2306
+ - **` nonce `**: Challenge nonce for this operation.
2307
+ - **` state `**: Opaque state echoed in the wallet response.
2308
+ - **` iat `**: Issue time in Unix seconds.
2309
+ - **` exp `**: Expiration time in Unix seconds.
2310
+ - **` dcql_query `**: Credential requirements presented to the wallet.
2311
+ - **` client_metadata `**: Verifier metadata, including optional response encryption keys.
2312
+ - **` transaction_data `**: Encoded operation context displayed or bound by the wallet.
2313
+
2314
+ ### ResolveOpts
2315
+
2316
+ Fetch implementation and optional loopback HTTP permission for did:web resolution.
2317
+
2318
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/did-web.ts#L33)
2319
+
2320
+ ```ts
2321
+ export interface ResolveOpts {
2322
+ fetchImpl?: typeof fetch;
2323
+ allowInsecureLoopback?: boolean;
2324
+ }
2325
+ ```
2326
+
2327
+ Fields:
2328
+
2329
+ - **` fetchImpl `**: HTTP transport override; defaults to the global fetch implementation.
2330
+ - **` allowInsecureLoopback `**: Allow `http://` for a loopback host (tests, loopback services); never for a public host.
2331
+
2332
+ ### SdJwtIssuer
2333
+
2334
+ Issuer DID, optional signing key identifier and compact JWS signer.
2335
+
2336
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/sd-jwt.ts#L121)
2337
+
2338
+ ```ts
2339
+ export interface SdJwtIssuer {
2340
+ did: string;
2341
+ kid?: string;
2342
+ signer: JwsSigner;
2343
+ }
2344
+ ```
2345
+
2346
+ Fields:
2347
+
2348
+ - **` did `**: The issuer DID the credential's `iss` names; `kid` = `${did}#${fragment}` unless given.
2349
+ - **` kid `**: Optional signing key identifier.
2350
+ - **` signer `**: Private-key signer for the issuer JWT.
2351
+
2352
+ ### SessionPhase
2353
+
2354
+ Displayable authorization progress. A done phase means the committee answered; it does not mean the requested signing or decryption operation executed.
2355
+
2356
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/verifier-agent/index.ts#L94)
2357
+
2358
+ ```ts
2359
+ export type SessionPhase = 'awaiting_wallet' | 'verifying' | 'done' | 'failed';
2360
+ ```
2361
+
2362
+ ### SessionStatusResult
2363
+
2364
+ Authorization session progress and optional committee result or failure detail.
2365
+
2366
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/verifier-agent/index.ts#L97)
2367
+
2368
+ ```ts
2369
+ export interface SessionStatusResult {
2370
+ status: 'pending' | 'done' | 'failed';
2371
+ phase: SessionPhase;
2372
+ compoundToken?: Record<string, unknown>;
2373
+ verifierProofs?: unknown;
2374
+ bindingPreimage?: Record<string, unknown>;
2375
+ error?: string;
2376
+ evidenceCt?: string;
2377
+ }
2378
+ ```
2379
+
2380
+ Fields:
2381
+
2382
+ - **` status `**: Pending, completed or failed authorization state.
2383
+ - **` phase `**: Displayable progress within the authorization lifecycle.
2384
+ - **` compoundToken `**: Committee token returned after successful authorization.
2385
+ - **` verifierProofs `**: Verifier membership proofs for the selected snapshot.
2386
+ - **` bindingPreimage `**: Operation context used to derive the request-binding hash.
2387
+ - **` error `**: Optional failure detail reported by the verifier agent.
2388
+ - **` evidenceCt `**: the sealed presentation (base64url `bincode(Ciphertext)`) the token's `evidence_hash` names — post it to the keeper beside the token as `evidence_ct`.
2389
+
2390
+ ### TypedDataSigner
2391
+
2392
+ Anything that signs EIP-712 typed data for an address - a viem `LocalAccount` or `WalletClient`-bound account fits.
2393
+
2394
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/verifier-agent.ts#L37)
2395
+
2396
+ ```ts
2397
+ export interface TypedDataSigner {
2398
+ address: `0x${string}`;
2399
+ signTypedData(args: {
2400
+ domain: {
2401
+ name: string;
2402
+ version: string;
2403
+ chainId: number;
2404
+ verifyingContract: `0x${string}`;
2405
+ };
2406
+ types: typeof PRESENTATION_OPERATION_TYPES;
2407
+ primaryType: 'PresentationOperation';
2408
+ message: {
2409
+ chainId: bigint;
2410
+ slotId: `0x${string}`;
2411
+ action: string;
2412
+ payloadDigest: `0x${string}`;
2413
+ description: string;
2414
+ exp: bigint;
2415
+ };
2416
+ }): Promise<`0x${string}`>;
2417
+ }
2418
+ ```
2419
+
2420
+ Fields:
2421
+
2422
+ - **` address `**: EVM address of the creator or delegated signing wallet.
2423
+ - **` signTypedData `**: Sign the operation EIP-712 payload using the wallet's key.
2424
+
2425
+ ### VerifiedRequestObject
2426
+
2427
+ Request JWT, decoded claims and signing identity after request-object validation.
2428
+
2429
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/request-object.ts#L51)
2430
+
2431
+ ```ts
2432
+ export interface VerifiedRequestObject {
2433
+ jwt: string;
2434
+ header: {
2435
+ alg: string;
2436
+ typ?: string;
2437
+ kid?: string;
2438
+ };
2439
+ claims: RequestObjectClaims;
2440
+ signerDid: string;
2441
+ signerKey: Jwk;
2442
+ }
2443
+ ```
2444
+
2445
+ Fields:
2446
+
2447
+ - **` jwt `**: Original compact request JWT.
2448
+ - **` header `**: Verified request JOSE header.
2449
+ - **` claims `**: Validated request claims.
2450
+ - **` signerDid `**: The DID `iss` names, after the `client_id` prefix agreed with it.
2451
+ - **` signerKey `**: Public key used to verify the request signature.
2452
+
2453
+ ### VerifierAgentResult
2454
+
2455
+ Compound committee token with optional request preimage and verifier membership proofs.
2456
+
2457
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/verifier-agent.ts#L147)
2458
+
2459
+ ```ts
2460
+ export interface VerifierAgentResult {
2461
+ token: CompoundTokenWire;
2462
+ bindingPreimage?: Record<string, unknown>;
2463
+ verifierProofs?: VerifierProof[];
2464
+ evidenceCt?: string;
2465
+ }
2466
+ ```
2467
+
2468
+ Fields:
2469
+
2470
+ - **` token `**: Compound committee authorization token.
2471
+ - **` bindingPreimage `**: Operation context used to derive the request-binding hash.
2472
+ - **` verifierProofs `**: The drawn verifiers' snapshot membership proofs the verifier-agent built at session creation - hand them to every keeper call (`verifierProofs`): a keeper in snapshot-required mode (`api.require_verifier_proofs`) refuses a committee request without them.
2473
+ - **` evidenceCt `**: the sealed presentation the token's `evidence_hash` binds, when the committee sealed one — hand it to every keeper call (`evidenceCt`); a keeper with `require_committee_evidence` refuses the token without it.
2474
+
2475
+ ### VerifierAgentSessionErrorKind
2476
+
2477
+ Why a session did not yield a token - the class the UI explains, with a NON-SECRET
2478
+ correlation reference (the session id; the poll secret is never part of an error).
2479
+
2480
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/verifier-agent/index.ts#L117)
2481
+
2482
+ ```ts
2483
+ export type VerifierAgentSessionErrorKind = 'timeout' | 'refused' | 'unavailable' | 'protocol' | 'cancelled';
2484
+ ```
2485
+
2486
+ ### VerifyRequestObjectOpts
2487
+
2488
+ Signing-key resolver, evaluation time and expiration tolerance for request validation.
2489
+
2490
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/request-object.ts#L96)
2491
+
2492
+ ```ts
2493
+ export interface VerifyRequestObjectOpts {
2494
+ resolveKey?: KeyResolver;
2495
+ nowSecs?: number;
2496
+ leewaySecs?: number;
2497
+ }
2498
+ ```
2499
+
2500
+ Fields:
2501
+
2502
+ - **` resolveKey `**: Resolver supplying a trusted public key for the request issuer and key identifier.
2503
+ - **` nowSecs `**: Current time override in Unix seconds.
2504
+ - **` leewaySecs `**: Seconds of clock skew tolerated on `exp`.
2505
+
2506
+ ### WaitOpts
2507
+
2508
+ Polling backoff, cancellation, progress callback and randomness options.
2509
+
2510
+ [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/verifier-agent/index.ts#L479)
2511
+
2512
+ ```ts
2513
+ export interface WaitOpts {
2514
+ maxIntervalMs?: number;
2515
+ signal?: AbortSignal;
2516
+ onPhase?: (phase: SessionPhase) => void;
2517
+ random?: () => number;
2518
+ }
2519
+ ```
2520
+
2521
+ Fields:
2522
+
2523
+ - **` maxIntervalMs `**: Ceiling for the growing interval (default 4 times intervalMs).
2524
+ - **` signal `**: Cancel (a user closed the wallet prompt): rejects with `cancelled`.
2525
+ - **` onPhase `**: Called on every poll with the phase the UI may show.
2526
+ - **` random `**: Randomness for the jitter (tests inject a fixed value).
2527
+
2528
+ ## Constants and ABI values
2529
+
2530
+ Shared values and contract definitions.
2531
+
2532
+ | Export | Description | Definition |
2533
+ |---|---|---|
2534
+ | `CLIENT_ID_PREFIX_DID` | OpenID4VP client identifier prefix for a DID-based verifier. | [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/request-object.ts#L14) |
2535
+ | `COMMITTEE_ACTIONS` | Supported operation names accepted by request-binding validation. | [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/binding.ts#L19) |
2536
+ | `CREDENTIAL_OFFER_SCHEME` | URI scheme for a wallet credential offer. | [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/oid4vci.ts#L6) |
2537
+ | `DECRYPT_DIGEST_DOMAIN` | Domain separator for the ciphertext digest used in decryption authorization. | [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/binding.ts#L14) |
2538
+ | `KB_JWT_TYP` | JOSE type identifier for the holder key-binding JWT. | [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/sd-jwt.ts#L11) |
2539
+ | `PRE_AUTHORIZED_GRANT` | OAuth grant identifier for credential issuance using a pre-authorized code. | [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/oid4vci.ts#L8) |
2540
+ | `PRESENTATION_EIP712_NAME` | EIP-712 domain name for creator-signed presentation operations. | [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/verifier-agent.ts#L20) |
2541
+ | `PRESENTATION_EIP712_VERSION` | EIP-712 domain version for creator-signed presentation operations. | [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/verifier-agent.ts#L22) |
2542
+ | `PRESENTATION_OPERATION_TYPES` | The EIP-712 types mirrored from the reference presentation-auth types - do not reorder. | [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/verifier-agent.ts#L25) |
2543
+ | `PROOF_TYP` | JOSE type identifier for an OpenID4VCI proof of key possession. | [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/oid4vci.ts#L10) |
2544
+ | `REQUEST_BINDING_DOMAIN` | Domain separator for binding chain, slot, action and payload digest. | [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/binding.ts#L10) |
2545
+ | `REQUEST_OBJECT_TYP` | JOSE type identifier for a signed authorization request object. | [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/request-object.ts#L12) |
2546
+ | `SD_JWT_TYP` | JOSE type identifier for a selectively disclosable verifiable credential. | [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/sd-jwt.ts#L9) |
2547
+ | `VP_NONCE_DOMAIN` | Domain separator for deriving a wallet presentation nonce from the operation context. | [Source](https://github.com/t3foundry/tasra-sdk/blob/develop/src/oid4vp/binding.ts#L12) |