You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refac: renaming agent functions to deregister and removing payer key (#119)
Renames the permission terminology from Grantor/Grantee/Grant to
Delegator/Recipient/Delegate. This plays better with the terminology
throughout the project.
The namespace permission scope contains a set of paths that the grantee can access. The permission system's existing infrastructure handles the complexity of duration, revocation terms, and enforcement authorities. This means namespace permissions can be temporary, require multi-signature revocation, or include third-party controllers. Read more in [permission0.md](permission0.md).
115
+
The namespace permission scope contains a set of paths that the recipient can access. The permission system's existing infrastructure handles the complexity of duration, revocation terms, and enforcement authorities. This means namespace permissions can be temporary, require multi-signature revocation, or include third-party controllers. Read more in [permission0.md](permission0.md).
116
116
117
117
This integration creates composition possibilities. An agent running a data aggregation service could delegate read access to `agent.alice.data.public` while keeping `agent.alice.data.private` restricted, or delegate the entire data scope: `agent.alice.data`. The delegation could be time-limited, revocable by designated arbiters, or controlled by enforcement authorities who verify off-chain conditions.
118
118
119
119
## Practical Applications
120
120
121
121
A memory service agent registers `agent.memory` and creates specialized sub-namespaces like `agent.memory.twitter`, `agent.memory.discord`, and `agent.memory.telegram`. Each represents a different data source with potentially different access requirements. The agent can delegate read access to `agent.memory.twitter` to analytics agents while keeping other sources private.
122
122
123
-
A compute marketplace might use `agent.compute.gpu.nvidia.a100` to represent specific hardware resources. Delegating this namespace grants access to submit jobs to those specific GPUs. The hierarchical structure naturally represents the hardware taxonomy while permissions control access.
123
+
A compute marketplace might use `agent.compute.gpu.nvidia.a100` to represent specific hardware resources. Delegating this namespace delegates access to submit jobs to those specific GPUs. The hierarchical structure naturally represents the hardware taxonomy while permissions control access.
124
124
125
125
API versioning is viable with paths like `agent.api.v1` and `agent.api.v2`. Services can maintain backward compatibility by keeping old namespaces active while encouraging migration to newer versions. Permissions can be time-limited to enforce deprecation schedules.
Copy file name to clipboardExpand all lines: docs/permission0.md
+34-33Lines changed: 34 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,14 +8,14 @@ The concept draws inspiration from multi-level competency networks that self-org
8
8
9
9
## Permission Contracts
10
10
11
-
A permission contract forms the foundation of the delegation relationship. Each contract defines the relationship between a grantor (who delegates emissions) and a grantee (who receives the delegation authority). The contract specifies allocation parameters, distribution controls, duration, and revocation terms.
11
+
A permission contract forms the foundation of the delegation relationship. Each contract defines the relationship between a delegator (who delegates emissions) and a recipient (who receives the delegation authority). The contract specifies allocation parameters, distribution controls, duration, and revocation terms.
12
12
13
-
Permission contracts are identified by a unique `PermissionId` generated deterministically from the grantor, grantee, scope, and creation block. This ensures contracts can be consistently referenced and avoids collision issues when multiple contracts exist between the same parties.
13
+
Permission contracts are identified by a unique `PermissionId` generated deterministically from the delegator, recipient, scope, and creation block. This ensures contracts can be consistently referenced and avoids collision issues when multiple contracts exist between the same parties.
With `Streams` allocation, portions of the grantor's incoming emissions from specific streams are diverted according to the percentages specified (0-100%). Each stream ID represents a distinct emission source, allowing for fine-grained control over different emission types. For `FixedAmount` allocation, a specific number of tokens is reserved from the grantor's account at contract creation.
65
+
With `Streams` allocation, portions of the delegator's incoming emissions from specific streams are diverted according to the percentages specified (0-100%). Each stream ID represents a distinct emission source, allowing for fine-grained control over different emission types. For `FixedAmount` allocation, a specific number of tokens is reserved from the delegator's account at contract creation.
66
66
67
67
The `targets` field identifies recipients with associated weights, determining how tokens are distributed among multiple targets. For example, with targets A (weight 1) and B (weight 2), target B receives twice the tokens of target A.
68
68
69
-
The `accumulating` boolean determines whether emissions should actively accumulate for this permission. This flag can be toggled by the grantor or enforcement authorities to temporarily pause emission accumulation.
69
+
The `accumulating` boolean determines whether emissions should actively accumulate for this permission. This flag can be toggled by the delegator or enforcement authorities to temporarily pause emission accumulation.
These terms create different security guarantees for the grantee, ranging from complete assurance (`Irrevocable`) to flexible arrangements (`RevocableByGrantor`). The `RevocableByArbiters` option allows for multi-signature revocation by designated third parties. The grantee can ALWAYS revoke a permission as it is the one being benefitted.
144
+
These terms create different security guarantees for the recipient, ranging from complete assurance (`Irrevocable`) to flexible arrangements (`RevocableByDelegator`). The `RevocableByArbiters` option allows for multi-signature revocation by designated third parties. The recipient can ALWAYS revoke a permission as it is the one being benefitted.
145
145
146
146
## Enforcement Authority System
147
147
@@ -213,8 +213,8 @@ For example, a permission might require KYC verification before distributions ca
213
213
214
214
Enforcement can be configured in two ways:
215
215
216
-
1. During permission creation via the `grant_emission_permission` extrinsic
217
-
2. After creation through the `set_enforcement_authority` extrinsic (only by the grantor or root)
216
+
1. During permission creation via the `delegate_emission_permission` extrinsic
217
+
2. After creation through the `set_enforcement_authority` extrinsic (only by the delegator or root)
218
218
219
219
```rust
220
220
pubfnset_enforcement_authority(
@@ -233,12 +233,12 @@ The enforcement authority system transforms the permission framework from a simp
0 commit comments