We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5b0fcd7 commit 62023f4Copy full SHA for 62023f4
src/fee.rs
@@ -0,0 +1,20 @@
1
+/// Represents the context of a protocol-defined "use"
2
+#[derive(Debug, Clone)]
3
+pub struct UseContext {
4
+ pub intent_id: String,
5
+ pub from_state: String,
6
+ pub to_state: String,
7
+ pub timestamp_unix: u64,
8
+}
9
+
10
+/// Represents a record that a usage event was registered
11
12
+pub struct FeeReceipt {
13
+ pub context_hash: String,
14
15
16
+/// Abstract sink for recording protocol usage
17
+pub trait FeeSink {
18
+ /// Record a single protocol-defined "use"
19
+ fn record_use(&self, context: &UseContext) -> FeeReceipt;
20
0 commit comments