zklicensing 0.1.0-beta.2 → 0.1.0-beta.21

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 (317) hide show
  1. package/README.md +417 -201
  2. package/build/agent.d.ts +371 -0
  3. package/build/agent.d.ts.map +1 -0
  4. package/build/agent.js +553 -0
  5. package/build/agent.js.map +1 -0
  6. package/build/agentActions.d.ts +841 -0
  7. package/build/agentActions.d.ts.map +1 -0
  8. package/build/agentActions.js +581 -0
  9. package/build/agentActions.js.map +1 -0
  10. package/build/agentRecord.d.ts +83 -0
  11. package/build/agentRecord.d.ts.map +1 -0
  12. package/build/agentRecord.js +69 -0
  13. package/build/agentRecord.js.map +1 -0
  14. package/build/agentVendor.d.ts +220 -0
  15. package/build/agentVendor.d.ts.map +1 -0
  16. package/build/agentVendor.js +306 -0
  17. package/build/agentVendor.js.map +1 -0
  18. package/build/appsLookup.d.ts +14 -0
  19. package/build/appsLookup.d.ts.map +1 -0
  20. package/build/appsLookup.js +12 -0
  21. package/build/appsLookup.js.map +1 -0
  22. package/build/archiveBootstrap.d.ts +31 -5
  23. package/build/archiveBootstrap.d.ts.map +1 -0
  24. package/build/archiveBootstrap.js +140 -47
  25. package/build/archiveBootstrap.js.map +1 -0
  26. package/build/atomicJson.d.ts +5 -0
  27. package/build/atomicJson.d.ts.map +1 -0
  28. package/build/atomicJson.js +55 -0
  29. package/build/atomicJson.js.map +1 -0
  30. package/build/bindClient.d.ts +85 -0
  31. package/build/bindClient.d.ts.map +1 -0
  32. package/build/bindClient.js +187 -0
  33. package/build/bindClient.js.map +1 -0
  34. package/build/buyClient.d.ts +27 -4
  35. package/build/buyClient.d.ts.map +1 -0
  36. package/build/buyClient.js +72 -26
  37. package/build/buyClient.js.map +1 -0
  38. package/build/chainHead.d.ts +61 -0
  39. package/build/chainHead.d.ts.map +1 -0
  40. package/build/chainHead.js +88 -0
  41. package/build/chainHead.js.map +1 -0
  42. package/build/compactMerkleMap.d.ts +72 -0
  43. package/build/compactMerkleMap.d.ts.map +1 -0
  44. package/build/compactMerkleMap.js +224 -0
  45. package/build/compactMerkleMap.js.map +1 -0
  46. package/build/contractInterface.d.ts +191 -51
  47. package/build/contractInterface.d.ts.map +1 -0
  48. package/build/contractInterface.js +234 -43
  49. package/build/contractInterface.js.map +1 -0
  50. package/build/contractTypes.d.ts +9 -0
  51. package/build/contractTypes.d.ts.map +1 -0
  52. package/build/contractTypes.js +28 -0
  53. package/build/contractTypes.js.map +1 -0
  54. package/build/countryStats.d.ts +12 -3
  55. package/build/countryStats.d.ts.map +1 -0
  56. package/build/countryStats.js +87 -23
  57. package/build/countryStats.js.map +1 -0
  58. package/build/deployClient.d.ts +138 -24
  59. package/build/deployClient.d.ts.map +1 -0
  60. package/build/deployClient.js +91 -31
  61. package/build/deployClient.js.map +1 -0
  62. package/build/deviceIdentity.d.ts +68 -0
  63. package/build/deviceIdentity.d.ts.map +1 -0
  64. package/build/deviceIdentity.js +209 -0
  65. package/build/deviceIdentity.js.map +1 -0
  66. package/build/freezeClient.d.ts +26 -6
  67. package/build/freezeClient.d.ts.map +1 -0
  68. package/build/freezeClient.js +30 -6
  69. package/build/freezeClient.js.map +1 -0
  70. package/build/generationClient.d.ts +6 -3
  71. package/build/generationClient.d.ts.map +1 -0
  72. package/build/generationClient.js +25 -38
  73. package/build/generationClient.js.map +1 -0
  74. package/build/holderSecret.d.ts +70 -0
  75. package/build/holderSecret.d.ts.map +1 -0
  76. package/build/holderSecret.js +76 -0
  77. package/build/holderSecret.js.map +1 -0
  78. package/build/index.d.ts +38 -38
  79. package/build/index.d.ts.map +1 -0
  80. package/build/index.js +97 -121
  81. package/build/index.js.map +1 -0
  82. package/build/keysClient.d.ts +142 -0
  83. package/build/keysClient.d.ts.map +1 -0
  84. package/build/keysClient.js +109 -0
  85. package/build/keysClient.js.map +1 -0
  86. package/build/licenseLeaf.d.ts +76 -0
  87. package/build/licenseLeaf.d.ts.map +1 -0
  88. package/build/licenseLeaf.js +189 -0
  89. package/build/licenseLeaf.js.map +1 -0
  90. package/build/licenseRecord.d.ts +68 -5
  91. package/build/licenseRecord.d.ts.map +1 -0
  92. package/build/licenseRecord.js +26 -1
  93. package/build/licenseRecord.js.map +1 -0
  94. package/build/licenseStore.d.ts +81 -4
  95. package/build/licenseStore.d.ts.map +1 -0
  96. package/build/licenseStore.js +400 -30
  97. package/build/licenseStore.js.map +1 -0
  98. package/build/licenseTrustless.d.ts +43 -0
  99. package/build/licenseTrustless.d.ts.map +1 -0
  100. package/build/licenseTrustless.js +180 -0
  101. package/build/licenseTrustless.js.map +1 -0
  102. package/build/manifestVerify.d.ts +29 -1
  103. package/build/manifestVerify.d.ts.map +1 -0
  104. package/build/manifestVerify.js +46 -4
  105. package/build/manifestVerify.js.map +1 -0
  106. package/build/minaPriceHistory.d.ts +9 -0
  107. package/build/minaPriceHistory.d.ts.map +1 -0
  108. package/build/minaPriceHistory.js +152 -0
  109. package/build/minaPriceHistory.js.map +1 -0
  110. package/build/onChainRoot.d.ts +60 -0
  111. package/build/onChainRoot.d.ts.map +1 -0
  112. package/build/onChainRoot.js +74 -0
  113. package/build/onChainRoot.js.map +1 -0
  114. package/build/ownershipLicenseHash.d.ts +25 -0
  115. package/build/ownershipLicenseHash.d.ts.map +1 -0
  116. package/build/ownershipLicenseHash.js +29 -0
  117. package/build/ownershipLicenseHash.js.map +1 -0
  118. package/build/ownershipSignature.d.ts +153 -0
  119. package/build/ownershipSignature.d.ts.map +1 -0
  120. package/build/ownershipSignature.js +297 -0
  121. package/build/ownershipSignature.js.map +1 -0
  122. package/build/permitCheckFlow.d.ts +155 -0
  123. package/build/permitCheckFlow.d.ts.map +1 -0
  124. package/build/permitCheckFlow.js +196 -0
  125. package/build/permitCheckFlow.js.map +1 -0
  126. package/build/permitDescribe.d.ts +124 -0
  127. package/build/permitDescribe.d.ts.map +1 -0
  128. package/build/permitDescribe.js +324 -0
  129. package/build/permitDescribe.js.map +1 -0
  130. package/build/permitInterface.d.ts +85 -0
  131. package/build/permitInterface.d.ts.map +1 -0
  132. package/build/permitInterface.js +121 -0
  133. package/build/permitInterface.js.map +1 -0
  134. package/build/permitMessages.d.ts +313 -0
  135. package/build/permitMessages.d.ts.map +1 -0
  136. package/build/permitMessages.js +462 -0
  137. package/build/permitMessages.js.map +1 -0
  138. package/build/permitProof.d.ts +108 -0
  139. package/build/permitProof.d.ts.map +1 -0
  140. package/build/permitProof.js +202 -0
  141. package/build/permitProof.js.map +1 -0
  142. package/build/permitRegistryRebuild.d.ts +166 -0
  143. package/build/permitRegistryRebuild.d.ts.map +1 -0
  144. package/build/permitRegistryRebuild.js +347 -0
  145. package/build/permitRegistryRebuild.js.map +1 -0
  146. package/build/permitTree.d.ts +88 -0
  147. package/build/permitTree.d.ts.map +1 -0
  148. package/build/permitTree.js +230 -0
  149. package/build/permitTree.js.map +1 -0
  150. package/build/permitsClient.d.ts +680 -0
  151. package/build/permitsClient.d.ts.map +1 -0
  152. package/build/permitsClient.js +597 -0
  153. package/build/permitsClient.js.map +1 -0
  154. package/build/proveErrors.d.ts +50 -0
  155. package/build/proveErrors.d.ts.map +1 -0
  156. package/build/proveErrors.js +76 -0
  157. package/build/proveErrors.js.map +1 -0
  158. package/build/receipt.d.ts +95 -0
  159. package/build/receipt.d.ts.map +1 -0
  160. package/build/receipt.js +84 -0
  161. package/build/receipt.js.map +1 -0
  162. package/build/refundClient.d.ts +7 -12
  163. package/build/refundClient.d.ts.map +1 -0
  164. package/build/refundClient.js +52 -21
  165. package/build/refundClient.js.map +1 -0
  166. package/build/registryTrustVerify.d.ts +78 -0
  167. package/build/registryTrustVerify.d.ts.map +1 -0
  168. package/build/registryTrustVerify.js +129 -0
  169. package/build/registryTrustVerify.js.map +1 -0
  170. package/build/releaseClient.d.ts +26 -0
  171. package/build/releaseClient.d.ts.map +1 -0
  172. package/build/releaseClient.js +65 -0
  173. package/build/releaseClient.js.map +1 -0
  174. package/build/renewClient.d.ts +28 -2
  175. package/build/renewClient.d.ts.map +1 -0
  176. package/build/renewClient.js +31 -27
  177. package/build/renewClient.js.map +1 -0
  178. package/build/seatName.d.ts +8 -0
  179. package/build/seatName.d.ts.map +1 -0
  180. package/build/seatName.js +136 -0
  181. package/build/seatName.js.map +1 -0
  182. package/build/slotConstants.d.ts +15 -0
  183. package/build/slotConstants.d.ts.map +1 -0
  184. package/build/slotConstants.js +17 -0
  185. package/build/slotConstants.js.map +1 -0
  186. package/build/statsClient.d.ts +61 -7
  187. package/build/statsClient.d.ts.map +1 -0
  188. package/build/statsClient.js +44 -5
  189. package/build/statsClient.js.map +1 -0
  190. package/build/successorChain.d.ts +35 -0
  191. package/build/successorChain.d.ts.map +1 -0
  192. package/build/successorChain.js +69 -0
  193. package/build/successorChain.js.map +1 -0
  194. package/build/taxId.d.ts +44 -0
  195. package/build/taxId.d.ts.map +1 -0
  196. package/build/taxId.js +212 -0
  197. package/build/taxId.js.map +1 -0
  198. package/build/trustAnchorVerify.d.ts +49 -0
  199. package/build/trustAnchorVerify.d.ts.map +1 -0
  200. package/build/trustAnchorVerify.js +432 -0
  201. package/build/trustAnchorVerify.js.map +1 -0
  202. package/build/trustAnchorVerifyCli.d.ts +45 -0
  203. package/build/trustAnchorVerifyCli.d.ts.map +1 -0
  204. package/build/trustAnchorVerifyCli.js +235 -0
  205. package/build/trustAnchorVerifyCli.js.map +1 -0
  206. package/build/txBroadcastClient.d.ts +26 -0
  207. package/build/txBroadcastClient.d.ts.map +1 -0
  208. package/build/txBroadcastClient.js +20 -0
  209. package/build/txBroadcastClient.js.map +1 -0
  210. package/build/unbindClient.d.ts +77 -0
  211. package/build/unbindClient.d.ts.map +1 -0
  212. package/build/unbindClient.js +169 -0
  213. package/build/unbindClient.js.map +1 -0
  214. package/build/units.d.ts +28 -0
  215. package/build/units.d.ts.map +1 -0
  216. package/build/units.js +65 -0
  217. package/build/units.js.map +1 -0
  218. package/build/vatRates.d.ts +54 -0
  219. package/build/vatRates.d.ts.map +1 -0
  220. package/build/vatRates.js +82 -0
  221. package/build/vatRates.js.map +1 -0
  222. package/build/vatRatesData.d.ts +5 -0
  223. package/build/vatRatesData.d.ts.map +1 -0
  224. package/build/vatRatesData.js +42 -0
  225. package/build/vatRatesData.js.map +1 -0
  226. package/build/vendorAccountClient.d.ts +66 -0
  227. package/build/vendorAccountClient.d.ts.map +1 -0
  228. package/build/vendorAccountClient.js +47 -0
  229. package/build/vendorAccountClient.js.map +1 -0
  230. package/build/verifyCore.d.ts +4 -1
  231. package/build/verifyCore.d.ts.map +1 -0
  232. package/build/verifyCore.js +21 -10
  233. package/build/verifyCore.js.map +1 -0
  234. package/build/verifyOffline.d.ts +85 -0
  235. package/build/verifyOffline.d.ts.map +1 -0
  236. package/build/verifyOffline.js +139 -0
  237. package/build/verifyOffline.js.map +1 -0
  238. package/build/verifyService.d.ts.map +1 -0
  239. package/build/verifyService.js +571 -501
  240. package/build/verifyService.js.map +1 -0
  241. package/build/verifyWithAncestors.d.ts +19 -0
  242. package/build/verifyWithAncestors.d.ts.map +1 -0
  243. package/build/verifyWithAncestors.js +127 -0
  244. package/build/verifyWithAncestors.js.map +1 -0
  245. package/build/zipToState.d.ts +2 -0
  246. package/build/zipToState.d.ts.map +1 -0
  247. package/build/zipToState.js +94 -0
  248. package/build/zipToState.js.map +1 -0
  249. package/package.json +141 -16
  250. package/src/agent.ts +682 -0
  251. package/src/agentActions.ts +637 -0
  252. package/src/agentRecord.ts +121 -0
  253. package/src/agentVendor.ts +356 -0
  254. package/src/appsLookup.ts +48 -0
  255. package/src/archiveBootstrap.ts +386 -0
  256. package/src/atomicJson.ts +53 -0
  257. package/src/bindClient.ts +297 -0
  258. package/src/buyClient.ts +344 -0
  259. package/src/chainHead.ts +106 -0
  260. package/src/compactMerkleMap.ts +222 -0
  261. package/src/contractInterface.ts +465 -0
  262. package/src/contractTypes.ts +31 -0
  263. package/src/countryStats.ts +200 -0
  264. package/src/deployClient.ts +517 -0
  265. package/src/deviceIdentity.ts +249 -0
  266. package/src/freezeClient.ts +162 -0
  267. package/src/generationClient.ts +145 -0
  268. package/src/holderSecret.ts +91 -0
  269. package/src/index.ts +362 -0
  270. package/src/keysClient.ts +135 -0
  271. package/src/licenseLeaf.ts +221 -0
  272. package/src/licenseRecord.ts +190 -0
  273. package/src/licenseStore.ts +767 -0
  274. package/src/licenseTrustless.ts +207 -0
  275. package/src/manifestVerify.ts +164 -0
  276. package/src/minaPriceHistory.ts +166 -0
  277. package/src/onChainRoot.ts +90 -0
  278. package/src/ownershipLicenseHash.ts +31 -0
  279. package/src/ownershipSignature.ts +421 -0
  280. package/src/permitCheckFlow.ts +227 -0
  281. package/src/permitDescribe.ts +362 -0
  282. package/src/permitInterface.ts +146 -0
  283. package/src/permitMessages.ts +572 -0
  284. package/src/permitProof.ts +230 -0
  285. package/src/permitRegistryRebuild.ts +423 -0
  286. package/src/permitTree.ts +232 -0
  287. package/src/permitsClient.ts +746 -0
  288. package/src/proveErrors.ts +98 -0
  289. package/src/receipt.ts +156 -0
  290. package/src/refundClient.ts +177 -0
  291. package/src/registryTrustVerify.ts +192 -0
  292. package/src/releaseClient.ts +101 -0
  293. package/src/renewClient.ts +234 -0
  294. package/src/seatName.ts +165 -0
  295. package/src/slotConstants.ts +18 -0
  296. package/src/statsClient.ts +249 -0
  297. package/src/successorChain.ts +87 -0
  298. package/src/taxId.ts +227 -0
  299. package/src/trustAnchorVerify.ts +550 -0
  300. package/src/trustAnchorVerifyCli.ts +234 -0
  301. package/src/txBroadcastClient.ts +48 -0
  302. package/src/unbindClient.ts +233 -0
  303. package/src/units.ts +74 -0
  304. package/src/vatRates.ts +100 -0
  305. package/src/vatRatesData.ts +43 -0
  306. package/src/vendorAccountClient.ts +120 -0
  307. package/src/verifyCore.ts +100 -0
  308. package/src/verifyOffline.ts +212 -0
  309. package/src/verifyService.ts +982 -0
  310. package/src/verifyWithAncestors.ts +163 -0
  311. package/src/zipToState.ts +94 -0
  312. package/build/licenseProof.d.ts +0 -26
  313. package/build/licenseProof.js +0 -41
  314. package/build/migrateClient.d.ts +0 -43
  315. package/build/migrateClient.js +0 -47
  316. package/build/ownership.d.ts +0 -34
  317. package/build/ownership.js +0 -147
@@ -0,0 +1,841 @@
1
+ /**
2
+ * agentActions.ts — `zklicensing/agent/actions`
3
+ *
4
+ * Lets an AI agent carry out actions with a key its owner gave it
5
+ * (PERMITS_PLAN.md §16.4): buy, renew and refund licenses, and accept
6
+ * permit grants. Every action starts from a `PreparedAction`
7
+ * (`zklicensing/agent` prepare*), then:
8
+ *
9
+ * - the owner's optional policy is checked (caps per action and per day,
10
+ * allowed actions, targets and networks) — none by default;
11
+ * - consent the action needs (a consumer's withdrawal waiver, permit
12
+ * conditions) must come from a **standing consent** the owner signed
13
+ * for this agent, and a vendor may require the human's own consent
14
+ * ('human-only'), in which case the agent gets the approval link instead;
15
+ * - the agent's wallet signs and pays; the result carries a confirmation
16
+ * that records who gave consent and under which authorisation.
17
+ *
18
+ * Loads o1js (identity derivation) on first use.
19
+ */
20
+ import { type AgentActionRecord } from './agentRecord.js';
21
+ import { type Network, type PreparedAction, type ConsentKind } from './agent.js';
22
+ import type { AuthorityDetails, PermitWallet } from './permitsClient.js';
23
+ /**
24
+ * Error codes raised here before anything reaches the keeper, on top of the
25
+ * keeper's own codes (see /openapi.json). None is retryable as is.
26
+ * - POLICY_DENIED: the owner's policy doesn't allow the action.
27
+ * - CONSENT_HUMAN_ONLY: the vendor wants the human's own consent; hand them
28
+ * the approval link in the message.
29
+ * - CONSENT_REQUIRED: no standing consent covers what the action needs.
30
+ */
31
+ export declare const AGENT_ACTION_ERROR_CODES: readonly ["POLICY_DENIED", "CONSENT_HUMAN_ONLY", "CONSENT_REQUIRED"];
32
+ /** Any wallet with the PermitWallet interface (browser adapter, minaSignerWallet). */
33
+ export type AgentWallet = PermitWallet;
34
+ /** Every action an agent can take here, for the owner's `allowedActions`. */
35
+ export type AgentActionName = PreparedAction['action'] | 'apply-permit' | 'withdraw-application' | 'surrender-permit' | 'accept-authority-terms' | 'create-registry' | 'deploy-registry' | 'redeploy-registry' | 'decide-application' | 'sign-request' | 'execute-request' | 'request-change' | 'accept-vendor-terms' | 'update-vendor-details' | 'register-app' | 'set-prices' | 'update-listing' | 'redeploy-app';
36
+ export type AgentPolicy = {
37
+ allowedActions?: AgentActionName[];
38
+ /** Cap per action, MINA (the amount leaving the agent's wallet). */
39
+ maxPerActionMina?: number;
40
+ /** Cap per UTC day across actions, MINA. */
41
+ maxPerDayMina?: number;
42
+ /** zkApp or registry addresses the agent may act on. */
43
+ allowedTargets?: string[];
44
+ networks?: Network[];
45
+ };
46
+ /** Spend record for the per-day cap. Pass `load`/`save` to persist it. */
47
+ export declare class SpendLedger {
48
+ private readonly store?;
49
+ private entries;
50
+ constructor(store?: {
51
+ load(): Array<{
52
+ at: number;
53
+ nano: string;
54
+ }>;
55
+ save(e: Array<{
56
+ at: number;
57
+ nano: string;
58
+ }>): void;
59
+ } | undefined);
60
+ spentOnDay(now?: number): bigint;
61
+ record(nano: bigint, now?: number): void;
62
+ }
63
+ /** Throws POLICY_DENIED when the owner's policy doesn't allow this action. */
64
+ export declare function checkPolicy(policy: AgentPolicy | undefined, prepared: PreparedAction, target: string, ledger?: SpendLedger, now?: number): void;
65
+ /**
66
+ * The policy check for any action. `target` is the zkApp or registry acted
67
+ * on (none for a registry not yet deployed); `amountNano` what leaves the
68
+ * wallet besides transaction fees.
69
+ */
70
+ export declare function checkActionPolicy(policy: AgentPolicy | undefined, a: {
71
+ action: AgentActionName;
72
+ network: Network;
73
+ target?: string;
74
+ amountNano?: bigint;
75
+ }, ledger?: SpendLedger, now?: number): void;
76
+ export type StandingConsent = {
77
+ version: 1;
78
+ owner: string;
79
+ agent: string;
80
+ kinds: ConsentKind[];
81
+ network: Network;
82
+ issuedAt: string;
83
+ expiresAt: string | null;
84
+ /** The exact text the owner signed. */
85
+ statement: string;
86
+ signature: {
87
+ field: string;
88
+ scalar: string;
89
+ };
90
+ };
91
+ export declare function standingConsentStatement(f: {
92
+ owner: string;
93
+ agent: string;
94
+ kinds: ConsentKind[];
95
+ network: Network;
96
+ issuedAt: string;
97
+ expiresAt: string | null;
98
+ }): string;
99
+ /** How long a standing consent lasts unless the owner chooses otherwise. */
100
+ export declare const DEFAULT_CONSENT_DAYS = 90;
101
+ /**
102
+ * The owner signs a standing consent for an agent with their own wallet.
103
+ * It expires after DEFAULT_CONSENT_DAYS unless `expiresAt` is given; pass
104
+ * `expiresAt: null` for a consent that lasts until revoked.
105
+ */
106
+ export declare function grantStandingConsent(owner: AgentWallet, f: {
107
+ agent: string;
108
+ kinds: ConsentKind[];
109
+ network: Network;
110
+ expiresAt?: string | null;
111
+ }): Promise<StandingConsent>;
112
+ /** Checks a standing consent's text and signature (mina-signer, as for wallet text signatures). */
113
+ export declare function verifyStandingConsent(c: StandingConsent, now?: number): Promise<{
114
+ ok: boolean;
115
+ reason: string | null;
116
+ }>;
117
+ /** SHA-256 (hex) of a consent's statement: how a consent is referred to and revoked. */
118
+ export declare function consentId(c: StandingConsent): Promise<string>;
119
+ /** The text an owner signs to revoke a standing consent. */
120
+ export declare function standingConsentRevocationStatement(f: {
121
+ owner: string;
122
+ statementSha256: string;
123
+ network: Network;
124
+ revokedAt: string;
125
+ }): string;
126
+ /** The owner revokes a standing consent at the keeper, signing with their own wallet. */
127
+ export declare function revokeStandingConsent(owner: AgentWallet, consent: StandingConsent, opts: {
128
+ keeperUrl: string;
129
+ fetcher?: typeof fetch;
130
+ }): Promise<{
131
+ revokedAt: string;
132
+ }>;
133
+ /** Whether the owner has revoked a consent (asks the keeper). */
134
+ export declare function isStandingConsentRevoked(consent: StandingConsent, opts: {
135
+ keeperUrl: string;
136
+ fetcher?: typeof fetch;
137
+ }): Promise<boolean>;
138
+ export type ConsentRecord = {
139
+ givenBy: 'none';
140
+ } | {
141
+ givenBy: 'agent';
142
+ agent: string;
143
+ owner: string;
144
+ kinds: ConsentKind[];
145
+ statementSha256: string;
146
+ issuedAt: string;
147
+ };
148
+ /**
149
+ * Consent the prepared action needs, from the standing consent. Refuses
150
+ * when the vendor requires the human's own consent, returning the approval
151
+ * link in the error so the agent can hand it to the human.
152
+ */
153
+ export declare function consentFor(prepared: PreparedAction, agentAddress: string, consent?: StandingConsent, keeper?: {
154
+ keeperUrl: string;
155
+ fetcher?: typeof fetch;
156
+ }): Promise<ConsentRecord>;
157
+ export type ActOptions = {
158
+ keeperUrl: string;
159
+ wallet: AgentWallet;
160
+ policy?: AgentPolicy;
161
+ ledger?: SpendLedger;
162
+ consent?: StandingConsent;
163
+ fetcher?: typeof fetch;
164
+ };
165
+ /**
166
+ * Buys a license. The license belongs to a key derived from `passphrase`
167
+ * (generated if omitted) — keep the returned passphrase and license file:
168
+ * they are the license.
169
+ */
170
+ export declare function buyLicense(prepared: PreparedAction, opts: ActOptions & {
171
+ buyerCountry: string;
172
+ buyerZip?: string;
173
+ passphrase?: string;
174
+ }): Promise<{
175
+ proofFile: {
176
+ licenseHash: string;
177
+ expirySlot: number;
178
+ zkAppAddress: string;
179
+ network: Network;
180
+ txHash: string;
181
+ tier: string;
182
+ verificationKeyHash: string;
183
+ purchaseSlot: number;
184
+ purchaseAmount: string;
185
+ escrowless: boolean;
186
+ generation: number;
187
+ pending: boolean;
188
+ };
189
+ confirmation: {
190
+ action: string;
191
+ summary: string;
192
+ amounts: {
193
+ total: string;
194
+ toRecipient: string;
195
+ toPlatform: string;
196
+ recipient: string;
197
+ };
198
+ consent: ConsentRecord;
199
+ at: string;
200
+ };
201
+ receipt?: import("./receipt.js").PurchaseReceipt | undefined;
202
+ passphrase: string;
203
+ actionRecord?: AgentActionRecord | undefined;
204
+ txHash: string;
205
+ warnings: string[];
206
+ }>;
207
+ /** Renews a license; always needs the withdrawal waiver (renewals take effect immediately). */
208
+ export declare function renewLicense(prepared: PreparedAction, opts: ActOptions): Promise<{
209
+ confirmation: {
210
+ action: string;
211
+ summary: string;
212
+ amounts: {
213
+ total: string;
214
+ toRecipient: string;
215
+ toPlatform: string;
216
+ recipient: string;
217
+ };
218
+ consent: ConsentRecord;
219
+ at: string;
220
+ };
221
+ receipt?: import("./receipt.js").PurchaseReceipt | undefined;
222
+ newExpirySlot: number;
223
+ actionRecord?: AgentActionRecord | undefined;
224
+ txHash: string;
225
+ warnings: string[];
226
+ }>;
227
+ /** Refunds a license inside its 14-day window, to the wallet that bought it. */
228
+ export declare function refundLicense(prepared: PreparedAction, opts: ActOptions): Promise<{
229
+ confirmation: {
230
+ action: string;
231
+ summary: string;
232
+ amounts: {
233
+ total: string;
234
+ toRecipient: string;
235
+ toPlatform: string;
236
+ recipient: string;
237
+ };
238
+ consent: ConsentRecord;
239
+ at: string;
240
+ };
241
+ creditNote?: import("./receipt.js").PurchaseReceipt | undefined;
242
+ actionRecord?: AgentActionRecord | undefined;
243
+ txHash: string;
244
+ warnings: string[];
245
+ }>;
246
+ /**
247
+ * Accepts a permit grant as its holder (the agent's wallet must be the
248
+ * holder key) and pays with `payer` (default the same wallet).
249
+ */
250
+ export declare function acceptPermitGrant(prepared: PreparedAction, opts: ActOptions & {
251
+ payer?: AgentWallet;
252
+ }): Promise<{
253
+ confirmation: {
254
+ action: string;
255
+ summary: string;
256
+ amounts: {
257
+ total: string;
258
+ toRecipient: string;
259
+ toPlatform: string;
260
+ recipient: string;
261
+ };
262
+ consent: ConsentRecord;
263
+ docHash: {} | null;
264
+ at: string;
265
+ };
266
+ warnings?: string[] | undefined;
267
+ actionRecord?: AgentActionRecord | undefined;
268
+ receipt?: import("./receipt.js").PurchaseReceipt | undefined;
269
+ txHash: string;
270
+ subject: string;
271
+ fee: string;
272
+ toAuthority: string;
273
+ toPlatform: string;
274
+ }>;
275
+ /** Public Mina nodes used to broadcast when no URL is given (as onChainRoot's defaults). */
276
+ export declare const DEFAULT_SEND_GRAPHQL_URLS: Record<Network, string>;
277
+ /**
278
+ * A `send` for `minaSignerWallet` that posts the signed zkApp command to a
279
+ * Mina node's GraphQL `sendZkapp` — no o1js needed.
280
+ */
281
+ export declare function graphqlSender(network: Network, opts?: {
282
+ url?: string;
283
+ fetcher?: typeof fetch;
284
+ }): (zkappCommand: unknown) => Promise<string>;
285
+ export type PermitAgentOptions = Omit<ActOptions, 'consent'> & {
286
+ network: Network;
287
+ consent?: StandingConsent;
288
+ /** How long a permit fee payment is retried while the keeper is busy (default 3 minutes). */
289
+ payRetryMs?: number;
290
+ };
291
+ /**
292
+ * Every permits flow for an agent key, with the owner's policy checked
293
+ * first: as an operator (apply, withdraw, surrender, prove access) and as an
294
+ * authority key-set member (create and deploy a registry, decide
295
+ * applications, sign and execute requests, request changes). Signing a
296
+ * request is one key's approval; the registry's threshold still applies.
297
+ */
298
+ export declare function createPermitAgent(opts: PermitAgentOptions): Promise<{
299
+ client: {
300
+ network: import("./permitsClient.js").Network;
301
+ signIn: () => Promise<string>;
302
+ listRegistries: () => Promise<{
303
+ registries: any[];
304
+ }>;
305
+ getRegistry: (address: string) => Promise<{
306
+ registry: any;
307
+ chain?: any;
308
+ }>;
309
+ registryLineage: (address: string) => Promise<string>;
310
+ getPermit: (registry: string, subject: string) => Promise<{
311
+ permit: import("./permitRegistryRebuild.js").PermitRecord | null;
312
+ status: import("./permitRegistryRebuild.js").PermitStatusName;
313
+ slot: number;
314
+ root: string;
315
+ witness: {
316
+ isLefts: boolean[];
317
+ siblings: string[];
318
+ };
319
+ registry?: string;
320
+ generation?: number;
321
+ frozen?: boolean;
322
+ }>;
323
+ getDeployment: (registry: string) => Promise<{
324
+ registry: string;
325
+ network: string;
326
+ generation: number;
327
+ status: string;
328
+ current: string;
329
+ generations: Array<{
330
+ generation: number;
331
+ address: string;
332
+ status: string;
333
+ retiredAt?: string;
334
+ }>;
335
+ currentVerificationKeyHash: string;
336
+ chain: {
337
+ verificationKeyHash: string | null;
338
+ current: boolean;
339
+ retired: boolean;
340
+ hasPermits: boolean;
341
+ hasOpenApplications: boolean;
342
+ } | null;
343
+ redeploy: {
344
+ startedAt: string;
345
+ draining?: boolean;
346
+ openApplications?: number;
347
+ lastDeadline?: number | null;
348
+ successor?: any;
349
+ request?: import("./permitsClient.js").RequestView | null;
350
+ retireRequest?: import("./permitsClient.js").RequestView | null;
351
+ byPlatform?: boolean;
352
+ } | null;
353
+ }>;
354
+ verifyPermit: (registry: string, subject: string, scope?: bigint | string) => Promise<{
355
+ valid: boolean;
356
+ status: import("./permitRegistryRebuild.js").PermitStatusName;
357
+ scopeOk: boolean;
358
+ slot: number;
359
+ root: string;
360
+ permit: any;
361
+ }>;
362
+ getRequest: (id: string, asSelf?: boolean) => Promise<{
363
+ request: import("./permitsClient.js").RequestView;
364
+ }>;
365
+ acceptAuthorityTerms(f: AuthorityDetails & {
366
+ termsVersion: string;
367
+ termsHash: string;
368
+ agentConsent?: unknown;
369
+ }): Promise<{
370
+ authority: any;
371
+ }>;
372
+ authorityStranded: () => Promise<{
373
+ registries: Array<{
374
+ registry: string;
375
+ name: string | null;
376
+ successor: string | null;
377
+ retireTxHash: string;
378
+ strandedAt: string;
379
+ count: number;
380
+ totalNano: string;
381
+ applications: Array<{
382
+ id: string;
383
+ holderKey: string;
384
+ payer: string | null;
385
+ feeNano: string;
386
+ deadline: number | null;
387
+ contactEmail: string;
388
+ }>;
389
+ }>;
390
+ count: number;
391
+ totalNano: string;
392
+ }>;
393
+ authorityFeeStatement: (month: string) => Promise<any>;
394
+ getLicenseReceipts: (zkAppAddress: string, licenseHash: string) => Promise<import("./receipt.js").PurchaseReceipt[]>;
395
+ getReceipt: (txHash: string) => Promise<import("./receipt.js").PurchaseReceipt>;
396
+ getHolderOverview: () => Promise<{
397
+ network: string;
398
+ slot: number;
399
+ applications: Array<{
400
+ id: string;
401
+ registry: string;
402
+ registryName: string;
403
+ status: string;
404
+ createdAt: string;
405
+ requestedScope: string;
406
+ terms: any | null;
407
+ escrow: any | null;
408
+ settlement: any | null;
409
+ }>;
410
+ permits: Array<import("./permitRegistryRebuild.js").PermitRecord & {
411
+ registry: string;
412
+ registryName: string;
413
+ generation: number;
414
+ frozen: boolean;
415
+ effectiveStatus: import("./permitRegistryRebuild.js").PermitStatusName;
416
+ }>;
417
+ offers: Array<{
418
+ id: string;
419
+ registry: string;
420
+ registryName: string;
421
+ newLeaf: import("./permitRegistryRebuild.js").PermitRecord;
422
+ fee: string;
423
+ createdAt: string;
424
+ }>;
425
+ }>;
426
+ getAuthority: () => Promise<{
427
+ authority: any;
428
+ currentTerms: {
429
+ version: string;
430
+ hash: string;
431
+ };
432
+ }>;
433
+ listMyRegistries: () => Promise<{
434
+ registries: any[];
435
+ }>;
436
+ listRequests: (registry: string, status?: string) => Promise<{
437
+ requests: import("./permitsClient.js").RequestView[];
438
+ }>;
439
+ createRegistry: (draft: {
440
+ name: string;
441
+ website: string;
442
+ jurisdiction?: string;
443
+ description?: string;
444
+ keys: string[];
445
+ threshold: number;
446
+ scopes: Array<{
447
+ bit: number;
448
+ label: string;
449
+ }>;
450
+ policy?: {
451
+ gracePeriod?: number;
452
+ maxTerm?: number;
453
+ singleKeySuspend?: boolean;
454
+ holderSigRequired?: boolean;
455
+ };
456
+ grantFeeMina: string;
457
+ renewalFeeMina?: string;
458
+ payout?: string;
459
+ processingFeeMina?: string;
460
+ decisionWindow?: number;
461
+ }) => Promise<{
462
+ registry: any;
463
+ request: import("./permitsClient.js").RequestView;
464
+ }>;
465
+ updateRegistryListing: (registry: string, edit: {
466
+ name?: string;
467
+ description?: string;
468
+ jurisdiction?: string;
469
+ scopeLabels?: string[];
470
+ }) => Promise<{
471
+ registry: any;
472
+ staged: boolean;
473
+ }>;
474
+ setApplicationsOpen: (registry: string, open: boolean) => Promise<{
475
+ registry: any;
476
+ }>;
477
+ withdrawRegistryEdit: (registry: string) => Promise<{
478
+ registry: any;
479
+ }>;
480
+ getRegistryStats: (registry: string) => Promise<import("./permitsClient.js").RegistryStats>;
481
+ getRegistryTransactions: (registry: string, period?: {
482
+ from?: string;
483
+ to?: string;
484
+ }) => Promise<{
485
+ registry: string;
486
+ network: string;
487
+ transactions: import("./permitsClient.js").RegistryTransaction[];
488
+ }>;
489
+ signRequest(requestId: string, slot?: number): Promise<{
490
+ request: import("./permitsClient.js").RequestView;
491
+ }>;
492
+ redeployRegistry: (registry: string) => Promise<{
493
+ successor: any;
494
+ retireRequest: import("./permitsClient.js").RequestView | null;
495
+ retiredByPlatform?: boolean;
496
+ request: import("./permitsClient.js").RequestView;
497
+ } | {
498
+ draining: true;
499
+ openApplications: number;
500
+ lastDeadline: number | null;
501
+ }>;
502
+ cancelRedeploy: (registry: string) => Promise<{
503
+ registry: any;
504
+ }>;
505
+ deployRegistry(requestId: string): Promise<{
506
+ registry: string;
507
+ txHash: string;
508
+ }>;
509
+ listApplications: (registry: string, status?: string) => Promise<{
510
+ applications: any[];
511
+ paymentPaused?: boolean;
512
+ }>;
513
+ approveApplication: (id: string) => Promise<{
514
+ application: any;
515
+ request?: import("./permitsClient.js").RequestView;
516
+ }>;
517
+ rejectApplication: (id: string, reason?: string, reasonCode?: string) => Promise<{
518
+ application: any;
519
+ request?: import("./permitsClient.js").RequestView;
520
+ }>;
521
+ requestRenewal: (registry: string, subject: string, change: {
522
+ expirySlot: number | "none";
523
+ scope?: string;
524
+ validFrom?: number;
525
+ docHash?: string;
526
+ }) => Promise<{
527
+ request: import("./permitsClient.js").RequestView;
528
+ }>;
529
+ requestStatus: (registry: string, subject: string, action: "suspend" | "reinstate" | "revoke", reasonCode?: string) => Promise<{
530
+ request: import("./permitsClient.js").RequestView;
531
+ }>;
532
+ requestFees: (registry: string, grantFeeMina: string, renewalFeeMina?: string, applications?: {
533
+ processingFeeMina?: string;
534
+ decisionWindow?: number;
535
+ }) => Promise<{
536
+ request: import("./permitsClient.js").RequestView;
537
+ }>;
538
+ requestRotation: (registry: string, keys: string[], threshold: number) => Promise<{
539
+ request: import("./permitsClient.js").RequestView;
540
+ }>;
541
+ executeRequest(requestId: string): Promise<{
542
+ txHash: string;
543
+ }>;
544
+ apply(registry: string, a: {
545
+ scope?: string;
546
+ requestedScope?: string;
547
+ expirySlot?: number | "none";
548
+ validFrom?: number;
549
+ docHash?: string;
550
+ details?: Record<string, unknown>;
551
+ docLinks?: string[];
552
+ contactEmail?: string;
553
+ holderKey?: string;
554
+ salt?: string;
555
+ subject?: string;
556
+ pay?: boolean;
557
+ payer?: PermitWallet;
558
+ }): Promise<{
559
+ application: any;
560
+ apply: any;
561
+ txHash?: string;
562
+ fee?: string;
563
+ processingFee?: string;
564
+ deadline?: number;
565
+ paymentPaused?: {
566
+ reason: string;
567
+ forkActivationSlot: number | null;
568
+ };
569
+ }>;
570
+ getApplication: (id: string) => Promise<{
571
+ application: any;
572
+ request: import("./permitsClient.js").RequestView | null;
573
+ slot: number | null;
574
+ apply: {
575
+ application: import("./permitRegistryRebuild.js").ApplicationRecord;
576
+ fee: string;
577
+ processingFee: string;
578
+ decisionWindow: number;
579
+ message: string[];
580
+ paymentPaused?: {
581
+ reason: "upgrade" | "redeploy";
582
+ forkActivationSlot: number | null;
583
+ };
584
+ } | null;
585
+ withdrawMessage?: string[];
586
+ reclaimable?: boolean | null;
587
+ }>;
588
+ fileApplication(id: string, payer?: PermitWallet): Promise<{
589
+ txHash: string;
590
+ fee: string;
591
+ processingFee: string;
592
+ deadline: number;
593
+ }>;
594
+ withdrawApplication(id: string): Promise<{
595
+ application: any;
596
+ } | {
597
+ receipt?: import("./receipt.js").PurchaseReceipt | undefined;
598
+ application: any;
599
+ txHash: string;
600
+ kept: string;
601
+ refunded: string;
602
+ }>;
603
+ reclaimApplication(id: string, sender?: PermitWallet): Promise<{
604
+ txHash: string;
605
+ refunded: string;
606
+ payer: string;
607
+ }>;
608
+ acceptGrant(requestId: string, payer?: PermitWallet): Promise<{
609
+ receipt?: import("./receipt.js").PurchaseReceipt | undefined;
610
+ txHash: string;
611
+ subject: string;
612
+ fee: string;
613
+ toAuthority: string;
614
+ toPlatform: string;
615
+ }>;
616
+ proposeRegistryPayout: (registry: string, payout: string) => Promise<{
617
+ request: import("./permitsClient.js").RequestView;
618
+ }>;
619
+ cancelRegistryPayout: (registry: string) => Promise<{
620
+ request: import("./permitsClient.js").RequestView;
621
+ }>;
622
+ applyRegistryPayout(registry: string): Promise<{
623
+ txHash: string;
624
+ payout: string;
625
+ }>;
626
+ signRotationAsNewKey(requestId: string, newSlot?: number): Promise<{
627
+ request: import("./permitsClient.js").RequestView;
628
+ }>;
629
+ rekeyPermit(registry: string, subject: string, newWallet: PermitWallet, payer?: PermitWallet): Promise<{
630
+ txHash: string;
631
+ subject: string;
632
+ salt: string;
633
+ }>;
634
+ moveAuthorityAccount(newWallet: PermitWallet): Promise<{
635
+ moved: {
636
+ from: string;
637
+ to: string;
638
+ };
639
+ }>;
640
+ surrender(registry: string, subject: string): Promise<{
641
+ txHash: string;
642
+ }>;
643
+ };
644
+ address: string;
645
+ /**
646
+ * Applies for a permit (`subject`: renew or change this key's permit) and
647
+ * pays the fee into escrow from this key: a spend under the owner's
648
+ * policy (the full fee; on a rejection or withdrawal only the processing
649
+ * fee is kept, with no decision by the deadline nothing).
650
+ */
651
+ apply(registry: string, a: {
652
+ scope?: string;
653
+ requestedScope?: string;
654
+ expirySlot?: number | "none";
655
+ validFrom?: number;
656
+ docHash?: string;
657
+ details?: Record<string, unknown>;
658
+ docLinks?: string[];
659
+ contactEmail?: string;
660
+ subject?: string;
661
+ }): Promise<{
662
+ txHash: string;
663
+ fee: string;
664
+ processingFee: string;
665
+ deadline: number;
666
+ application: any;
667
+ apply: any;
668
+ paymentPaused?: {
669
+ reason: string;
670
+ forkActivationSlot: number | null;
671
+ };
672
+ }>;
673
+ /**
674
+ * Pays an application this key made that is still unpaid (submitted):
675
+ * for one whose payment `apply` couldn't complete. A spend under the
676
+ * owner's policy, as `apply`.
677
+ */
678
+ payApplication(id: string): Promise<{
679
+ txHash: string;
680
+ fee: string;
681
+ processingFee: string;
682
+ deadline: number;
683
+ application: any;
684
+ }>;
685
+ /** Withdraws an application (paid: the processing fee is kept, the rest refunded). */
686
+ withdrawApplication(id: string): Promise<{
687
+ application: any;
688
+ } | {
689
+ receipt?: import("./receipt.js").PurchaseReceipt | undefined;
690
+ application: any;
691
+ txHash: string;
692
+ kept: string;
693
+ refunded: string;
694
+ }>;
695
+ /** After the decision deadline: returns the whole fee to the payer. */
696
+ reclaimApplication(id: string): Promise<{
697
+ txHash: string;
698
+ refunded: string;
699
+ payer: string;
700
+ }>;
701
+ surrender(registry: string, subject: string): Promise<{
702
+ txHash: string;
703
+ }>;
704
+ /**
705
+ * Proves this key holds an active permit covering `requiredScope`,
706
+ * without revealing which permit (zero-knowledge holder proof). Give the
707
+ * verifier the proof. The challenge is bound to the verifier: `verifier`
708
+ * is the identity this agent is actually talking to (the service's URL,
709
+ * not a name it claims) and `nonce` the number it handed out, so two
710
+ * services cannot link the agent by agreeing on one challenge. The
711
+ * permit's secret is re-derived with this key (findHolderSecret).
712
+ */
713
+ proveAccess(a: {
714
+ registry: string;
715
+ subject: string;
716
+ requiredScope?: bigint;
717
+ verifier: string;
718
+ nonce: bigint | string;
719
+ }): Promise<{
720
+ registry: string;
721
+ root: string;
722
+ slot: number;
723
+ verifier: string;
724
+ nonce: string;
725
+ context: string;
726
+ requiredScope: string;
727
+ proof: unknown;
728
+ nullifier: string;
729
+ }>;
730
+ /**
731
+ * Accepts the Authority Terms with the agent key, for its owner. Needs a
732
+ * standing consent covering 'authority-terms'; the keeper records the
733
+ * acceptance as given by this agent under that authorisation.
734
+ */
735
+ acceptAuthorityTerms(f: AuthorityDetails & {
736
+ termsVersion: string;
737
+ termsHash: string;
738
+ }): Promise<{
739
+ authority: any;
740
+ }>;
741
+ listApplications(registry: string, status?: string): Promise<{
742
+ applications: any[];
743
+ paymentPaused?: boolean;
744
+ }>;
745
+ listRequests(registry: string, status?: string): Promise<{
746
+ requests: import("./permitsClient.js").RequestView[];
747
+ }>;
748
+ createRegistry(draft: Parameters<(draft: {
749
+ name: string;
750
+ website: string;
751
+ jurisdiction?: string;
752
+ description?: string;
753
+ keys: string[];
754
+ threshold: number;
755
+ scopes: Array<{
756
+ bit: number;
757
+ label: string;
758
+ }>;
759
+ policy?: {
760
+ gracePeriod?: number;
761
+ maxTerm?: number;
762
+ singleKeySuspend?: boolean;
763
+ holderSigRequired?: boolean;
764
+ };
765
+ grantFeeMina: string;
766
+ renewalFeeMina?: string;
767
+ payout?: string;
768
+ processingFeeMina?: string;
769
+ decisionWindow?: number;
770
+ }) => Promise<{
771
+ registry: any;
772
+ request: import("./permitsClient.js").RequestView;
773
+ }>>[0]): Promise<{
774
+ registry: any;
775
+ request: import("./permitsClient.js").RequestView;
776
+ }>;
777
+ deployRegistry(requestId: string): Promise<{
778
+ registry: string;
779
+ txHash: string;
780
+ }>;
781
+ /**
782
+ * Starts a redeploy to the current release: two requests for the keys,
783
+ * retire (sign, then execute_request) and the new registry (sign, then
784
+ * deployRegistry; after a pending hard fork). Every permit carries over to it.
785
+ */
786
+ redeployRegistry(registry: string): Promise<{
787
+ successor: any;
788
+ retireRequest: import("./permitsClient.js").RequestView | null;
789
+ retiredByPlatform?: boolean;
790
+ request: import("./permitsClient.js").RequestView;
791
+ } | {
792
+ draining: true;
793
+ openApplications: number;
794
+ lastDeadline: number | null;
795
+ }>;
796
+ /** Approves exactly what was applied for, or rejects (the processing fee is kept): a request for the authority keys to sign (an unpaid one whose payment waits for a Mina upgrade may be decided before payment; the request follows once paid). */
797
+ decideApplication(id: string, d: {
798
+ decision: "approve";
799
+ } | {
800
+ decision: "reject";
801
+ reason?: string;
802
+ reasonCode?: string;
803
+ }): Promise<{
804
+ application: any;
805
+ request?: import("./permitsClient.js").RequestView;
806
+ }>;
807
+ signRequest(requestId: string): Promise<{
808
+ request: import("./permitsClient.js").RequestView;
809
+ }>;
810
+ /** Proves and pays for a fully signed non-grant request (grants are paid by the holder). */
811
+ executeRequest(requestId: string): Promise<{
812
+ txHash: string;
813
+ }>;
814
+ requestChange(registry: string, c: {
815
+ kind: "renewal";
816
+ subject: string;
817
+ expirySlot: number | "none";
818
+ scope?: string;
819
+ validFrom?: number;
820
+ docHash?: string;
821
+ } | {
822
+ kind: "status";
823
+ subject: string;
824
+ action: "suspend" | "reinstate" | "revoke";
825
+ reasonCode?: string;
826
+ } | {
827
+ kind: "fees";
828
+ grantFeeMina: string;
829
+ renewalFeeMina?: string;
830
+ } | {
831
+ kind: "rotation";
832
+ keys: string[];
833
+ threshold: number;
834
+ }): Promise<{
835
+ request: import("./permitsClient.js").RequestView;
836
+ }>;
837
+ }>;
838
+ export type PermitAgent = Awaited<ReturnType<typeof createPermitAgent>>;
839
+ export { signActionRecord, verifyActionRecord, actionRecordStatement, policyHash, canonicalJson, ACTION_RECORD_LIMITS, type AgentActionRecord } from './agentRecord.js';
840
+ export { createVendorAgent, vendorAcceptanceMessage, billingHash, REGISTRATION_FEE_MINA, type VendorAgent, type VendorListing, type VendorLegalInput, type VendorTerms } from './agentVendor.js';
841
+ //# sourceMappingURL=agentActions.d.ts.map