pub enum SwarmAction {
Show 19 variants
CaptureReward {
merchant_id: String,
amount: u64,
transaction_ref: String,
},
TrackReferral {
referral_code: String,
conversion_amount: Option<u64>,
},
SubmitAttention {
content_id: String,
duration_ms: u64,
},
LicenseData {
data_type: String,
buyer: String,
terms_hash: String,
},
JoinInsurancePool {
pool_id: String,
coverage_amount: u64,
},
RegisterCompute {
gpu_type: String,
available_hours: u32,
},
RunNode {
node_type: String,
uptime_commitment: u8,
},
EnergyTrade {
direction: String,
kwh: f64,
price_per_kwh: f64,
},
LicenseSkill {
skill_type: String,
license_terms: String,
},
SubmitCuration {
signal_type: String,
signal_data: String,
},
SocialAction {
action_type: String,
target: String,
},
DeployLiquidity {
pool: String,
amount: u64,
strategy: String,
},
CastVote {
proposal_id: String,
vote: String,
delegation_power: u64,
},
BulkPurchase {
merchant_id: String,
items: Vec<String>,
max_spend: u64,
},
HireSubAgent {
sub_agent_pubkey: String,
task_description: String,
max_budget: u64,
deadline: u64,
},
PledgeReputation {
protocol: String,
loan_amount: u64,
collateral_score: u32,
},
CoordinateSwarm {
task_id: String,
sub_agents: Vec<String>,
task_allocation: HashMap<String, String>,
total_budget: u64,
coordination_fee_bps: u16,
},
AcceptContract {
contract_id: String,
requester: String,
deliverables: Vec<String>,
payment: u64,
},
DistributeRewards {
task_id: String,
distributions: HashMap<String, u64>,
},
}Expand description
Actions that can be requested through the gateway
Variants§
CaptureReward
Capture shopping reward
TrackReferral
Track referral
SubmitAttention
Submit attention proof
LicenseData
License data
JoinInsurancePool
Join insurance pool
RegisterCompute
Register compute capacity
RunNode
Run network node
EnergyTrade
Energy arbitrage trade
LicenseSkill
License behavioral model
SubmitCuration
Submit curation signal
SocialAction
Social monetization
DeployLiquidity
Deploy liquidity
CastVote
Cast governance vote
BulkPurchase
Bulk inventory purchase
HireSubAgent
Hire a sub-agent for a specific task
PledgeReputation
Use reputation as DeFi collateral
CoordinateSwarm
Coordinate multiple sub-agents for complex task
Fields
AcceptContract
Become a general contractor for other agents
DistributeRewards
Distribute rewards to sub-agents
Implementations§
Source§impl SwarmAction
impl SwarmAction
Sourcepub fn layer(&self) -> CaptureLayer
pub fn layer(&self) -> CaptureLayer
Get the capture layer this action belongs to
Sourcepub fn required_score(&self) -> u32
pub fn required_score(&self) -> u32
Get the minimum reputation score required for this action
Sourcepub fn is_swarm_action(&self) -> bool
pub fn is_swarm_action(&self) -> bool
Check if this is a swarm coordination action (Layer 22)
Sourcepub fn requires_collateral(&self) -> bool
pub fn requires_collateral(&self) -> bool
Check if this requires collateral-level reputation
Trait Implementations§
Source§impl Clone for SwarmAction
impl Clone for SwarmAction
Source§fn clone(&self) -> SwarmAction
fn clone(&self) -> SwarmAction
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SwarmAction
impl Debug for SwarmAction
Source§impl<'de> Deserialize<'de> for SwarmAction
impl<'de> Deserialize<'de> for SwarmAction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SwarmAction
impl RefUnwindSafe for SwarmAction
impl Send for SwarmAction
impl Sync for SwarmAction
impl Unpin for SwarmAction
impl UnsafeUnpin for SwarmAction
impl UnwindSafe for SwarmAction
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<B> IntoFunctionResponse<B, Body> for Bwhere
B: Serialize,
impl<B> IntoFunctionResponse<B, Body> for Bwhere
B: Serialize,
Source§fn into_response(self) -> FunctionResponse<B, Body>
fn into_response(self) -> FunctionResponse<B, Body>
Convert the type into a FunctionResponse.
Creates a shared type from an unshared type.