From d329f010d9bbd2d6cc2c926e34b6e989c4d6a7f8 Mon Sep 17 00:00:00 2001
From: Michael Pretorius
Date: Fri, 11 Oct 2024 17:43:38 +0200
Subject: [PATCH] feat(claims): add intents and oracle approval payment
---
app/ante.go | 10 +-
app/keepers/keepers.go | 1 +
docs/core/proto-docs.html | 777 +++++++++-
docs/core/proto-docs.json | 859 ++++++++++-
docs/core/proto-docs.md | 261 +++-
docs/swagger-ui/swagger.yaml | 1807 ++++++++++++++++++++++--
proto/ixo/claims/v1beta1/authz.proto | 14 +
proto/ixo/claims/v1beta1/claims.proto | 103 +-
proto/ixo/claims/v1beta1/event.proto | 8 +-
proto/ixo/claims/v1beta1/genesis.proto | 1 +
proto/ixo/claims/v1beta1/query.proto | 26 +
proto/ixo/claims/v1beta1/tx.proto | 84 +-
wasmbinding/stargate_whitelist.go | 8 +
x/bonds/types/tx.go | 2 -
x/claims/abci.go | 50 +
x/claims/autocli.go | 11 +
x/claims/client/cli/tx.go | 24 +
x/claims/keeper/claims.go | 190 +++
x/claims/keeper/genesis.go | 9 +-
x/claims/keeper/grpc_query.go | 40 +
x/claims/keeper/keeper.go | 35 +-
x/claims/keeper/msg_server.go | 366 ++++-
x/claims/keeper/payments.go | 107 +-
x/claims/module.go | 7 +
x/claims/types/authz.go | 73 +-
x/claims/types/authz.pb.go | 308 +++-
x/claims/types/claims.go | 159 ++-
x/claims/types/claims.pb.go | 1508 ++++++++++++++++++--
x/claims/types/codec.go | 4 +
x/claims/types/cw20.go | 22 +-
x/claims/types/errors.go | 5 +
x/claims/types/event.pb.go | 412 +++++-
x/claims/types/expected_keepers.go | 7 +
x/claims/types/genesis.pb.go | 103 +-
x/claims/types/keys.go | 24 +
x/claims/types/msg_validation.go | 60 +-
x/claims/types/params.go | 11 +-
x/claims/types/query.pb.go | 1295 ++++++++++++++---
x/claims/types/query.pb.gw.go | 228 +++
x/claims/types/tx.go | 24 +
x/claims/types/tx.pb.go | 1501 ++++++++++++++++++--
41 files changed, 9525 insertions(+), 1019 deletions(-)
mode change 100755 => 100644 proto/ixo/claims/v1beta1/query.proto
create mode 100644 x/claims/abci.go
diff --git a/app/ante.go b/app/ante.go
index f61de993..8f0fc399 100755
--- a/app/ante.go
+++ b/app/ante.go
@@ -68,6 +68,7 @@ func IxoAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
authante.NewSigGasConsumeDecorator(options.AccountKeeper, sigGasConsumer),
authante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler),
authante.NewIncrementSequenceDecorator(options.AccountKeeper),
+ ibcante.NewRedundantRelayDecorator(options.IBCKeeper),
)
// authenticatorVerificationDecorator is the new authenticator flow that's embedded into the circuit breaker ante
@@ -92,16 +93,15 @@ func IxoAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
authante.NewValidateMemoDecorator(options.AccountKeeper),
authante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper),
+ // TODO: analyse how to make smart accounts work for iid handlers
+ iidante.NewIidResolutionDecorator(options.IidKeeper),
+ entityante.NewBlockNftContractTransferForEntityDecorator(options.EntityKeeper),
+
smartaccountante.NewCircuitBreakerDecorator(
options.smartAccountKeeper,
authenticatorVerificationDecorator,
classicSignatureVerificationDecorator,
),
-
- ibcante.NewRedundantRelayDecorator(options.IBCKeeper),
- // TODO: analyse how smart accounts affect iid handlers
- iidante.NewIidResolutionDecorator(options.IidKeeper),
- entityante.NewBlockNftContractTransferForEntityDecorator(options.EntityKeeper),
}
return sdk.ChainAnteDecorators(anteDecorators...), nil
diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go
index 0c3dcf32..2c36e63d 100755
--- a/app/keepers/keepers.go
+++ b/app/keepers/keepers.go
@@ -528,6 +528,7 @@ func NewAppKeepers(
appKeepers.BankKeeper,
appKeepers.EntityKeeper,
appKeepers.ContractKeeper,
+ appKeepers.AccountKeeper,
)
// Initialize authenticators
diff --git a/docs/core/proto-docs.html b/docs/core/proto-docs.html
index 1744b582..3ed5cb24 100755
--- a/docs/core/proto-docs.html
+++ b/docs/core/proto-docs.html
@@ -565,6 +565,10 @@ Table of Contents
MEvaluation
+
+ MIntent
+
+
MParams
@@ -578,6 +582,10 @@ Table of Contents
+
+ ECollectionIntentOptions
+
+
ECollectionState
@@ -586,6 +594,10 @@ Table of Contents
EEvaluationStatus
+
+ EIntentStatus
+
+
EPaymentStatus
@@ -663,6 +675,14 @@ Table of Contents
MCollectionUpdatedEvent
+
+ MIntentSubmittedEvent
+
+
+
+ MIntentUpdatedEvent
+
+
MPaymentWithdrawCreatedEvent
@@ -745,6 +765,22 @@ Table of Contents
MQueryDisputeResponse
+
+ MQueryIntentListRequest
+
+
+
+ MQueryIntentListResponse
+
+
+
+ MQueryIntentRequest
+
+
+
+ MQueryIntentResponse
+
+
MQueryParamsRequest
@@ -768,6 +804,14 @@ Table of Contents
ixo/claims/v1beta1/tx.proto
+
+ escrow_account |
+ string |
+ |
+ escrow_account is the escrow account address for this collection created at
+collection creation, current purpose is to transfer payments to escrow
+account for GUARANTEED payments through intents |
+
+
+
+ intents |
+ CollectionIntentOptions |
+ |
+ intents is the option for intents for this collection (allow, deny,
+required) |
+
+
@@ -5477,16 +5570,117 @@ Evaluation
amount |
cosmos.base.v1beta1.Coin |
repeated |
- custom amount specified by evaluator for claim approval, if empty list then
-use default by Collection |
+ if both amount and cw20 amount are empty then use default by Collection
+custom amount specified by evaluator for claim approval |
+
+
+
+ cw20_payment |
+ CW20Payment |
+ repeated |
+ custom cw20 payments specified by evaluator for claim approval |
+
+
+
+
+
+
+
+
+
+ Intent
+ Intent defines the structure for a service agent's claim intent.
+
+
+
+
+ Field | Type | Label | Description |
+
+
+
+
+ id |
+ string |
+ |
+ id is the incremented internal id for the intent |
+
+
+
+ agent_did |
+ string |
+ |
+ The service agent's DID (Decentralized Identifier). |
+
+
+
+ agent_address |
+ string |
+ |
+ The service agent's address. |
+
+
+
+ collection_id |
+ string |
+ |
+ The id of the collection this intent is linked to. |
+
+
+
+ claim_id |
+ string |
+ |
+ claim_id (optional, set when claim is submitted) |
+
+
+
+ created_at |
+ google.protobuf.Timestamp |
+ |
+ The time the intent was created. |
+
+
+
+ expire_at |
+ google.protobuf.Timestamp |
+ |
+ Timeout period for the intent. If the claim is not submitted by this time,
+the intent expires. |
+
+
+
+ status |
+ IntentStatus |
+ |
+ Status of the intent (e.g., "ACTIVE" or "FULFILLED"). |
+
+
+
+ amount |
+ cosmos.base.v1beta1.Coin |
+ repeated |
+ The payment amount the agent intends to claim, if any. |
cw20_payment |
CW20Payment |
repeated |
- custom cw20 payments specified by evaluator for claim approval, if empty
-list then use default by Collection |
+ The CW20Payment amount the agent intends to claim, if any. |
+
+
+
+ from_address |
+ string |
+ |
+ the address the escrow payment came from |
+
+
+
+ escrow_address |
+ string |
+ |
+ the escrow account address |
@@ -5534,6 +5728,13 @@ Params
|
+
+ intent_sequence |
+ uint64 |
+ |
+ |
+
+
@@ -5587,6 +5788,15 @@ Payment
cw20 payments, can be empty or multiple |
+
+ is_oracle_payment |
+ bool |
+ |
+ boolean to indicate if the payment is for oracle payments, aka it will go
+through network fees split NOTE: if true the payment can only have amount
+values(Native coins), no cw20 payments allowed then |
+
+
@@ -5641,6 +5851,37 @@ Payments
+ CollectionIntentOptions
+
+
+
+ Name | Number | Description |
+
+
+
+
+ ALLOW |
+ 0 |
+ Allow: Intents can be made for claims, but claims can also be made without
+intents. |
+
+
+
+ DENY |
+ 1 |
+ Deny: Intents cannot be made for claims for the collection. |
+
+
+
+ REQUIRED |
+ 2 |
+ Required: Claims cannot be made without an associated intent. An intent is
+mandatory before a claim can be submitted. |
+
+
+
+
+
CollectionState
@@ -5711,6 +5952,39 @@ EvaluationStatus
+ IntentStatus
+
+
+
+ Name | Number | Description |
+
+
+
+
+ ACTIVE |
+ 0 |
+ Active: Intent is created and active, payments have been transferred to
+escrow if there is any |
+
+
+
+ FULFILLED |
+ 1 |
+ Fulfilled: Intent is fulfilled, was used to create a claim and funds will
+be released on claim APPROVAL, or funds will be reverted on claim REJECTION
+or DISPUTE |
+
+
+
+ EXPIRED |
+ 2 |
+ Expired: Intent has expired, payments have been transferred back out of
+escrow |
+
+
+
+
+
PaymentStatus
@@ -5728,37 +6002,37 @@ PaymentStatus
PROMISED |
1 |
- agent is contracted to receive payment |
+ Promised: Agent is contracted to receive payment |
AUTHORIZED |
2 |
- authz set up, no guarantee |
+ Authorized: Authz set up, no guarantee |
GUARANTEED |
3 |
- escrow set up with funds blocked |
+ Guaranteed: Escrow set up with funds blocked |
PAID |
4 |
- |
+ Paid: Funds have been paid |
FAILED |
5 |
- |
+ Failed: Payment failed, most probably due to insufficient funds |
DISPUTED_PAYMENT |
6 |
- |
+ DisputedPayment: Payment disputed |
@@ -5958,6 +6232,30 @@ SubmitClaimConstraints
|
+
+ max_amount |
+ cosmos.base.v1beta1.Coin |
+ repeated |
+ custom max_amount allowed to be specified by service agent for claim
+approval, if empty then no custom amount is allowed |
+
+
+
+ max_cw20_payment |
+ CW20Payment |
+ repeated |
+ custom max_cw20_payment allowed to be specified by service agent for claim
+approval, if empty then no custom amount is allowed |
+
+
+
+ intent_duration_ns |
+ google.protobuf.Duration |
+ |
+ intent_duration_ns is the duration for which the intent is active, after
+which it will expire (in nanoseconds) |
+
+
@@ -6236,8 +6534,8 @@ CollectionUpdatedEvent
- PaymentWithdrawCreatedEvent
- ClaimDisputedEvent is an event triggered on a Claim dispute
+ IntentSubmittedEvent
+ IntentSubmittedEvent is an event triggered on an Intent submission
@@ -6247,8 +6545,8 @@ PaymentWithdrawCreatedEv
- withdraw |
- WithdrawPaymentConstraints |
+ intent |
+ Intent |
|
|
@@ -6260,8 +6558,8 @@ PaymentWithdrawCreatedEv
- PaymentWithdrawnEvent
-
ClaimDisputedEvent is an event triggered on a Claim dispute
+ IntentUpdatedEvent
+ IntentUpdatedEvent is an event triggered on an Intent update
@@ -6271,8 +6569,8 @@ PaymentWithdrawnEvent
- withdraw |
- WithdrawPaymentConstraints |
+ intent |
+ Intent |
|
|
@@ -6284,22 +6582,8 @@ PaymentWithdrawnEvent
-
-
-
-
-
-
-
-
-
-
ixo/claims/v1beta1/genesis.proto
Top
-
-
-
-
- GenesisState
- GenesisState defines the claims module's genesis state.
+ PaymentWithdrawCreatedEvent
+ ClaimDisputedEvent is an event triggered on a Claim dispute
+
+
+
+
+
+ PaymentWithdrawnEvent
+ ClaimDisputedEvent is an event triggered on a Claim dispute
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
ixo/claims/v1beta1/genesis.proto
Top
+
+
+
+
+ GenesisState
+ GenesisState defines the claims module's genesis state.
+
+
+
+
+ Field | Type | Label | Description |
+
+
+
+
+ params |
+ Params |
+ |
+ |
+
+
+
+ collections |
+ Collection |
+ repeated |
+ |
@@ -6336,6 +6682,13 @@ GenesisState
|
+
+ intents |
+ Intent |
+ repeated |
+ |
+
+
@@ -6666,6 +7019,123 @@ QueryDisputeResponse
+ QueryIntentListRequest
+
+
+
+
+
+
+
+
+
+ QueryIntentListResponse
+
+
+
+
+
+
+
+
+
+ QueryIntentRequest
+
+
+
+
+
+ Field | Type | Label | Description |
+
+
+
+
+ id |
+ string |
+ |
+ |
+
+
+
+ agentAddress |
+ string |
+ |
+ |
+
+
+
+ collectionId |
+ string |
+ |
+ |
+
+
+
+
+
+
+
+
+
+ QueryIntentResponse
+
+
+
+
+
+ Field | Type | Label | Description |
+
+
+
+
+ intent |
+ Intent |
+ |
+ |
+
+
+
+
+
+
+
+
+
QueryParamsRequest
@@ -6760,6 +7230,20 @@ Query
|
+
+ Intent |
+ QueryIntentRequest |
+ QueryIntentResponse |
+ |
+
+
+
+ IntentList |
+ QueryIntentListRequest |
+ QueryIntentListResponse |
+ |
+
+
@@ -6848,6 +7332,26 @@ Methods with HTTP bindings
+
+
+
+ Intent |
+ GET |
+ /ixo/intent/{agentAddress}/{collectionId}/{id} |
+ |
+
+
+
+
+
+
+ IntentList |
+ GET |
+ /ixo/intent |
+ |
+
+
+
@@ -6860,6 +7364,92 @@ ixo/claims/v1beta1/tx.proto
MsgClaimIntent
+
+
+
+
+
+ Field | Type | Label | Description |
+
+
+
+
+ agent_did |
+ string |
+ |
+ The service agent's DID (Decentralized Identifier). |
+
+
+
+ agent_address |
+ string |
+ |
+ The service agent's address (who submits this message). |
+
+
+
+ collection_id |
+ string |
+ |
+ The id of the collection this intent is linked to. |
+
+
+
+ amount |
+ cosmos.base.v1beta1.Coin |
+ repeated |
+ NOTE: if both amount and cw20 amount are empty then default by Collection
+is used (APPROVAL payment). The desired claim amount, if any. |
+
+
+
+ cw20_payment |
+ CW20Payment |
+ repeated |
+ NOTE: if both amount and cw20 amount are empty then default by Collection
+is used (APPROVAL payment). The custom CW20 payment, if any. |
+
+
+
+
+
+
+
+
+
+ MsgClaimIntentResponse
+ MsgClaimIntentResponse defines the response after submitting an intent.
+
+
+
+
+ Field | Type | Label | Description |
+
+
+
+
+ intent_id |
+ string |
+ |
+ Resulting intent id. |
+
+
+
+ expire_at |
+ google.protobuf.Timestamp |
+ |
+ Timeout period for the intent. If the claim is not submitted by this time,
+the intent expires. |
+
+
+
+
+
+
+
+
+
MsgCreateCollection
@@ -6928,6 +7518,14 @@ MsgCreateCollection
rejection
+
+ intents |
+ CollectionIntentOptions |
+ |
+ intents is the option for intents for this collection (allow, deny,
+required) |
+
+
@@ -7082,16 +7680,16 @@ MsgEvaluateClaim
amount |
cosmos.base.v1beta1.Coin |
repeated |
- custom amount specified by evaluator for claim approval, if empty list then
-use default by Collection |
+ NOTE: if both amount and cw20 amount are empty then use collection default
+custom amount specified by evaluator for claim approval |
cw20_payment |
CW20Payment |
repeated |
- custom cw20 payments specified by evaluator for claim approval, if empty
-list then use default by Collection |
+ NOTE: if both amount and cw20 amount are empty then use collection default
+custom cw20 payments specified by evaluator for claim approval |
@@ -7153,6 +7751,33 @@ MsgSubmitClaim
admin address used to sign this message, validated against Collection Admin |
+
+ use_intent |
+ bool |
+ |
+ use_intent is the option for using intent for this claim if it exists and
+is active. NOTE: if use_intent is true then amount and cw20 amount are
+ignored and overriden with intent amounts. NOTE: if use_intent is true and
+there is no active intent then will error |
+
+
+
+ amount |
+ cosmos.base.v1beta1.Coin |
+ repeated |
+ NOTE: if both amount and cw20_payment are empty then use default by
+Collection custom amount specified by service agent for claim approval |
+
+
+
+ cw20_payment |
+ CW20Payment |
+ repeated |
+ NOTE: if both amount and cw20 amount are empty then use default by
+Collection custom cw20 payments specified by service agent for claim
+approval |
+
+
@@ -7220,6 +7845,52 @@ MsgUpdateCollection
+ MsgUpdateCollectionIntents
+
+
+
+
+
+ Field | Type | Label | Description |
+
+
+
+
+ collection_id |
+ string |
+ |
+ collection_id indicates which Collection to update |
+
+
+
+ intents |
+ CollectionIntentOptions |
+ |
+ intents is the option for intents for this collection (allow, deny,
+required) |
+
+
+
+ admin_address |
+ string |
+ |
+ admin address used to sign this message, validated against Collection Admin |
+
+
+
+
+
+
+
+
+
+ MsgUpdateCollectionIntentsResponse
+
+
+
+
+
+
MsgUpdateCollectionPayments
@@ -7478,6 +8149,20 @@ Msg
|
+
+ UpdateCollectionIntents |
+ MsgUpdateCollectionIntents |
+ MsgUpdateCollectionIntentsResponse |
+ |
+
+
+
+ ClaimIntent |
+ MsgClaimIntent |
+ MsgClaimIntentResponse |
+ |
+
+
diff --git a/docs/core/proto-docs.json b/docs/core/proto-docs.json
index a46582cd..363f6e28 100755
--- a/docs/core/proto-docs.json
+++ b/docs/core/proto-docs.json
@@ -3968,6 +3968,29 @@
"hasMessages": true,
"hasServices": false,
"enums": [
+ {
+ "name": "CollectionIntentOptions",
+ "longName": "CollectionIntentOptions",
+ "fullName": "ixo.claims.v1beta1.CollectionIntentOptions",
+ "description": "",
+ "values": [
+ {
+ "name": "ALLOW",
+ "number": "0",
+ "description": "Allow: Intents can be made for claims, but claims can also be made without\nintents."
+ },
+ {
+ "name": "DENY",
+ "number": "1",
+ "description": "Deny: Intents cannot be made for claims for the collection."
+ },
+ {
+ "name": "REQUIRED",
+ "number": "2",
+ "description": "Required: Claims cannot be made without an associated intent. An intent is\nmandatory before a claim can be submitted."
+ }
+ ]
+ },
{
"name": "CollectionState",
"longName": "CollectionState",
@@ -4024,6 +4047,29 @@
}
]
},
+ {
+ "name": "IntentStatus",
+ "longName": "IntentStatus",
+ "fullName": "ixo.claims.v1beta1.IntentStatus",
+ "description": "",
+ "values": [
+ {
+ "name": "ACTIVE",
+ "number": "0",
+ "description": "Active: Intent is created and active, payments have been transferred to\nescrow if there is any"
+ },
+ {
+ "name": "FULFILLED",
+ "number": "1",
+ "description": "Fulfilled: Intent is fulfilled, was used to create a claim and funds will\nbe released on claim APPROVAL, or funds will be reverted on claim REJECTION\nor DISPUTE"
+ },
+ {
+ "name": "EXPIRED",
+ "number": "2",
+ "description": "Expired: Intent has expired, payments have been transferred back out of\nescrow"
+ }
+ ]
+ },
{
"name": "PaymentStatus",
"longName": "PaymentStatus",
@@ -4038,32 +4084,32 @@
{
"name": "PROMISED",
"number": "1",
- "description": "agent is contracted to receive payment"
+ "description": "Promised: Agent is contracted to receive payment"
},
{
"name": "AUTHORIZED",
"number": "2",
- "description": "authz set up, no guarantee"
+ "description": "Authorized: Authz set up, no guarantee"
},
{
"name": "GUARANTEED",
"number": "3",
- "description": "escrow set up with funds blocked"
+ "description": "Guaranteed: Escrow set up with funds blocked"
},
{
"name": "PAID",
"number": "4",
- "description": ""
+ "description": "Paid: Funds have been paid"
},
{
"name": "FAILED",
"number": "5",
- "description": ""
+ "description": "Failed: Payment failed, most probably due to insufficient funds"
},
{
"name": "DISPUTED_PAYMENT",
"number": "6",
- "description": ""
+ "description": "DisputedPayment: Payment disputed"
}
]
},
@@ -4218,7 +4264,7 @@
},
{
"name": "payments_status",
- "description": "",
+ "description": "payments_status is the status of the payments for the claim",
"label": "",
"type": "ClaimPayments",
"longType": "ClaimPayments",
@@ -4227,6 +4273,42 @@
"isoneof": false,
"oneofdecl": "",
"defaultValue": ""
+ },
+ {
+ "name": "use_intent",
+ "description": "intent_id is the id of the intent for this claim, if any",
+ "label": "",
+ "type": "bool",
+ "longType": "bool",
+ "fullType": "bool",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "amount",
+ "description": "NOTE: if both amount and cw20 amount are empty then use default by\nCollection custom amount specified by service agent for claim approval",
+ "label": "repeated",
+ "type": "Coin",
+ "longType": "cosmos.base.v1beta1.Coin",
+ "fullType": "cosmos.base.v1beta1.Coin",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "cw20_payment",
+ "description": "NOTE: if both amount and cw20 amount are empty then use default by\nCollection custom cw20 payments specified by service agent for claim\napproval",
+ "label": "repeated",
+ "type": "CW20Payment",
+ "longType": "CW20Payment",
+ "fullType": "ixo.claims.v1beta1.CW20Payment",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
}
]
},
@@ -4491,6 +4573,30 @@
"isoneof": false,
"oneofdecl": "",
"defaultValue": ""
+ },
+ {
+ "name": "escrow_account",
+ "description": "escrow_account is the escrow account address for this collection created at\ncollection creation, current purpose is to transfer payments to escrow\naccount for GUARANTEED payments through intents",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "intents",
+ "description": "intents is the option for intents for this collection (allow, deny,\nrequired)",
+ "label": "",
+ "type": "CollectionIntentOptions",
+ "longType": "CollectionIntentOptions",
+ "fullType": "ixo.claims.v1beta1.CollectionIntentOptions",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
}
]
},
@@ -4770,7 +4876,139 @@
},
{
"name": "amount",
- "description": "custom amount specified by evaluator for claim approval, if empty list then\nuse default by Collection",
+ "description": "if both amount and cw20 amount are empty then use default by Collection\ncustom amount specified by evaluator for claim approval",
+ "label": "repeated",
+ "type": "Coin",
+ "longType": "cosmos.base.v1beta1.Coin",
+ "fullType": "cosmos.base.v1beta1.Coin",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "cw20_payment",
+ "description": "custom cw20 payments specified by evaluator for claim approval",
+ "label": "repeated",
+ "type": "CW20Payment",
+ "longType": "CW20Payment",
+ "fullType": "ixo.claims.v1beta1.CW20Payment",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ }
+ ]
+ },
+ {
+ "name": "Intent",
+ "longName": "Intent",
+ "fullName": "ixo.claims.v1beta1.Intent",
+ "description": "Intent defines the structure for a service agent's claim intent.",
+ "hasExtensions": false,
+ "hasFields": true,
+ "hasOneofs": false,
+ "extensions": [],
+ "fields": [
+ {
+ "name": "id",
+ "description": "id is the incremented internal id for the intent",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "agent_did",
+ "description": "The service agent's DID (Decentralized Identifier).",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "agent_address",
+ "description": "The service agent's address.",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "collection_id",
+ "description": "The id of the collection this intent is linked to.",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "claim_id",
+ "description": "claim_id (optional, set when claim is submitted)",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "created_at",
+ "description": "The time the intent was created.",
+ "label": "",
+ "type": "Timestamp",
+ "longType": "google.protobuf.Timestamp",
+ "fullType": "google.protobuf.Timestamp",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "expire_at",
+ "description": "Timeout period for the intent. If the claim is not submitted by this time,\nthe intent expires.",
+ "label": "",
+ "type": "Timestamp",
+ "longType": "google.protobuf.Timestamp",
+ "fullType": "google.protobuf.Timestamp",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "status",
+ "description": "Status of the intent (e.g., \"ACTIVE\" or \"FULFILLED\").",
+ "label": "",
+ "type": "IntentStatus",
+ "longType": "IntentStatus",
+ "fullType": "ixo.claims.v1beta1.IntentStatus",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "amount",
+ "description": "The payment amount the agent intends to claim, if any.",
"label": "repeated",
"type": "Coin",
"longType": "cosmos.base.v1beta1.Coin",
@@ -4782,7 +5020,7 @@
},
{
"name": "cw20_payment",
- "description": "custom cw20 payments specified by evaluator for claim approval, if empty\nlist then use default by Collection",
+ "description": "The CW20Payment amount the agent intends to claim, if any.",
"label": "repeated",
"type": "CW20Payment",
"longType": "CW20Payment",
@@ -4791,6 +5029,30 @@
"isoneof": false,
"oneofdecl": "",
"defaultValue": ""
+ },
+ {
+ "name": "from_address",
+ "description": "the address the escrow payment came from",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "escrow_address",
+ "description": "the escrow account address",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
}
]
},
@@ -4851,6 +5113,18 @@
"isoneof": false,
"oneofdecl": "",
"defaultValue": ""
+ },
+ {
+ "name": "intent_sequence",
+ "description": "",
+ "label": "",
+ "type": "uint64",
+ "longType": "uint64",
+ "fullType": "uint64",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
}
]
},
@@ -4923,6 +5197,18 @@
"isoneof": false,
"oneofdecl": "",
"defaultValue": ""
+ },
+ {
+ "name": "is_oracle_payment",
+ "description": "boolean to indicate if the payment is for oracle payments, aka it will go\nthrough network fees split NOTE: if true the payment can only have amount\nvalues(Native coins), no cw20 payments allowed then",
+ "label": "",
+ "type": "bool",
+ "longType": "bool",
+ "fullType": "bool",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
}
]
},
@@ -5189,27 +5475,63 @@
"isoneof": false,
"oneofdecl": "",
"defaultValue": ""
- }
- ]
- },
- {
- "name": "WithdrawPaymentAuthorization",
- "longName": "WithdrawPaymentAuthorization",
- "fullName": "ixo.claims.v1beta1.WithdrawPaymentAuthorization",
- "description": "",
- "hasExtensions": false,
- "hasFields": true,
- "hasOneofs": false,
- "extensions": [],
- "fields": [
+ },
{
- "name": "admin",
- "description": "address of admin",
- "label": "",
- "type": "string",
- "longType": "string",
- "fullType": "string",
- "ismap": false,
+ "name": "max_amount",
+ "description": "custom max_amount allowed to be specified by service agent for claim\napproval, if empty then no custom amount is allowed",
+ "label": "repeated",
+ "type": "Coin",
+ "longType": "cosmos.base.v1beta1.Coin",
+ "fullType": "cosmos.base.v1beta1.Coin",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "max_cw20_payment",
+ "description": "custom max_cw20_payment allowed to be specified by service agent for claim\napproval, if empty then no custom amount is allowed",
+ "label": "repeated",
+ "type": "CW20Payment",
+ "longType": "CW20Payment",
+ "fullType": "ixo.claims.v1beta1.CW20Payment",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "intent_duration_ns",
+ "description": "intent_duration_ns is the duration for which the intent is active, after\nwhich it will expire (in nanoseconds)",
+ "label": "",
+ "type": "Duration",
+ "longType": "google.protobuf.Duration",
+ "fullType": "google.protobuf.Duration",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ }
+ ]
+ },
+ {
+ "name": "WithdrawPaymentAuthorization",
+ "longName": "WithdrawPaymentAuthorization",
+ "fullName": "ixo.claims.v1beta1.WithdrawPaymentAuthorization",
+ "description": "",
+ "hasExtensions": false,
+ "hasFields": true,
+ "hasOneofs": false,
+ "extensions": [],
+ "fields": [
+ {
+ "name": "admin",
+ "description": "address of admin",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
"isoneof": false,
"oneofdecl": "",
"defaultValue": ""
@@ -5506,6 +5828,54 @@
}
]
},
+ {
+ "name": "IntentSubmittedEvent",
+ "longName": "IntentSubmittedEvent",
+ "fullName": "ixo.claims.v1beta1.IntentSubmittedEvent",
+ "description": "IntentSubmittedEvent is an event triggered on an Intent submission",
+ "hasExtensions": false,
+ "hasFields": true,
+ "hasOneofs": false,
+ "extensions": [],
+ "fields": [
+ {
+ "name": "intent",
+ "description": "",
+ "label": "",
+ "type": "Intent",
+ "longType": "Intent",
+ "fullType": "ixo.claims.v1beta1.Intent",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ }
+ ]
+ },
+ {
+ "name": "IntentUpdatedEvent",
+ "longName": "IntentUpdatedEvent",
+ "fullName": "ixo.claims.v1beta1.IntentUpdatedEvent",
+ "description": "IntentUpdatedEvent is an event triggered on an Intent update",
+ "hasExtensions": false,
+ "hasFields": true,
+ "hasOneofs": false,
+ "extensions": [],
+ "fields": [
+ {
+ "name": "intent",
+ "description": "",
+ "label": "",
+ "type": "Intent",
+ "longType": "Intent",
+ "fullType": "ixo.claims.v1beta1.Intent",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ }
+ ]
+ },
{
"name": "PaymentWithdrawCreatedEvent",
"longName": "PaymentWithdrawCreatedEvent",
@@ -5625,6 +5995,18 @@
"isoneof": false,
"oneofdecl": "",
"defaultValue": ""
+ },
+ {
+ "name": "intents",
+ "description": "",
+ "label": "repeated",
+ "type": "Intent",
+ "longType": "Intent",
+ "fullType": "ixo.claims.v1beta1.Intent",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
}
]
}
@@ -5966,6 +6348,138 @@
}
]
},
+ {
+ "name": "QueryIntentListRequest",
+ "longName": "QueryIntentListRequest",
+ "fullName": "ixo.claims.v1beta1.QueryIntentListRequest",
+ "description": "",
+ "hasExtensions": false,
+ "hasFields": true,
+ "hasOneofs": false,
+ "extensions": [],
+ "fields": [
+ {
+ "name": "pagination",
+ "description": "",
+ "label": "",
+ "type": "PageRequest",
+ "longType": "cosmos.base.query.v1beta1.PageRequest",
+ "fullType": "cosmos.base.query.v1beta1.PageRequest",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ }
+ ]
+ },
+ {
+ "name": "QueryIntentListResponse",
+ "longName": "QueryIntentListResponse",
+ "fullName": "ixo.claims.v1beta1.QueryIntentListResponse",
+ "description": "",
+ "hasExtensions": false,
+ "hasFields": true,
+ "hasOneofs": false,
+ "extensions": [],
+ "fields": [
+ {
+ "name": "intents",
+ "description": "",
+ "label": "repeated",
+ "type": "Intent",
+ "longType": "Intent",
+ "fullType": "ixo.claims.v1beta1.Intent",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "pagination",
+ "description": "",
+ "label": "",
+ "type": "PageResponse",
+ "longType": "cosmos.base.query.v1beta1.PageResponse",
+ "fullType": "cosmos.base.query.v1beta1.PageResponse",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ }
+ ]
+ },
+ {
+ "name": "QueryIntentRequest",
+ "longName": "QueryIntentRequest",
+ "fullName": "ixo.claims.v1beta1.QueryIntentRequest",
+ "description": "",
+ "hasExtensions": false,
+ "hasFields": true,
+ "hasOneofs": false,
+ "extensions": [],
+ "fields": [
+ {
+ "name": "id",
+ "description": "",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "agentAddress",
+ "description": "",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "collectionId",
+ "description": "",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ }
+ ]
+ },
+ {
+ "name": "QueryIntentResponse",
+ "longName": "QueryIntentResponse",
+ "fullName": "ixo.claims.v1beta1.QueryIntentResponse",
+ "description": "",
+ "hasExtensions": false,
+ "hasFields": true,
+ "hasOneofs": false,
+ "extensions": [],
+ "fields": [
+ {
+ "name": "intent",
+ "description": "",
+ "label": "",
+ "type": "Intent",
+ "longType": "Intent",
+ "fullType": "ixo.claims.v1beta1.Intent",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ }
+ ]
+ },
{
"name": "QueryParamsRequest",
"longName": "QueryParamsRequest",
@@ -6162,6 +6676,50 @@
]
}
}
+ },
+ {
+ "name": "Intent",
+ "description": "",
+ "requestType": "QueryIntentRequest",
+ "requestLongType": "QueryIntentRequest",
+ "requestFullType": "ixo.claims.v1beta1.QueryIntentRequest",
+ "requestStreaming": false,
+ "responseType": "QueryIntentResponse",
+ "responseLongType": "QueryIntentResponse",
+ "responseFullType": "ixo.claims.v1beta1.QueryIntentResponse",
+ "responseStreaming": false,
+ "options": {
+ "google.api.http": {
+ "rules": [
+ {
+ "method": "GET",
+ "pattern": "/ixo/intent/{agentAddress}/{collectionId}/{id}"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "name": "IntentList",
+ "description": "",
+ "requestType": "QueryIntentListRequest",
+ "requestLongType": "QueryIntentListRequest",
+ "requestFullType": "ixo.claims.v1beta1.QueryIntentListRequest",
+ "requestStreaming": false,
+ "responseType": "QueryIntentListResponse",
+ "responseLongType": "QueryIntentListResponse",
+ "responseFullType": "ixo.claims.v1beta1.QueryIntentListResponse",
+ "responseStreaming": false,
+ "options": {
+ "google.api.http": {
+ "rules": [
+ {
+ "method": "GET",
+ "pattern": "/ixo/intent"
+ }
+ ]
+ }
+ }
}
]
}
@@ -6178,6 +6736,114 @@
"enums": [],
"extensions": [],
"messages": [
+ {
+ "name": "MsgClaimIntent",
+ "longName": "MsgClaimIntent",
+ "fullName": "ixo.claims.v1beta1.MsgClaimIntent",
+ "description": "",
+ "hasExtensions": false,
+ "hasFields": true,
+ "hasOneofs": false,
+ "extensions": [],
+ "fields": [
+ {
+ "name": "agent_did",
+ "description": "The service agent's DID (Decentralized Identifier).",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "agent_address",
+ "description": "The service agent's address (who submits this message).",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "collection_id",
+ "description": "The id of the collection this intent is linked to.",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "amount",
+ "description": "NOTE: if both amount and cw20 amount are empty then default by Collection\nis used (APPROVAL payment). The desired claim amount, if any.",
+ "label": "repeated",
+ "type": "Coin",
+ "longType": "cosmos.base.v1beta1.Coin",
+ "fullType": "cosmos.base.v1beta1.Coin",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "cw20_payment",
+ "description": "NOTE: if both amount and cw20 amount are empty then default by Collection\nis used (APPROVAL payment). The custom CW20 payment, if any.",
+ "label": "repeated",
+ "type": "CW20Payment",
+ "longType": "CW20Payment",
+ "fullType": "ixo.claims.v1beta1.CW20Payment",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ }
+ ]
+ },
+ {
+ "name": "MsgClaimIntentResponse",
+ "longName": "MsgClaimIntentResponse",
+ "fullName": "ixo.claims.v1beta1.MsgClaimIntentResponse",
+ "description": "MsgClaimIntentResponse defines the response after submitting an intent.",
+ "hasExtensions": false,
+ "hasFields": true,
+ "hasOneofs": false,
+ "extensions": [],
+ "fields": [
+ {
+ "name": "intent_id",
+ "description": "Resulting intent id.",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "expire_at",
+ "description": "Timeout period for the intent. If the claim is not submitted by this time,\nthe intent expires.",
+ "label": "",
+ "type": "Timestamp",
+ "longType": "google.protobuf.Timestamp",
+ "fullType": "google.protobuf.Timestamp",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ }
+ ]
+ },
{
"name": "MsgCreateCollection",
"longName": "MsgCreateCollection",
@@ -6283,6 +6949,18 @@
"isoneof": false,
"oneofdecl": "",
"defaultValue": ""
+ },
+ {
+ "name": "intents",
+ "description": "intents is the option for intents for this collection (allow, deny,\nrequired)",
+ "label": "",
+ "type": "CollectionIntentOptions",
+ "longType": "CollectionIntentOptions",
+ "fullType": "ixo.claims.v1beta1.CollectionIntentOptions",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
}
]
},
@@ -6500,7 +7178,7 @@
},
{
"name": "amount",
- "description": "custom amount specified by evaluator for claim approval, if empty list then\nuse default by Collection",
+ "description": "NOTE: if both amount and cw20 amount are empty then use collection default\ncustom amount specified by evaluator for claim approval",
"label": "repeated",
"type": "Coin",
"longType": "cosmos.base.v1beta1.Coin",
@@ -6512,7 +7190,7 @@
},
{
"name": "cw20_payment",
- "description": "custom cw20 payments specified by evaluator for claim approval, if empty\nlist then use default by Collection",
+ "description": "NOTE: if both amount and cw20 amount are empty then use collection default\ncustom cw20 payments specified by evaluator for claim approval",
"label": "repeated",
"type": "CW20Payment",
"longType": "CW20Payment",
@@ -6604,6 +7282,42 @@
"isoneof": false,
"oneofdecl": "",
"defaultValue": ""
+ },
+ {
+ "name": "use_intent",
+ "description": "use_intent is the option for using intent for this claim if it exists and\nis active. NOTE: if use_intent is true then amount and cw20 amount are\nignored and overriden with intent amounts. NOTE: if use_intent is true and\nthere is no active intent then will error",
+ "label": "",
+ "type": "bool",
+ "longType": "bool",
+ "fullType": "bool",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "amount",
+ "description": "NOTE: if both amount and cw20_payment are empty then use default by\nCollection custom amount specified by service agent for claim approval",
+ "label": "repeated",
+ "type": "Coin",
+ "longType": "cosmos.base.v1beta1.Coin",
+ "fullType": "cosmos.base.v1beta1.Coin",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "cw20_payment",
+ "description": "NOTE: if both amount and cw20 amount are empty then use default by\nCollection custom cw20 payments specified by service agent for claim\napproval",
+ "label": "repeated",
+ "type": "CW20Payment",
+ "longType": "CW20Payment",
+ "fullType": "ixo.claims.v1beta1.CW20Payment",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
}
]
},
@@ -6689,6 +7403,65 @@
"extensions": [],
"fields": []
},
+ {
+ "name": "MsgUpdateCollectionIntents",
+ "longName": "MsgUpdateCollectionIntents",
+ "fullName": "ixo.claims.v1beta1.MsgUpdateCollectionIntents",
+ "description": "",
+ "hasExtensions": false,
+ "hasFields": true,
+ "hasOneofs": false,
+ "extensions": [],
+ "fields": [
+ {
+ "name": "collection_id",
+ "description": "collection_id indicates which Collection to update",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "intents",
+ "description": "intents is the option for intents for this collection (allow, deny,\nrequired)",
+ "label": "",
+ "type": "CollectionIntentOptions",
+ "longType": "CollectionIntentOptions",
+ "fullType": "ixo.claims.v1beta1.CollectionIntentOptions",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ },
+ {
+ "name": "admin_address",
+ "description": "admin address used to sign this message, validated against Collection Admin",
+ "label": "",
+ "type": "string",
+ "longType": "string",
+ "fullType": "string",
+ "ismap": false,
+ "isoneof": false,
+ "oneofdecl": "",
+ "defaultValue": ""
+ }
+ ]
+ },
+ {
+ "name": "MsgUpdateCollectionIntentsResponse",
+ "longName": "MsgUpdateCollectionIntentsResponse",
+ "fullName": "ixo.claims.v1beta1.MsgUpdateCollectionIntentsResponse",
+ "description": "",
+ "hasExtensions": false,
+ "hasFields": false,
+ "hasOneofs": false,
+ "extensions": [],
+ "fields": []
+ },
{
"name": "MsgUpdateCollectionPayments",
"longName": "MsgUpdateCollectionPayments",
@@ -7053,6 +7826,30 @@
"responseLongType": "MsgUpdateCollectionPaymentsResponse",
"responseFullType": "ixo.claims.v1beta1.MsgUpdateCollectionPaymentsResponse",
"responseStreaming": false
+ },
+ {
+ "name": "UpdateCollectionIntents",
+ "description": "",
+ "requestType": "MsgUpdateCollectionIntents",
+ "requestLongType": "MsgUpdateCollectionIntents",
+ "requestFullType": "ixo.claims.v1beta1.MsgUpdateCollectionIntents",
+ "requestStreaming": false,
+ "responseType": "MsgUpdateCollectionIntentsResponse",
+ "responseLongType": "MsgUpdateCollectionIntentsResponse",
+ "responseFullType": "ixo.claims.v1beta1.MsgUpdateCollectionIntentsResponse",
+ "responseStreaming": false
+ },
+ {
+ "name": "ClaimIntent",
+ "description": "",
+ "requestType": "MsgClaimIntent",
+ "requestLongType": "MsgClaimIntent",
+ "requestFullType": "ixo.claims.v1beta1.MsgClaimIntent",
+ "requestStreaming": false,
+ "responseType": "MsgClaimIntentResponse",
+ "responseLongType": "MsgClaimIntentResponse",
+ "responseFullType": "ixo.claims.v1beta1.MsgClaimIntentResponse",
+ "responseStreaming": false
}
]
}
diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md
index 165bd2dc..4bda5960 100755
--- a/docs/core/proto-docs.md
+++ b/docs/core/proto-docs.md
@@ -99,12 +99,15 @@
- [Dispute](#ixo.claims.v1beta1.Dispute)
- [DisputeData](#ixo.claims.v1beta1.DisputeData)
- [Evaluation](#ixo.claims.v1beta1.Evaluation)
+ - [Intent](#ixo.claims.v1beta1.Intent)
- [Params](#ixo.claims.v1beta1.Params)
- [Payment](#ixo.claims.v1beta1.Payment)
- [Payments](#ixo.claims.v1beta1.Payments)
+ - [CollectionIntentOptions](#ixo.claims.v1beta1.CollectionIntentOptions)
- [CollectionState](#ixo.claims.v1beta1.CollectionState)
- [EvaluationStatus](#ixo.claims.v1beta1.EvaluationStatus)
+ - [IntentStatus](#ixo.claims.v1beta1.IntentStatus)
- [PaymentStatus](#ixo.claims.v1beta1.PaymentStatus)
- [PaymentType](#ixo.claims.v1beta1.PaymentType)
@@ -123,6 +126,8 @@
- [ClaimUpdatedEvent](#ixo.claims.v1beta1.ClaimUpdatedEvent)
- [CollectionCreatedEvent](#ixo.claims.v1beta1.CollectionCreatedEvent)
- [CollectionUpdatedEvent](#ixo.claims.v1beta1.CollectionUpdatedEvent)
+ - [IntentSubmittedEvent](#ixo.claims.v1beta1.IntentSubmittedEvent)
+ - [IntentUpdatedEvent](#ixo.claims.v1beta1.IntentUpdatedEvent)
- [PaymentWithdrawCreatedEvent](#ixo.claims.v1beta1.PaymentWithdrawCreatedEvent)
- [PaymentWithdrawnEvent](#ixo.claims.v1beta1.PaymentWithdrawnEvent)
@@ -142,12 +147,18 @@
- [QueryDisputeListResponse](#ixo.claims.v1beta1.QueryDisputeListResponse)
- [QueryDisputeRequest](#ixo.claims.v1beta1.QueryDisputeRequest)
- [QueryDisputeResponse](#ixo.claims.v1beta1.QueryDisputeResponse)
+ - [QueryIntentListRequest](#ixo.claims.v1beta1.QueryIntentListRequest)
+ - [QueryIntentListResponse](#ixo.claims.v1beta1.QueryIntentListResponse)
+ - [QueryIntentRequest](#ixo.claims.v1beta1.QueryIntentRequest)
+ - [QueryIntentResponse](#ixo.claims.v1beta1.QueryIntentResponse)
- [QueryParamsRequest](#ixo.claims.v1beta1.QueryParamsRequest)
- [QueryParamsResponse](#ixo.claims.v1beta1.QueryParamsResponse)
- [Query](#ixo.claims.v1beta1.Query)
- [ixo/claims/v1beta1/tx.proto](#ixo/claims/v1beta1/tx.proto)
+ - [MsgClaimIntent](#ixo.claims.v1beta1.MsgClaimIntent)
+ - [MsgClaimIntentResponse](#ixo.claims.v1beta1.MsgClaimIntentResponse)
- [MsgCreateCollection](#ixo.claims.v1beta1.MsgCreateCollection)
- [MsgCreateCollectionResponse](#ixo.claims.v1beta1.MsgCreateCollectionResponse)
- [MsgDisputeClaim](#ixo.claims.v1beta1.MsgDisputeClaim)
@@ -158,6 +169,8 @@
- [MsgSubmitClaimResponse](#ixo.claims.v1beta1.MsgSubmitClaimResponse)
- [MsgUpdateCollectionDates](#ixo.claims.v1beta1.MsgUpdateCollectionDates)
- [MsgUpdateCollectionDatesResponse](#ixo.claims.v1beta1.MsgUpdateCollectionDatesResponse)
+ - [MsgUpdateCollectionIntents](#ixo.claims.v1beta1.MsgUpdateCollectionIntents)
+ - [MsgUpdateCollectionIntentsResponse](#ixo.claims.v1beta1.MsgUpdateCollectionIntentsResponse)
- [MsgUpdateCollectionPayments](#ixo.claims.v1beta1.MsgUpdateCollectionPayments)
- [MsgUpdateCollectionPaymentsResponse](#ixo.claims.v1beta1.MsgUpdateCollectionPaymentsResponse)
- [MsgUpdateCollectionState](#ixo.claims.v1beta1.MsgUpdateCollectionState)
@@ -1810,7 +1823,10 @@ Msg defines the bonds Msg service.
| submission_date | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | submissionDate is the date and time that the claim was submitted on-chain |
| claim_id | [string](#string) | | claimID is the unique identifier of the claim in the cid hash format |
| evaluation | [Evaluation](#ixo.claims.v1beta1.Evaluation) | | evaluation is the result of one or more claim evaluations |
-| payments_status | [ClaimPayments](#ixo.claims.v1beta1.ClaimPayments) | | |
+| payments_status | [ClaimPayments](#ixo.claims.v1beta1.ClaimPayments) | | payments_status is the status of the payments for the claim |
+| use_intent | [bool](#bool) | | intent_id is the id of the intent for this claim, if any |
+| amount | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | NOTE: if both amount and cw20 amount are empty then use default by Collection custom amount specified by service agent for claim approval |
+| cw20_payment | [CW20Payment](#ixo.claims.v1beta1.CW20Payment) | repeated | NOTE: if both amount and cw20 amount are empty then use default by Collection custom cw20 payments specified by service agent for claim approval |
@@ -1859,6 +1875,8 @@ Msg defines the bonds Msg service.
| payments | [Payments](#ixo.claims.v1beta1.Payments) | | payments is the amount paid for claim submission, evaluation, approval, or rejection |
| signer | [string](#string) | | signer address |
| invalidated | [uint64](#uint64) | | invalidated is the number of claims that have been evaluated as invalid (internally calculated) |
+| escrow_account | [string](#string) | | escrow_account is the escrow account address for this collection created at collection creation, current purpose is to transfer payments to escrow account for GUARANTEED payments through intents |
+| intents | [CollectionIntentOptions](#ixo.claims.v1beta1.CollectionIntentOptions) | | intents is the option for intents for this collection (allow, deny, required) |
@@ -1934,8 +1952,34 @@ Msg defines the bonds Msg service.
| reason | [uint32](#uint32) | | reason is the code expressed as an integer, for why the evaluation result was given (codes defined by evaluator) |
| verification_proof | [string](#string) | | verificationProof is the cid of the evaluation Verfiable Credential |
| evaluation_date | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | evaluationDate is the date and time that the claim evaluation was submitted on-chain |
-| amount | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | custom amount specified by evaluator for claim approval, if empty list then use default by Collection |
-| cw20_payment | [CW20Payment](#ixo.claims.v1beta1.CW20Payment) | repeated | custom cw20 payments specified by evaluator for claim approval, if empty list then use default by Collection |
+| amount | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | if both amount and cw20 amount are empty then use default by Collection custom amount specified by evaluator for claim approval |
+| cw20_payment | [CW20Payment](#ixo.claims.v1beta1.CW20Payment) | repeated | custom cw20 payments specified by evaluator for claim approval |
+
+
+
+
+
+
+
+
+### Intent
+Intent defines the structure for a service agent's claim intent.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| id | [string](#string) | | id is the incremented internal id for the intent |
+| agent_did | [string](#string) | | The service agent's DID (Decentralized Identifier). |
+| agent_address | [string](#string) | | The service agent's address. |
+| collection_id | [string](#string) | | The id of the collection this intent is linked to. |
+| claim_id | [string](#string) | | claim_id (optional, set when claim is submitted) |
+| created_at | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | The time the intent was created. |
+| expire_at | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | Timeout period for the intent. If the claim is not submitted by this time, the intent expires. |
+| status | [IntentStatus](#ixo.claims.v1beta1.IntentStatus) | | Status of the intent (e.g., "ACTIVE" or "FULFILLED"). |
+| amount | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | The payment amount the agent intends to claim, if any. |
+| cw20_payment | [CW20Payment](#ixo.claims.v1beta1.CW20Payment) | repeated | The CW20Payment amount the agent intends to claim, if any. |
+| from_address | [string](#string) | | the address the escrow payment came from |
+| escrow_address | [string](#string) | | the escrow account address |
@@ -1954,6 +1998,7 @@ Msg defines the bonds Msg service.
| ixo_account | [string](#string) | | |
| network_fee_percentage | [string](#string) | | |
| node_fee_percentage | [string](#string) | | |
+| intent_sequence | [uint64](#uint64) | | |
@@ -1973,6 +2018,7 @@ Msg defines the bonds Msg service.
| contract_1155_payment | [Contract1155Payment](#ixo.claims.v1beta1.Contract1155Payment) | | if empty(nil) then no contract payment, not allowed for Evaluation Payment |
| timeout_ns | [google.protobuf.Duration](#google.protobuf.Duration) | | timeout after claim/evaluation to create authZ for payment, if 0 then immediate direct payment |
| cw20_payment | [CW20Payment](#ixo.claims.v1beta1.CW20Payment) | repeated | cw20 payments, can be empty or multiple |
+| is_oracle_payment | [bool](#bool) | | boolean to indicate if the payment is for oracle payments, aka it will go through network fees split NOTE: if true the payment can only have amount values(Native coins), no cw20 payments allowed then |
@@ -1999,6 +2045,19 @@ Msg defines the bonds Msg service.
+
+
+### CollectionIntentOptions
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| ALLOW | 0 | Allow: Intents can be made for claims, but claims can also be made without intents. |
+| DENY | 1 | Deny: Intents cannot be made for claims for the collection. |
+| REQUIRED | 2 | Required: Claims cannot be made without an associated intent. An intent is mandatory before a claim can be submitted. |
+
+
+
### CollectionState
@@ -2027,6 +2086,19 @@ Msg defines the bonds Msg service.
+
+
+### IntentStatus
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| ACTIVE | 0 | Active: Intent is created and active, payments have been transferred to escrow if there is any |
+| FULFILLED | 1 | Fulfilled: Intent is fulfilled, was used to create a claim and funds will be released on claim APPROVAL, or funds will be reverted on claim REJECTION or DISPUTE |
+| EXPIRED | 2 | Expired: Intent has expired, payments have been transferred back out of escrow |
+
+
+
### PaymentStatus
@@ -2035,12 +2107,12 @@ Msg defines the bonds Msg service.
| Name | Number | Description |
| ---- | ------ | ----------- |
| NO_PAYMENT | 0 | |
-| PROMISED | 1 | agent is contracted to receive payment |
-| AUTHORIZED | 2 | authz set up, no guarantee |
-| GUARANTEED | 3 | escrow set up with funds blocked |
-| PAID | 4 | |
-| FAILED | 5 | |
-| DISPUTED_PAYMENT | 6 | |
+| PROMISED | 1 | Promised: Agent is contracted to receive payment |
+| AUTHORIZED | 2 | Authorized: Authz set up, no guarantee |
+| GUARANTEED | 3 | Guaranteed: Escrow set up with funds blocked |
+| PAID | 4 | Paid: Funds have been paid |
+| FAILED | 5 | Failed: Payment failed, most probably due to insufficient funds |
+| DISPUTED_PAYMENT | 6 | DisputedPayment: Payment disputed |
@@ -2134,6 +2206,9 @@ Msg defines the bonds Msg service.
| ----- | ---- | ----- | ----------- |
| collection_id | [string](#string) | | collection_id indicates to which Collection this claim belongs |
| agent_quota | [uint64](#uint64) | | |
+| max_amount | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | custom max_amount allowed to be specified by service agent for claim approval, if empty then no custom amount is allowed |
+| max_cw20_payment | [CW20Payment](#ixo.claims.v1beta1.CW20Payment) | repeated | custom max_cw20_payment allowed to be specified by service agent for claim approval, if empty then no custom amount is allowed |
+| intent_duration_ns | [google.protobuf.Duration](#google.protobuf.Duration) | | intent_duration_ns is the duration for which the intent is active, after which it will expire (in nanoseconds) |
@@ -2285,6 +2360,36 @@ CollectionUpdatedEvent is an event triggered on a Collection update
+
+
+### IntentSubmittedEvent
+IntentSubmittedEvent is an event triggered on an Intent submission
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| intent | [Intent](#ixo.claims.v1beta1.Intent) | | |
+
+
+
+
+
+
+
+
+### IntentUpdatedEvent
+IntentUpdatedEvent is an event triggered on an Intent update
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| intent | [Intent](#ixo.claims.v1beta1.Intent) | | |
+
+
+
+
+
+
### PaymentWithdrawCreatedEvent
@@ -2343,6 +2448,7 @@ GenesisState defines the claims module's genesis state.
| collections | [Collection](#ixo.claims.v1beta1.Collection) | repeated | |
| claims | [Claim](#ixo.claims.v1beta1.Claim) | repeated | |
| disputes | [Dispute](#ixo.claims.v1beta1.Dispute) | repeated | |
+| intents | [Intent](#ixo.claims.v1beta1.Intent) | repeated | |
@@ -2548,6 +2654,69 @@ GenesisState defines the claims module's genesis state.
+
+
+### QueryIntentListRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| pagination | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | |
+
+
+
+
+
+
+
+
+### QueryIntentListResponse
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| intents | [Intent](#ixo.claims.v1beta1.Intent) | repeated | |
+| pagination | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | |
+
+
+
+
+
+
+
+
+### QueryIntentRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| id | [string](#string) | | |
+| agentAddress | [string](#string) | | |
+| collectionId | [string](#string) | | |
+
+
+
+
+
+
+
+
+### QueryIntentResponse
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| intent | [Intent](#ixo.claims.v1beta1.Intent) | | |
+
+
+
+
+
+
### QueryParamsRequest
@@ -2593,6 +2762,8 @@ Query defines the gRPC querier service.
| ClaimList | [QueryClaimListRequest](#ixo.claims.v1beta1.QueryClaimListRequest) | [QueryClaimListResponse](#ixo.claims.v1beta1.QueryClaimListResponse) | |
| Dispute | [QueryDisputeRequest](#ixo.claims.v1beta1.QueryDisputeRequest) | [QueryDisputeResponse](#ixo.claims.v1beta1.QueryDisputeResponse) | |
| DisputeList | [QueryDisputeListRequest](#ixo.claims.v1beta1.QueryDisputeListRequest) | [QueryDisputeListResponse](#ixo.claims.v1beta1.QueryDisputeListResponse) | |
+| Intent | [QueryIntentRequest](#ixo.claims.v1beta1.QueryIntentRequest) | [QueryIntentResponse](#ixo.claims.v1beta1.QueryIntentResponse) | |
+| IntentList | [QueryIntentListRequest](#ixo.claims.v1beta1.QueryIntentListRequest) | [QueryIntentListResponse](#ixo.claims.v1beta1.QueryIntentListResponse) | |
@@ -2605,6 +2776,41 @@ Query defines the gRPC querier service.
+
+
+### MsgClaimIntent
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| agent_did | [string](#string) | | The service agent's DID (Decentralized Identifier). |
+| agent_address | [string](#string) | | The service agent's address (who submits this message). |
+| collection_id | [string](#string) | | The id of the collection this intent is linked to. |
+| amount | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | NOTE: if both amount and cw20 amount are empty then default by Collection is used (APPROVAL payment). The desired claim amount, if any. |
+| cw20_payment | [CW20Payment](#ixo.claims.v1beta1.CW20Payment) | repeated | NOTE: if both amount and cw20 amount are empty then default by Collection is used (APPROVAL payment). The custom CW20 payment, if any. |
+
+
+
+
+
+
+
+
+### MsgClaimIntentResponse
+MsgClaimIntentResponse defines the response after submitting an intent.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| intent_id | [string](#string) | | Resulting intent id. |
+| expire_at | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | Timeout period for the intent. If the claim is not submitted by this time, the intent expires. |
+
+
+
+
+
+
### MsgCreateCollection
@@ -2621,6 +2827,7 @@ Query defines the gRPC querier service.
| quota | [uint64](#uint64) | | quota is the maximum number of claims that may be submitted, 0 is unlimited |
| state | [CollectionState](#ixo.claims.v1beta1.CollectionState) | | state is the current state of this Collection (open, paused, closed) |
| payments | [Payments](#ixo.claims.v1beta1.Payments) | | payments is the amount paid for claim submission, evaluation, approval, or rejection |
+| intents | [CollectionIntentOptions](#ixo.claims.v1beta1.CollectionIntentOptions) | | intents is the option for intents for this collection (allow, deny, required) |
@@ -2684,8 +2891,8 @@ Collection entity, or have authz cap, aka is agent
| status | [EvaluationStatus](#ixo.claims.v1beta1.EvaluationStatus) | | status is the evaluation status expressed as an integer (2=approved, 3=rejected, ...) |
| reason | [uint32](#uint32) | | reason is the code expressed as an integer, for why the evaluation result was given (codes defined by evaluator) |
| verification_proof | [string](#string) | | verificationProof is the cid of the evaluation Verfiable Credential |
-| amount | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | custom amount specified by evaluator for claim approval, if empty list then use default by Collection |
-| cw20_payment | [CW20Payment](#ixo.claims.v1beta1.CW20Payment) | repeated | custom cw20 payments specified by evaluator for claim approval, if empty list then use default by Collection |
+| amount | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | NOTE: if both amount and cw20 amount are empty then use collection default custom amount specified by evaluator for claim approval |
+| cw20_payment | [CW20Payment](#ixo.claims.v1beta1.CW20Payment) | repeated | NOTE: if both amount and cw20 amount are empty then use collection default custom cw20 payments specified by evaluator for claim approval |
@@ -2715,6 +2922,9 @@ Collection entity, or have authz cap, aka is agent
| agent_did | [string](#string) | | agent is the DID of the agent submitting the claim |
| agent_address | [string](#string) | | |
| admin_address | [string](#string) | | admin address used to sign this message, validated against Collection Admin |
+| use_intent | [bool](#bool) | | use_intent is the option for using intent for this claim if it exists and is active. NOTE: if use_intent is true then amount and cw20 amount are ignored and overriden with intent amounts. NOTE: if use_intent is true and there is no active intent then will error |
+| amount | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | NOTE: if both amount and cw20_payment are empty then use default by Collection custom amount specified by service agent for claim approval |
+| cw20_payment | [CW20Payment](#ixo.claims.v1beta1.CW20Payment) | repeated | NOTE: if both amount and cw20 amount are empty then use default by Collection custom cw20 payments specified by service agent for claim approval |
@@ -2759,6 +2969,33 @@ Collection entity, or have authz cap, aka is agent
+
+
+### MsgUpdateCollectionIntents
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| collection_id | [string](#string) | | collection_id indicates which Collection to update |
+| intents | [CollectionIntentOptions](#ixo.claims.v1beta1.CollectionIntentOptions) | | intents is the option for intents for this collection (allow, deny, required) |
+| admin_address | [string](#string) | | admin address used to sign this message, validated against Collection Admin |
+
+
+
+
+
+
+
+
+### MsgUpdateCollectionIntentsResponse
+
+
+
+
+
+
+
### MsgUpdateCollectionPayments
@@ -2868,6 +3105,8 @@ Msg defines the Msg service.
| UpdateCollectionState | [MsgUpdateCollectionState](#ixo.claims.v1beta1.MsgUpdateCollectionState) | [MsgUpdateCollectionStateResponse](#ixo.claims.v1beta1.MsgUpdateCollectionStateResponse) | |
| UpdateCollectionDates | [MsgUpdateCollectionDates](#ixo.claims.v1beta1.MsgUpdateCollectionDates) | [MsgUpdateCollectionDatesResponse](#ixo.claims.v1beta1.MsgUpdateCollectionDatesResponse) | |
| UpdateCollectionPayments | [MsgUpdateCollectionPayments](#ixo.claims.v1beta1.MsgUpdateCollectionPayments) | [MsgUpdateCollectionPaymentsResponse](#ixo.claims.v1beta1.MsgUpdateCollectionPaymentsResponse) | |
+| UpdateCollectionIntents | [MsgUpdateCollectionIntents](#ixo.claims.v1beta1.MsgUpdateCollectionIntents) | [MsgUpdateCollectionIntentsResponse](#ixo.claims.v1beta1.MsgUpdateCollectionIntentsResponse) | |
+| ClaimIntent | [MsgClaimIntent](#ixo.claims.v1beta1.MsgClaimIntent) | [MsgClaimIntentResponse](#ixo.claims.v1beta1.MsgClaimIntentResponse) | |
diff --git a/docs/swagger-ui/swagger.yaml b/docs/swagger-ui/swagger.yaml
index 6123730d..4a68ed56 100644
--- a/docs/swagger-ui/swagger.yaml
+++ b/docs/swagger-ui/swagger.yaml
@@ -50740,10 +50740,11 @@ paths:
signatures required by gogoproto.
title: >-
- custom amount specified by evaluator for claim
- approval, if empty list then
+ if both amount and cw20 amount are empty then use
+ default by Collection
- use default by Collection
+ custom amount specified by evaluator for claim
+ approval
cw20_payment:
type: array
items:
@@ -50761,10 +50762,11 @@ paths:
uint64(max 18446744073709551615)
title: >-
custom cw20 payments specified by evaluator for
- claim approval, if empty
-
- list then use default by Collection
+ claim approval
payments_status:
+ title: >-
+ payments_status is the status of the payments for the
+ claim
type: object
properties:
submission:
@@ -50778,6 +50780,14 @@ paths:
- FAILED
- DISPUTED_PAYMENT
default: NO_PAYMENT
+ title: >-
+ - PROMISED: Promised: Agent is contracted to receive
+ payment
+ - AUTHORIZED: Authorized: Authz set up, no guarantee
+ - GUARANTEED: Guaranteed: Escrow set up with funds blocked
+ - PAID: Paid: Funds have been paid
+ - FAILED: Failed: Payment failed, most probably due to insufficient funds
+ - DISPUTED_PAYMENT: DisputedPayment: Payment disputed
evaluation:
type: string
enum:
@@ -50789,6 +50799,14 @@ paths:
- FAILED
- DISPUTED_PAYMENT
default: NO_PAYMENT
+ title: >-
+ - PROMISED: Promised: Agent is contracted to receive
+ payment
+ - AUTHORIZED: Authorized: Authz set up, no guarantee
+ - GUARANTEED: Guaranteed: Escrow set up with funds blocked
+ - PAID: Paid: Funds have been paid
+ - FAILED: Failed: Payment failed, most probably due to insufficient funds
+ - DISPUTED_PAYMENT: DisputedPayment: Payment disputed
approval:
type: string
enum:
@@ -50800,6 +50818,14 @@ paths:
- FAILED
- DISPUTED_PAYMENT
default: NO_PAYMENT
+ title: >-
+ - PROMISED: Promised: Agent is contracted to receive
+ payment
+ - AUTHORIZED: Authorized: Authz set up, no guarantee
+ - GUARANTEED: Guaranteed: Escrow set up with funds blocked
+ - PAID: Paid: Funds have been paid
+ - FAILED: Failed: Payment failed, most probably due to insufficient funds
+ - DISPUTED_PAYMENT: DisputedPayment: Payment disputed
rejection:
type: string
enum:
@@ -50811,6 +50837,64 @@ paths:
- FAILED
- DISPUTED_PAYMENT
default: NO_PAYMENT
+ title: >-
+ - PROMISED: Promised: Agent is contracted to receive
+ payment
+ - AUTHORIZED: Authorized: Authz set up, no guarantee
+ - GUARANTEED: Guaranteed: Escrow set up with funds blocked
+ - PAID: Paid: Funds have been paid
+ - FAILED: Failed: Payment failed, most probably due to insufficient funds
+ - DISPUTED_PAYMENT: DisputedPayment: Payment disputed
+ use_intent:
+ type: boolean
+ title: intent_id is the id of the intent for this claim, if any
+ amount:
+ type: array
+ items:
+ type: object
+ properties:
+ denom:
+ type: string
+ amount:
+ type: string
+ description: >-
+ Coin defines a token with a denomination and an
+ amount.
+
+
+ NOTE: The amount field is an Int which implements the
+ custom method
+
+ signatures required by gogoproto.
+ title: >-
+ NOTE: if both amount and cw20 amount are empty then use
+ default by
+
+ Collection custom amount specified by service agent for
+ claim approval
+ cw20_payment:
+ type: array
+ items:
+ type: object
+ properties:
+ address:
+ type: string
+ amount:
+ type: string
+ format: uint64
+ title: >-
+ chose uint64 for now as amounts should be small
+ enough to fit in a
+
+ uint64(max 18446744073709551615)
+ title: >-
+ NOTE: if both amount and cw20 amount are empty then use
+ default by
+
+ Collection custom cw20 payments specified by service
+ agent for claim
+
+ approval
pagination:
type: object
properties:
@@ -51033,10 +51117,11 @@ paths:
signatures required by gogoproto.
title: >-
- custom amount specified by evaluator for claim
- approval, if empty list then
+ if both amount and cw20 amount are empty then use
+ default by Collection
- use default by Collection
+ custom amount specified by evaluator for claim
+ approval
cw20_payment:
type: array
items:
@@ -51054,10 +51139,11 @@ paths:
uint64(max 18446744073709551615)
title: >-
custom cw20 payments specified by evaluator for claim
- approval, if empty
-
- list then use default by Collection
+ approval
payments_status:
+ title: >-
+ payments_status is the status of the payments for the
+ claim
type: object
properties:
submission:
@@ -51071,6 +51157,14 @@ paths:
- FAILED
- DISPUTED_PAYMENT
default: NO_PAYMENT
+ title: >-
+ - PROMISED: Promised: Agent is contracted to receive
+ payment
+ - AUTHORIZED: Authorized: Authz set up, no guarantee
+ - GUARANTEED: Guaranteed: Escrow set up with funds blocked
+ - PAID: Paid: Funds have been paid
+ - FAILED: Failed: Payment failed, most probably due to insufficient funds
+ - DISPUTED_PAYMENT: DisputedPayment: Payment disputed
evaluation:
type: string
enum:
@@ -51082,6 +51176,14 @@ paths:
- FAILED
- DISPUTED_PAYMENT
default: NO_PAYMENT
+ title: >-
+ - PROMISED: Promised: Agent is contracted to receive
+ payment
+ - AUTHORIZED: Authorized: Authz set up, no guarantee
+ - GUARANTEED: Guaranteed: Escrow set up with funds blocked
+ - PAID: Paid: Funds have been paid
+ - FAILED: Failed: Payment failed, most probably due to insufficient funds
+ - DISPUTED_PAYMENT: DisputedPayment: Payment disputed
approval:
type: string
enum:
@@ -51093,6 +51195,14 @@ paths:
- FAILED
- DISPUTED_PAYMENT
default: NO_PAYMENT
+ title: >-
+ - PROMISED: Promised: Agent is contracted to receive
+ payment
+ - AUTHORIZED: Authorized: Authz set up, no guarantee
+ - GUARANTEED: Guaranteed: Escrow set up with funds blocked
+ - PAID: Paid: Funds have been paid
+ - FAILED: Failed: Payment failed, most probably due to insufficient funds
+ - DISPUTED_PAYMENT: DisputedPayment: Payment disputed
rejection:
type: string
enum:
@@ -51104,6 +51214,63 @@ paths:
- FAILED
- DISPUTED_PAYMENT
default: NO_PAYMENT
+ title: >-
+ - PROMISED: Promised: Agent is contracted to receive
+ payment
+ - AUTHORIZED: Authorized: Authz set up, no guarantee
+ - GUARANTEED: Guaranteed: Escrow set up with funds blocked
+ - PAID: Paid: Funds have been paid
+ - FAILED: Failed: Payment failed, most probably due to insufficient funds
+ - DISPUTED_PAYMENT: DisputedPayment: Payment disputed
+ use_intent:
+ type: boolean
+ title: intent_id is the id of the intent for this claim, if any
+ amount:
+ type: array
+ items:
+ type: object
+ properties:
+ denom:
+ type: string
+ amount:
+ type: string
+ description: >-
+ Coin defines a token with a denomination and an amount.
+
+
+ NOTE: The amount field is an Int which implements the
+ custom method
+
+ signatures required by gogoproto.
+ title: >-
+ NOTE: if both amount and cw20 amount are empty then use
+ default by
+
+ Collection custom amount specified by service agent for
+ claim approval
+ cw20_payment:
+ type: array
+ items:
+ type: object
+ properties:
+ address:
+ type: string
+ amount:
+ type: string
+ format: uint64
+ title: >-
+ chose uint64 for now as amounts should be small
+ enough to fit in a
+
+ uint64(max 18446744073709551615)
+ title: >-
+ NOTE: if both amount and cw20 amount are empty then use
+ default by
+
+ Collection custom cw20 payments specified by service agent
+ for claim
+
+ approval
default:
description: An unexpected error response.
schema:
@@ -51156,6 +51323,9 @@ paths:
type: string
node_fee_percentage:
type: string
+ intent_sequence:
+ type: string
+ format: uint64
default:
description: An unexpected error response.
schema:
@@ -51352,6 +51522,17 @@ paths:
uint64(max 18446744073709551615)
title: cw20 payments, can be empty or multiple
+ is_oracle_payment:
+ type: boolean
+ title: >-
+ boolean to indicate if the payment is for oracle
+ payments, aka it will go
+
+ through network fees split NOTE: if true the
+ payment can only have amount
+
+ values(Native coins), no cw20 payments allowed
+ then
evaluation:
type: object
properties:
@@ -51414,6 +51595,17 @@ paths:
uint64(max 18446744073709551615)
title: cw20 payments, can be empty or multiple
+ is_oracle_payment:
+ type: boolean
+ title: >-
+ boolean to indicate if the payment is for oracle
+ payments, aka it will go
+
+ through network fees split NOTE: if true the
+ payment can only have amount
+
+ values(Native coins), no cw20 payments allowed
+ then
approval:
type: object
properties:
@@ -51476,6 +51668,17 @@ paths:
uint64(max 18446744073709551615)
title: cw20 payments, can be empty or multiple
+ is_oracle_payment:
+ type: boolean
+ title: >-
+ boolean to indicate if the payment is for oracle
+ payments, aka it will go
+
+ through network fees split NOTE: if true the
+ payment can only have amount
+
+ values(Native coins), no cw20 payments allowed
+ then
rejection:
type: object
properties:
@@ -51538,6 +51741,17 @@ paths:
uint64(max 18446744073709551615)
title: cw20 payments, can be empty or multiple
+ is_oracle_payment:
+ type: boolean
+ title: >-
+ boolean to indicate if the payment is for oracle
+ payments, aka it will go
+
+ through network fees split NOTE: if true the
+ payment can only have amount
+
+ values(Native coins), no cw20 payments allowed
+ then
signer:
type: string
title: signer address
@@ -51549,6 +51763,34 @@ paths:
evaluated as invalid
(internally calculated)
+ escrow_account:
+ type: string
+ title: >-
+ escrow_account is the escrow account address for this
+ collection created at
+
+ collection creation, current purpose is to transfer
+ payments to escrow
+
+ account for GUARANTEED payments through intents
+ intents:
+ title: >-
+ intents is the option for intents for this collection
+ (allow, deny,
+
+ required)
+ type: string
+ enum:
+ - ALLOW
+ - DENY
+ - REQUIRED
+ default: ALLOW
+ description: |2-
+ - ALLOW: Allow: Intents can be made for claims, but claims can also be made without
+ intents.
+ - DENY: Deny: Intents cannot be made for claims for the collection.
+ - REQUIRED: Required: Claims cannot be made without an associated intent. An intent is
+ mandatory before a claim can be submitted.
pagination:
type: object
properties:
@@ -51826,6 +52068,17 @@ paths:
uint64(max 18446744073709551615)
title: cw20 payments, can be empty or multiple
+ is_oracle_payment:
+ type: boolean
+ title: >-
+ boolean to indicate if the payment is for oracle
+ payments, aka it will go
+
+ through network fees split NOTE: if true the
+ payment can only have amount
+
+ values(Native coins), no cw20 payments allowed
+ then
evaluation:
type: object
properties:
@@ -51888,6 +52141,17 @@ paths:
uint64(max 18446744073709551615)
title: cw20 payments, can be empty or multiple
+ is_oracle_payment:
+ type: boolean
+ title: >-
+ boolean to indicate if the payment is for oracle
+ payments, aka it will go
+
+ through network fees split NOTE: if true the
+ payment can only have amount
+
+ values(Native coins), no cw20 payments allowed
+ then
approval:
type: object
properties:
@@ -51950,6 +52214,17 @@ paths:
uint64(max 18446744073709551615)
title: cw20 payments, can be empty or multiple
+ is_oracle_payment:
+ type: boolean
+ title: >-
+ boolean to indicate if the payment is for oracle
+ payments, aka it will go
+
+ through network fees split NOTE: if true the
+ payment can only have amount
+
+ values(Native coins), no cw20 payments allowed
+ then
rejection:
type: object
properties:
@@ -52012,6 +52287,17 @@ paths:
uint64(max 18446744073709551615)
title: cw20 payments, can be empty or multiple
+ is_oracle_payment:
+ type: boolean
+ title: >-
+ boolean to indicate if the payment is for oracle
+ payments, aka it will go
+
+ through network fees split NOTE: if true the
+ payment can only have amount
+
+ values(Native coins), no cw20 payments allowed
+ then
signer:
type: string
title: signer address
@@ -52023,6 +52309,34 @@ paths:
evaluated as invalid
(internally calculated)
+ escrow_account:
+ type: string
+ title: >-
+ escrow_account is the escrow account address for this
+ collection created at
+
+ collection creation, current purpose is to transfer
+ payments to escrow
+
+ account for GUARANTEED payments through intents
+ intents:
+ title: >-
+ intents is the option for intents for this collection
+ (allow, deny,
+
+ required)
+ type: string
+ enum:
+ - ALLOW
+ - DENY
+ - REQUIRED
+ default: ALLOW
+ description: |2-
+ - ALLOW: Allow: Intents can be made for claims, but claims can also be made without
+ intents.
+ - DENY: Deny: Intents cannot be made for claims for the collection.
+ - REQUIRED: Required: Claims cannot be made without an associated intent. An intent is
+ mandatory before a claim can be submitted.
default:
description: An unexpected error response.
schema:
@@ -52136,117 +52450,472 @@ paths:
type: string
format: byte
parameters:
- - name: pagination.key
- description: |-
- key is a value returned in PageResponse.next_key to begin
- querying the next page most efficiently. Only one of offset or key
- should be set.
- in: query
- required: false
- type: string
- format: byte
- - name: pagination.offset
- description: >-
- offset is a numeric offset that can be used when key is unavailable.
-
- It is less efficient than using key. Only one of offset or key
- should
-
- be set.
- in: query
- required: false
+ - name: pagination.key
+ description: |-
+ key is a value returned in PageResponse.next_key to begin
+ querying the next page most efficiently. Only one of offset or key
+ should be set.
+ in: query
+ required: false
+ type: string
+ format: byte
+ - name: pagination.offset
+ description: >-
+ offset is a numeric offset that can be used when key is unavailable.
+
+ It is less efficient than using key. Only one of offset or key
+ should
+
+ be set.
+ in: query
+ required: false
+ type: string
+ format: uint64
+ - name: pagination.limit
+ description: >-
+ limit is the total number of results to be returned in the result
+ page.
+
+ If left empty it will default to a value to be set by each app.
+ in: query
+ required: false
+ type: string
+ format: uint64
+ - name: pagination.count_total
+ description: >-
+ count_total is set to true to indicate that the result set should
+ include
+
+ a count of the total number of items available for pagination in
+ UIs.
+
+ count_total is only respected when offset is used. It is ignored
+ when key
+
+ is set.
+ in: query
+ required: false
+ type: boolean
+ - name: pagination.reverse
+ description: >-
+ reverse is set to true if results are to be returned in the
+ descending order.
+
+
+ Since: cosmos-sdk 0.43
+ in: query
+ required: false
+ type: boolean
+ tags:
+ - Query
+ /ixo/dispute/{proof}:
+ get:
+ operationId: Dispute
+ responses:
+ '200':
+ description: A successful response.
+ schema:
+ type: object
+ properties:
+ dispute:
+ type: object
+ properties:
+ subject_id:
+ type: string
+ type:
+ type: integer
+ format: int32
+ title: type is expressed as an integer, interpreted by the client
+ data:
+ type: object
+ properties:
+ uri:
+ type: string
+ type:
+ type: string
+ proof:
+ type: string
+ encrypted:
+ type: boolean
+ default:
+ description: An unexpected error response.
+ schema:
+ type: object
+ properties:
+ error:
+ type: string
+ code:
+ type: integer
+ format: int32
+ message:
+ type: string
+ details:
+ type: array
+ items:
+ type: object
+ properties:
+ type_url:
+ type: string
+ value:
+ type: string
+ format: byte
+ parameters:
+ - name: proof
+ in: path
+ required: true
+ type: string
+ tags:
+ - Query
+ /ixo/intent:
+ get:
+ operationId: IntentList
+ responses:
+ '200':
+ description: A successful response.
+ schema:
+ type: object
+ properties:
+ intents:
+ type: array
+ items:
+ type: object
+ properties:
+ id:
+ type: string
+ title: id is the incremented internal id for the intent
+ agent_did:
+ type: string
+ description: The service agent's DID (Decentralized Identifier).
+ agent_address:
+ type: string
+ description: The service agent's address.
+ collection_id:
+ type: string
+ description: The id of the collection this intent is linked to.
+ claim_id:
+ type: string
+ title: claim_id (optional, set when claim is submitted)
+ created_at:
+ type: string
+ format: date-time
+ description: The time the intent was created.
+ expire_at:
+ type: string
+ format: date-time
+ description: >-
+ Timeout period for the intent. If the claim is not
+ submitted by this time,
+
+ the intent expires.
+ status:
+ description: Status of the intent (e.g., "ACTIVE" or "FULFILLED").
+ type: string
+ enum:
+ - ACTIVE
+ - FULFILLED
+ - EXPIRED
+ default: ACTIVE
+ title: >-
+ - ACTIVE: Active: Intent is created and active, payments
+ have been transferred to
+
+ escrow if there is any
+ - FULFILLED: Fulfilled: Intent is fulfilled, was used to create a claim and funds will
+ be released on claim APPROVAL, or funds will be reverted
+ on claim REJECTION
+
+ or DISPUTE
+ - EXPIRED: Expired: Intent has expired, payments have been transferred back out of
+ escrow
+ amount:
+ type: array
+ items:
+ type: object
+ properties:
+ denom:
+ type: string
+ amount:
+ type: string
+ description: >-
+ Coin defines a token with a denomination and an
+ amount.
+
+
+ NOTE: The amount field is an Int which implements the
+ custom method
+
+ signatures required by gogoproto.
+ description: The payment amount the agent intends to claim, if any.
+ cw20_payment:
+ type: array
+ items:
+ type: object
+ properties:
+ address:
+ type: string
+ amount:
+ type: string
+ format: uint64
+ title: >-
+ chose uint64 for now as amounts should be small
+ enough to fit in a
+
+ uint64(max 18446744073709551615)
+ description: >-
+ The CW20Payment amount the agent intends to claim, if
+ any.
+ from_address:
+ type: string
+ title: the address the escrow payment came from
+ escrow_address:
+ type: string
+ title: the escrow account address
+ description: >-
+ Intent defines the structure for a service agent's claim
+ intent.
+ pagination:
+ type: object
+ properties:
+ next_key:
+ type: string
+ format: byte
+ description: |-
+ next_key is the key to be passed to PageRequest.key to
+ query the next page most efficiently. It will be empty if
+ there are no more results.
+ total:
+ type: string
+ format: uint64
+ title: >-
+ total is total number of results available if
+ PageRequest.count_total
+
+ was set, its value is undefined otherwise
+ description: >-
+ PageResponse is to be embedded in gRPC response messages where
+ the
+
+ corresponding request message has used PageRequest.
+
+ message SomeResponse {
+ repeated Bar results = 1;
+ PageResponse page = 2;
+ }
+ default:
+ description: An unexpected error response.
+ schema:
+ type: object
+ properties:
+ error:
+ type: string
+ code:
+ type: integer
+ format: int32
+ message:
+ type: string
+ details:
+ type: array
+ items:
+ type: object
+ properties:
+ type_url:
+ type: string
+ value:
+ type: string
+ format: byte
+ parameters:
+ - name: pagination.key
+ description: |-
+ key is a value returned in PageResponse.next_key to begin
+ querying the next page most efficiently. Only one of offset or key
+ should be set.
+ in: query
+ required: false
+ type: string
+ format: byte
+ - name: pagination.offset
+ description: >-
+ offset is a numeric offset that can be used when key is unavailable.
+
+ It is less efficient than using key. Only one of offset or key
+ should
+
+ be set.
+ in: query
+ required: false
+ type: string
+ format: uint64
+ - name: pagination.limit
+ description: >-
+ limit is the total number of results to be returned in the result
+ page.
+
+ If left empty it will default to a value to be set by each app.
+ in: query
+ required: false
+ type: string
+ format: uint64
+ - name: pagination.count_total
+ description: >-
+ count_total is set to true to indicate that the result set should
+ include
+
+ a count of the total number of items available for pagination in
+ UIs.
+
+ count_total is only respected when offset is used. It is ignored
+ when key
+
+ is set.
+ in: query
+ required: false
+ type: boolean
+ - name: pagination.reverse
+ description: >-
+ reverse is set to true if results are to be returned in the
+ descending order.
+
+
+ Since: cosmos-sdk 0.43
+ in: query
+ required: false
+ type: boolean
+ tags:
+ - Query
+ /ixo/intent/{agentAddress}/{collectionId}/{id}:
+ get:
+ operationId: Intent
+ responses:
+ '200':
+ description: A successful response.
+ schema:
+ type: object
+ properties:
+ intent:
+ type: object
+ properties:
+ id:
+ type: string
+ title: id is the incremented internal id for the intent
+ agent_did:
+ type: string
+ description: The service agent's DID (Decentralized Identifier).
+ agent_address:
+ type: string
+ description: The service agent's address.
+ collection_id:
+ type: string
+ description: The id of the collection this intent is linked to.
+ claim_id:
+ type: string
+ title: claim_id (optional, set when claim is submitted)
+ created_at:
+ type: string
+ format: date-time
+ description: The time the intent was created.
+ expire_at:
+ type: string
+ format: date-time
+ description: >-
+ Timeout period for the intent. If the claim is not
+ submitted by this time,
+
+ the intent expires.
+ status:
+ description: Status of the intent (e.g., "ACTIVE" or "FULFILLED").
+ type: string
+ enum:
+ - ACTIVE
+ - FULFILLED
+ - EXPIRED
+ default: ACTIVE
+ title: >-
+ - ACTIVE: Active: Intent is created and active, payments
+ have been transferred to
+
+ escrow if there is any
+ - FULFILLED: Fulfilled: Intent is fulfilled, was used to create a claim and funds will
+ be released on claim APPROVAL, or funds will be reverted
+ on claim REJECTION
+
+ or DISPUTE
+ - EXPIRED: Expired: Intent has expired, payments have been transferred back out of
+ escrow
+ amount:
+ type: array
+ items:
+ type: object
+ properties:
+ denom:
+ type: string
+ amount:
+ type: string
+ description: >-
+ Coin defines a token with a denomination and an amount.
+
+
+ NOTE: The amount field is an Int which implements the
+ custom method
+
+ signatures required by gogoproto.
+ description: The payment amount the agent intends to claim, if any.
+ cw20_payment:
+ type: array
+ items:
+ type: object
+ properties:
+ address:
+ type: string
+ amount:
+ type: string
+ format: uint64
+ title: >-
+ chose uint64 for now as amounts should be small
+ enough to fit in a
+
+ uint64(max 18446744073709551615)
+ description: The CW20Payment amount the agent intends to claim, if any.
+ from_address:
+ type: string
+ title: the address the escrow payment came from
+ escrow_address:
+ type: string
+ title: the escrow account address
+ description: >-
+ Intent defines the structure for a service agent's claim
+ intent.
+ default:
+ description: An unexpected error response.
+ schema:
+ type: object
+ properties:
+ error:
+ type: string
+ code:
+ type: integer
+ format: int32
+ message:
+ type: string
+ details:
+ type: array
+ items:
+ type: object
+ properties:
+ type_url:
+ type: string
+ value:
+ type: string
+ format: byte
+ parameters:
+ - name: agentAddress
+ in: path
+ required: true
type: string
- format: uint64
- - name: pagination.limit
- description: >-
- limit is the total number of results to be returned in the result
- page.
-
- If left empty it will default to a value to be set by each app.
- in: query
- required: false
+ - name: collectionId
+ in: path
+ required: true
type: string
- format: uint64
- - name: pagination.count_total
- description: >-
- count_total is set to true to indicate that the result set should
- include
-
- a count of the total number of items available for pagination in
- UIs.
-
- count_total is only respected when offset is used. It is ignored
- when key
-
- is set.
- in: query
- required: false
- type: boolean
- - name: pagination.reverse
- description: >-
- reverse is set to true if results are to be returned in the
- descending order.
-
-
- Since: cosmos-sdk 0.43
- in: query
- required: false
- type: boolean
- tags:
- - Query
- /ixo/dispute/{proof}:
- get:
- operationId: Dispute
- responses:
- '200':
- description: A successful response.
- schema:
- type: object
- properties:
- dispute:
- type: object
- properties:
- subject_id:
- type: string
- type:
- type: integer
- format: int32
- title: type is expressed as an integer, interpreted by the client
- data:
- type: object
- properties:
- uri:
- type: string
- type:
- type: string
- proof:
- type: string
- encrypted:
- type: boolean
- default:
- description: An unexpected error response.
- schema:
- type: object
- properties:
- error:
- type: string
- code:
- type: integer
- format: int32
- message:
- type: string
- details:
- type: array
- items:
- type: object
- properties:
- type_url:
- type: string
- value:
- type: string
- format: byte
- parameters:
- - name: proof
+ - name: id
in: path
required: true
type: string
@@ -86769,10 +87438,10 @@ definitions:
signatures required by gogoproto.
title: >-
- custom amount specified by evaluator for claim approval, if empty
- list then
+ if both amount and cw20 amount are empty then use default by
+ Collection
- use default by Collection
+ custom amount specified by evaluator for claim approval
cw20_payment:
type: array
items:
@@ -86788,12 +87457,9 @@ definitions:
fit in a
uint64(max 18446744073709551615)
- title: >-
- custom cw20 payments specified by evaluator for claim approval, if
- empty
-
- list then use default by Collection
+ title: custom cw20 payments specified by evaluator for claim approval
payments_status:
+ title: payments_status is the status of the payments for the claim
type: object
properties:
submission:
@@ -86807,6 +87473,13 @@ definitions:
- FAILED
- DISPUTED_PAYMENT
default: NO_PAYMENT
+ title: |-
+ - PROMISED: Promised: Agent is contracted to receive payment
+ - AUTHORIZED: Authorized: Authz set up, no guarantee
+ - GUARANTEED: Guaranteed: Escrow set up with funds blocked
+ - PAID: Paid: Funds have been paid
+ - FAILED: Failed: Payment failed, most probably due to insufficient funds
+ - DISPUTED_PAYMENT: DisputedPayment: Payment disputed
evaluation:
type: string
enum:
@@ -86818,6 +87491,13 @@ definitions:
- FAILED
- DISPUTED_PAYMENT
default: NO_PAYMENT
+ title: |-
+ - PROMISED: Promised: Agent is contracted to receive payment
+ - AUTHORIZED: Authorized: Authz set up, no guarantee
+ - GUARANTEED: Guaranteed: Escrow set up with funds blocked
+ - PAID: Paid: Funds have been paid
+ - FAILED: Failed: Payment failed, most probably due to insufficient funds
+ - DISPUTED_PAYMENT: DisputedPayment: Payment disputed
approval:
type: string
enum:
@@ -86829,6 +87509,13 @@ definitions:
- FAILED
- DISPUTED_PAYMENT
default: NO_PAYMENT
+ title: |-
+ - PROMISED: Promised: Agent is contracted to receive payment
+ - AUTHORIZED: Authorized: Authz set up, no guarantee
+ - GUARANTEED: Guaranteed: Escrow set up with funds blocked
+ - PAID: Paid: Funds have been paid
+ - FAILED: Failed: Payment failed, most probably due to insufficient funds
+ - DISPUTED_PAYMENT: DisputedPayment: Payment disputed
rejection:
type: string
enum:
@@ -86840,6 +87527,52 @@ definitions:
- FAILED
- DISPUTED_PAYMENT
default: NO_PAYMENT
+ title: |-
+ - PROMISED: Promised: Agent is contracted to receive payment
+ - AUTHORIZED: Authorized: Authz set up, no guarantee
+ - GUARANTEED: Guaranteed: Escrow set up with funds blocked
+ - PAID: Paid: Funds have been paid
+ - FAILED: Failed: Payment failed, most probably due to insufficient funds
+ - DISPUTED_PAYMENT: DisputedPayment: Payment disputed
+ use_intent:
+ type: boolean
+ title: intent_id is the id of the intent for this claim, if any
+ amount:
+ type: array
+ items:
+ type: object
+ properties:
+ denom:
+ type: string
+ amount:
+ type: string
+ description: |-
+ Coin defines a token with a denomination and an amount.
+
+ NOTE: The amount field is an Int which implements the custom method
+ signatures required by gogoproto.
+ title: |-
+ NOTE: if both amount and cw20 amount are empty then use default by
+ Collection custom amount specified by service agent for claim approval
+ cw20_payment:
+ type: array
+ items:
+ type: object
+ properties:
+ address:
+ type: string
+ amount:
+ type: string
+ format: uint64
+ title: >-
+ chose uint64 for now as amounts should be small enough to fit in
+ a
+
+ uint64(max 18446744073709551615)
+ title: |-
+ NOTE: if both amount and cw20 amount are empty then use default by
+ Collection custom cw20 payments specified by service agent for claim
+ approval
ixo.claims.v1beta1.ClaimPayments:
type: object
properties:
@@ -86854,6 +87587,13 @@ definitions:
- FAILED
- DISPUTED_PAYMENT
default: NO_PAYMENT
+ title: |-
+ - PROMISED: Promised: Agent is contracted to receive payment
+ - AUTHORIZED: Authorized: Authz set up, no guarantee
+ - GUARANTEED: Guaranteed: Escrow set up with funds blocked
+ - PAID: Paid: Funds have been paid
+ - FAILED: Failed: Payment failed, most probably due to insufficient funds
+ - DISPUTED_PAYMENT: DisputedPayment: Payment disputed
evaluation:
type: string
enum:
@@ -86865,6 +87605,13 @@ definitions:
- FAILED
- DISPUTED_PAYMENT
default: NO_PAYMENT
+ title: |-
+ - PROMISED: Promised: Agent is contracted to receive payment
+ - AUTHORIZED: Authorized: Authz set up, no guarantee
+ - GUARANTEED: Guaranteed: Escrow set up with funds blocked
+ - PAID: Paid: Funds have been paid
+ - FAILED: Failed: Payment failed, most probably due to insufficient funds
+ - DISPUTED_PAYMENT: DisputedPayment: Payment disputed
approval:
type: string
enum:
@@ -86876,6 +87623,13 @@ definitions:
- FAILED
- DISPUTED_PAYMENT
default: NO_PAYMENT
+ title: |-
+ - PROMISED: Promised: Agent is contracted to receive payment
+ - AUTHORIZED: Authorized: Authz set up, no guarantee
+ - GUARANTEED: Guaranteed: Escrow set up with funds blocked
+ - PAID: Paid: Funds have been paid
+ - FAILED: Failed: Payment failed, most probably due to insufficient funds
+ - DISPUTED_PAYMENT: DisputedPayment: Payment disputed
rejection:
type: string
enum:
@@ -86887,6 +87641,13 @@ definitions:
- FAILED
- DISPUTED_PAYMENT
default: NO_PAYMENT
+ title: |-
+ - PROMISED: Promised: Agent is contracted to receive payment
+ - AUTHORIZED: Authorized: Authz set up, no guarantee
+ - GUARANTEED: Guaranteed: Escrow set up with funds blocked
+ - PAID: Paid: Funds have been paid
+ - FAILED: Failed: Payment failed, most probably due to insufficient funds
+ - DISPUTED_PAYMENT: DisputedPayment: Payment disputed
ixo.claims.v1beta1.Collection:
type: object
properties:
@@ -87031,6 +87792,16 @@ definitions:
uint64(max 18446744073709551615)
title: cw20 payments, can be empty or multiple
+ is_oracle_payment:
+ type: boolean
+ title: >-
+ boolean to indicate if the payment is for oracle payments, aka
+ it will go
+
+ through network fees split NOTE: if true the payment can only
+ have amount
+
+ values(Native coins), no cw20 payments allowed then
evaluation:
type: object
properties:
@@ -87092,6 +87863,16 @@ definitions:
uint64(max 18446744073709551615)
title: cw20 payments, can be empty or multiple
+ is_oracle_payment:
+ type: boolean
+ title: >-
+ boolean to indicate if the payment is for oracle payments, aka
+ it will go
+
+ through network fees split NOTE: if true the payment can only
+ have amount
+
+ values(Native coins), no cw20 payments allowed then
approval:
type: object
properties:
@@ -87153,6 +87934,16 @@ definitions:
uint64(max 18446744073709551615)
title: cw20 payments, can be empty or multiple
+ is_oracle_payment:
+ type: boolean
+ title: >-
+ boolean to indicate if the payment is for oracle payments, aka
+ it will go
+
+ through network fees split NOTE: if true the payment can only
+ have amount
+
+ values(Native coins), no cw20 payments allowed then
rejection:
type: object
properties:
@@ -87214,6 +88005,16 @@ definitions:
uint64(max 18446744073709551615)
title: cw20 payments, can be empty or multiple
+ is_oracle_payment:
+ type: boolean
+ title: >-
+ boolean to indicate if the payment is for oracle payments, aka
+ it will go
+
+ through network fees split NOTE: if true the payment can only
+ have amount
+
+ values(Native coins), no cw20 payments allowed then
signer:
type: string
title: signer address
@@ -87225,6 +88026,44 @@ definitions:
invalid
(internally calculated)
+ escrow_account:
+ type: string
+ title: >-
+ escrow_account is the escrow account address for this collection
+ created at
+
+ collection creation, current purpose is to transfer payments to escrow
+
+ account for GUARANTEED payments through intents
+ intents:
+ title: |-
+ intents is the option for intents for this collection (allow, deny,
+ required)
+ type: string
+ enum:
+ - ALLOW
+ - DENY
+ - REQUIRED
+ default: ALLOW
+ description: |2-
+ - ALLOW: Allow: Intents can be made for claims, but claims can also be made without
+ intents.
+ - DENY: Deny: Intents cannot be made for claims for the collection.
+ - REQUIRED: Required: Claims cannot be made without an associated intent. An intent is
+ mandatory before a claim can be submitted.
+ ixo.claims.v1beta1.CollectionIntentOptions:
+ type: string
+ enum:
+ - ALLOW
+ - DENY
+ - REQUIRED
+ default: ALLOW
+ description: |2-
+ - ALLOW: Allow: Intents can be made for claims, but claims can also be made without
+ intents.
+ - DENY: Deny: Intents cannot be made for claims for the collection.
+ - REQUIRED: Required: Claims cannot be made without an associated intent. An intent is
+ mandatory before a claim can be submitted.
ixo.claims.v1beta1.CollectionState:
type: string
enum:
@@ -87338,10 +88177,10 @@ definitions:
NOTE: The amount field is an Int which implements the custom method
signatures required by gogoproto.
title: >-
- custom amount specified by evaluator for claim approval, if empty list
- then
+ if both amount and cw20 amount are empty then use default by
+ Collection
- use default by Collection
+ custom amount specified by evaluator for claim approval
cw20_payment:
type: array
items:
@@ -87357,11 +88196,7 @@ definitions:
a
uint64(max 18446744073709551615)
- title: >-
- custom cw20 payments specified by evaluator for claim approval, if
- empty
-
- list then use default by Collection
+ title: custom cw20 payments specified by evaluator for claim approval
ixo.claims.v1beta1.EvaluationStatus:
type: string
enum:
@@ -87371,6 +88206,113 @@ definitions:
- DISPUTED
- INVALIDATED
default: PENDING
+ ixo.claims.v1beta1.Intent:
+ type: object
+ properties:
+ id:
+ type: string
+ title: id is the incremented internal id for the intent
+ agent_did:
+ type: string
+ description: The service agent's DID (Decentralized Identifier).
+ agent_address:
+ type: string
+ description: The service agent's address.
+ collection_id:
+ type: string
+ description: The id of the collection this intent is linked to.
+ claim_id:
+ type: string
+ title: claim_id (optional, set when claim is submitted)
+ created_at:
+ type: string
+ format: date-time
+ description: The time the intent was created.
+ expire_at:
+ type: string
+ format: date-time
+ description: >-
+ Timeout period for the intent. If the claim is not submitted by this
+ time,
+
+ the intent expires.
+ status:
+ description: Status of the intent (e.g., "ACTIVE" or "FULFILLED").
+ type: string
+ enum:
+ - ACTIVE
+ - FULFILLED
+ - EXPIRED
+ default: ACTIVE
+ title: >-
+ - ACTIVE: Active: Intent is created and active, payments have been
+ transferred to
+
+ escrow if there is any
+ - FULFILLED: Fulfilled: Intent is fulfilled, was used to create a claim and funds will
+ be released on claim APPROVAL, or funds will be reverted on claim
+ REJECTION
+
+ or DISPUTE
+ - EXPIRED: Expired: Intent has expired, payments have been transferred back out of
+ escrow
+ amount:
+ type: array
+ items:
+ type: object
+ properties:
+ denom:
+ type: string
+ amount:
+ type: string
+ description: |-
+ Coin defines a token with a denomination and an amount.
+
+ NOTE: The amount field is an Int which implements the custom method
+ signatures required by gogoproto.
+ description: The payment amount the agent intends to claim, if any.
+ cw20_payment:
+ type: array
+ items:
+ type: object
+ properties:
+ address:
+ type: string
+ amount:
+ type: string
+ format: uint64
+ title: >-
+ chose uint64 for now as amounts should be small enough to fit in
+ a
+
+ uint64(max 18446744073709551615)
+ description: The CW20Payment amount the agent intends to claim, if any.
+ from_address:
+ type: string
+ title: the address the escrow payment came from
+ escrow_address:
+ type: string
+ title: the escrow account address
+ description: Intent defines the structure for a service agent's claim intent.
+ ixo.claims.v1beta1.IntentStatus:
+ type: string
+ enum:
+ - ACTIVE
+ - FULFILLED
+ - EXPIRED
+ default: ACTIVE
+ title: >-
+ - ACTIVE: Active: Intent is created and active, payments have been
+ transferred to
+
+ escrow if there is any
+ - FULFILLED: Fulfilled: Intent is fulfilled, was used to create a claim and funds will
+ be released on claim APPROVAL, or funds will be reverted on claim
+ REJECTION
+
+ or DISPUTE
+ - EXPIRED: Expired: Intent has expired, payments have been transferred back out of
+ escrow
ixo.claims.v1beta1.Params:
type: object
properties:
@@ -87383,6 +88325,9 @@ definitions:
type: string
node_fee_percentage:
type: string
+ intent_sequence:
+ type: string
+ format: uint64
ixo.claims.v1beta1.Payment:
type: object
properties:
@@ -87439,6 +88384,16 @@ definitions:
uint64(max 18446744073709551615)
title: cw20 payments, can be empty or multiple
+ is_oracle_payment:
+ type: boolean
+ title: >-
+ boolean to indicate if the payment is for oracle payments, aka it will
+ go
+
+ through network fees split NOTE: if true the payment can only have
+ amount
+
+ values(Native coins), no cw20 payments allowed then
ixo.claims.v1beta1.PaymentStatus:
type: string
enum:
@@ -87450,6 +88405,13 @@ definitions:
- FAILED
- DISPUTED_PAYMENT
default: NO_PAYMENT
+ title: |-
+ - PROMISED: Promised: Agent is contracted to receive payment
+ - AUTHORIZED: Authorized: Authz set up, no guarantee
+ - GUARANTEED: Guaranteed: Escrow set up with funds blocked
+ - PAID: Paid: Funds have been paid
+ - FAILED: Failed: Payment failed, most probably due to insufficient funds
+ - DISPUTED_PAYMENT: DisputedPayment: Payment disputed
ixo.claims.v1beta1.Payments:
type: object
properties:
@@ -87514,6 +88476,16 @@ definitions:
uint64(max 18446744073709551615)
title: cw20 payments, can be empty or multiple
+ is_oracle_payment:
+ type: boolean
+ title: >-
+ boolean to indicate if the payment is for oracle payments, aka it
+ will go
+
+ through network fees split NOTE: if true the payment can only have
+ amount
+
+ values(Native coins), no cw20 payments allowed then
evaluation:
type: object
properties:
@@ -87575,6 +88547,16 @@ definitions:
uint64(max 18446744073709551615)
title: cw20 payments, can be empty or multiple
+ is_oracle_payment:
+ type: boolean
+ title: >-
+ boolean to indicate if the payment is for oracle payments, aka it
+ will go
+
+ through network fees split NOTE: if true the payment can only have
+ amount
+
+ values(Native coins), no cw20 payments allowed then
approval:
type: object
properties:
@@ -87636,6 +88618,16 @@ definitions:
uint64(max 18446744073709551615)
title: cw20 payments, can be empty or multiple
+ is_oracle_payment:
+ type: boolean
+ title: >-
+ boolean to indicate if the payment is for oracle payments, aka it
+ will go
+
+ through network fees split NOTE: if true the payment can only have
+ amount
+
+ values(Native coins), no cw20 payments allowed then
rejection:
type: object
properties:
@@ -87697,6 +88689,16 @@ definitions:
uint64(max 18446744073709551615)
title: cw20 payments, can be empty or multiple
+ is_oracle_payment:
+ type: boolean
+ title: >-
+ boolean to indicate if the payment is for oracle payments, aka it
+ will go
+
+ through network fees split NOTE: if true the payment can only have
+ amount
+
+ values(Native coins), no cw20 payments allowed then
ixo.claims.v1beta1.QueryClaimListResponse:
type: object
properties:
@@ -87801,10 +88803,10 @@ definitions:
signatures required by gogoproto.
title: >-
- custom amount specified by evaluator for claim approval, if
- empty list then
+ if both amount and cw20 amount are empty then use default by
+ Collection
- use default by Collection
+ custom amount specified by evaluator for claim approval
cw20_payment:
type: array
items:
@@ -87822,10 +88824,9 @@ definitions:
uint64(max 18446744073709551615)
title: >-
custom cw20 payments specified by evaluator for claim
- approval, if empty
-
- list then use default by Collection
+ approval
payments_status:
+ title: payments_status is the status of the payments for the claim
type: object
properties:
submission:
@@ -87839,6 +88840,13 @@ definitions:
- FAILED
- DISPUTED_PAYMENT
default: NO_PAYMENT
+ title: |-
+ - PROMISED: Promised: Agent is contracted to receive payment
+ - AUTHORIZED: Authorized: Authz set up, no guarantee
+ - GUARANTEED: Guaranteed: Escrow set up with funds blocked
+ - PAID: Paid: Funds have been paid
+ - FAILED: Failed: Payment failed, most probably due to insufficient funds
+ - DISPUTED_PAYMENT: DisputedPayment: Payment disputed
evaluation:
type: string
enum:
@@ -87850,6 +88858,13 @@ definitions:
- FAILED
- DISPUTED_PAYMENT
default: NO_PAYMENT
+ title: |-
+ - PROMISED: Promised: Agent is contracted to receive payment
+ - AUTHORIZED: Authorized: Authz set up, no guarantee
+ - GUARANTEED: Guaranteed: Escrow set up with funds blocked
+ - PAID: Paid: Funds have been paid
+ - FAILED: Failed: Payment failed, most probably due to insufficient funds
+ - DISPUTED_PAYMENT: DisputedPayment: Payment disputed
approval:
type: string
enum:
@@ -87861,6 +88876,13 @@ definitions:
- FAILED
- DISPUTED_PAYMENT
default: NO_PAYMENT
+ title: |-
+ - PROMISED: Promised: Agent is contracted to receive payment
+ - AUTHORIZED: Authorized: Authz set up, no guarantee
+ - GUARANTEED: Guaranteed: Escrow set up with funds blocked
+ - PAID: Paid: Funds have been paid
+ - FAILED: Failed: Payment failed, most probably due to insufficient funds
+ - DISPUTED_PAYMENT: DisputedPayment: Payment disputed
rejection:
type: string
enum:
@@ -87872,6 +88894,62 @@ definitions:
- FAILED
- DISPUTED_PAYMENT
default: NO_PAYMENT
+ title: |-
+ - PROMISED: Promised: Agent is contracted to receive payment
+ - AUTHORIZED: Authorized: Authz set up, no guarantee
+ - GUARANTEED: Guaranteed: Escrow set up with funds blocked
+ - PAID: Paid: Funds have been paid
+ - FAILED: Failed: Payment failed, most probably due to insufficient funds
+ - DISPUTED_PAYMENT: DisputedPayment: Payment disputed
+ use_intent:
+ type: boolean
+ title: intent_id is the id of the intent for this claim, if any
+ amount:
+ type: array
+ items:
+ type: object
+ properties:
+ denom:
+ type: string
+ amount:
+ type: string
+ description: >-
+ Coin defines a token with a denomination and an amount.
+
+
+ NOTE: The amount field is an Int which implements the custom
+ method
+
+ signatures required by gogoproto.
+ title: >-
+ NOTE: if both amount and cw20 amount are empty then use default
+ by
+
+ Collection custom amount specified by service agent for claim
+ approval
+ cw20_payment:
+ type: array
+ items:
+ type: object
+ properties:
+ address:
+ type: string
+ amount:
+ type: string
+ format: uint64
+ title: >-
+ chose uint64 for now as amounts should be small enough to
+ fit in a
+
+ uint64(max 18446744073709551615)
+ title: >-
+ NOTE: if both amount and cw20 amount are empty then use default
+ by
+
+ Collection custom cw20 payments specified by service agent for
+ claim
+
+ approval
pagination:
type: object
properties:
@@ -88000,10 +89078,10 @@ definitions:
signatures required by gogoproto.
title: >-
- custom amount specified by evaluator for claim approval, if
- empty list then
+ if both amount and cw20 amount are empty then use default by
+ Collection
- use default by Collection
+ custom amount specified by evaluator for claim approval
cw20_payment:
type: array
items:
@@ -88019,12 +89097,9 @@ definitions:
to fit in a
uint64(max 18446744073709551615)
- title: >-
- custom cw20 payments specified by evaluator for claim
- approval, if empty
-
- list then use default by Collection
+ title: custom cw20 payments specified by evaluator for claim approval
payments_status:
+ title: payments_status is the status of the payments for the claim
type: object
properties:
submission:
@@ -88038,6 +89113,13 @@ definitions:
- FAILED
- DISPUTED_PAYMENT
default: NO_PAYMENT
+ title: |-
+ - PROMISED: Promised: Agent is contracted to receive payment
+ - AUTHORIZED: Authorized: Authz set up, no guarantee
+ - GUARANTEED: Guaranteed: Escrow set up with funds blocked
+ - PAID: Paid: Funds have been paid
+ - FAILED: Failed: Payment failed, most probably due to insufficient funds
+ - DISPUTED_PAYMENT: DisputedPayment: Payment disputed
evaluation:
type: string
enum:
@@ -88049,6 +89131,13 @@ definitions:
- FAILED
- DISPUTED_PAYMENT
default: NO_PAYMENT
+ title: |-
+ - PROMISED: Promised: Agent is contracted to receive payment
+ - AUTHORIZED: Authorized: Authz set up, no guarantee
+ - GUARANTEED: Guaranteed: Escrow set up with funds blocked
+ - PAID: Paid: Funds have been paid
+ - FAILED: Failed: Payment failed, most probably due to insufficient funds
+ - DISPUTED_PAYMENT: DisputedPayment: Payment disputed
approval:
type: string
enum:
@@ -88060,6 +89149,13 @@ definitions:
- FAILED
- DISPUTED_PAYMENT
default: NO_PAYMENT
+ title: |-
+ - PROMISED: Promised: Agent is contracted to receive payment
+ - AUTHORIZED: Authorized: Authz set up, no guarantee
+ - GUARANTEED: Guaranteed: Escrow set up with funds blocked
+ - PAID: Paid: Funds have been paid
+ - FAILED: Failed: Payment failed, most probably due to insufficient funds
+ - DISPUTED_PAYMENT: DisputedPayment: Payment disputed
rejection:
type: string
enum:
@@ -88071,6 +89167,60 @@ definitions:
- FAILED
- DISPUTED_PAYMENT
default: NO_PAYMENT
+ title: |-
+ - PROMISED: Promised: Agent is contracted to receive payment
+ - AUTHORIZED: Authorized: Authz set up, no guarantee
+ - GUARANTEED: Guaranteed: Escrow set up with funds blocked
+ - PAID: Paid: Funds have been paid
+ - FAILED: Failed: Payment failed, most probably due to insufficient funds
+ - DISPUTED_PAYMENT: DisputedPayment: Payment disputed
+ use_intent:
+ type: boolean
+ title: intent_id is the id of the intent for this claim, if any
+ amount:
+ type: array
+ items:
+ type: object
+ properties:
+ denom:
+ type: string
+ amount:
+ type: string
+ description: >-
+ Coin defines a token with a denomination and an amount.
+
+
+ NOTE: The amount field is an Int which implements the custom
+ method
+
+ signatures required by gogoproto.
+ title: >-
+ NOTE: if both amount and cw20 amount are empty then use default by
+
+ Collection custom amount specified by service agent for claim
+ approval
+ cw20_payment:
+ type: array
+ items:
+ type: object
+ properties:
+ address:
+ type: string
+ amount:
+ type: string
+ format: uint64
+ title: >-
+ chose uint64 for now as amounts should be small enough to
+ fit in a
+
+ uint64(max 18446744073709551615)
+ title: >-
+ NOTE: if both amount and cw20 amount are empty then use default by
+
+ Collection custom cw20 payments specified by service agent for
+ claim
+
+ approval
ixo.claims.v1beta1.QueryCollectionListResponse:
type: object
properties:
@@ -88235,6 +89385,16 @@ definitions:
uint64(max 18446744073709551615)
title: cw20 payments, can be empty or multiple
+ is_oracle_payment:
+ type: boolean
+ title: >-
+ boolean to indicate if the payment is for oracle
+ payments, aka it will go
+
+ through network fees split NOTE: if true the payment can
+ only have amount
+
+ values(Native coins), no cw20 payments allowed then
evaluation:
type: object
properties:
@@ -88297,6 +89457,16 @@ definitions:
uint64(max 18446744073709551615)
title: cw20 payments, can be empty or multiple
+ is_oracle_payment:
+ type: boolean
+ title: >-
+ boolean to indicate if the payment is for oracle
+ payments, aka it will go
+
+ through network fees split NOTE: if true the payment can
+ only have amount
+
+ values(Native coins), no cw20 payments allowed then
approval:
type: object
properties:
@@ -88359,6 +89529,16 @@ definitions:
uint64(max 18446744073709551615)
title: cw20 payments, can be empty or multiple
+ is_oracle_payment:
+ type: boolean
+ title: >-
+ boolean to indicate if the payment is for oracle
+ payments, aka it will go
+
+ through network fees split NOTE: if true the payment can
+ only have amount
+
+ values(Native coins), no cw20 payments allowed then
rejection:
type: object
properties:
@@ -88421,6 +89601,16 @@ definitions:
uint64(max 18446744073709551615)
title: cw20 payments, can be empty or multiple
+ is_oracle_payment:
+ type: boolean
+ title: >-
+ boolean to indicate if the payment is for oracle
+ payments, aka it will go
+
+ through network fees split NOTE: if true the payment can
+ only have amount
+
+ values(Native coins), no cw20 payments allowed then
signer:
type: string
title: signer address
@@ -88432,6 +89622,34 @@ definitions:
invalid
(internally calculated)
+ escrow_account:
+ type: string
+ title: >-
+ escrow_account is the escrow account address for this collection
+ created at
+
+ collection creation, current purpose is to transfer payments to
+ escrow
+
+ account for GUARANTEED payments through intents
+ intents:
+ title: >-
+ intents is the option for intents for this collection (allow,
+ deny,
+
+ required)
+ type: string
+ enum:
+ - ALLOW
+ - DENY
+ - REQUIRED
+ default: ALLOW
+ description: |2-
+ - ALLOW: Allow: Intents can be made for claims, but claims can also be made without
+ intents.
+ - DENY: Deny: Intents cannot be made for claims for the collection.
+ - REQUIRED: Required: Claims cannot be made without an associated intent. An intent is
+ mandatory before a claim can be submitted.
pagination:
type: object
properties:
@@ -88619,6 +89837,16 @@ definitions:
uint64(max 18446744073709551615)
title: cw20 payments, can be empty or multiple
+ is_oracle_payment:
+ type: boolean
+ title: >-
+ boolean to indicate if the payment is for oracle payments,
+ aka it will go
+
+ through network fees split NOTE: if true the payment can
+ only have amount
+
+ values(Native coins), no cw20 payments allowed then
evaluation:
type: object
properties:
@@ -88680,6 +89908,16 @@ definitions:
uint64(max 18446744073709551615)
title: cw20 payments, can be empty or multiple
+ is_oracle_payment:
+ type: boolean
+ title: >-
+ boolean to indicate if the payment is for oracle payments,
+ aka it will go
+
+ through network fees split NOTE: if true the payment can
+ only have amount
+
+ values(Native coins), no cw20 payments allowed then
approval:
type: object
properties:
@@ -88741,6 +89979,16 @@ definitions:
uint64(max 18446744073709551615)
title: cw20 payments, can be empty or multiple
+ is_oracle_payment:
+ type: boolean
+ title: >-
+ boolean to indicate if the payment is for oracle payments,
+ aka it will go
+
+ through network fees split NOTE: if true the payment can
+ only have amount
+
+ values(Native coins), no cw20 payments allowed then
rejection:
type: object
properties:
@@ -88802,6 +90050,16 @@ definitions:
uint64(max 18446744073709551615)
title: cw20 payments, can be empty or multiple
+ is_oracle_payment:
+ type: boolean
+ title: >-
+ boolean to indicate if the payment is for oracle payments,
+ aka it will go
+
+ through network fees split NOTE: if true the payment can
+ only have amount
+
+ values(Native coins), no cw20 payments allowed then
signer:
type: string
title: signer address
@@ -88813,6 +90071,34 @@ definitions:
invalid
(internally calculated)
+ escrow_account:
+ type: string
+ title: >-
+ escrow_account is the escrow account address for this collection
+ created at
+
+ collection creation, current purpose is to transfer payments to
+ escrow
+
+ account for GUARANTEED payments through intents
+ intents:
+ title: >-
+ intents is the option for intents for this collection (allow,
+ deny,
+
+ required)
+ type: string
+ enum:
+ - ALLOW
+ - DENY
+ - REQUIRED
+ default: ALLOW
+ description: |2-
+ - ALLOW: Allow: Intents can be made for claims, but claims can also be made without
+ intents.
+ - DENY: Deny: Intents cannot be made for claims for the collection.
+ - REQUIRED: Required: Claims cannot be made without an associated intent. An intent is
+ mandatory before a claim can be submitted.
ixo.claims.v1beta1.QueryDisputeListResponse:
type: object
properties:
@@ -88887,6 +90173,222 @@ definitions:
type: string
encrypted:
type: boolean
+ ixo.claims.v1beta1.QueryIntentListResponse:
+ type: object
+ properties:
+ intents:
+ type: array
+ items:
+ type: object
+ properties:
+ id:
+ type: string
+ title: id is the incremented internal id for the intent
+ agent_did:
+ type: string
+ description: The service agent's DID (Decentralized Identifier).
+ agent_address:
+ type: string
+ description: The service agent's address.
+ collection_id:
+ type: string
+ description: The id of the collection this intent is linked to.
+ claim_id:
+ type: string
+ title: claim_id (optional, set when claim is submitted)
+ created_at:
+ type: string
+ format: date-time
+ description: The time the intent was created.
+ expire_at:
+ type: string
+ format: date-time
+ description: >-
+ Timeout period for the intent. If the claim is not submitted by
+ this time,
+
+ the intent expires.
+ status:
+ description: Status of the intent (e.g., "ACTIVE" or "FULFILLED").
+ type: string
+ enum:
+ - ACTIVE
+ - FULFILLED
+ - EXPIRED
+ default: ACTIVE
+ title: >-
+ - ACTIVE: Active: Intent is created and active, payments have
+ been transferred to
+
+ escrow if there is any
+ - FULFILLED: Fulfilled: Intent is fulfilled, was used to create a claim and funds will
+ be released on claim APPROVAL, or funds will be reverted on
+ claim REJECTION
+
+ or DISPUTE
+ - EXPIRED: Expired: Intent has expired, payments have been transferred back out of
+ escrow
+ amount:
+ type: array
+ items:
+ type: object
+ properties:
+ denom:
+ type: string
+ amount:
+ type: string
+ description: >-
+ Coin defines a token with a denomination and an amount.
+
+
+ NOTE: The amount field is an Int which implements the custom
+ method
+
+ signatures required by gogoproto.
+ description: The payment amount the agent intends to claim, if any.
+ cw20_payment:
+ type: array
+ items:
+ type: object
+ properties:
+ address:
+ type: string
+ amount:
+ type: string
+ format: uint64
+ title: >-
+ chose uint64 for now as amounts should be small enough to
+ fit in a
+
+ uint64(max 18446744073709551615)
+ description: The CW20Payment amount the agent intends to claim, if any.
+ from_address:
+ type: string
+ title: the address the escrow payment came from
+ escrow_address:
+ type: string
+ title: the escrow account address
+ description: Intent defines the structure for a service agent's claim intent.
+ pagination:
+ type: object
+ properties:
+ next_key:
+ type: string
+ format: byte
+ description: |-
+ next_key is the key to be passed to PageRequest.key to
+ query the next page most efficiently. It will be empty if
+ there are no more results.
+ total:
+ type: string
+ format: uint64
+ title: >-
+ total is total number of results available if
+ PageRequest.count_total
+
+ was set, its value is undefined otherwise
+ description: |-
+ PageResponse is to be embedded in gRPC response messages where the
+ corresponding request message has used PageRequest.
+
+ message SomeResponse {
+ repeated Bar results = 1;
+ PageResponse page = 2;
+ }
+ ixo.claims.v1beta1.QueryIntentResponse:
+ type: object
+ properties:
+ intent:
+ type: object
+ properties:
+ id:
+ type: string
+ title: id is the incremented internal id for the intent
+ agent_did:
+ type: string
+ description: The service agent's DID (Decentralized Identifier).
+ agent_address:
+ type: string
+ description: The service agent's address.
+ collection_id:
+ type: string
+ description: The id of the collection this intent is linked to.
+ claim_id:
+ type: string
+ title: claim_id (optional, set when claim is submitted)
+ created_at:
+ type: string
+ format: date-time
+ description: The time the intent was created.
+ expire_at:
+ type: string
+ format: date-time
+ description: >-
+ Timeout period for the intent. If the claim is not submitted by
+ this time,
+
+ the intent expires.
+ status:
+ description: Status of the intent (e.g., "ACTIVE" or "FULFILLED").
+ type: string
+ enum:
+ - ACTIVE
+ - FULFILLED
+ - EXPIRED
+ default: ACTIVE
+ title: >-
+ - ACTIVE: Active: Intent is created and active, payments have been
+ transferred to
+
+ escrow if there is any
+ - FULFILLED: Fulfilled: Intent is fulfilled, was used to create a claim and funds will
+ be released on claim APPROVAL, or funds will be reverted on claim
+ REJECTION
+
+ or DISPUTE
+ - EXPIRED: Expired: Intent has expired, payments have been transferred back out of
+ escrow
+ amount:
+ type: array
+ items:
+ type: object
+ properties:
+ denom:
+ type: string
+ amount:
+ type: string
+ description: >-
+ Coin defines a token with a denomination and an amount.
+
+
+ NOTE: The amount field is an Int which implements the custom
+ method
+
+ signatures required by gogoproto.
+ description: The payment amount the agent intends to claim, if any.
+ cw20_payment:
+ type: array
+ items:
+ type: object
+ properties:
+ address:
+ type: string
+ amount:
+ type: string
+ format: uint64
+ title: >-
+ chose uint64 for now as amounts should be small enough to
+ fit in a
+
+ uint64(max 18446744073709551615)
+ description: The CW20Payment amount the agent intends to claim, if any.
+ from_address:
+ type: string
+ title: the address the escrow payment came from
+ escrow_address:
+ type: string
+ title: the escrow account address
+ description: Intent defines the structure for a service agent's claim intent.
ixo.claims.v1beta1.QueryParamsResponse:
type: object
properties:
@@ -88903,6 +90405,9 @@ definitions:
type: string
node_fee_percentage:
type: string
+ intent_sequence:
+ type: string
+ format: uint64
ixo.entity.v1beta1.Entity:
type: object
properties:
diff --git a/proto/ixo/claims/v1beta1/authz.proto b/proto/ixo/claims/v1beta1/authz.proto
index 0a000a94..04114161 100644
--- a/proto/ixo/claims/v1beta1/authz.proto
+++ b/proto/ixo/claims/v1beta1/authz.proto
@@ -6,6 +6,7 @@ import "cosmos_proto/cosmos.proto";
import "google/protobuf/timestamp.proto";
import "cosmos/base/v1beta1/coin.proto";
import "ixo/claims/v1beta1/claims.proto";
+import "google/protobuf/duration.proto";
import "cosmos/bank/v1beta1/bank.proto";
option go_package = "github.com/ixofoundation/ixo-blockchain/v3/x/claims/types";
@@ -23,6 +24,19 @@ message SubmitClaimConstraints {
// collection_id indicates to which Collection this claim belongs
string collection_id = 1;
uint64 agent_quota = 2;
+ // custom max_amount allowed to be specified by service agent for claim
+ // approval, if empty then no custom amount is allowed
+ repeated cosmos.base.v1beta1.Coin max_amount = 3 [
+ (gogoproto.nullable) = false,
+ (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
+ ];
+ // custom max_cw20_payment allowed to be specified by service agent for claim
+ // approval, if empty then no custom amount is allowed
+ repeated CW20Payment max_cw20_payment = 4;
+ // intent_duration_ns is the duration for which the intent is active, after
+ // which it will expire (in nanoseconds)
+ google.protobuf.Duration intent_duration_ns = 5
+ [ (gogoproto.nullable) = false, (gogoproto.stdduration) = true ];
}
message EvaluateClaimAuthorization {
diff --git a/proto/ixo/claims/v1beta1/claims.proto b/proto/ixo/claims/v1beta1/claims.proto
index 0b9a5aed..7e50df27 100644
--- a/proto/ixo/claims/v1beta1/claims.proto
+++ b/proto/ixo/claims/v1beta1/claims.proto
@@ -22,6 +22,7 @@ message Params {
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
+ uint64 intent_sequence = 5;
}
enum CollectionState {
@@ -30,6 +31,17 @@ enum CollectionState {
CLOSED = 2 [ (gogoproto.enumvalue_customname) = "closed" ];
}
+enum CollectionIntentOptions {
+ // Allow: Intents can be made for claims, but claims can also be made without
+ // intents.
+ ALLOW = 0 [ (gogoproto.enumvalue_customname) = "allow" ];
+ // Deny: Intents cannot be made for claims for the collection.
+ DENY = 1 [ (gogoproto.enumvalue_customname) = "deny" ];
+ // Required: Claims cannot be made without an associated intent. An intent is
+ // mandatory before a claim can be submitted.
+ REQUIRED = 2 [ (gogoproto.enumvalue_customname) = "required" ];
+}
+
enum EvaluationStatus {
PENDING = 0 [ (gogoproto.enumvalue_customname) = "pending" ];
APPROVED = 1 [ (gogoproto.enumvalue_customname) = "approved" ];
@@ -38,6 +50,19 @@ enum EvaluationStatus {
INVALIDATED = 4 [ (gogoproto.enumvalue_customname) = "invalidated" ];
}
+enum IntentStatus {
+ // Active: Intent is created and active, payments have been transferred to
+ // escrow if there is any
+ ACTIVE = 0 [ (gogoproto.enumvalue_customname) = "active" ];
+ // Fulfilled: Intent is fulfilled, was used to create a claim and funds will
+ // be released on claim APPROVAL, or funds will be reverted on claim REJECTION
+ // or DISPUTE
+ FULFILLED = 1 [ (gogoproto.enumvalue_customname) = "fulfilled" ];
+ // Expired: Intent has expired, payments have been transferred back out of
+ // escrow
+ EXPIRED = 2 [ (gogoproto.enumvalue_customname) = "expired" ];
+}
+
enum PaymentType {
SUBMISSION = 0 [ (gogoproto.enumvalue_customname) = "submission" ];
APPROVAL = 1 [ (gogoproto.enumvalue_customname) = "approval" ];
@@ -47,14 +72,17 @@ enum PaymentType {
enum PaymentStatus {
NO_PAYMENT = 0 [ (gogoproto.enumvalue_customname) = "no_payment" ];
- PROMISED = 1 [ (gogoproto.enumvalue_customname) =
- "promised" ]; // agent is contracted to receive payment
- AUTHORIZED = 2 [ (gogoproto.enumvalue_customname) =
- "authorized" ]; // authz set up, no guarantee
- GUARANTEED = 3 [ (gogoproto.enumvalue_customname) =
- "guaranteed" ]; // escrow set up with funds blocked
+ // Promised: Agent is contracted to receive payment
+ PROMISED = 1 [ (gogoproto.enumvalue_customname) = "promised" ];
+ // Authorized: Authz set up, no guarantee
+ AUTHORIZED = 2 [ (gogoproto.enumvalue_customname) = "authorized" ];
+ // Guaranteed: Escrow set up with funds blocked
+ GUARANTEED = 3 [ (gogoproto.enumvalue_customname) = "guaranteed" ];
+ // Paid: Funds have been paid
PAID = 4 [ (gogoproto.enumvalue_customname) = "paid" ];
+ // Failed: Payment failed, most probably due to insufficient funds
FAILED = 5 [ (gogoproto.enumvalue_customname) = "failed" ];
+ // DisputedPayment: Payment disputed
DISPUTED_PAYMENT = 6 [ (gogoproto.enumvalue_customname) = "disputed" ];
}
@@ -99,6 +127,13 @@ message Collection {
// invalidated is the number of claims that have been evaluated as invalid
// (internally calculated)
uint64 invalidated = 16;
+ // escrow_account is the escrow account address for this collection created at
+ // collection creation, current purpose is to transfer payments to escrow
+ // account for GUARANTEED payments through intents
+ string escrow_account = 17;
+ // intents is the option for intents for this collection (allow, deny,
+ // required)
+ CollectionIntentOptions intents = 18;
}
message Payments {
@@ -124,6 +159,10 @@ message Payment {
[ (gogoproto.nullable) = false, (gogoproto.stdduration) = true ];
// cw20 payments, can be empty or multiple
repeated CW20Payment cw20_payment = 5;
+ // boolean to indicate if the payment is for oracle payments, aka it will go
+ // through network fees split NOTE: if true the payment can only have amount
+ // values(Native coins), no cw20 payments allowed then
+ bool is_oracle_payment = 6;
}
message Contract1155Payment {
@@ -155,7 +194,20 @@ message Claim {
string claim_id = 5;
// evaluation is the result of one or more claim evaluations
Evaluation evaluation = 6;
+ // payments_status is the status of the payments for the claim
ClaimPayments payments_status = 7;
+ // intent_id is the id of the intent for this claim, if any
+ bool use_intent = 8;
+ // NOTE: if both amount and cw20 amount are empty then use default by
+ // Collection custom amount specified by service agent for claim approval
+ repeated cosmos.base.v1beta1.Coin amount = 9 [
+ (gogoproto.nullable) = false,
+ (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
+ ];
+ // NOTE: if both amount and cw20 amount are empty then use default by
+ // Collection custom cw20 payments specified by service agent for claim
+ // approval
+ repeated CW20Payment cw20_payment = 10;
}
message ClaimPayments {
@@ -188,14 +240,13 @@ message Evaluation {
// evaluationDate is the date and time that the claim evaluation was submitted
// on-chain
google.protobuf.Timestamp evaluation_date = 9 [ (gogoproto.stdtime) = true ];
- // custom amount specified by evaluator for claim approval, if empty list then
- // use default by Collection
+ // if both amount and cw20 amount are empty then use default by Collection
+ // custom amount specified by evaluator for claim approval
repeated cosmos.base.v1beta1.Coin amount = 10 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
- // custom cw20 payments specified by evaluator for claim approval, if empty
- // list then use default by Collection
+ // custom cw20 payments specified by evaluator for claim approval
repeated CW20Payment cw20_payment = 11;
}
@@ -212,3 +263,35 @@ message DisputeData {
string proof = 3;
bool encrypted = 4;
}
+
+// Intent defines the structure for a service agent's claim intent.
+message Intent {
+ // id is the incremented internal id for the intent
+ string id = 1;
+ // The service agent's DID (Decentralized Identifier).
+ string agent_did = 2;
+ // The service agent's address.
+ string agent_address = 3;
+ // The id of the collection this intent is linked to.
+ string collection_id = 4;
+ // claim_id (optional, set when claim is submitted)
+ string claim_id = 5;
+ // The time the intent was created.
+ google.protobuf.Timestamp created_at = 6 [ (gogoproto.stdtime) = true ];
+ // Timeout period for the intent. If the claim is not submitted by this time,
+ // the intent expires.
+ google.protobuf.Timestamp expire_at = 7 [ (gogoproto.stdtime) = true ];
+ // Status of the intent (e.g., "ACTIVE" or "FULFILLED").
+ IntentStatus status = 8;
+ // The payment amount the agent intends to claim, if any.
+ repeated cosmos.base.v1beta1.Coin amount = 9 [
+ (gogoproto.nullable) = false,
+ (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
+ ];
+ // The CW20Payment amount the agent intends to claim, if any.
+ repeated CW20Payment cw20_payment = 10;
+ // the address the escrow payment came from
+ string from_address = 11;
+ // the escrow account address
+ string escrow_address = 12;
+}
diff --git a/proto/ixo/claims/v1beta1/event.proto b/proto/ixo/claims/v1beta1/event.proto
index 16038fbc..d3c86424 100755
--- a/proto/ixo/claims/v1beta1/event.proto
+++ b/proto/ixo/claims/v1beta1/event.proto
@@ -29,4 +29,10 @@ message ClaimDisputedEvent { Dispute dispute = 1; }
message PaymentWithdrawnEvent { WithdrawPaymentConstraints withdraw = 1; }
// ClaimDisputedEvent is an event triggered on a Claim dispute
-message PaymentWithdrawCreatedEvent { WithdrawPaymentConstraints withdraw = 1; }
\ No newline at end of file
+message PaymentWithdrawCreatedEvent { WithdrawPaymentConstraints withdraw = 1; }
+
+// IntentSubmittedEvent is an event triggered on an Intent submission
+message IntentSubmittedEvent { Intent intent = 1; }
+
+// IntentUpdatedEvent is an event triggered on an Intent update
+message IntentUpdatedEvent { Intent intent = 1; }
\ No newline at end of file
diff --git a/proto/ixo/claims/v1beta1/genesis.proto b/proto/ixo/claims/v1beta1/genesis.proto
index 258566fc..d92d2124 100755
--- a/proto/ixo/claims/v1beta1/genesis.proto
+++ b/proto/ixo/claims/v1beta1/genesis.proto
@@ -12,4 +12,5 @@ message GenesisState {
repeated Collection collections = 2 [ (gogoproto.nullable) = false ];
repeated Claim claims = 3 [ (gogoproto.nullable) = false ];
repeated Dispute disputes = 4 [ (gogoproto.nullable) = false ];
+ repeated Intent intents = 5 [ (gogoproto.nullable) = false ];
}
diff --git a/proto/ixo/claims/v1beta1/query.proto b/proto/ixo/claims/v1beta1/query.proto
old mode 100755
new mode 100644
index eadeeb2c..29274d45
--- a/proto/ixo/claims/v1beta1/query.proto
+++ b/proto/ixo/claims/v1beta1/query.proto
@@ -33,6 +33,13 @@ service Query {
rpc DisputeList(QueryDisputeListRequest) returns (QueryDisputeListResponse) {
option (google.api.http).get = "/ixo/dispute";
}
+ rpc Intent(QueryIntentRequest) returns (QueryIntentResponse) {
+ option (google.api.http).get =
+ "/ixo/intent/{agentAddress}/{collectionId}/{id}";
+ }
+ rpc IntentList(QueryIntentListRequest) returns (QueryIntentListResponse) {
+ option (google.api.http).get = "/ixo/intent";
+ }
}
message QueryParamsRequest {}
@@ -84,3 +91,22 @@ message QueryDisputeListResponse {
repeated Dispute disputes = 1 [ (gogoproto.nullable) = false ];
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}
+
+message QueryIntentRequest {
+ string id = 1;
+ string agentAddress = 2;
+ string collectionId = 3;
+}
+
+message QueryIntentResponse {
+ Intent intent = 1 [ (gogoproto.nullable) = false ];
+}
+
+message QueryIntentListRequest {
+ cosmos.base.query.v1beta1.PageRequest pagination = 1;
+}
+
+message QueryIntentListResponse {
+ repeated Intent intents = 1 [ (gogoproto.nullable) = false ];
+ cosmos.base.query.v1beta1.PageResponse pagination = 2;
+}
diff --git a/proto/ixo/claims/v1beta1/tx.proto b/proto/ixo/claims/v1beta1/tx.proto
index 26ef01a5..dd14b341 100644
--- a/proto/ixo/claims/v1beta1/tx.proto
+++ b/proto/ixo/claims/v1beta1/tx.proto
@@ -24,6 +24,9 @@ service Msg {
returns (MsgUpdateCollectionDatesResponse);
rpc UpdateCollectionPayments(MsgUpdateCollectionPayments)
returns (MsgUpdateCollectionPaymentsResponse);
+ rpc UpdateCollectionIntents(MsgUpdateCollectionIntents)
+ returns (MsgUpdateCollectionIntentsResponse);
+ rpc ClaimIntent(MsgClaimIntent) returns (MsgClaimIntentResponse);
}
message MsgCreateCollection {
@@ -47,8 +50,10 @@ message MsgCreateCollection {
// payments is the amount paid for claim submission, evaluation, approval, or
// rejection
Payments payments = 8;
+ // intents is the option for intents for this collection (allow, deny,
+ // required)
+ CollectionIntentOptions intents = 9;
}
-
message MsgCreateCollectionResponse {}
message MsgSubmitClaim {
@@ -66,8 +71,22 @@ message MsgSubmitClaim {
string agent_address = 4;
// admin address used to sign this message, validated against Collection Admin
string admin_address = 5;
+ // use_intent is the option for using intent for this claim if it exists and
+ // is active. NOTE: if use_intent is true then amount and cw20 amount are
+ // ignored and overriden with intent amounts. NOTE: if use_intent is true and
+ // there is no active intent then will error
+ bool use_intent = 6;
+ // NOTE: if both amount and cw20_payment are empty then use default by
+ // Collection custom amount specified by service agent for claim approval
+ repeated cosmos.base.v1beta1.Coin amount = 7 [
+ (gogoproto.nullable) = false,
+ (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
+ ];
+ // NOTE: if both amount and cw20 amount are empty then use default by
+ // Collection custom cw20 payments specified by service agent for claim
+ // approval
+ repeated CW20Payment cw20_payment = 8;
}
-
message MsgSubmitClaimResponse {}
message MsgEvaluateClaim {
@@ -95,17 +114,18 @@ message MsgEvaluateClaim {
uint32 reason = 8;
// verificationProof is the cid of the evaluation Verfiable Credential
string verification_proof = 9;
- // custom amount specified by evaluator for claim approval, if empty list then
- // use default by Collection
+ // NOTE: if claim is using intent, then amount and cw20 amount are ignored and overriden with intent amounts
+ // NOTE: if both amount and cw20 amount are empty then use collection default
+ // custom amount specified by evaluator for claim approval
repeated cosmos.base.v1beta1.Coin amount = 10 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
- // custom cw20 payments specified by evaluator for claim approval, if empty
- // list then use default by Collection
+ // NOTE: if claim is using intent, then amount and cw20 amount are ignored and overriden with intent amounts
+ // NOTE: if both amount and cw20 amount are empty then use collection default
+ // custom cw20 payments specified by evaluator for claim approval
repeated CW20Payment cw20_payment = 11;
}
-
message MsgEvaluateClaimResponse {}
// Agent laying dispute must be admin for Collection, or controller on
@@ -127,7 +147,6 @@ message MsgDisputeClaim {
int32 dispute_type = 4;
DisputeData data = 5;
}
-
message MsgDisputeClaimResponse {}
message MsgWithdrawPayment {
@@ -158,7 +177,6 @@ message MsgWithdrawPayment {
// cw20 payments, can be empty or multiple
repeated CW20Payment cw20_payment = 10;
}
-
message MsgWithdrawPaymentResponse {}
message MsgUpdateCollectionState {
@@ -172,7 +190,6 @@ message MsgUpdateCollectionState {
// admin address used to sign this message, validated against Collection Admin
string admin_address = 3;
}
-
message MsgUpdateCollectionStateResponse {}
message MsgUpdateCollectionDates {
@@ -188,7 +205,6 @@ message MsgUpdateCollectionDates {
// admin address used to sign this message, validated against Collection Admin
string admin_address = 4;
}
-
message MsgUpdateCollectionDatesResponse {}
message MsgUpdateCollectionPayments {
@@ -202,5 +218,49 @@ message MsgUpdateCollectionPayments {
// admin address used to sign this message, validated against Collection Admin
string admin_address = 3;
}
+message MsgUpdateCollectionPaymentsResponse {}
+
+message MsgUpdateCollectionIntents {
+ option (cosmos.msg.v1.signer) = "admin_address";
-message MsgUpdateCollectionPaymentsResponse {}
\ No newline at end of file
+ // collection_id indicates which Collection to update
+ string collection_id = 1;
+ // intents is the option for intents for this collection (allow, deny,
+ // required)
+ CollectionIntentOptions intents = 2;
+ // admin address used to sign this message, validated against Collection Admin
+ string admin_address = 3;
+}
+message MsgUpdateCollectionIntentsResponse {}
+
+message MsgClaimIntent {
+ option (cosmos.msg.v1.signer) = "agent_address";
+
+ // The service agent's DID (Decentralized Identifier).
+ string agent_did = 1 [
+ (gogoproto.casttype) =
+ "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types.DIDFragment"
+ ];
+ // The service agent's address (who submits this message).
+ string agent_address = 2;
+ // The id of the collection this intent is linked to.
+ string collection_id = 3;
+ // NOTE: if both amount and cw20 amount are empty then default by Collection
+ // is used (APPROVAL payment). The desired claim amount, if any.
+ repeated cosmos.base.v1beta1.Coin amount = 4 [
+ (gogoproto.nullable) = false,
+ (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
+ ];
+ // NOTE: if both amount and cw20 amount are empty then default by Collection
+ // is used (APPROVAL payment). The custom CW20 payment, if any.
+ repeated CW20Payment cw20_payment = 5;
+}
+
+// MsgClaimIntentResponse defines the response after submitting an intent.
+message MsgClaimIntentResponse {
+ // Resulting intent id.
+ string intent_id = 1;
+ // Timeout period for the intent. If the claim is not submitted by this time,
+ // the intent expires.
+ google.protobuf.Timestamp expire_at = 2 [ (gogoproto.stdtime) = true ];
+}
diff --git a/wasmbinding/stargate_whitelist.go b/wasmbinding/stargate_whitelist.go
index abb5d135..c9a4292d 100755
--- a/wasmbinding/stargate_whitelist.go
+++ b/wasmbinding/stargate_whitelist.go
@@ -18,6 +18,7 @@ import (
entitytypes "github.com/ixofoundation/ixo-blockchain/v3/x/entity/types"
epochtypes "github.com/ixofoundation/ixo-blockchain/v3/x/epochs/types"
iidtypes "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types"
+ minttypes "github.com/ixofoundation/ixo-blockchain/v3/x/mint/types"
smartaccounttypes "github.com/ixofoundation/ixo-blockchain/v3/x/smart-account/types"
tokentypes "github.com/ixofoundation/ixo-blockchain/v3/x/token/types"
)
@@ -99,6 +100,8 @@ func init() {
setWhitelistedQuery("/ixo.claims.v1beta1.Query/Collection", &claimstypes.QueryCollectionResponse{})
setWhitelistedQuery("/ixo.claims.v1beta1.Query/Claim", &claimstypes.QueryClaimResponse{})
setWhitelistedQuery("/ixo.claims.v1beta1.Query/Dispute", &claimstypes.QueryDisputeResponse{})
+ setWhitelistedQuery("/ixo.claims.v1beta1.Query/Intent", &claimstypes.QueryIntentResponse{})
+ setWhitelistedQuery("/ixo.claims.v1beta1.Query/IntentList", &claimstypes.QueryIntentListResponse{})
// entity
setWhitelistedQuery("/ixo.entity.v1beta1.Query/Params", &entitytypes.QueryParamsResponse{})
@@ -111,6 +114,7 @@ func init() {
// token
setWhitelistedQuery("/ixo.token.v1beta1.Query/Params", &tokentypes.QueryParamsResponse{})
setWhitelistedQuery("/ixo.token.v1beta1.Query/TokenMetadata", &tokentypes.QueryTokenMetadataResponse{})
+ setWhitelistedQuery("/ixo.token.v1beta1.Query/TokenDoc", &tokentypes.QueryTokenDocResponse{})
// smartaccount
setWhitelistedQuery("/ixo.smartaccount.v1beta1.Query/Params", &smartaccounttypes.QueryParamsResponse{})
@@ -120,6 +124,10 @@ func init() {
// epochs
setWhitelistedQuery("/ixo.epochs.v1beta1.Query/EpochInfos", &epochtypes.QueryEpochsInfoResponse{})
setWhitelistedQuery("/ixo.epochs.v1beta1.Query/CurrentEpoch", &epochtypes.QueryCurrentEpochResponse{})
+
+ // mint
+ setWhitelistedQuery("/ixo.mint.v1beta1.Query/Params", &minttypes.QueryParamsResponse{})
+ setWhitelistedQuery("/ixo.mint.v1beta1.Query/EpochProvisions", &minttypes.QueryEpochProvisionsResponse{})
}
// IsWhitelistedQuery returns if the query is not whitelisted.
diff --git a/x/bonds/types/tx.go b/x/bonds/types/tx.go
index 8e681fd6..451f8e24 100755
--- a/x/bonds/types/tx.go
+++ b/x/bonds/types/tx.go
@@ -242,8 +242,6 @@ func NewMsgWithdrawReserve(withdrawerDid iidtypes.DIDFragment, amount sdk.Coins,
func (msg MsgWithdrawReserve) GetIidController() iidtypes.DIDFragment { return msg.WithdrawerDid }
-// TODO: test messages once sdk works and they say we can safely remove all GetSigners and ValidateBasic, do so and test
-
func (msg MsgWithdrawReserve) Route() string { return RouterKey }
func (msg MsgWithdrawReserve) Type() string { return TypeMsgWithdrawReserve }
diff --git a/x/claims/abci.go b/x/claims/abci.go
new file mode 100644
index 00000000..c943751d
--- /dev/null
+++ b/x/claims/abci.go
@@ -0,0 +1,50 @@
+package claims
+
+import (
+ sdk "github.com/cosmos/cosmos-sdk/types"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/claims/keeper"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/claims/types"
+)
+
+// NOTE: if performance becomes an issue, we can consider using a similar approach to cosmos sdk grants queue
+// for active intents
+
+// EndBlocker is the end blocker function for the claims module
+func EndBlocker(ctx sdk.Context, k keeper.Keeper) {
+ // Get iterator for active intents
+ iterator := k.GetAll(ctx, types.IntentKey)
+ defer iterator.Close()
+
+ for ; iterator.Valid(); iterator.Next() {
+ var intent types.Intent
+ k.Unmarshal(iterator.Value(), &intent)
+
+ // Check if the intent is past its expiration date
+ if ctx.BlockTime().After(*intent.ExpireAt) {
+ // Get account used for APPROVAL payments on collection
+ fromAddress, err := sdk.AccAddressFromBech32(intent.FromAddress)
+ if err != nil {
+ panic(err)
+ }
+ // Get escrow address
+ escrow, err := sdk.AccAddressFromBech32(intent.EscrowAddress)
+ if err != nil {
+ panic(err)
+ }
+
+ // Transfer funds back to the original account
+ err = k.TransferIntentPayments(ctx, escrow, fromAddress, intent.Amount, intent.Cw20Payment)
+ if err != nil {
+ // if this happens then it means there is funds missing in escrow account, should never happen
+ panic(err)
+ }
+
+ // Mark intent as expired
+ intent.Status = types.IntentStatus_expired
+ err = k.RemoveIntentAndEmitEvents(ctx, intent)
+ if err != nil {
+ panic(err)
+ }
+ }
+ }
+}
diff --git a/x/claims/autocli.go b/x/claims/autocli.go
index f9e7c1a2..aef41f40 100644
--- a/x/claims/autocli.go
+++ b/x/claims/autocli.go
@@ -43,6 +43,17 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
Short: "Query for a dispute",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "proof"}},
},
+ {
+ RpcMethod: "IntentList",
+ Use: "intent-list",
+ Short: "Query for all intents",
+ },
+ {
+ RpcMethod: "Intent",
+ Use: "intent [agent-address] [collection-id] [id]",
+ Short: "Query for an intent",
+ PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "agentAddress"}, {ProtoField: "collectionId"}, {ProtoField: "id"}},
+ },
{
RpcMethod: "Params",
Use: "params",
diff --git a/x/claims/client/cli/tx.go b/x/claims/client/cli/tx.go
index abb9d8d2..7f1e641c 100755
--- a/x/claims/client/cli/tx.go
+++ b/x/claims/client/cli/tx.go
@@ -151,3 +151,27 @@ func NewCmdWithdrawPayment() *cobra.Command {
flags.AddTxFlagsToCmd(cmd)
return cmd
}
+
+func NewCmdSubmitIntent() *cobra.Command {
+ cmd := &cobra.Command{
+ Use: "submit-intent [claim-intent-doc]",
+ Short: "Submit a claim - flag is raw json with struct of MsgClaimIntent",
+ Args: cobra.ExactArgs(1),
+ RunE: func(cmd *cobra.Command, args []string) error {
+ var msg types.MsgClaimIntent
+ if err := json.Unmarshal([]byte(args[0]), &msg); err != nil {
+ return err
+ }
+
+ clientCtx, err := client.GetClientTxContext(cmd)
+ if err != nil {
+ return err
+ }
+
+ return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg)
+ },
+ }
+
+ flags.AddTxFlagsToCmd(cmd)
+ return cmd
+}
diff --git a/x/claims/keeper/claims.go b/x/claims/keeper/claims.go
index 1dbe9cf3..172eb318 100755
--- a/x/claims/keeper/claims.go
+++ b/x/claims/keeper/claims.go
@@ -1,11 +1,16 @@
package keeper
import (
+ "fmt"
+
errorsmod "cosmossdk.io/errors"
+ "cosmossdk.io/math"
storetypes "cosmossdk.io/store/types"
"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
+ sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/ixofoundation/ixo-blockchain/v3/x/claims/types"
+ "github.com/ixofoundation/ixo-blockchain/v3/x/token/types/contracts/cw20"
)
func (k Keeper) SetCollection(ctx sdk.Context, data types.Collection) {
@@ -38,6 +43,8 @@ func (k Keeper) Marshal(value interface{}) (bytes []byte) {
bytes = k.cdc.MustMarshal(&value)
case types.Dispute:
bytes = k.cdc.MustMarshal(&value)
+ case types.Intent:
+ bytes = k.cdc.MustMarshal(&value)
}
return
}
@@ -148,3 +155,186 @@ func (k Keeper) GetDisputes(ctx sdk.Context) []types.Dispute {
return disputes
}
+
+// SetIntent stores the intent in the KV store with the generated key format.
+func (k Keeper) SetIntent(ctx sdk.Context, data types.Intent) {
+ key := types.IntentKeyCreate(data.AgentAddress, data.CollectionId, data.Id)
+
+ k.Set(ctx, key, types.IntentKey, data, k.Marshal)
+}
+
+// GetIntent retrieves an intent from the KV store using the generated key.
+func (k Keeper) GetIntent(ctx sdk.Context, agentAddress, collectionId, intentID string) (types.Intent, error) {
+ key := types.IntentKeyCreate(agentAddress, collectionId, intentID)
+
+ // Retrieve the intent from the store
+ val, found := k.Get(ctx, key, types.IntentKey, k.UnmarshalIntent)
+ if !found {
+ return types.Intent{}, errorsmod.Wrapf(types.ErrIntentNotFound, "for id %s", intentID)
+ }
+ intent, ok := val.(types.Intent)
+ if !ok {
+ return types.Intent{}, errorsmod.Wrapf(types.ErrIntentNotFound, "for id %s", intentID)
+ }
+ return intent, nil
+}
+
+func (k Keeper) GetIntents(ctx sdk.Context) []types.Intent {
+ var intents []types.Intent
+ iterator := k.GetAll(ctx, types.IntentKey)
+ defer iterator.Close()
+ for ; iterator.Valid(); iterator.Next() {
+ var intent types.Intent
+ k.Unmarshal(iterator.Value(), &intent)
+ intents = append(intents, intent)
+ }
+ return intents
+}
+
+func (k Keeper) UnmarshalIntent(value []byte) (interface{}, bool) {
+ data := types.Intent{}
+ k.Unmarshal(value, &data)
+ return data, types.IsValidIntent(&data)
+}
+
+func (k Keeper) GetAllUserCollectionIntents(ctx sdk.Context, agentAddress, collectionId string) []types.Intent {
+ var intents []types.Intent
+
+ prefix := []byte(agentAddress + "/" + collectionId + "/")
+ iterator := k.GetAll(ctx, append(types.IntentKey, prefix...))
+ defer iterator.Close()
+
+ for ; iterator.Valid(); iterator.Next() {
+ var intent types.Intent
+ k.Unmarshal(iterator.Value(), &intent)
+ intents = append(intents, intent)
+ }
+
+ return intents
+}
+
+// GetActiveIntent retrieves agents current intents for the collection, and returns the first intent if exists
+func (k Keeper) GetActiveIntent(ctx sdk.Context, agentAddress, collectionId string) (types.Intent, bool) {
+ intents := k.GetAllUserCollectionIntents(ctx, agentAddress, collectionId)
+ if len(intents) == 0 {
+ return types.Intent{}, false
+ }
+ k.Logger(ctx).Info("intents", "intent", intents)
+ k.Logger(ctx).Info("intent", "intent", intents[0])
+ return intents[0], true
+}
+
+// RemoveIntentAndEmitEvents removes the intent from the KV store and emits the event as IntentUpdated
+// for offchain indexers, Intent status will always change on removal so safe to always emit UpdateIntent event
+func (k Keeper) RemoveIntentAndEmitEvents(ctx sdk.Context, intent types.Intent) error {
+ // first remove the intent from the KV store
+ key := types.IntentKeyCreate(intent.AgentAddress, intent.CollectionId, intent.Id)
+ k.Delete(ctx, key, types.IntentKey)
+
+ // then emit events for intent update for offchain indexers
+ if err := ctx.EventManager().EmitTypedEvent(
+ &types.IntentUpdatedEvent{
+ Intent: &intent,
+ },
+ ); err != nil {
+ return err
+ }
+ return nil
+}
+
+// TransferCW20Payment transfers CW20 payments to the recipient address.
+func (k Keeper) TransferCW20Payment(ctx sdk.Context, fromAddress, toAddress sdk.AccAddress, payment *types.CW20Payment) error {
+ // make the payments if amount is not 0
+ if payment.Amount == 0 {
+ return nil
+ }
+
+ encodedTransferMessage, err := cw20.Marshal(cw20.WasmTransfer{
+ Transfer: cw20.Transfer{
+ Recipient: toAddress.String(),
+ Amount: fmt.Sprint(payment.Amount),
+ },
+ })
+ if err != nil {
+ return err
+ }
+
+ contractAddress, err := sdk.AccAddressFromBech32(payment.Address)
+ if err != nil {
+ return err
+ }
+
+ _, err = k.WasmKeeper.Execute(
+ ctx,
+ contractAddress,
+ fromAddress,
+ encodedTransferMessage,
+ sdk.NewCoins(sdk.NewCoin("uixo", math.ZeroInt())),
+ )
+ if err != nil {
+ return err
+ }
+ return nil
+}
+
+// TransferIntentPayments transfers payments, both native coins and CW20 payments, to the recipient address.
+func (k Keeper) TransferIntentPayments(ctx sdk.Context, fromAddress, toAddress sdk.AccAddress, amount sdk.Coins, cw20Payments []*types.CW20Payment) error {
+ // transfer native coins
+ if len(amount) > 0 {
+ // clear any Coin with amount 0, generally validation will already block this,
+ // but we allow it to know when to use collection defaults or when to have no payments, aka amount 0.
+ cleanedAmount := sdk.Coins{}
+ for _, coin := range amount {
+ if coin.Amount.IsPositive() {
+ cleanedAmount = append(cleanedAmount, coin)
+ }
+ }
+
+ err := k.BankKeeper.SendCoins(ctx, fromAddress, toAddress, cleanedAmount)
+ if err != nil {
+ return err
+ }
+ }
+
+ // transfer CW20 payments
+ for _, payment := range cw20Payments {
+ if payment.Amount != 0 {
+ err := k.TransferCW20Payment(ctx, fromAddress, toAddress, payment)
+ if err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+}
+
+// Create a module account for entity id and name of account as fragemnt in form: did#name
+func (k Keeper) CreateNewCollectionEscrow(ctx sdk.Context, collectionId string) (sdk.AccAddress, error) {
+ address := types.GetModuleAccountAddressEscrow(collectionId)
+
+ if k.AccountKeeper.GetAccount(ctx, address) != nil {
+ return nil, errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "account already exists")
+ }
+
+ account := k.AccountKeeper.NewAccountWithAddress(ctx, address)
+ k.AccountKeeper.SetAccount(ctx, account)
+
+ return account.GetAddress(), nil
+}
+
+// CollectionPersistAndEmitEvents persists the collection and emits the events.
+func (k Keeper) CollectionPersistAndEmitEvents(ctx sdk.Context, collection types.Collection) error {
+ // persist the Collection
+ k.SetCollection(ctx, collection)
+
+ // emit the events
+ if err := ctx.EventManager().EmitTypedEvent(
+ &types.CollectionCreatedEvent{
+ Collection: &collection,
+ },
+ ); err != nil {
+ return err
+ }
+
+ return nil
+}
diff --git a/x/claims/keeper/genesis.go b/x/claims/keeper/genesis.go
index 53c127f6..f391acac 100755
--- a/x/claims/keeper/genesis.go
+++ b/x/claims/keeper/genesis.go
@@ -24,6 +24,11 @@ func (k Keeper) InitGenesis(ctx sdk.Context, gs types.GenesisState) {
for _, d := range gs.Disputes {
k.SetDispute(ctx, d)
}
+
+ // save intents to the store
+ for _, i := range gs.Intents {
+ k.SetIntent(ctx, i)
+ }
}
// ExportGenesis returns the x/claims module's exported genesis.
@@ -31,15 +36,15 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState {
params := k.GetParams(ctx)
collections := k.GetCollections(ctx)
-
claims := k.GetClaims(ctx)
-
disputes := k.GetDisputes(ctx)
+ intents := k.GetIntents(ctx)
return &types.GenesisState{
Params: params,
Collections: collections,
Disputes: disputes,
Claims: claims,
+ Intents: intents,
}
}
diff --git a/x/claims/keeper/grpc_query.go b/x/claims/keeper/grpc_query.go
index 0f200cb5..430cb9e6 100755
--- a/x/claims/keeper/grpc_query.go
+++ b/x/claims/keeper/grpc_query.go
@@ -141,3 +141,43 @@ func (k Keeper) DisputeList(c context.Context, req *types.QueryDisputeListReques
return &types.QueryDisputeListResponse{Disputes: disputes, Pagination: pageRes}, nil
}
+
+func (k Keeper) Intent(c context.Context, req *types.QueryIntentRequest) (*types.QueryIntentResponse, error) {
+ if req == nil || req.Id == "" || req.AgentAddress == "" || req.CollectionId == "" {
+ return nil, status.Error(codes.InvalidArgument, "invalid request")
+ }
+
+ ctx := sdk.UnwrapSDKContext(c)
+ Dispute, err := k.GetIntent(ctx, req.AgentAddress, req.CollectionId, req.Id)
+ if err != nil {
+ return nil, err
+ }
+
+ return &types.QueryIntentResponse{Intent: Dispute}, nil
+}
+
+func (k Keeper) IntentList(c context.Context, req *types.QueryIntentListRequest) (*types.QueryIntentListResponse, error) {
+ if req == nil {
+ return nil, status.Error(codes.InvalidArgument, "invalid request")
+ }
+
+ var intents []types.Intent
+ ctx := sdk.UnwrapSDKContext(c)
+ disputesStore := prefix.NewStore(ctx.KVStore(k.storeKey), types.IntentKey)
+
+ pageRes, err := query.Paginate(disputesStore, req.Pagination, func(key []byte, value []byte) error {
+ var intent types.Intent
+ if err := k.cdc.Unmarshal(value, &intent); err != nil {
+ return err
+ }
+
+ intents = append(intents, intent)
+ return nil
+ })
+
+ if err != nil {
+ return nil, status.Error(codes.Internal, err.Error())
+ }
+
+ return &types.QueryIntentListResponse{Intents: intents, Pagination: pageRes}, nil
+}
diff --git a/x/claims/keeper/keeper.go b/x/claims/keeper/keeper.go
index b115282b..b5dbb52b 100755
--- a/x/claims/keeper/keeper.go
+++ b/x/claims/keeper/keeper.go
@@ -19,14 +19,15 @@ type MarshalFn func(value interface{}) []byte
type (
Keeper struct {
- cdc codec.BinaryCodec
- storeKey storetypes.StoreKey
- paramstore paramtypes.Subspace
- AuthzKeeper types.AuthzKeeper
- IidKeeper types.IidKeeper
- BankKeeper types.BankKeeper
- EntityKeeper types.EntityKeeper
- WasmKeeper types.WasmKeeper
+ cdc codec.BinaryCodec
+ storeKey storetypes.StoreKey
+ paramstore paramtypes.Subspace
+ AuthzKeeper types.AuthzKeeper
+ IidKeeper types.IidKeeper
+ BankKeeper types.BankKeeper
+ EntityKeeper types.EntityKeeper
+ WasmKeeper types.WasmKeeper
+ AccountKeeper types.AccountKeeper
}
)
@@ -39,6 +40,7 @@ func NewKeeper(
bankKeeper types.BankKeeper,
entityKeeper types.EntityKeeper,
wasmKeeper types.WasmKeeper,
+ accountKeeper types.AccountKeeper,
) Keeper {
// set KeyTable if it has not already been set
if !ps.HasKeyTable() {
@@ -46,14 +48,15 @@ func NewKeeper(
}
return Keeper{
- cdc: cdc,
- storeKey: storeKey,
- paramstore: ps,
- IidKeeper: iidKeeper,
- AuthzKeeper: authzKeeper,
- BankKeeper: bankKeeper,
- EntityKeeper: entityKeeper,
- WasmKeeper: wasmKeeper,
+ cdc: cdc,
+ storeKey: storeKey,
+ paramstore: ps,
+ IidKeeper: iidKeeper,
+ AuthzKeeper: authzKeeper,
+ BankKeeper: bankKeeper,
+ EntityKeeper: entityKeeper,
+ WasmKeeper: wasmKeeper,
+ AccountKeeper: accountKeeper,
}
}
diff --git a/x/claims/keeper/msg_server.go b/x/claims/keeper/msg_server.go
index 9dc2109e..ecb42b26 100755
--- a/x/claims/keeper/msg_server.go
+++ b/x/claims/keeper/msg_server.go
@@ -6,6 +6,7 @@ import (
errorsmod "cosmossdk.io/errors"
sdk "github.com/cosmos/cosmos-sdk/types"
+ sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/ixofoundation/ixo-blockchain/v3/lib/ixo"
"github.com/ixofoundation/ixo-blockchain/v3/x/claims/types"
iidtypes "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types"
@@ -23,12 +24,15 @@ func NewMsgServerImpl(keeper *Keeper) types.MsgServer {
return &msgServer{Keeper: keeper}
}
+// TODO: ensure to creatre escrow accounts on migration for existing collections
+// TODO: ADD 1155 and 721 capabilities to claims and payments also.
+// TODO: add possibility to allow multiple intents per agent based of collection flag
+
// --------------------------
// CREATE COLLECTION
// --------------------------
func (s msgServer) CreateCollection(goCtx context.Context, msg *types.MsgCreateCollection) (*types.MsgCreateCollectionResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)
- params := s.Keeper.GetParams(ctx)
// check that entity exists
_, entity, err := s.Keeper.EntityKeeper.ResolveEntity(ctx, msg.Entity)
@@ -66,11 +70,15 @@ func (s msgServer) CreateCollection(goCtx context.Context, msg *types.MsgCreateC
return nil, errorsmod.Wrapf(err, "for admin")
}
+ // get collection id from params and update params
+ params := s.Keeper.GetParams(ctx)
+ collectionSequence := params.CollectionSequence
+ params.CollectionSequence++
+ s.Keeper.SetParams(ctx, ¶ms)
+
// create and persist the Collection
- var collection types.Collection
- collectionId := fmt.Sprint(params.CollectionSequence)
- collection = types.Collection{
- Id: collectionId,
+ collection := types.Collection{
+ Id: fmt.Sprint(collectionSequence),
Entity: msg.Entity,
Admin: admin.Address,
Protocol: msg.Protocol,
@@ -85,20 +93,17 @@ func (s msgServer) CreateCollection(goCtx context.Context, msg *types.MsgCreateC
Invalidated: 0,
State: msg.State,
Payments: msg.Payments,
+ Intents: msg.Intents,
}
- s.Keeper.SetCollection(ctx, collection)
-
- // update and persist createSequence
- params.CollectionSequence++
- s.Keeper.SetParams(ctx, ¶ms)
+ // create escrow account for the collection
+ escrowAccount, err := s.Keeper.CreateNewCollectionEscrow(ctx, collection.Id)
+ if err != nil {
+ return nil, errorsmod.Wrapf(err, "failed to create escrow account for collection: %s", collection.Id)
+ }
+ collection.EscrowAccount = escrowAccount.String()
- // emit the events
- if err := ctx.EventManager().EmitTypedEvents(
- &types.CollectionCreatedEvent{
- Collection: &collection,
- },
- ); err != nil {
+ if err := s.Keeper.CollectionPersistAndEmitEvents(ctx, collection); err != nil {
return nil, err
}
@@ -153,6 +158,29 @@ func (s msgServer) SubmitClaim(goCtx context.Context, msg *types.MsgSubmitClaim)
return nil, types.ErrClaimCollectionQuotaReached
}
+ // if intents are required then check if intent is used
+ if collection.Intents == types.CollectionIntentOptions_required && !msg.UseIntent {
+ return nil, errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "collection %s requires intent", msg.CollectionId)
+ }
+ // if intents are not allowed then check if intent is used
+ if collection.Intents == types.CollectionIntentOptions_deny && msg.UseIntent {
+ return nil, errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "collection %s does not allow intent", msg.CollectionId)
+ }
+
+ // get intent if used, if used agent must have an active intent for this collection
+ var intent types.Intent
+ var intentFound bool
+ if msg.UseIntent {
+ intent, intentFound = s.Keeper.GetActiveIntent(ctx, msg.AgentAddress, msg.CollectionId)
+ if !intentFound {
+ return nil, errorsmod.Wrapf(types.ErrIntentNotFound, "for agent %s and collection %s", msg.AgentAddress, msg.CollectionId)
+ }
+ // check if intent is expired
+ if !intent.ExpireAt.IsZero() && intent.ExpireAt.Before(ctx.BlockTime()) {
+ return nil, errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "intent %s is expired", intent.Id)
+ }
+ }
+
// create and persist the Claim
claimSubmissionDate := ctx.BlockTime()
claim := types.Claim{
@@ -167,28 +195,54 @@ func (s msgServer) SubmitClaim(goCtx context.Context, msg *types.MsgSubmitClaim)
Evaluation: types.PaymentStatus_no_payment,
Rejection: types.PaymentStatus_no_payment,
},
+ Amount: msg.Amount,
+ Cw20Payment: msg.Cw20Payment,
+ UseIntent: msg.UseIntent,
}
- s.Keeper.SetClaim(ctx, claim)
+ // if intent then override payments, add intent id and update APPROVAL payment to GUARANTEED
+ if msg.UseIntent {
+ claim.Amount = intent.Amount
+ claim.Cw20Payment = intent.Cw20Payment
+
+ // if either payment is not empty then APPROVAL payment become GUARANTEED as funds is in escrow account
+ // if both payments is empty or all amounts is 0 then APPROVAL payment stays NO_PAYMENT since no funds are in escrow account
+ if !intent.Amount.IsZero() || !types.IsZeroCW20Payments(intent.Cw20Payment) {
+ claim.PaymentsStatus.Approval = types.PaymentStatus_guaranteed
+ }
+
+ // mark intent as fulfilled
+ intent.Status = types.IntentStatus_fulfilled
+ intent.ClaimId = claim.ClaimId
+ err = s.Keeper.RemoveIntentAndEmitEvents(ctx, intent)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ // if collection approval payment is oracle payment then only native coins allowed
+ if collection.Payments.Approval.IsOraclePayment && !types.IsZeroCW20Payments(claim.Cw20Payment) {
+ return nil, types.ErrOraclePaymentOnlyNative
+ }
// update count for collection and persist
collection.Count++
- s.Keeper.SetCollection(ctx, collection)
+ if err := s.Keeper.CollectionPersistAndEmitEvents(ctx, collection); err != nil {
+ return nil, err
+ }
- // emit the events
+ // persist claim and emit the events
+ s.Keeper.SetClaim(ctx, claim)
if err := ctx.EventManager().EmitTypedEvents(
&types.ClaimSubmittedEvent{
Claim: &claim,
},
- &types.CollectionUpdatedEvent{
- Collection: &collection,
- },
); err != nil {
return nil, err
}
// start payout process for claim submission
- if err = processPayment(ctx, *s.Keeper, agent, collection.Payments.Submission, types.PaymentType_submission, msg.ClaimId); err != nil {
+ if err = processPayment(ctx, *s.Keeper, agent, collection.Payments.Submission, types.PaymentType_submission, msg.ClaimId, collection, false); err != nil {
return nil, err
}
@@ -256,12 +310,18 @@ func (s msgServer) EvaluateClaim(goCtx context.Context, msg *types.MsgEvaluateCl
Cw20Payment: msg.Cw20Payment,
}
+ // if intent on claim then override payments with claim payments as it used the intent
+ if claim.UseIntent {
+ evaluation.Amount = claim.Amount
+ evaluation.Cw20Payment = claim.Cw20Payment
+ }
+
claim.Evaluation = &evaluation
s.Keeper.SetClaim(ctx, claim)
// start payout process for evaluation submission, if evaluation has status invalidated, dont run evaluation payout process
if msg.Status != types.EvaluationStatus_invalidated {
- if err = processPayment(ctx, *s.Keeper, evalAgent, collection.Payments.Evaluation, types.PaymentType_evaluation, msg.ClaimId); err != nil {
+ if err = processPayment(ctx, *s.Keeper, evalAgent, collection.Payments.Evaluation, types.PaymentType_evaluation, msg.ClaimId, collection, false); err != nil {
return nil, err
}
@@ -269,26 +329,61 @@ func (s msgServer) EvaluateClaim(goCtx context.Context, msg *types.MsgEvaluateCl
collection.Evaluated++
}
+ // if status is not approved and intent was used then transfer funds back out of escrow account to current APPROVAL payments account
+ if msg.Status != types.EvaluationStatus_approved && claim.UseIntent {
+ // Get account used for APPROVAL payments on collection
+ approvalAddress, err := sdk.AccAddressFromBech32(collection.Payments.Approval.Account)
+ if err != nil {
+ return nil, err
+ }
+ // Get escrow address
+ escrow, err := sdk.AccAddressFromBech32(collection.EscrowAccount)
+ if err != nil {
+ return nil, err
+ }
+ if err := s.Keeper.TransferIntentPayments(ctx, escrow, approvalAddress, claim.Amount, claim.Cw20Payment); err != nil {
+ return nil, err
+ }
+ // Update payment status to no payment again as was guaranteed with intent
+ err = updatePaymentStatus(ctx, *s.Keeper, types.PaymentType_approval, msg.ClaimId, types.PaymentStatus_no_payment)
+ if err != nil {
+ return nil, err
+ }
+ }
+
// update amounts for collection, make payouts and persist
if msg.Status == types.EvaluationStatus_approved {
// payout process for evaluation approval to claim agent
collection.Approved++
- // if msg amount/cw20Payment length is not zero, it means agent set custom amount/cw20Payment that was authenticated
- // through authZ constraints to be valid since all evaluations must be done by module account through authz.
// Dereference the pointer to avoid changing collection payments as collection is saved in keeper below
approvedPayment := collection.Payments.Approval.Clone()
- if len(msg.Amount) > 0 {
- approvedPayment.Amount = msg.Amount
+ // if intent on claim then overide payments with claim payments as it used the intent and payment must be intent amount
+ // also override payment account to escrow account, so funds can be transferred from escrow to agent
+ if claim.UseIntent {
+ approvedPayment.Amount = claim.Amount
+ approvedPayment.Cw20Payment = claim.Cw20Payment
+ approvedPayment.Account = collection.EscrowAccount
+ } else {
+ // if either msg amount or cw20Payment length is not zero, it means agent set custom amount/cw20Payment that was authenticated
+ // through authZ constraints to be valid since all evaluations must be done by module account through authz
+ if len(msg.Amount) > 0 || len(msg.Cw20Payment) > 0 {
+ approvedPayment.Amount = msg.Amount
+ approvedPayment.Cw20Payment = msg.Cw20Payment
+ }
}
- if len(msg.Cw20Payment) > 0 {
- approvedPayment.Cw20Payment = msg.Cw20Payment
+ // if collection approval payment is oracle payment then only native coins allowed
+ if collection.Payments.Approval.IsOraclePayment && !types.IsZeroCW20Payments(approvedPayment.Cw20Payment) {
+ return nil, types.ErrOraclePaymentOnlyNative
}
- if err = processPayment(ctx, *s.Keeper, claimAgent, approvedPayment, types.PaymentType_approval, msg.ClaimId); err != nil {
+ if err = processPayment(ctx, *s.Keeper, claimAgent, approvedPayment, types.PaymentType_approval, msg.ClaimId, collection, claim.UseIntent); err != nil {
return nil, err
}
} else if msg.Status == types.EvaluationStatus_rejected {
- // no payment for rejected
+ // payout process for evaluation rejected to claim agent
collection.Rejected++
+ if err = processPayment(ctx, *s.Keeper, claimAgent, collection.Payments.Rejection, types.PaymentType_rejection, msg.ClaimId, collection, false); err != nil {
+ return nil, err
+ }
} else if msg.Status == types.EvaluationStatus_disputed {
// no payment for disputed
collection.Disputed++
@@ -301,7 +396,10 @@ func (s msgServer) EvaluateClaim(goCtx context.Context, msg *types.MsgEvaluateCl
// no payment for invalidated
collection.Invalidated++
}
- s.Keeper.SetCollection(ctx, collection)
+
+ if err := s.Keeper.CollectionPersistAndEmitEvents(ctx, collection); err != nil {
+ return nil, err
+ }
// emit the events
if err := ctx.EventManager().EmitTypedEvents(
@@ -311,9 +409,6 @@ func (s msgServer) EvaluateClaim(goCtx context.Context, msg *types.MsgEvaluateCl
&types.ClaimUpdatedEvent{
Claim: &claim,
},
- &types.CollectionUpdatedEvent{
- Collection: &collection,
- },
); err != nil {
return nil, err
}
@@ -433,6 +528,20 @@ func (s msgServer) WithdrawPayment(goCtx context.Context, msg *types.MsgWithdraw
return nil, err
}
+ // if any input address or the fromAddress is the escrow account then return error, as any escrow funds will be
+ // paid immediately through intents and never through this function, this also prevents collection owners from taking
+ // out funds from escrow account through this function
+ if msg.FromAddress == collection.EscrowAccount {
+ return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "from address cannot be collection's escrow account")
+ }
+ if len(msg.Inputs) > 0 {
+ for _, i := range msg.Inputs {
+ if i.Address == collection.EscrowAccount {
+ return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "input address cannot be collection's escrow account")
+ }
+ }
+ }
+
// check that user is authorized, aka signer is admin for Collection
if collection.Admin != msg.AdminAddress {
return nil, errorsmod.Wrapf(types.ErrClaimUnauthorized, "collection admin %s, msg admin address %s", collection.Admin, msg.AdminAddress)
@@ -450,7 +559,7 @@ func (s msgServer) WithdrawPayment(goCtx context.Context, msg *types.MsgWithdraw
}
// make payout
- err = payout(ctx, *s.Keeper, msg.Inputs, msg.Outputs, msg.PaymentType, msg.ClaimId, msg.ReleaseDate, msg.Contract_1155Payment, msg.Cw20Payment, fromAddress, toAddress)
+ err = payout(ctx, *s.Keeper, msg.Inputs, msg.Outputs, msg.PaymentType, msg.ClaimId, collection, msg.ReleaseDate, msg.Contract_1155Payment, msg.Cw20Payment, fromAddress, toAddress)
if err != nil {
return nil, err
}
@@ -478,14 +587,7 @@ func (s msgServer) UpdateCollectionState(goCtx context.Context, msg *types.MsgUp
collection.State = msg.State
// persist the Collection
- s.Keeper.SetCollection(ctx, collection)
-
- // emit the events
- if err := ctx.EventManager().EmitTypedEvents(
- &types.CollectionUpdatedEvent{
- Collection: &collection,
- },
- ); err != nil {
+ if err := s.Keeper.CollectionPersistAndEmitEvents(ctx, collection); err != nil {
return nil, err
}
@@ -514,14 +616,7 @@ func (s msgServer) UpdateCollectionDates(goCtx context.Context, msg *types.MsgUp
collection.EndDate = msg.EndDate
// persist the Collection
- s.Keeper.SetCollection(ctx, collection)
-
- // emit the events
- if err := ctx.EventManager().EmitTypedEvents(
- &types.CollectionUpdatedEvent{
- Collection: &collection,
- },
- ); err != nil {
+ if err := s.Keeper.CollectionPersistAndEmitEvents(ctx, collection); err != nil {
return nil, err
}
@@ -569,16 +664,171 @@ func (s msgServer) UpdateCollectionPayments(goCtx context.Context, msg *types.Ms
collection.Payments = msg.Payments
// persist the Collection
- s.Keeper.SetCollection(ctx, collection)
+ if err := s.Keeper.CollectionPersistAndEmitEvents(ctx, collection); err != nil {
+ return nil, err
+ }
- // emit the events
+ return &types.MsgUpdateCollectionPaymentsResponse{}, nil
+}
+
+// --------------------------
+// UPDATE COLLECTION STATE
+// --------------------------
+func (s msgServer) UpdateCollectionIntents(goCtx context.Context, msg *types.MsgUpdateCollectionIntents) (*types.MsgUpdateCollectionIntentsResponse, error) {
+ ctx := sdk.UnwrapSDKContext(goCtx)
+
+ // Get Collection
+ collection, err := s.Keeper.GetCollection(ctx, msg.CollectionId)
+ if err != nil {
+ return nil, err
+ }
+
+ // check that signer is collection admin
+ if collection.Admin != msg.AdminAddress {
+ return nil, errorsmod.Wrapf(types.ErrClaimUnauthorized, "collection admin %s, msg admin address %s", collection.Admin, msg.AdminAddress)
+ }
+
+ // update Intents
+ collection.Intents = msg.Intents
+
+ // persist the Collection
+ if err := s.Keeper.CollectionPersistAndEmitEvents(ctx, collection); err != nil {
+ return nil, err
+ }
+
+ return &types.MsgUpdateCollectionIntentsResponse{}, nil
+}
+
+// --------------------------
+// CLAIM INTENT
+// --------------------------
+func (s msgServer) ClaimIntent(goCtx context.Context, msg *types.MsgClaimIntent) (*types.MsgClaimIntentResponse, error) {
+ ctx := sdk.UnwrapSDKContext(goCtx)
+
+ // Check if the agent already has an active intent for this collection, if has throw error
+ _, found := s.Keeper.GetActiveIntent(ctx, msg.AgentAddress, msg.CollectionId)
+ if found {
+ return nil, errorsmod.Wrapf(types.ErrIntentExists, "agent already has an active intent for collection %s", msg.CollectionId)
+ }
+
+ // Get Collection for Intent
+ collection, err := s.Keeper.GetCollection(ctx, msg.CollectionId)
+ if err != nil {
+ return nil, err
+ }
+
+ // check that intents is allowed for the collection
+ if collection.Intents == types.CollectionIntentOptions_deny {
+ return nil, errorsmod.Wrapf(types.ErrIntentUnauthorized, "intents is not allowed for collection %s", msg.CollectionId)
+ }
+
+ agentAddress, err := sdk.AccAddressFromBech32(msg.AgentAddress)
+ if err != nil {
+ return nil, err
+ }
+ adminAddress, err := sdk.AccAddressFromBech32(collection.Admin)
+ if err != nil {
+ return nil, err
+ }
+ // get SubmitClaimAuthorization for agent to use for intent verification
+ authzMsgType := sdk.MsgTypeURL(&types.MsgSubmitClaim{})
+ authz, _ := s.Keeper.AuthzKeeper.GetAuthorization(ctx, agentAddress, adminAddress, authzMsgType)
+
+ // if no authz then return error
+ if authz == nil {
+ return nil, errorsmod.Wrapf(types.ErrIntentUnauthorized, "agent %s does not have authz from this collection %s", msg.AgentAddress, msg.CollectionId)
+ }
+ // get authz constraints for type match
+ var constraints []*types.SubmitClaimConstraints
+ switch k := authz.(type) {
+ case *types.SubmitClaimAuthorization:
+ constraints = k.Constraints
+ default:
+ return nil, fmt.Errorf("existing Authorizations for route %s is not of type SubmitClaimAuthorization", authzMsgType)
+ }
+ // get constraint for collection id
+ var constraint *types.SubmitClaimConstraints
+ for _, con := range constraints {
+ if con.CollectionId == msg.CollectionId {
+ constraint = con
+ break
+ }
+ }
+ // if no authz constraint for collection id then return error
+ if constraint == nil {
+ return nil, errorsmod.Wrapf(types.ErrIntentUnauthorized, "agent %s does not have authz from this collection %s", msg.AgentAddress, msg.CollectionId)
+ }
+
+ // check that intent amount and cw20 payments are within max constraints
+ if !types.IsCoinsInMaxConstraints(msg.Amount, constraint.MaxAmount) {
+ return nil, errorsmod.Wrapf(types.ErrIntentUnauthorized, "intent amount is not within authz max constraints")
+ }
+ if !types.IsCW20PaymentsInMaxConstraints(msg.Cw20Payment, constraint.MaxCw20Payment) {
+ return nil, errorsmod.Wrapf(types.ErrIntentUnauthorized, "intent cw20 payments is not within authz max constraints")
+ }
+
+ // if both amount and cw20 payments are empty then use default payments for APPROVAL
+ if len(msg.Amount) == 0 && len(msg.Cw20Payment) == 0 {
+ msg.Amount = collection.Payments.Approval.Amount
+ msg.Cw20Payment = collection.Payments.Approval.Cw20Payment
+ }
+
+ // if collection approval payment is oracle payment then only native coins allowed
+ if collection.Payments.Approval.IsOraclePayment && !types.IsZeroCW20Payments(msg.Cw20Payment) {
+ return nil, types.ErrOraclePaymentOnlyNative
+ }
+
+ // Get account used for APPROVAL payments on collection
+ approvalAddress, err := sdk.AccAddressFromBech32(collection.Payments.Approval.Account)
+ if err != nil {
+ return nil, err
+ }
+ // Get escrow address
+ escrow, err := sdk.AccAddressFromBech32(collection.EscrowAccount)
+ if err != nil {
+ return nil, err
+ }
+
+ // get intent id from params and update params
+ params := s.Keeper.GetParams(ctx)
+ intentID := params.IntentSequence
+ params.IntentSequence++
+ s.Keeper.SetParams(ctx, ¶ms)
+
+ // create Intent
+ createdDate := ctx.BlockTime()
+ expireAt := createdDate.Add(constraint.IntentDurationNs)
+ intent := types.Intent{
+ Id: fmt.Sprint(intentID),
+ AgentDid: msg.AgentDid.Did(),
+ AgentAddress: msg.AgentAddress,
+ CollectionId: msg.CollectionId,
+ CreatedAt: &createdDate,
+ ExpireAt: &expireAt,
+ Status: types.IntentStatus_active,
+ Amount: msg.Amount,
+ Cw20Payment: msg.Cw20Payment,
+ FromAddress: approvalAddress.String(),
+ EscrowAddress: escrow.String(),
+ }
+ // transfer the payments to escrow
+ err = s.Keeper.TransferIntentPayments(ctx, approvalAddress, escrow, intent.Amount, intent.Cw20Payment)
+ if err != nil {
+ return nil, errorsmod.Wrap(err, "failed to transfer payments to escrow")
+ }
+
+ // Save the intent and emit the events
+ s.Keeper.SetIntent(ctx, intent)
if err := ctx.EventManager().EmitTypedEvents(
- &types.CollectionUpdatedEvent{
- Collection: &collection,
+ &types.IntentSubmittedEvent{
+ Intent: &intent,
},
); err != nil {
return nil, err
}
- return &types.MsgUpdateCollectionPaymentsResponse{}, nil
+ return &types.MsgClaimIntentResponse{
+ IntentId: intent.Id,
+ ExpireAt: intent.ExpireAt,
+ }, nil
}
diff --git a/x/claims/keeper/payments.go b/x/claims/keeper/payments.go
index 93f3d7cc..d24428e4 100755
--- a/x/claims/keeper/payments.go
+++ b/x/claims/keeper/payments.go
@@ -10,7 +10,6 @@ import (
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
"github.com/ixofoundation/ixo-blockchain/v3/x/claims/types"
- "github.com/ixofoundation/ixo-blockchain/v3/x/token/types/contracts/cw20"
"github.com/ixofoundation/ixo-blockchain/v3/x/token/types/contracts/ixo1155"
)
@@ -27,46 +26,26 @@ import (
// after the native coin payments is calculated, it does the following:
// 1. if timeout for the payment is nil, it makes the payment by calling payout() function
// 2. if timeout for the payment is not nil, it creates an authz grant to make the payment by calling createAuthz() function
-func processPayment(ctx sdk.Context, k Keeper, receiver sdk.AccAddress, payment *types.Payment, paymentType types.PaymentType, claimId string) error {
+func processPayment(ctx sdk.Context, k Keeper, receiver sdk.AccAddress, payment *types.Payment, paymentType types.PaymentType, claimId string, collection types.Collection, useIntent bool) error {
// check that there is outcome payment to make, otherwise skip this with no error as no payment for action
paymentExists := false
- if !payment.Amount.IsZero() {
+ if !payment.Amount.IsZero() || !types.IsZeroCW20Payments(payment.Cw20Payment) {
paymentExists = true
}
if payment.Contract_1155Payment != nil && payment.Contract_1155Payment.Amount != 0 {
paymentExists = true
}
- if payment.Cw20Payment != nil && len(payment.Cw20Payment) > 0 {
- // map to check if there is any cw20 payments
- for _, cw20Payment := range payment.Cw20Payment {
- if cw20Payment.Amount != 0 {
- paymentExists = true
- break
- }
- }
- }
if !paymentExists {
return nil
}
- // Get payer address
- payerAddress, err := sdk.AccAddressFromBech32(payment.Account)
- if err != nil {
- return err
+ // if payment is oracle payment then only native coins allowed
+ if payment.IsOraclePayment && (!types.IsZeroCW20Payments(payment.Cw20Payment) || payment.Contract_1155Payment != nil) {
+ return types.ErrOraclePaymentOnlyNative
}
- // Not sure if needed as authz can still be created even if sender has no fees
- // check that sender has enough tokens to make the payment
- // if !types.HasBalances(ctx, k.BankKeeper, payerAddress, payment.Amount) {
- // return errorsmod.Wrapf(sdkerrors.ErrInsufficientFunds, "sender has insufficient funds")
- // }
-
- // get claim and collection payment is for
- claim, err := k.GetClaim(ctx, claimId)
- if err != nil {
- return err
- }
- collection, err := k.GetCollection(ctx, claim.CollectionId)
+ // Get payer address
+ payerAddress, err := sdk.AccAddressFromBech32(payment.Account)
if err != nil {
return err
}
@@ -76,8 +55,8 @@ func processPayment(ctx sdk.Context, k Keeper, receiver sdk.AccAddress, payment
// if there is cosmos coins in payment get input/outputs for multisend
if !payment.Amount.IsZero() {
- // if evaluation payment then do split based on params
- if paymentType == types.PaymentType_evaluation {
+ // if evaluation payment or oracle payment then do split based on params
+ if paymentType == types.PaymentType_evaluation || payment.IsOraclePayment {
params := k.GetParams(ctx)
// Get node address
@@ -148,9 +127,10 @@ func processPayment(ctx sdk.Context, k Keeper, receiver sdk.AccAddress, payment
inputs = append(inputs, banktypes.NewInput(payerAddress, payment.Amount))
}
- // if no timeout in payment make payout immediately
- if payment.TimeoutNs == 0 {
- if err := payout(ctx, k, inputs, outputs, paymentType, claimId, &time.Time{}, payment.Contract_1155Payment, payment.Cw20Payment, payerAddress, receiver); err != nil {
+ // if no timeout in payment or use intent is true make payout immediately
+ // if use intent then funds is already in escrow account, so no need to wait even if timeout is set
+ if payment.TimeoutNs == 0 || useIntent {
+ if err := payout(ctx, k, inputs, outputs, paymentType, claimId, collection, &time.Time{}, payment.Contract_1155Payment, payment.Cw20Payment, payerAddress, receiver); err != nil {
return err
}
} else {
@@ -177,34 +157,39 @@ func processPayment(ctx sdk.Context, k Keeper, receiver sdk.AccAddress, payment
// 4. if paymentCw20s is not nil, it makes the payments by calling k.WasmKeeper.Execute()
// 5. update the claim payment status to success
// 6. emit PaymentWithdrawnEvent event
-func payout(ctx sdk.Context, k Keeper, inputs []banktypes.Input, outputs []banktypes.Output, paymentType types.PaymentType, claimId string, releaseDate *time.Time, payment1155 *types.Contract1155Payment, paymentCw20s []*types.CW20Payment, fromAddress, toAddress sdk.AccAddress) error {
+func payout(ctx sdk.Context, k Keeper, inputs []banktypes.Input, outputs []banktypes.Output, paymentType types.PaymentType, claimId string, collection types.Collection, releaseDate *time.Time, payment1155 *types.Contract1155Payment, paymentCw20s []*types.CW20Payment, fromAddress, toAddress sdk.AccAddress) error {
// get entity payout is for to validate if from address is valid entity module account
- claim, err := k.GetClaim(ctx, claimId)
- if err != nil {
- return err
- }
- collection, err := k.GetCollection(ctx, claim.CollectionId)
- if err != nil {
- return err
- }
_, entity, err := k.EntityKeeper.ResolveEntity(ctx, collection.Entity)
if err != nil {
return err
}
- // check that fromAddress and input addresses is entity module accounts
- if !entity.ContainsAccountAddress(fromAddress.String()) {
+ // check that fromAddress and input addresses is entity module accounts or the collections escrow account
+ if !entity.ContainsAccountAddress(fromAddress.String()) && collection.EscrowAccount != fromAddress.String() {
return types.ErrCollNotEntityAcc
}
for _, i := range inputs {
- if !entity.ContainsAccountAddress(i.Address) {
+ if !entity.ContainsAccountAddress(i.Address) && collection.EscrowAccount != i.Address {
return types.ErrCollNotEntityAcc
}
}
+ // clear input[0] list of Coin of any Coin with amount 0, generally validation will already block this,
+ // but we allow it to know when to use collection defaults or when to have no payments, aka amount 0.
+ cleanedInput := banktypes.Input{}
+ if len(inputs) != 0 {
+ cleanedInput.Address = inputs[0].Address
+ for _, coin := range inputs[0].Coins {
+ if coin.Amount.IsPositive() {
+ cleanedInput.Coins = append(cleanedInput.Coins, coin)
+ }
+ }
+ }
+
+ // TODO: Test case where one output will have 0 amount
// distribute the payment according to the outputs for Cosmos Coins if has inputs and outputs
- if len(inputs) != 0 && len(outputs) != 0 {
- if err := k.BankKeeper.InputOutputCoins(ctx, inputs[0], outputs); err != nil {
+ if len(cleanedInput.Coins) != 0 && len(outputs) != 0 {
+ if err := k.BankKeeper.InputOutputCoins(ctx, cleanedInput, outputs); err != nil {
return errorsmod.Wrapf(types.ErrPaymentWithdrawFailed, "%s", err)
}
}
@@ -243,31 +228,9 @@ func payout(ctx sdk.Context, k Keeper, inputs []banktypes.Input, outputs []bankt
// pay cw20 payments if has any
if len(paymentCw20s) > 0 {
for _, cw20Payment := range paymentCw20s {
- // make the payments if amount is not 0
+ // if amount not zero, then transfer
if cw20Payment.Amount != 0 {
- encodedTransferMessage, err := cw20.Marshal(cw20.WasmTransfer{
- Transfer: cw20.Transfer{
- Recipient: toAddress.String(),
- Amount: fmt.Sprint(cw20Payment.Amount),
- },
- })
- if err != nil {
- return err
- }
-
- contractAddress, err := sdk.AccAddressFromBech32(cw20Payment.Address)
- if err != nil {
- return err
- }
-
- _, err = k.WasmKeeper.Execute(
- ctx,
- contractAddress,
- fromAddress,
- encodedTransferMessage,
- sdk.NewCoins(sdk.NewCoin("uixo", math.ZeroInt())),
- )
- if err != nil {
+ if err := k.TransferCW20Payment(ctx, fromAddress, toAddress, cw20Payment); err != nil {
return err
}
}
@@ -368,6 +331,7 @@ func createAuthz(ctx sdk.Context, k Keeper, receiver, admin sdk.AccAddress, inpu
return nil
}
+// TODO: analyse claims events emited after this change?
// updatePaymentStatus updates the payment status for the provided different paymentType.
// it does the following:
// 1. get claim and payment is for
@@ -401,5 +365,6 @@ func updatePaymentStatus(ctx sdk.Context, k Keeper, paymentType types.PaymentTyp
); err != nil {
return err
}
+
return nil
}
diff --git a/x/claims/module.go b/x/claims/module.go
index 2624c7bf..02283e08 100755
--- a/x/claims/module.go
+++ b/x/claims/module.go
@@ -136,6 +136,13 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw
return cdc.MustMarshalJSON(am.keeper.ExportGenesis(ctx))
}
+// EndBlock returns the end blocker for the bonds module. It returns no validator updates.
+func (am AppModule) EndBlock(context context.Context) error {
+ ctx := sdk.UnwrapSDKContext(context)
+ EndBlocker(ctx, am.keeper)
+ return nil
+}
+
// ConsensusVersion is a sequence number for state-breaking change of the
// module. It should be incremented on each consensus-breaking change
// introduced by the module. To avoid wrong/empty versions, the initial version
diff --git a/x/claims/types/authz.go b/x/claims/types/authz.go
index af55a963..e42dad3e 100755
--- a/x/claims/types/authz.go
+++ b/x/claims/types/authz.go
@@ -52,6 +52,12 @@ func (a SubmitClaimAuthorization) ValidateBasic() error {
if iidtypes.IsEmpty(constraint.CollectionId) {
return sdkerrors.ErrInvalidRequest.Wrap("collection id can't be empty")
}
+ if err = ValidateCoinsAllowZero(constraint.MaxAmount.Sort()); err != nil {
+ return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "max amounts not valid: (%s)", err)
+ }
+ if err = ValidateCW20Payments(constraint.MaxCw20Payment, true); err != nil {
+ return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "max cw20 payments not valid: (%s)", err)
+ }
}
return nil
@@ -80,7 +86,16 @@ func (a SubmitClaimAuthorization) Accept(_ context.Context, msg sdk.Msg) (authz.
continue
}
- // if reaches here it means there is a matching constraint for the specific batch
+ // if reaches here it means there is a matching constraint for the specific collection
+ // if amount or cw20 payment is defined, check that it is within max constraints
+ if len(mSubmit.Amount) != 0 && !IsCoinsInMaxConstraints(mSubmit.Amount, constraint.MaxAmount) {
+ return authz.AcceptResponse{}, errorsmod.Wrapf(sdkerrors.ErrUnauthorized, "amount is not within max constraints")
+ }
+ if len(mSubmit.Cw20Payment) != 0 && !IsCW20PaymentsInMaxConstraints(mSubmit.Cw20Payment, constraint.MaxCw20Payment) {
+ return authz.AcceptResponse{}, errorsmod.Wrapf(sdkerrors.ErrUnauthorized, "cw20 payments is not within max constraints")
+ }
+
+ // now the collection matches and amount and cw20 payments are within max constraints
matched = true
// subtract quota by one and if not 0 re-add to constraints, otherwise new quota is 0 so remove from constraints
if constraint.AgentQuota > 1 {
@@ -142,11 +157,10 @@ func (a EvaluateClaimAuthorization) ValidateBasic() error {
if !iidtypes.IsEmpty(constraint.CollectionId) && len(constraint.ClaimIds) != 0 {
return sdkerrors.ErrInvalidRequest.Wrap("constraint must have either a collection_id or some claim ids, not both")
}
- // TODO: test that amount 0 works and test against duplicate denoms (should it be allowed?)
- if err = constraint.MaxCustomAmount.Sort().Validate(); err != nil {
+ if err = ValidateCoinsAllowZero(constraint.MaxCustomAmount.Sort()); err != nil {
return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "max custom amounts not valid: (%s)", err)
}
- if err = ValidateCW20Payments(constraint.MaxCustomCw20Payment); err != nil {
+ if err = ValidateCW20Payments(constraint.MaxCustomCw20Payment, true); err != nil {
return err
}
}
@@ -154,7 +168,6 @@ func (a EvaluateClaimAuthorization) ValidateBasic() error {
return nil
}
-// TODO: if custom eval amount is 0 then payments are not required? Right now it then maps to collection payments
// Accept implements Authorization.Accept.
func (a EvaluateClaimAuthorization) Accept(ctx context.Context, msg sdk.Msg) (authz.AcceptResponse, error) {
mEval, ok := msg.(*MsgEvaluateClaim)
@@ -186,24 +199,7 @@ func (a EvaluateClaimAuthorization) Accept(ctx context.Context, msg sdk.Msg) (au
// check when evaluator defined own custom amounts if is is allowed in constraints
if len(mEval.Amount) != 0 {
- // state for below loop if one msg Amount is invalid whole msg is invalid
- invalid := false
- // for each custom amount check if it within allowed max amount
- for _, mAmount := range mEval.Amount {
- // state if this specific coin amount is within allowed max
- valid := false
- for _, cAmount := range constraint.MaxCustomAmount {
- // get matching maxCustomAmount by checking denoms, if match then check that message amount must be less than or equal to maxCustomAmount
- if mAmount.Denom == cAmount.Denom && mAmount.IsLTE(cAmount) {
- valid = true
- break
- }
- }
- if !valid {
- invalid = true
- break
- }
- }
+ invalid := !IsCoinsInMaxConstraints(mEval.Amount, constraint.MaxCustomAmount)
// if invalid then add constraint back into list
if invalid {
@@ -214,29 +210,8 @@ func (a EvaluateClaimAuthorization) Accept(ctx context.Context, msg sdk.Msg) (au
// check when evaluator defined own custom cw20 payments if is is allowed in constraints
if len(mEval.Cw20Payment) != 0 {
- // first validate that all cw20 payments are valid and no duplicates
- if err := ValidateCW20Payments(mEval.Cw20Payment); err != nil {
- return authz.AcceptResponse{}, err
- }
- // state for below loop if one msg Cw20Payment is invalid whole msg is invalid
- invalid := false
- // for each msg Cw20Payment check if it correlates to a granted constraint
- for _, mCw20Payment := range mEval.Cw20Payment {
- // state if this specific Cw20Payment is in the list of constraints
- valid := false
- for _, cCw20Payment := range constraint.MaxCustomCw20Payment {
- // get matching maxCustomCw20Payment by checking addresses, if match then check that message amount must be less than or equal to maxCustomCw20Payment
- if mCw20Payment.Address == cCw20Payment.Address && mCw20Payment.Amount <= cCw20Payment.Amount {
- valid = true
- break
- }
- }
- // if this specific Cw20Payment is not in the list of constraints, then invalid
- if !valid {
- invalid = true
- break
- }
- }
+ invalid := !IsCW20PaymentsInMaxConstraints(mEval.Cw20Payment, constraint.MaxCustomCw20Payment)
+
// if invalid then add constraint back into list
if invalid {
unhandledConstraints = append(unhandledConstraints, constraint)
@@ -334,7 +309,7 @@ func (a WithdrawPaymentAuthorization) ValidateBasic() error {
if err = constraint.Contract_1155Payment.Validate(); err != nil {
return err
}
- if err = ValidateCW20Payments(constraint.Cw20Payment); err != nil {
+ if err = ValidateCW20Payments(constraint.Cw20Payment, true); err != nil {
return err
}
}
@@ -435,10 +410,6 @@ func (a WithdrawPaymentAuthorization) Accept(ctx context.Context, msg sdk.Msg) (
// if has cw20 payments then check that valid
if len(mWith.Cw20Payment) != 0 {
- // first validate that all cw20 payments are valid and no duplicates
- if err := ValidateCW20Payments(mWith.Cw20Payment); err != nil {
- return authz.AcceptResponse{}, err
- }
// then check that for each cw20 payment there is a corresponding constraint cw20 payment
for _, mCw20Payment := range mWith.Cw20Payment {
// state if this specific cw20Payment is valid
diff --git a/x/claims/types/authz.pb.go b/x/claims/types/authz.pb.go
index f9870f6b..b1c59513 100644
--- a/x/claims/types/authz.pb.go
+++ b/x/claims/types/authz.pb.go
@@ -12,6 +12,7 @@ import (
_ "github.com/cosmos/gogoproto/gogoproto"
proto "github.com/cosmos/gogoproto/proto"
github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types"
+ _ "google.golang.org/protobuf/types/known/durationpb"
_ "google.golang.org/protobuf/types/known/timestamppb"
io "io"
math "math"
@@ -88,6 +89,15 @@ type SubmitClaimConstraints struct {
// collection_id indicates to which Collection this claim belongs
CollectionId string `protobuf:"bytes,1,opt,name=collection_id,json=collectionId,proto3" json:"collection_id,omitempty"`
AgentQuota uint64 `protobuf:"varint,2,opt,name=agent_quota,json=agentQuota,proto3" json:"agent_quota,omitempty"`
+ // custom max_amount allowed to be specified by service agent for claim
+ // approval, if empty then no custom amount is allowed
+ MaxAmount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=max_amount,json=maxAmount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"max_amount"`
+ // custom max_cw20_payment allowed to be specified by service agent for claim
+ // approval, if empty then no custom amount is allowed
+ MaxCw20Payment []*CW20Payment `protobuf:"bytes,4,rep,name=max_cw20_payment,json=maxCw20Payment,proto3" json:"max_cw20_payment,omitempty"`
+ // intent_duration_ns is the duration for which the intent is active, after
+ // which it will expire (in nanoseconds)
+ IntentDurationNs time.Duration `protobuf:"bytes,5,opt,name=intent_duration_ns,json=intentDurationNs,proto3,stdduration" json:"intent_duration_ns"`
}
func (m *SubmitClaimConstraints) Reset() { *m = SubmitClaimConstraints{} }
@@ -137,6 +147,27 @@ func (m *SubmitClaimConstraints) GetAgentQuota() uint64 {
return 0
}
+func (m *SubmitClaimConstraints) GetMaxAmount() github_com_cosmos_cosmos_sdk_types.Coins {
+ if m != nil {
+ return m.MaxAmount
+ }
+ return nil
+}
+
+func (m *SubmitClaimConstraints) GetMaxCw20Payment() []*CW20Payment {
+ if m != nil {
+ return m.MaxCw20Payment
+ }
+ return nil
+}
+
+func (m *SubmitClaimConstraints) GetIntentDurationNs() time.Duration {
+ if m != nil {
+ return m.IntentDurationNs
+ }
+ return 0
+}
+
type EvaluateClaimAuthorization struct {
// address of admin
Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"`
@@ -465,57 +496,61 @@ func init() {
func init() { proto.RegisterFile("ixo/claims/v1beta1/authz.proto", fileDescriptor_f4b7f6c531e101a6) }
var fileDescriptor_f4b7f6c531e101a6 = []byte{
- // 787 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xcb, 0x6e, 0xdb, 0x46,
- 0x14, 0x15, 0x2d, 0xf9, 0xa1, 0xa1, 0xda, 0xa2, 0x53, 0xb7, 0xa5, 0x65, 0x83, 0x12, 0x54, 0xa0,
- 0x15, 0x8a, 0x9a, 0xb4, 0x64, 0x18, 0xe8, 0x63, 0x25, 0xa9, 0x5d, 0x18, 0x28, 0x12, 0x87, 0x36,
- 0x62, 0x20, 0x01, 0x42, 0x0c, 0xc9, 0x91, 0x34, 0x90, 0xc8, 0x51, 0xc8, 0xa1, 0x25, 0xfb, 0x2b,
- 0x9c, 0x5d, 0xbe, 0x20, 0x0b, 0x2f, 0xb2, 0xca, 0x47, 0x18, 0x59, 0x79, 0x99, 0x55, 0x1c, 0xd8,
- 0x3f, 0x12, 0x70, 0x38, 0xa4, 0x64, 0x99, 0x06, 0x04, 0x78, 0x25, 0xdd, 0xc7, 0xb9, 0x73, 0x74,
- 0xee, 0xb9, 0x10, 0x50, 0xc9, 0x84, 0xea, 0xf6, 0x10, 0x11, 0x37, 0xd0, 0x4f, 0x1a, 0x16, 0x66,
- 0xa8, 0xa1, 0xa3, 0x90, 0xf5, 0xcf, 0xb4, 0x91, 0x4f, 0x19, 0x85, 0x90, 0x4c, 0xa8, 0x16, 0xd7,
- 0x35, 0x51, 0x2f, 0xaf, 0xf7, 0x68, 0x8f, 0xf2, 0xb2, 0x1e, 0x7d, 0x8b,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, 0xb9,
+ 0xfb, 0xf8, 0xd5, 0x85, 0x6d, 0xbc, 0xbe, 0xb0, 0x8d, 0x7f, 0x2f, 0x6c, 0xe3, 0xf9, 0xa5, 0xbd,
+ 0xf5, 0xfa, 0xd2, 0xde, 0xfa, 0xfb, 0xd2, 0xde, 0xfa, 0xe9, 0xeb, 0xa5, 0x87, 0x47, 0xe6, 0x6c,
+ 0xc0, 0x52, 0x1a, 0x29, 0x9c, 0xe4, 0xe9, 0x38, 0x98, 0xb0, 0x70, 0x1c, 0x8e, 0x10, 0xa1, 0xee,
+ 0xd9, 0x5d, 0x77, 0x9e, 0xff, 0x88, 0xab, 0xf7, 0x18, 0xec, 0x2a, 0xfd, 0x77, 0xff, 0x0f, 0x00,
+ 0x00, 0xff, 0xff, 0x27, 0x09, 0xe5, 0xd7, 0x85, 0x08, 0x00, 0x00,
}
func (m *SubmitClaimAuthorization) Marshal() (dAtA []byte, err error) {
@@ -582,6 +617,42 @@ func (m *SubmitClaimConstraints) MarshalToSizedBuffer(dAtA []byte) (int, error)
_ = i
var l int
_ = l
+ n1, err1 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.IntentDurationNs, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.IntentDurationNs):])
+ if err1 != nil {
+ return 0, err1
+ }
+ i -= n1
+ i = encodeVarintAuthz(dAtA, i, uint64(n1))
+ i--
+ dAtA[i] = 0x2a
+ if len(m.MaxCw20Payment) > 0 {
+ for iNdEx := len(m.MaxCw20Payment) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.MaxCw20Payment[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintAuthz(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x22
+ }
+ }
+ if len(m.MaxAmount) > 0 {
+ for iNdEx := len(m.MaxAmount) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.MaxAmount[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintAuthz(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x1a
+ }
+ }
if m.AgentQuota != 0 {
i = encodeVarintAuthz(dAtA, i, uint64(m.AgentQuota))
i--
@@ -690,12 +761,12 @@ func (m *EvaluateClaimConstraints) MarshalToSizedBuffer(dAtA []byte) (int, error
}
}
if m.BeforeDate != nil {
- n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.BeforeDate, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.BeforeDate):])
- if err1 != nil {
- return 0, err1
+ n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.BeforeDate, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.BeforeDate):])
+ if err2 != nil {
+ return 0, err2
}
- i -= n1
- i = encodeVarintAuthz(dAtA, i, uint64(n1))
+ i -= n2
+ i = encodeVarintAuthz(dAtA, i, uint64(n2))
i--
dAtA[i] = 0x22
}
@@ -802,12 +873,12 @@ func (m *WithdrawPaymentConstraints) MarshalToSizedBuffer(dAtA []byte) (int, err
}
}
if m.ReleaseDate != nil {
- n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.ReleaseDate, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.ReleaseDate):])
- if err2 != nil {
- return 0, err2
+ n3, err3 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.ReleaseDate, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.ReleaseDate):])
+ if err3 != nil {
+ return 0, err3
}
- i -= n2
- i = encodeVarintAuthz(dAtA, i, uint64(n2))
+ i -= n3
+ i = encodeVarintAuthz(dAtA, i, uint64(n3))
i--
dAtA[i] = 0x42
}
@@ -923,6 +994,20 @@ func (m *SubmitClaimConstraints) Size() (n int) {
if m.AgentQuota != 0 {
n += 1 + sovAuthz(uint64(m.AgentQuota))
}
+ if len(m.MaxAmount) > 0 {
+ for _, e := range m.MaxAmount {
+ l = e.Size()
+ n += 1 + l + sovAuthz(uint64(l))
+ }
+ }
+ if len(m.MaxCw20Payment) > 0 {
+ for _, e := range m.MaxCw20Payment {
+ l = e.Size()
+ n += 1 + l + sovAuthz(uint64(l))
+ }
+ }
+ l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.IntentDurationNs)
+ n += 1 + l + sovAuthz(uint64(l))
return n
}
@@ -1254,6 +1339,107 @@ func (m *SubmitClaimConstraints) Unmarshal(dAtA []byte) error {
break
}
}
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MaxAmount", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowAuthz
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthAuthz
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthAuthz
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.MaxAmount = append(m.MaxAmount, types.Coin{})
+ if err := m.MaxAmount[len(m.MaxAmount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MaxCw20Payment", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowAuthz
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthAuthz
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthAuthz
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.MaxCw20Payment = append(m.MaxCw20Payment, &CW20Payment{})
+ if err := m.MaxCw20Payment[len(m.MaxCw20Payment)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field IntentDurationNs", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowAuthz
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthAuthz
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthAuthz
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.IntentDurationNs, dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipAuthz(dAtA[iNdEx:])
diff --git a/x/claims/types/claims.go b/x/claims/types/claims.go
index 197ad259..6be62119 100755
--- a/x/claims/types/claims.go
+++ b/x/claims/types/claims.go
@@ -6,6 +6,7 @@ import (
errorsmod "cosmossdk.io/errors"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
+ authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
entitytypes "github.com/ixofoundation/ixo-blockchain/v3/x/entity/types"
iidtypes "github.com/ixofoundation/ixo-blockchain/v3/x/iid/types"
@@ -63,6 +64,32 @@ func IsValidDispute(dispute *Dispute) bool {
return true
}
+// IsValidIntent tells if a Intent is valid,
+func IsValidIntent(intent *Intent) bool {
+ if intent == nil {
+ return false
+ }
+ if iidtypes.IsEmpty(intent.AgentDid) {
+ return false
+ }
+ if iidtypes.IsEmpty(intent.Id) {
+ return false
+ }
+ _, err := sdk.AccAddressFromBech32(intent.AgentAddress)
+ if err != nil {
+ return false
+ }
+ if iidtypes.IsEmpty(intent.CollectionId) {
+ return false
+ }
+ _, err = sdk.AccAddressFromBech32(intent.FromAddress)
+ if err != nil {
+ return false
+ }
+ _, err = sdk.AccAddressFromBech32(intent.EscrowAddress)
+ return err == nil
+}
+
func HasBalances(ctx sdk.Context, bankKeeper bankkeeper.Keeper, payerAddr sdk.AccAddress,
requiredFunds sdk.Coins) bool {
for _, coin := range requiredFunds {
@@ -76,35 +103,49 @@ func HasBalances(ctx sdk.Context, bankKeeper bankkeeper.Keeper, payerAddr sdk.Ac
func (p *Contract1155Payment) Validate() error {
if p != nil {
- _, err := sdk.AccAddressFromBech32(p.Address)
- if err != nil {
- return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "err %s", err)
- }
- if iidtypes.IsEmpty(p.TokenId) {
- return fmt.Errorf("token id cannot be empty")
- }
- // if p.Contract_1155Payment.Amount == 0 {
- // return fmt.Errorf("token amount cannot be 0")
+ // temporarily disable using 1155 tokens for payments
+ return fmt.Errorf("contract_1155_payment is currently disabled (not allowed)")
+
+ // _, err := sdk.AccAddressFromBech32(p.Address)
+ // if err != nil {
+ // return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "err %s", err)
+ // }
+ // if iidtypes.IsEmpty(p.TokenId) {
+ // return fmt.Errorf("token id cannot be empty")
// }
+ // // if p.Contract_1155Payment.Amount == 0 {
+ // // return fmt.Errorf("token amount cannot be 0")
+ // // }
}
return nil
}
-func (p Payment) Validate() error {
+func (p Payment) Validate(allowOraclePayments bool) error {
_, err := sdk.AccAddressFromBech32(p.Account)
if err != nil {
return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "err %s", err)
}
+ if !allowOraclePayments && p.IsOraclePayment {
+ return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "oracle payments is only allowed for APPROVAL payments")
+ }
+
+ // if is oracle payment then only native coins allowed
+ if p.IsOraclePayment && (!IsZeroCW20Payments(p.Cw20Payment) || p.Contract_1155Payment != nil) {
+ return ErrOraclePaymentOnlyNative
+ }
+
if err = p.Contract_1155Payment.Validate(); err != nil {
return err
}
- if err = ValidateCW20Payments(p.Cw20Payment); err != nil {
+ // no 0 amounts allowed, otherwise unnnecesary 0 amount payments
+ if err = ValidateCW20Payments(p.Cw20Payment, false); err != nil {
return err
}
+ // no 0 amounts allowed, otherwise unnnecesary 0 amount payments
if err = p.Amount.Sort().Validate(); err != nil {
return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "amounts not valid: (%s)", err)
}
@@ -129,16 +170,16 @@ func (p Payments) Validate() error {
return ErrCollectionEvalCW20Error
}
- if err := p.Submission.Validate(); err != nil {
+ if err := p.Submission.Validate(false); err != nil {
return err
}
- if err := p.Evaluation.Validate(); err != nil {
+ if err := p.Evaluation.Validate(false); err != nil {
return err
}
- if err := p.Approval.Validate(); err != nil {
+ if err := p.Approval.Validate(true); err != nil {
return err
}
- if err := p.Rejection.Validate(); err != nil {
+ if err := p.Rejection.Validate(false); err != nil {
return err
}
@@ -162,6 +203,7 @@ func (p *Payment) Clone() *Payment {
Amount: p.Amount,
Contract_1155Payment: contract1155Payment,
TimeoutNs: p.TimeoutNs,
+ IsOraclePayment: p.IsOraclePayment,
}
if p.Cw20Payment != nil {
@@ -181,3 +223,90 @@ func (p *Payment) Clone() *Payment {
return cloned
}
+
+// Helper to get module account key in form of claims_escrow_{collectionId}
+func GetModuleAccountKeyEscrow(collectionId string) string {
+ return ModuleName + "_escrow_" + collectionId
+}
+
+// Helper to get module account address
+func GetModuleAccountAddressEscrow(collectionId string) sdk.AccAddress {
+ return authtypes.NewModuleAddress(GetModuleAccountKeyEscrow(collectionId))
+}
+
+// IsCoinsInMaxConstraints checks if the provided coins are within the max constraints
+func IsCoinsInMaxConstraints(coins sdk.Coins, maxCoins sdk.Coins) bool {
+ maxCoinsMap := make(map[string]sdk.Coin)
+ for _, maxCoin := range maxCoins {
+ maxCoinsMap[maxCoin.Denom] = maxCoin
+ }
+
+ for _, coin := range coins {
+ maxCoin, ok := maxCoinsMap[coin.Denom]
+ if !ok || !coin.IsLTE(maxCoin) {
+ return false
+ }
+ }
+ return true
+}
+
+func IsCW20PaymentsInMaxConstraints(cw20Payments []*CW20Payment, maxCw20Payments []*CW20Payment) bool {
+ maxPaymentsMap := make(map[string]*CW20Payment)
+ for _, maxPayment := range maxCw20Payments {
+ maxPaymentsMap[maxPayment.Address] = maxPayment
+ }
+
+ for _, payment := range cw20Payments {
+ maxPayment, ok := maxPaymentsMap[payment.Address]
+ if !ok || payment.Amount > maxPayment.Amount {
+ return false
+ }
+ }
+ return true
+}
+
+// Validate checks that the Coins are sorted, have positive amount or zero, with a valid and unique
+// denomination (i.e no duplicates). Otherwise, it returns an error. Copied from sdk.Coins.Validate()
+func ValidateCoinsAllowZero(coins sdk.Coins) error {
+ switch len(coins) {
+ case 0:
+ return nil
+
+ case 1:
+ if err := sdk.ValidateDenom(coins[0].Denom); err != nil {
+ return err
+ }
+ if coins[0].IsNegative() {
+ return fmt.Errorf("coin %s amount is negative", coins[0])
+ }
+ return nil
+
+ default:
+ // check single coin case
+ if err := ValidateCoinsAllowZero(sdk.Coins{coins[0]}); err != nil {
+ return err
+ }
+
+ lowDenom := coins[0].Denom
+
+ for _, coin := range coins[1:] {
+ if err := sdk.ValidateDenom(coin.Denom); err != nil {
+ return err
+ }
+ if coin.Denom < lowDenom {
+ return fmt.Errorf("denomination %s is not sorted", coin.Denom)
+ }
+ if coin.Denom == lowDenom {
+ return fmt.Errorf("duplicate denomination %s", coin.Denom)
+ }
+ if coin.IsNegative() {
+ return fmt.Errorf("coin %s amount is negative", coin.Denom)
+ }
+
+ // we compare each coin against the last denom
+ lowDenom = coin.Denom
+ }
+
+ return nil
+ }
+}
diff --git a/x/claims/types/claims.pb.go b/x/claims/types/claims.pb.go
index 3a9639c6..0de9cda7 100644
--- a/x/claims/types/claims.pb.go
+++ b/x/claims/types/claims.pb.go
@@ -60,6 +60,39 @@ func (CollectionState) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_619c1a0876cd0592, []int{0}
}
+type CollectionIntentOptions int32
+
+const (
+ // Allow: Intents can be made for claims, but claims can also be made without
+ // intents.
+ CollectionIntentOptions_allow CollectionIntentOptions = 0
+ // Deny: Intents cannot be made for claims for the collection.
+ CollectionIntentOptions_deny CollectionIntentOptions = 1
+ // Required: Claims cannot be made without an associated intent. An intent is
+ // mandatory before a claim can be submitted.
+ CollectionIntentOptions_required CollectionIntentOptions = 2
+)
+
+var CollectionIntentOptions_name = map[int32]string{
+ 0: "ALLOW",
+ 1: "DENY",
+ 2: "REQUIRED",
+}
+
+var CollectionIntentOptions_value = map[string]int32{
+ "ALLOW": 0,
+ "DENY": 1,
+ "REQUIRED": 2,
+}
+
+func (x CollectionIntentOptions) String() string {
+ return proto.EnumName(CollectionIntentOptions_name, int32(x))
+}
+
+func (CollectionIntentOptions) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_619c1a0876cd0592, []int{1}
+}
+
type EvaluationStatus int32
const (
@@ -91,7 +124,42 @@ func (x EvaluationStatus) String() string {
}
func (EvaluationStatus) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_619c1a0876cd0592, []int{1}
+ return fileDescriptor_619c1a0876cd0592, []int{2}
+}
+
+type IntentStatus int32
+
+const (
+ // Active: Intent is created and active, payments have been transferred to
+ // escrow if there is any
+ IntentStatus_active IntentStatus = 0
+ // Fulfilled: Intent is fulfilled, was used to create a claim and funds will
+ // be released on claim APPROVAL, or funds will be reverted on claim REJECTION
+ // or DISPUTE
+ IntentStatus_fulfilled IntentStatus = 1
+ // Expired: Intent has expired, payments have been transferred back out of
+ // escrow
+ IntentStatus_expired IntentStatus = 2
+)
+
+var IntentStatus_name = map[int32]string{
+ 0: "ACTIVE",
+ 1: "FULFILLED",
+ 2: "EXPIRED",
+}
+
+var IntentStatus_value = map[string]int32{
+ "ACTIVE": 0,
+ "FULFILLED": 1,
+ "EXPIRED": 2,
+}
+
+func (x IntentStatus) String() string {
+ return proto.EnumName(IntentStatus_name, int32(x))
+}
+
+func (IntentStatus) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_619c1a0876cd0592, []int{3}
}
type PaymentType int32
@@ -122,19 +190,25 @@ func (x PaymentType) String() string {
}
func (PaymentType) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_619c1a0876cd0592, []int{2}
+ return fileDescriptor_619c1a0876cd0592, []int{4}
}
type PaymentStatus int32
const (
PaymentStatus_no_payment PaymentStatus = 0
- PaymentStatus_promised PaymentStatus = 1
+ // Promised: Agent is contracted to receive payment
+ PaymentStatus_promised PaymentStatus = 1
+ // Authorized: Authz set up, no guarantee
PaymentStatus_authorized PaymentStatus = 2
+ // Guaranteed: Escrow set up with funds blocked
PaymentStatus_guaranteed PaymentStatus = 3
- PaymentStatus_paid PaymentStatus = 4
- PaymentStatus_failed PaymentStatus = 5
- PaymentStatus_disputed PaymentStatus = 6
+ // Paid: Funds have been paid
+ PaymentStatus_paid PaymentStatus = 4
+ // Failed: Payment failed, most probably due to insufficient funds
+ PaymentStatus_failed PaymentStatus = 5
+ // DisputedPayment: Payment disputed
+ PaymentStatus_disputed PaymentStatus = 6
)
var PaymentStatus_name = map[int32]string{
@@ -162,7 +236,7 @@ func (x PaymentStatus) String() string {
}
func (PaymentStatus) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_619c1a0876cd0592, []int{3}
+ return fileDescriptor_619c1a0876cd0592, []int{5}
}
type Params struct {
@@ -170,6 +244,7 @@ type Params struct {
IxoAccount string `protobuf:"bytes,2,opt,name=ixo_account,json=ixoAccount,proto3" json:"ixo_account,omitempty"`
NetworkFeePercentage cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=network_fee_percentage,json=networkFeePercentage,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"network_fee_percentage"`
NodeFeePercentage cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=node_fee_percentage,json=nodeFeePercentage,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"node_fee_percentage"`
+ IntentSequence uint64 `protobuf:"varint,5,opt,name=intent_sequence,json=intentSequence,proto3" json:"intent_sequence,omitempty"`
}
func (m *Params) Reset() { *m = Params{} }
@@ -219,6 +294,13 @@ func (m *Params) GetIxoAccount() string {
return ""
}
+func (m *Params) GetIntentSequence() uint64 {
+ if m != nil {
+ return m.IntentSequence
+ }
+ return 0
+}
+
type Collection struct {
// collection id is the incremented internal id for the collection of claims
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
@@ -260,6 +342,13 @@ type Collection struct {
// invalidated is the number of claims that have been evaluated as invalid
// (internally calculated)
Invalidated uint64 `protobuf:"varint,16,opt,name=invalidated,proto3" json:"invalidated,omitempty"`
+ // escrow_account is the escrow account address for this collection created at
+ // collection creation, current purpose is to transfer payments to escrow
+ // account for GUARANTEED payments through intents
+ EscrowAccount string `protobuf:"bytes,17,opt,name=escrow_account,json=escrowAccount,proto3" json:"escrow_account,omitempty"`
+ // intents is the option for intents for this collection (allow, deny,
+ // required)
+ Intents CollectionIntentOptions `protobuf:"varint,18,opt,name=intents,proto3,enum=ixo.claims.v1beta1.CollectionIntentOptions" json:"intents,omitempty"`
}
func (m *Collection) Reset() { *m = Collection{} }
@@ -407,6 +496,20 @@ func (m *Collection) GetInvalidated() uint64 {
return 0
}
+func (m *Collection) GetEscrowAccount() string {
+ if m != nil {
+ return m.EscrowAccount
+ }
+ return ""
+}
+
+func (m *Collection) GetIntents() CollectionIntentOptions {
+ if m != nil {
+ return m.Intents
+ }
+ return CollectionIntentOptions_allow
+}
+
type Payments struct {
Submission *Payment `protobuf:"bytes,1,opt,name=submission,proto3" json:"submission,omitempty"`
Evaluation *Payment `protobuf:"bytes,2,opt,name=evaluation,proto3" json:"evaluation,omitempty"`
@@ -486,6 +589,10 @@ type Payment struct {
TimeoutNs time.Duration `protobuf:"bytes,4,opt,name=timeout_ns,json=timeoutNs,proto3,stdduration" json:"timeout_ns"`
// cw20 payments, can be empty or multiple
Cw20Payment []*CW20Payment `protobuf:"bytes,5,rep,name=cw20_payment,json=cw20Payment,proto3" json:"cw20_payment,omitempty"`
+ // boolean to indicate if the payment is for oracle payments, aka it will go
+ // through network fees split NOTE: if true the payment can only have amount
+ // values(Native coins), no cw20 payments allowed then
+ IsOraclePayment bool `protobuf:"varint,6,opt,name=is_oracle_payment,json=isOraclePayment,proto3" json:"is_oracle_payment,omitempty"`
}
func (m *Payment) Reset() { *m = Payment{} }
@@ -556,6 +663,13 @@ func (m *Payment) GetCw20Payment() []*CW20Payment {
return nil
}
+func (m *Payment) GetIsOraclePayment() bool {
+ if m != nil {
+ return m.IsOraclePayment
+ }
+ return false
+}
+
type Contract1155Payment struct {
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
TokenId string `protobuf:"bytes,2,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"`
@@ -681,8 +795,18 @@ type Claim struct {
// claimID is the unique identifier of the claim in the cid hash format
ClaimId string `protobuf:"bytes,5,opt,name=claim_id,json=claimId,proto3" json:"claim_id,omitempty"`
// evaluation is the result of one or more claim evaluations
- Evaluation *Evaluation `protobuf:"bytes,6,opt,name=evaluation,proto3" json:"evaluation,omitempty"`
+ Evaluation *Evaluation `protobuf:"bytes,6,opt,name=evaluation,proto3" json:"evaluation,omitempty"`
+ // payments_status is the status of the payments for the claim
PaymentsStatus *ClaimPayments `protobuf:"bytes,7,opt,name=payments_status,json=paymentsStatus,proto3" json:"payments_status,omitempty"`
+ // intent_id is the id of the intent for this claim, if any
+ UseIntent bool `protobuf:"varint,8,opt,name=use_intent,json=useIntent,proto3" json:"use_intent,omitempty"`
+ // NOTE: if both amount and cw20 amount are empty then use default by
+ // Collection custom amount specified by service agent for claim approval
+ Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,9,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"`
+ // NOTE: if both amount and cw20 amount are empty then use default by
+ // Collection custom cw20 payments specified by service agent for claim
+ // approval
+ Cw20Payment []*CW20Payment `protobuf:"bytes,10,rep,name=cw20_payment,json=cw20Payment,proto3" json:"cw20_payment,omitempty"`
}
func (m *Claim) Reset() { *m = Claim{} }
@@ -767,6 +891,27 @@ func (m *Claim) GetPaymentsStatus() *ClaimPayments {
return nil
}
+func (m *Claim) GetUseIntent() bool {
+ if m != nil {
+ return m.UseIntent
+ }
+ return false
+}
+
+func (m *Claim) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins {
+ if m != nil {
+ return m.Amount
+ }
+ return nil
+}
+
+func (m *Claim) GetCw20Payment() []*CW20Payment {
+ if m != nil {
+ return m.Cw20Payment
+ }
+ return nil
+}
+
type ClaimPayments struct {
Submission PaymentStatus `protobuf:"varint,1,opt,name=submission,proto3,enum=ixo.claims.v1beta1.PaymentStatus" json:"submission,omitempty"`
Evaluation PaymentStatus `protobuf:"varint,2,opt,name=evaluation,proto3,enum=ixo.claims.v1beta1.PaymentStatus" json:"evaluation,omitempty"`
@@ -857,11 +1002,10 @@ type Evaluation struct {
// evaluationDate is the date and time that the claim evaluation was submitted
// on-chain
EvaluationDate *time.Time `protobuf:"bytes,9,opt,name=evaluation_date,json=evaluationDate,proto3,stdtime" json:"evaluation_date,omitempty"`
- // custom amount specified by evaluator for claim approval, if empty list then
- // use default by Collection
+ // if both amount and cw20 amount are empty then use default by Collection
+ // custom amount specified by evaluator for claim approval
Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,10,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"`
- // custom cw20 payments specified by evaluator for claim approval, if empty
- // list then use default by Collection
+ // custom cw20 payments specified by evaluator for claim approval
Cw20Payment []*CW20Payment `protobuf:"bytes,11,rep,name=cw20_payment,json=cw20Payment,proto3" json:"cw20_payment,omitempty"`
}
@@ -1104,9 +1248,157 @@ func (m *DisputeData) GetEncrypted() bool {
return false
}
+// Intent defines the structure for a service agent's claim intent.
+type Intent struct {
+ // id is the incremented internal id for the intent
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ // The service agent's DID (Decentralized Identifier).
+ AgentDid string `protobuf:"bytes,2,opt,name=agent_did,json=agentDid,proto3" json:"agent_did,omitempty"`
+ // The service agent's address.
+ AgentAddress string `protobuf:"bytes,3,opt,name=agent_address,json=agentAddress,proto3" json:"agent_address,omitempty"`
+ // The id of the collection this intent is linked to.
+ CollectionId string `protobuf:"bytes,4,opt,name=collection_id,json=collectionId,proto3" json:"collection_id,omitempty"`
+ // claim_id (optional, set when claim is submitted)
+ ClaimId string `protobuf:"bytes,5,opt,name=claim_id,json=claimId,proto3" json:"claim_id,omitempty"`
+ // The time the intent was created.
+ CreatedAt *time.Time `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at,omitempty"`
+ // Timeout period for the intent. If the claim is not submitted by this time,
+ // the intent expires.
+ ExpireAt *time.Time `protobuf:"bytes,7,opt,name=expire_at,json=expireAt,proto3,stdtime" json:"expire_at,omitempty"`
+ // Status of the intent (e.g., "ACTIVE" or "FULFILLED").
+ Status IntentStatus `protobuf:"varint,8,opt,name=status,proto3,enum=ixo.claims.v1beta1.IntentStatus" json:"status,omitempty"`
+ // The payment amount the agent intends to claim, if any.
+ Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,9,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"`
+ // The CW20Payment amount the agent intends to claim, if any.
+ Cw20Payment []*CW20Payment `protobuf:"bytes,10,rep,name=cw20_payment,json=cw20Payment,proto3" json:"cw20_payment,omitempty"`
+ // the address the escrow payment came from
+ FromAddress string `protobuf:"bytes,11,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"`
+ // the escrow account address
+ EscrowAddress string `protobuf:"bytes,12,opt,name=escrow_address,json=escrowAddress,proto3" json:"escrow_address,omitempty"`
+}
+
+func (m *Intent) Reset() { *m = Intent{} }
+func (m *Intent) String() string { return proto.CompactTextString(m) }
+func (*Intent) ProtoMessage() {}
+func (*Intent) Descriptor() ([]byte, []int) {
+ return fileDescriptor_619c1a0876cd0592, []int{11}
+}
+func (m *Intent) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Intent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Intent.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *Intent) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Intent.Merge(m, src)
+}
+func (m *Intent) XXX_Size() int {
+ return m.Size()
+}
+func (m *Intent) XXX_DiscardUnknown() {
+ xxx_messageInfo_Intent.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Intent proto.InternalMessageInfo
+
+func (m *Intent) GetId() string {
+ if m != nil {
+ return m.Id
+ }
+ return ""
+}
+
+func (m *Intent) GetAgentDid() string {
+ if m != nil {
+ return m.AgentDid
+ }
+ return ""
+}
+
+func (m *Intent) GetAgentAddress() string {
+ if m != nil {
+ return m.AgentAddress
+ }
+ return ""
+}
+
+func (m *Intent) GetCollectionId() string {
+ if m != nil {
+ return m.CollectionId
+ }
+ return ""
+}
+
+func (m *Intent) GetClaimId() string {
+ if m != nil {
+ return m.ClaimId
+ }
+ return ""
+}
+
+func (m *Intent) GetCreatedAt() *time.Time {
+ if m != nil {
+ return m.CreatedAt
+ }
+ return nil
+}
+
+func (m *Intent) GetExpireAt() *time.Time {
+ if m != nil {
+ return m.ExpireAt
+ }
+ return nil
+}
+
+func (m *Intent) GetStatus() IntentStatus {
+ if m != nil {
+ return m.Status
+ }
+ return IntentStatus_active
+}
+
+func (m *Intent) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins {
+ if m != nil {
+ return m.Amount
+ }
+ return nil
+}
+
+func (m *Intent) GetCw20Payment() []*CW20Payment {
+ if m != nil {
+ return m.Cw20Payment
+ }
+ return nil
+}
+
+func (m *Intent) GetFromAddress() string {
+ if m != nil {
+ return m.FromAddress
+ }
+ return ""
+}
+
+func (m *Intent) GetEscrowAddress() string {
+ if m != nil {
+ return m.EscrowAddress
+ }
+ return ""
+}
+
func init() {
proto.RegisterEnum("ixo.claims.v1beta1.CollectionState", CollectionState_name, CollectionState_value)
+ proto.RegisterEnum("ixo.claims.v1beta1.CollectionIntentOptions", CollectionIntentOptions_name, CollectionIntentOptions_value)
proto.RegisterEnum("ixo.claims.v1beta1.EvaluationStatus", EvaluationStatus_name, EvaluationStatus_value)
+ proto.RegisterEnum("ixo.claims.v1beta1.IntentStatus", IntentStatus_name, IntentStatus_value)
proto.RegisterEnum("ixo.claims.v1beta1.PaymentType", PaymentType_name, PaymentType_value)
proto.RegisterEnum("ixo.claims.v1beta1.PaymentStatus", PaymentStatus_name, PaymentStatus_value)
proto.RegisterType((*Params)(nil), "ixo.claims.v1beta1.Params")
@@ -1120,114 +1412,135 @@ func init() {
proto.RegisterType((*Evaluation)(nil), "ixo.claims.v1beta1.Evaluation")
proto.RegisterType((*Dispute)(nil), "ixo.claims.v1beta1.Dispute")
proto.RegisterType((*DisputeData)(nil), "ixo.claims.v1beta1.DisputeData")
+ proto.RegisterType((*Intent)(nil), "ixo.claims.v1beta1.Intent")
}
func init() { proto.RegisterFile("ixo/claims/v1beta1/claims.proto", fileDescriptor_619c1a0876cd0592) }
var fileDescriptor_619c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ool {
@@ -1307,6 +1620,11 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
+ if m.IntentSequence != 0 {
+ i = encodeVarintClaims(dAtA, i, uint64(m.IntentSequence))
+ i--
+ dAtA[i] = 0x28
+ }
{
size := m.NodeFeePercentage.Size()
i -= size
@@ -1362,6 +1680,22 @@ func (m *Collection) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
+ if m.Intents != 0 {
+ i = encodeVarintClaims(dAtA, i, uint64(m.Intents))
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0x90
+ }
+ if len(m.EscrowAccount) > 0 {
+ i -= len(m.EscrowAccount)
+ copy(dAtA[i:], m.EscrowAccount)
+ i = encodeVarintClaims(dAtA, i, uint64(len(m.EscrowAccount)))
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0x8a
+ }
if m.Invalidated != 0 {
i = encodeVarintClaims(dAtA, i, uint64(m.Invalidated))
i--
@@ -1565,6 +1899,16 @@ func (m *Payment) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
+ if m.IsOraclePayment {
+ i--
+ if m.IsOraclePayment {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x30
+ }
if len(m.Cw20Payment) > 0 {
for iNdEx := len(m.Cw20Payment) - 1; iNdEx >= 0; iNdEx-- {
{
@@ -1720,6 +2064,44 @@ func (m *Claim) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
+ if len(m.Cw20Payment) > 0 {
+ for iNdEx := len(m.Cw20Payment) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Cw20Payment[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintClaims(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x52
+ }
+ }
+ if len(m.Amount) > 0 {
+ for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintClaims(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x4a
+ }
+ }
+ if m.UseIntent {
+ i--
+ if m.UseIntent {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x40
+ }
if m.PaymentsStatus != nil {
{
size, err := m.PaymentsStatus.MarshalToSizedBuffer(dAtA[:i])
@@ -2042,48 +2424,176 @@ func (m *DisputeData) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil
}
-func encodeVarintClaims(dAtA []byte, offset int, v uint64) int {
- offset -= sovClaims(v)
- base := offset
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
+func (m *Intent) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
}
- dAtA[offset] = uint8(v)
- return base
+ return dAtA[:n], nil
}
-func (m *Params) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- if m.CollectionSequence != 0 {
- n += 1 + sovClaims(uint64(m.CollectionSequence))
- }
- l = len(m.IxoAccount)
- if l > 0 {
- n += 1 + l + sovClaims(uint64(l))
- }
- l = m.NetworkFeePercentage.Size()
- n += 1 + l + sovClaims(uint64(l))
- l = m.NodeFeePercentage.Size()
- n += 1 + l + sovClaims(uint64(l))
- return n
+
+func (m *Intent) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
}
-func (m *Collection) Size() (n int) {
- if m == nil {
- return 0
- }
+func (m *Intent) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
var l int
_ = l
- l = len(m.Id)
- if l > 0 {
- n += 1 + l + sovClaims(uint64(l))
+ if len(m.EscrowAddress) > 0 {
+ i -= len(m.EscrowAddress)
+ copy(dAtA[i:], m.EscrowAddress)
+ i = encodeVarintClaims(dAtA, i, uint64(len(m.EscrowAddress)))
+ i--
+ dAtA[i] = 0x62
}
- l = len(m.Entity)
+ if len(m.FromAddress) > 0 {
+ i -= len(m.FromAddress)
+ copy(dAtA[i:], m.FromAddress)
+ i = encodeVarintClaims(dAtA, i, uint64(len(m.FromAddress)))
+ i--
+ dAtA[i] = 0x5a
+ }
+ if len(m.Cw20Payment) > 0 {
+ for iNdEx := len(m.Cw20Payment) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Cw20Payment[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintClaims(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x52
+ }
+ }
+ if len(m.Amount) > 0 {
+ for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintClaims(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x4a
+ }
+ }
+ if m.Status != 0 {
+ i = encodeVarintClaims(dAtA, i, uint64(m.Status))
+ i--
+ dAtA[i] = 0x40
+ }
+ if m.ExpireAt != nil {
+ n15, err15 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.ExpireAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.ExpireAt):])
+ if err15 != nil {
+ return 0, err15
+ }
+ i -= n15
+ i = encodeVarintClaims(dAtA, i, uint64(n15))
+ i--
+ dAtA[i] = 0x3a
+ }
+ if m.CreatedAt != nil {
+ n16, err16 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.CreatedAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.CreatedAt):])
+ if err16 != nil {
+ return 0, err16
+ }
+ i -= n16
+ i = encodeVarintClaims(dAtA, i, uint64(n16))
+ i--
+ dAtA[i] = 0x32
+ }
+ if len(m.ClaimId) > 0 {
+ i -= len(m.ClaimId)
+ copy(dAtA[i:], m.ClaimId)
+ i = encodeVarintClaims(dAtA, i, uint64(len(m.ClaimId)))
+ i--
+ dAtA[i] = 0x2a
+ }
+ if len(m.CollectionId) > 0 {
+ i -= len(m.CollectionId)
+ copy(dAtA[i:], m.CollectionId)
+ i = encodeVarintClaims(dAtA, i, uint64(len(m.CollectionId)))
+ i--
+ dAtA[i] = 0x22
+ }
+ if len(m.AgentAddress) > 0 {
+ i -= len(m.AgentAddress)
+ copy(dAtA[i:], m.AgentAddress)
+ i = encodeVarintClaims(dAtA, i, uint64(len(m.AgentAddress)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.AgentDid) > 0 {
+ i -= len(m.AgentDid)
+ copy(dAtA[i:], m.AgentDid)
+ i = encodeVarintClaims(dAtA, i, uint64(len(m.AgentDid)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Id) > 0 {
+ i -= len(m.Id)
+ copy(dAtA[i:], m.Id)
+ i = encodeVarintClaims(dAtA, i, uint64(len(m.Id)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func encodeVarintClaims(dAtA []byte, offset int, v uint64) int {
+ offset -= sovClaims(v)
+ base := offset
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return base
+}
+func (m *Params) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.CollectionSequence != 0 {
+ n += 1 + sovClaims(uint64(m.CollectionSequence))
+ }
+ l = len(m.IxoAccount)
+ if l > 0 {
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ l = m.NetworkFeePercentage.Size()
+ n += 1 + l + sovClaims(uint64(l))
+ l = m.NodeFeePercentage.Size()
+ n += 1 + l + sovClaims(uint64(l))
+ if m.IntentSequence != 0 {
+ n += 1 + sovClaims(uint64(m.IntentSequence))
+ }
+ return n
+}
+
+func (m *Collection) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Id)
+ if l > 0 {
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ l = len(m.Entity)
if l > 0 {
n += 1 + l + sovClaims(uint64(l))
}
@@ -2135,6 +2645,13 @@ func (m *Collection) Size() (n int) {
if m.Invalidated != 0 {
n += 2 + sovClaims(uint64(m.Invalidated))
}
+ l = len(m.EscrowAccount)
+ if l > 0 {
+ n += 2 + l + sovClaims(uint64(l))
+ }
+ if m.Intents != 0 {
+ n += 2 + sovClaims(uint64(m.Intents))
+ }
return n
}
@@ -2191,6 +2708,9 @@ func (m *Payment) Size() (n int) {
n += 1 + l + sovClaims(uint64(l))
}
}
+ if m.IsOraclePayment {
+ n += 2
+ }
return n
}
@@ -2264,6 +2784,21 @@ func (m *Claim) Size() (n int) {
l = m.PaymentsStatus.Size()
n += 1 + l + sovClaims(uint64(l))
}
+ if m.UseIntent {
+ n += 2
+ }
+ if len(m.Amount) > 0 {
+ for _, e := range m.Amount {
+ l = e.Size()
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ }
+ if len(m.Cw20Payment) > 0 {
+ for _, e := range m.Cw20Payment {
+ l = e.Size()
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ }
return n
}
@@ -2387,6 +2922,66 @@ func (m *DisputeData) Size() (n int) {
return n
}
+func (m *Intent) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Id)
+ if l > 0 {
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ l = len(m.AgentDid)
+ if l > 0 {
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ l = len(m.AgentAddress)
+ if l > 0 {
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ l = len(m.CollectionId)
+ if l > 0 {
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ l = len(m.ClaimId)
+ if l > 0 {
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ if m.CreatedAt != nil {
+ l = github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.CreatedAt)
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ if m.ExpireAt != nil {
+ l = github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.ExpireAt)
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ if m.Status != 0 {
+ n += 1 + sovClaims(uint64(m.Status))
+ }
+ if len(m.Amount) > 0 {
+ for _, e := range m.Amount {
+ l = e.Size()
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ }
+ if len(m.Cw20Payment) > 0 {
+ for _, e := range m.Cw20Payment {
+ l = e.Size()
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ }
+ l = len(m.FromAddress)
+ if l > 0 {
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ l = len(m.EscrowAddress)
+ if l > 0 {
+ n += 1 + l + sovClaims(uint64(l))
+ }
+ return n
+}
+
func sovClaims(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
@@ -2541,6 +3136,25 @@ func (m *Params) Unmarshal(dAtA []byte) error {
return err
}
iNdEx = postIndex
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field IntentSequence", wireType)
+ }
+ m.IntentSequence = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.IntentSequence |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
default:
iNdEx = preIndex
skippy, err := skipClaims(dAtA[iNdEx:])
@@ -3011,6 +3625,57 @@ func (m *Collection) Unmarshal(dAtA []byte) error {
break
}
}
+ case 17:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field EscrowAccount", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.EscrowAccount = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 18:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Intents", wireType)
+ }
+ m.Intents = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Intents |= CollectionIntentOptions(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
default:
iNdEx = preIndex
skippy, err := skipClaims(dAtA[iNdEx:])
@@ -3424,7 +4089,27 @@ func (m *Payment) Unmarshal(dAtA []byte) error {
return err
}
iNdEx = postIndex
- default:
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field IsOraclePayment", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.IsOraclePayment = bool(v != 0)
+ default:
iNdEx = preIndex
skippy, err := skipClaims(dAtA[iNdEx:])
if err != nil {
@@ -3944,6 +4629,94 @@ func (m *Claim) Unmarshal(dAtA []byte) error {
return err
}
iNdEx = postIndex
+ case 8:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UseIntent", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.UseIntent = bool(v != 0)
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Amount = append(m.Amount, types.Coin{})
+ if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 10:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Cw20Payment", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Cw20Payment = append(m.Cw20Payment, &CW20Payment{})
+ if err := m.Cw20Payment[len(m.Cw20Payment)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipClaims(dAtA[iNdEx:])
@@ -4778,6 +5551,439 @@ func (m *DisputeData) Unmarshal(dAtA []byte) error {
}
return nil
}
+func (m *Intent) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Intent: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Intent: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Id = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AgentDid", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.AgentDid = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AgentAddress", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.AgentAddress = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CollectionId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.CollectionId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ClaimId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ClaimId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.CreatedAt == nil {
+ m.CreatedAt = new(time.Time)
+ }
+ if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ExpireAt", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ExpireAt == nil {
+ m.ExpireAt = new(time.Time)
+ }
+ if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(m.ExpireAt, dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 8:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
+ }
+ m.Status = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Status |= IntentStatus(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Amount = append(m.Amount, types.Coin{})
+ if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 10:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Cw20Payment", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Cw20Payment = append(m.Cw20Payment, &CW20Payment{})
+ if err := m.Cw20Payment[len(m.Cw20Payment)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 11:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FromAddress", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FromAddress = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 12:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field EscrowAddress", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowClaims
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthClaims
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.EscrowAddress = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipClaims(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthClaims
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
func skipClaims(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
diff --git a/x/claims/types/codec.go b/x/claims/types/codec.go
index a2fa2017..0580a787 100755
--- a/x/claims/types/codec.go
+++ b/x/claims/types/codec.go
@@ -20,6 +20,8 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
cdc.RegisterConcrete(&MsgUpdateCollectionState{}, "claims/UpdateCollectionState", nil)
cdc.RegisterConcrete(&MsgUpdateCollectionDates{}, "claims/UpdateCollectionDates", nil)
cdc.RegisterConcrete(&MsgUpdateCollectionPayments{}, "claims/UpdateCollectionPayments", nil)
+ cdc.RegisterConcrete(&MsgUpdateCollectionIntents{}, "claims/UpdateCollectionIntents", nil)
+ cdc.RegisterConcrete(&MsgClaimIntent{}, "claims/ClaimIntent", nil)
}
// RegisterInterfaces registers interfaces and implementations of the x/claims module.
@@ -33,6 +35,8 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) {
&MsgUpdateCollectionState{},
&MsgUpdateCollectionDates{},
&MsgUpdateCollectionPayments{},
+ &MsgUpdateCollectionIntents{},
+ &MsgClaimIntent{},
)
registry.RegisterImplementations(
diff --git a/x/claims/types/cw20.go b/x/claims/types/cw20.go
index d7c93f77..c97c9bf6 100644
--- a/x/claims/types/cw20.go
+++ b/x/claims/types/cw20.go
@@ -6,7 +6,7 @@ import (
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
)
-func (p *CW20Payment) Validate() error {
+func (p *CW20Payment) Validate(allowZero bool) error {
if p == nil {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "cw20 payment cannot be nil")
}
@@ -14,6 +14,9 @@ func (p *CW20Payment) Validate() error {
if err != nil {
return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "err %s", err)
}
+ if !allowZero && p.Amount == 0 {
+ return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "cw20 payment amount cannot be 0")
+ }
return nil
}
@@ -21,7 +24,7 @@ func (p *CW20Payment) Validate() error {
// - addresses are valid
// - amounts are positive (default as type is Uint)
// - no duplicates in addresses
-func ValidateCW20Payments(p []*CW20Payment) error {
+func ValidateCW20Payments(p []*CW20Payment, allowZero bool) error {
if len(p) == 0 {
return nil
}
@@ -33,10 +36,23 @@ func ValidateCW20Payments(p []*CW20Payment) error {
return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "cw20 payments cannot have duplicate addresses (%s)", cw20Payment.Address)
}
addresses[cw20Payment.Address] = struct{}{}
- if err := cw20Payment.Validate(); err != nil {
+ if err := cw20Payment.Validate(allowZero); err != nil {
return err
}
}
return nil
}
+
+// IsZero returns true if there are no payments or all payments are zero.
+func IsZeroCW20Payments(cw20Payments []*CW20Payment) bool {
+ if len(cw20Payments) == 0 {
+ return true
+ }
+ for _, cw20Payment := range cw20Payments {
+ if cw20Payment.Amount != 0 {
+ return false
+ }
+ }
+ return true
+}
diff --git a/x/claims/types/errors.go b/x/claims/types/errors.go
index b25b1ed5..5e788c39 100755
--- a/x/claims/types/errors.go
+++ b/x/claims/types/errors.go
@@ -29,4 +29,9 @@ var (
ErrPaymentPresetPercentagesOverflow = errorsmod.Register(ModuleName, 1400, "preset fee percentages for node and network overflows 100%")
ErrPaymentWithdrawFailed = errorsmod.Register(ModuleName, 1401, "payment withdrawal failed")
ErrDistributionFailed = errorsmod.Register(ModuleName, 1402, "distribution calculations failed")
+ ErrOraclePaymentOnlyNative = errorsmod.Register(ModuleName, 1403, "oracle payments can only have Native Coin payments, CW20 payments are not allowed")
+
+ ErrIntentNotFound = errorsmod.Register(ModuleName, 1500, "intent not found")
+ ErrIntentExists = errorsmod.Register(ModuleName, 1501, "active intent found")
+ ErrIntentUnauthorized = errorsmod.Register(ModuleName, 1502, "unauthorized")
)
diff --git a/x/claims/types/event.pb.go b/x/claims/types/event.pb.go
index c08b626c..6a394bab 100644
--- a/x/claims/types/event.pb.go
+++ b/x/claims/types/event.pb.go
@@ -383,6 +383,96 @@ func (m *PaymentWithdrawCreatedEvent) GetWithdraw() *WithdrawPaymentConstraints
return nil
}
+// IntentSubmittedEvent is an event triggered on an Intent submission
+type IntentSubmittedEvent struct {
+ Intent *Intent `protobuf:"bytes,1,opt,name=intent,proto3" json:"intent,omitempty"`
+}
+
+func (m *IntentSubmittedEvent) Reset() { *m = IntentSubmittedEvent{} }
+func (m *IntentSubmittedEvent) String() string { return proto.CompactTextString(m) }
+func (*IntentSubmittedEvent) ProtoMessage() {}
+func (*IntentSubmittedEvent) Descriptor() ([]byte, []int) {
+ return fileDescriptor_26b125bce36ddb45, []int{8}
+}
+func (m *IntentSubmittedEvent) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *IntentSubmittedEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_IntentSubmittedEvent.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *IntentSubmittedEvent) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_IntentSubmittedEvent.Merge(m, src)
+}
+func (m *IntentSubmittedEvent) XXX_Size() int {
+ return m.Size()
+}
+func (m *IntentSubmittedEvent) XXX_DiscardUnknown() {
+ xxx_messageInfo_IntentSubmittedEvent.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_IntentSubmittedEvent proto.InternalMessageInfo
+
+func (m *IntentSubmittedEvent) GetIntent() *Intent {
+ if m != nil {
+ return m.Intent
+ }
+ return nil
+}
+
+// IntentUpdatedEvent is an event triggered on an Intent update
+type IntentUpdatedEvent struct {
+ Intent *Intent `protobuf:"bytes,1,opt,name=intent,proto3" json:"intent,omitempty"`
+}
+
+func (m *IntentUpdatedEvent) Reset() { *m = IntentUpdatedEvent{} }
+func (m *IntentUpdatedEvent) String() string { return proto.CompactTextString(m) }
+func (*IntentUpdatedEvent) ProtoMessage() {}
+func (*IntentUpdatedEvent) Descriptor() ([]byte, []int) {
+ return fileDescriptor_26b125bce36ddb45, []int{9}
+}
+func (m *IntentUpdatedEvent) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *IntentUpdatedEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_IntentUpdatedEvent.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *IntentUpdatedEvent) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_IntentUpdatedEvent.Merge(m, src)
+}
+func (m *IntentUpdatedEvent) XXX_Size() int {
+ return m.Size()
+}
+func (m *IntentUpdatedEvent) XXX_DiscardUnknown() {
+ xxx_messageInfo_IntentUpdatedEvent.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_IntentUpdatedEvent proto.InternalMessageInfo
+
+func (m *IntentUpdatedEvent) GetIntent() *Intent {
+ if m != nil {
+ return m.Intent
+ }
+ return nil
+}
+
func init() {
proto.RegisterType((*CollectionCreatedEvent)(nil), "ixo.claims.v1beta1.CollectionCreatedEvent")
proto.RegisterType((*CollectionUpdatedEvent)(nil), "ixo.claims.v1beta1.CollectionUpdatedEvent")
@@ -392,36 +482,40 @@ func init() {
proto.RegisterType((*ClaimDisputedEvent)(nil), "ixo.claims.v1beta1.ClaimDisputedEvent")
proto.RegisterType((*PaymentWithdrawnEvent)(nil), "ixo.claims.v1beta1.PaymentWithdrawnEvent")
proto.RegisterType((*PaymentWithdrawCreatedEvent)(nil), "ixo.claims.v1beta1.PaymentWithdrawCreatedEvent")
+ proto.RegisterType((*IntentSubmittedEvent)(nil), "ixo.claims.v1beta1.IntentSubmittedEvent")
+ proto.RegisterType((*IntentUpdatedEvent)(nil), "ixo.claims.v1beta1.IntentUpdatedEvent")
}
func init() { proto.RegisterFile("ixo/claims/v1beta1/event.proto", fileDescriptor_26b125bce36ddb45) }
var fileDescriptor_26b125bce36ddb45 = []byte{
- // 379 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0xbf, 0x4e, 0xf3, 0x30,
- 0x14, 0xc5, 0x9b, 0xe1, 0xfb, 0x40, 0x66, 0x22, 0xfc, 0x11, 0xb4, 0x92, 0x41, 0x99, 0x58, 0x88,
- 0x55, 0x2a, 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0x69, 0xed, 0x90, 0x44, 0x76, 0x7e, 0x39, 0xe4,
- 0xa0, 0x72, 0xd9, 0x2b, 0x09, 0xe3, 0x16, 0xe8, 0x25, 0xb6, 0x4f, 0x93, 0x28, 0xad, 0xa8, 0xe7,
- 0x60, 0xc3, 0x93, 0x0d, 0x85, 0xec, 0x34, 0x21, 0x55, 0xc6, 0x5e, 0x7a, 0x0d, 0x17, 0xec, 0xdd,
- 0xe1, 0x69, 0x48, 0x98, 0xb8, 0xa7, 0xc2, 0xf7, 0x62, 0x3c, 0x61, 0x92, 0x77, 0x03, 0x36, 0x27,
- 0xaa, 0xa3, 0x80, 0x66, 0x13, 0x70, 0x99, 0x52, 0x10, 0x8b, 0xb3, 0x44, 0xc4, 0x98, 0x32, 0x91,
- 0xd8, 0x55, 0xde, 0xa0, 0xa0, 0xf3, 0x6d, 0x48, 0xed, 0x3e, 0xad, 0x71, 0xd4, 0xd5, 0xf0, 0x6d,
- 0x0e, 0xb5, 0xd9, 0x1c, 0x6a, 0x1f, 0x73, 0xa8, 0xbd, 0x2e, 0x60, 0x6b, 0xb6, 0x80, 0xad, 0xf7,
- 0x05, 0x6c, 0x3d, 0x5e, 0x8c, 0xa9, 0xf0, 0x53, 0xc7, 0x74, 0x79, 0x88, 0x68, 0xce, 0x9f, 0x78,
- 0xca, 0xbc, 0xf2, 0x87, 0x16, 0xd5, 0xa9, 0x13, 0x70, 0xf7, 0xd9, 0xf5, 0x31, 0x65, 0x28, 0xeb,
- 0xa1, 0x7c, 0xf9, 0x30, 0xc4, 0x34, 0x22, 0x89, 0xf3, 0xbf, 0x7c, 0x11, 0xbd, 0xcf, 0x00, 0x00,
- 0x00, 0xff, 0xff, 0x2d, 0x18, 0x80, 0x87, 0x9e, 0x03, 0x00, 0x00,
+ // 415 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0x41, 0x6f, 0x9b, 0x30,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e, 0x32, 0xaf, 0xfc, 0xcd, 0xc5, 0xe9, 0xb7, 0x13, 0x70, 0xf7, 0xda,
+ 0xf5, 0x31, 0x65, 0x28, 0x1b, 0xa2, 0x7c, 0xfb, 0x5c, 0xc5, 0x32, 0x22, 0x89, 0xd3, 0x2e, 0xdf,
+ 0xe9, 0xf0, 0x31, 0x00, 0x00, 0xff, 0xff, 0x2f, 0x6d, 0x8d, 0xc3, 0x34, 0x04, 0x00, 0x00,
}
func (m *CollectionCreatedEvent) Marshal() (dAtA []byte, err error) {
@@ -704,6 +798,76 @@ func (m *PaymentWithdrawCreatedEvent) MarshalToSizedBuffer(dAtA []byte) (int, er
return len(dAtA) - i, nil
}
+func (m *IntentSubmittedEvent) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *IntentSubmittedEvent) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *IntentSubmittedEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.Intent != nil {
+ {
+ size, err := m.Intent.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintEvent(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *IntentUpdatedEvent) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *IntentUpdatedEvent) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *IntentUpdatedEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.Intent != nil {
+ {
+ size, err := m.Intent.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintEvent(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
func encodeVarintEvent(dAtA []byte, offset int, v uint64) int {
offset -= sovEvent(v)
base := offset
@@ -819,6 +983,32 @@ func (m *PaymentWithdrawCreatedEvent) Size() (n int) {
return n
}
+func (m *IntentSubmittedEvent) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Intent != nil {
+ l = m.Intent.Size()
+ n += 1 + l + sovEvent(uint64(l))
+ }
+ return n
+}
+
+func (m *IntentUpdatedEvent) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Intent != nil {
+ l = m.Intent.Size()
+ n += 1 + l + sovEvent(uint64(l))
+ }
+ return n
+}
+
func sovEvent(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
@@ -1513,6 +1703,178 @@ func (m *PaymentWithdrawCreatedEvent) Unmarshal(dAtA []byte) error {
}
return nil
}
+func (m *IntentSubmittedEvent) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowEvent
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: IntentSubmittedEvent: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: IntentSubmittedEvent: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Intent", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowEvent
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthEvent
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthEvent
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Intent == nil {
+ m.Intent = &Intent{}
+ }
+ if err := m.Intent.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipEvent(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthEvent
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *IntentUpdatedEvent) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowEvent
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: IntentUpdatedEvent: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: IntentUpdatedEvent: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Intent", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowEvent
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthEvent
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthEvent
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Intent == nil {
+ m.Intent = &Intent{}
+ }
+ if err := m.Intent.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipEvent(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthEvent
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
func skipEvent(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
diff --git a/x/claims/types/expected_keepers.go b/x/claims/types/expected_keepers.go
index 3ce04540..2999029b 100644
--- a/x/claims/types/expected_keepers.go
+++ b/x/claims/types/expected_keepers.go
@@ -30,8 +30,15 @@ type AuthzKeeper interface {
type BankKeeper interface {
HasBalance(ctx context.Context, addr sdk.AccAddress, amt sdk.Coin) bool
InputOutputCoins(ctx context.Context, input banktypes.Input, outputs []banktypes.Output) error
+ SendCoins(ctx context.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) error
}
type WasmKeeper interface {
Execute(ctx sdk.Context, contractAddress sdk.AccAddress, caller sdk.AccAddress, msg []byte, coins sdk.Coins) ([]byte, error)
}
+
+type AccountKeeper interface {
+ NewAccountWithAddress(context.Context, sdk.AccAddress) sdk.AccountI
+ GetAccount(context.Context, sdk.AccAddress) sdk.AccountI
+ SetAccount(context.Context, sdk.AccountI)
+}
diff --git a/x/claims/types/genesis.pb.go b/x/claims/types/genesis.pb.go
index 3795d069..18b6b22b 100644
--- a/x/claims/types/genesis.pb.go
+++ b/x/claims/types/genesis.pb.go
@@ -29,6 +29,7 @@ type GenesisState struct {
Collections []Collection `protobuf:"bytes,2,rep,name=collections,proto3" json:"collections"`
Claims []Claim `protobuf:"bytes,3,rep,name=claims,proto3" json:"claims"`
Disputes []Dispute `protobuf:"bytes,4,rep,name=disputes,proto3" json:"disputes"`
+ Intents []Intent `protobuf:"bytes,5,rep,name=intents,proto3" json:"intents"`
}
func (m *GenesisState) Reset() { *m = GenesisState{} }
@@ -92,6 +93,13 @@ func (m *GenesisState) GetDisputes() []Dispute {
return nil
}
+func (m *GenesisState) GetIntents() []Intent {
+ if m != nil {
+ return m.Intents
+ }
+ return nil
+}
+
func init() {
proto.RegisterType((*GenesisState)(nil), "ixo.claims.v1beta1.GenesisState")
}
@@ -99,26 +107,27 @@ func init() {
func init() { proto.RegisterFile("ixo/claims/v1beta1/genesis.proto", fileDescriptor_43a260806dd06159) }
var fileDescriptor_43a260806dd06159 = []byte{
- // 296 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0xb1, 0x4e, 0xeb, 0x30,
- 0x14, 0x86, 0x93, 0xb6, 0xaa, 0xae, 0xdc, 0x3b, 0x59, 0x0c, 0xa1, 0x48, 0x6e, 0xc5, 0xd4, 0x05,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 0x3d, 0x6b, 0x53, 0xef, 0x1c, 0xd3, 0xc8, 0x47, 0x65, 0xb1, 0xdc, 0x95,
- 0xc4, 0xdf, 0x97, 0xc4, 0xff, 0x2e, 0x89, 0xff, 0x51, 0x11, 0x6f, 0x5f, 0x11, 0xef, 0xb3, 0x22,
- 0xde, 0xf3, 0x75, 0xa4, 0xcc, 0x3a, 0x0f, 0xa9, 0x80, 0x84, 0xa9, 0x02, 0x5e, 0x20, 0x4f, 0x57,
- 0xbc, 0x3e, 0xb6, 0x9e, 0x2e, 0xc2, 0x18, 0xc4, 0xab, 0x58, 0x73, 0x95, 0xb2, 0xed, 0x9c, 0x15,
- 0x87, 0xba, 0xcd, 0x5b, 0x26, 0x75, 0xd8, 0xb7, 0x35, 0xcf, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff,
- 0x5b, 0x6d, 0x9c, 0xd4, 0xd5, 0x01, 0x00, 0x00,
+ // 317 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0x4f, 0x4f, 0x32, 0x31,
+ 0x10, 0x87, 0x77, 0x81, 0x97, 0xd7, 0x14, 0x4f, 0x8d, 0x87, 0x15, 0x93, 0x42, 0x3c, 0x71, 0x71,
+ 0x1b, 0xe0, 0xe0, 0x9f, 0xc4, 0x0b, 0x1a, 0x8d, 0x37, 0x23, 0x37, 0x6f, 0xdd, 0x52, 0x97, 0xc6,
+ 0xa5, 0xb3, 0xa1, 0x85, 0xac, 0xdf, 0xc2, 0x0f, 0xe5, 0x81, 0x23, 0x47, 0x4f, 0xc6, 0xc0, 0x17,
+ 0x31, 0xdb, 0x16, 0x62, 0xe2, 0xde, 0x3a, 0x99, 0xe7, 0xf9, 0x75, 0x26, 0x83, 0xba, 0xb2, 0x00,
+ 0xca, 0x33, 0x26, 0x67, 0x9a, 0x2e, 0xfb, 0x89, 0x30, 0xac, 0x4f, 0x53, 0xa1, 0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 0x5e, 0x60, 0xa1, 0x26, 0xac, 0x5c, 0xb4, 0xac, 0xce, 0x92, 0x0c, 0xf8, 0x2b, 0x9f, 0x32,
+ 0xa9, 0xe8, 0x72, 0x48, 0x8b, 0xdd, 0xa9, 0xcc, 0x5b, 0x2e, 0x74, 0xd2, 0xb4, 0x27, 0x1a, 0xfe,
+ 0x04, 0x00, 0x00, 0xff, 0xff, 0x37, 0x3a, 0x81, 0xa5, 0x11, 0x02, 0x00, 0x00,
}
func (m *GenesisState) Marshal() (dAtA []byte, err error) {
@@ -141,6 +150,20 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
+ if len(m.Intents) > 0 {
+ for iNdEx := len(m.Intents) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Intents[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenesis(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x2a
+ }
+ }
if len(m.Disputes) > 0 {
for iNdEx := len(m.Disputes) - 1; iNdEx >= 0; iNdEx-- {
{
@@ -233,6 +256,12 @@ func (m *GenesisState) Size() (n int) {
n += 1 + l + sovGenesis(uint64(l))
}
}
+ if len(m.Intents) > 0 {
+ for _, e := range m.Intents {
+ l = e.Size()
+ n += 1 + l + sovGenesis(uint64(l))
+ }
+ }
return n
}
@@ -406,6 +435,40 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error {
return err
}
iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Intents", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenesis
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenesis
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenesis
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Intents = append(m.Intents, Intent{})
+ if err := m.Intents[len(m.Intents)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenesis(dAtA[iNdEx:])
diff --git a/x/claims/types/keys.go b/x/claims/types/keys.go
index 4e779c3a..32164331 100755
--- a/x/claims/types/keys.go
+++ b/x/claims/types/keys.go
@@ -1,5 +1,10 @@
package types
+import (
+ fmt "fmt"
+ "strings"
+)
+
const (
// ModuleName defines the module name
ModuleName = "claims"
@@ -19,4 +24,23 @@ var (
CollectionKey = []byte{0x01}
ClaimKey = []byte{0x02}
DisputeKey = []byte{0x03}
+ IntentKey = []byte{0x04}
)
+
+// Create the key for Intents KV Store: agentAddress+"/"+collectionID+"/"+intentID
+func IntentKeyCreate(agentAddress, collectionId, intentID string) []byte {
+ return []byte(agentAddress + "/" + collectionId + "/" + intentID)
+}
+
+// Unused for now
+// ParseActiveIntentKey parses the ActiveIntentKey into agentAddress and collectionId
+func ParseActiveIntentKey(key []byte) (agentAddress string, collectionId string, err error) {
+ // Convert byte array to string and split by "/"
+ parts := strings.Split(string(key), "/")
+ if len(parts) != 2 {
+ return "", "", fmt.Errorf("invalid active intent key: %s", string(key))
+ }
+ agentAddress = parts[0]
+ collectionId = parts[1]
+ return agentAddress, collectionId, nil
+}
diff --git a/x/claims/types/msg_validation.go b/x/claims/types/msg_validation.go
index 2c00b280..7e70558a 100755
--- a/x/claims/types/msg_validation.go
+++ b/x/claims/types/msg_validation.go
@@ -32,6 +32,9 @@ func (msg MsgCreateCollection) ValidateBasic() error {
if !ixo.IsEnumValueValid(CollectionState_name, int32(msg.State)) {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "invalid enum for state")
}
+ if !ixo.IsEnumValueValid(CollectionIntentOptions_name, int32(msg.Intents)) {
+ return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "invalid enum for intents")
+ }
return nil
}
@@ -60,6 +63,13 @@ func (msg MsgSubmitClaim) ValidateBasic() error {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "collection_id cannot be empty")
}
+ if err = ValidateCoinsAllowZero(msg.Amount.Sort()); err != nil {
+ return err
+ }
+ if err = ValidateCW20Payments(msg.Cw20Payment, true); err != nil {
+ return err
+ }
+
return nil
}
@@ -101,11 +111,10 @@ func (msg MsgEvaluateClaim) ValidateBasic() error {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "invalid enum for status")
}
- if err = msg.Amount.Sort().Validate(); err != nil {
+ if err = ValidateCoinsAllowZero(msg.Amount.Sort()); err != nil {
return err
}
-
- if err = ValidateCW20Payments(msg.Cw20Payment); err != nil {
+ if err = ValidateCW20Payments(msg.Cw20Payment, true); err != nil {
return err
}
@@ -161,7 +170,7 @@ func (msg MsgWithdrawPayment) ValidateBasic() error {
return err
}
- if err = ValidateCW20Payments(msg.Cw20Payment); err != nil {
+ if err = ValidateCW20Payments(msg.Cw20Payment, true); err != nil {
return err
}
@@ -227,3 +236,46 @@ func (msg MsgUpdateCollectionPayments) ValidateBasic() error {
return nil
}
+
+// --------------------------
+// UPDATE COLLECTION INTENTS
+// --------------------------
+func (msg MsgUpdateCollectionIntents) ValidateBasic() error {
+ _, err := sdk.AccAddressFromBech32(msg.AdminAddress)
+ if err != nil {
+ return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid admin address (%s)", err)
+ }
+ if iidtypes.IsEmpty(msg.CollectionId) {
+ return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "collection_id cannot be empty")
+ }
+ if !ixo.IsEnumValueValid(CollectionIntentOptions_name, int32(msg.Intents)) {
+ return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "invalid enum for intents")
+ }
+
+ return nil
+}
+
+// --------------------------
+// CLAIM INTENT
+// --------------------------
+func (msg *MsgClaimIntent) ValidateBasic() error {
+ _, err := sdk.AccAddressFromBech32(msg.AgentAddress)
+ if err != nil {
+ return errorsmod.Wrapf(err, "invalid agent address (%s)", err)
+ }
+ if !iidtypes.IsValidDID(msg.AgentDid.Did()) {
+ return errorsmod.Wrap(iidtypes.ErrInvalidDIDFormat, msg.AgentDid.String())
+ }
+ if iidtypes.IsEmpty(msg.CollectionId) {
+ return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "collection_id cannot be empty")
+ }
+
+ if err = ValidateCoinsAllowZero(msg.Amount.Sort()); err != nil {
+ return err
+ }
+ if err = ValidateCW20Payments(msg.Cw20Payment, true); err != nil {
+ return err
+ }
+
+ return nil
+}
diff --git a/x/claims/types/params.go b/x/claims/types/params.go
index 32fec103..309de3c3 100755
--- a/x/claims/types/params.go
+++ b/x/claims/types/params.go
@@ -10,6 +10,7 @@ import (
var (
KeyCollectionSequence = []byte("CollectionSequence")
+ KeyIntentSequence = []byte("IntentSequence")
KeyIxoAccount = []byte("IxoAccount")
KeyNetworkFeePercentage = []byte("NetworkFeePercentage")
KeyNodeFeePercentage = []byte("NodeFeePercentage")
@@ -23,10 +24,11 @@ func ParamKeyTable() paramtypes.KeyTable {
}
// NewParams creates a new Params instance
-func NewParams(collectionSequence uint64, ixoAccount string,
+func NewParams(collectionSequence, intentSequence uint64, ixoAccount string,
networkFeePercentage, nodeFeePercentage math.LegacyDec) Params {
return Params{
CollectionSequence: collectionSequence,
+ IntentSequence: intentSequence,
IxoAccount: ixoAccount,
NetworkFeePercentage: networkFeePercentage,
NodeFeePercentage: nodeFeePercentage,
@@ -38,13 +40,14 @@ func DefaultParams() Params {
defaultIxoAccount := "ixo1kqmtxkggcqa9u34lnr6shy0euvclgatw4f9zz5"
tenPercentFee := math.LegacyNewDec(10)
- return NewParams(1, defaultIxoAccount, tenPercentFee, tenPercentFee)
+ return NewParams(1, 1, defaultIxoAccount, tenPercentFee, tenPercentFee)
}
// ParamSetPairs get the params.ParamSet
func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs {
return paramtypes.ParamSetPairs{
paramtypes.ParamSetPair{Key: KeyCollectionSequence, Value: &p.CollectionSequence, ValidatorFn: validateCollectionSequence},
+ paramtypes.ParamSetPair{Key: KeyIntentSequence, Value: &p.IntentSequence, ValidatorFn: validateCollectionSequence},
paramtypes.ParamSetPair{Key: KeyIxoAccount, Value: &p.IxoAccount, ValidatorFn: validateIxoAccount},
paramtypes.ParamSetPair{Key: KeyNetworkFeePercentage, Value: &p.NetworkFeePercentage, ValidatorFn: validateFeePercentage},
paramtypes.ParamSetPair{Key: KeyNodeFeePercentage, Value: &p.NodeFeePercentage, ValidatorFn: validateFeePercentage},
@@ -95,6 +98,10 @@ func (p Params) Validate() error {
if err != nil {
return err
}
+ err = validateCollectionSequence(p.IntentSequence)
+ if err != nil {
+ return err
+ }
err = validateIxoAccount(p.IxoAccount)
if err != nil {
return err
diff --git a/x/claims/types/query.pb.go b/x/claims/types/query.pb.go
index 2378f11a..92da96da 100644
--- a/x/claims/types/query.pb.go
+++ b/x/claims/types/query.pb.go
@@ -663,6 +663,206 @@ func (m *QueryDisputeListResponse) GetPagination() *query.PageResponse {
return nil
}
+type QueryIntentRequest struct {
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ AgentAddress string `protobuf:"bytes,2,opt,name=agentAddress,proto3" json:"agentAddress,omitempty"`
+ CollectionId string `protobuf:"bytes,3,opt,name=collectionId,proto3" json:"collectionId,omitempty"`
+}
+
+func (m *QueryIntentRequest) Reset() { *m = QueryIntentRequest{} }
+func (m *QueryIntentRequest) String() string { return proto.CompactTextString(m) }
+func (*QueryIntentRequest) ProtoMessage() {}
+func (*QueryIntentRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_496f233aff18959b, []int{14}
+}
+func (m *QueryIntentRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *QueryIntentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_QueryIntentRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *QueryIntentRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_QueryIntentRequest.Merge(m, src)
+}
+func (m *QueryIntentRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *QueryIntentRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_QueryIntentRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_QueryIntentRequest proto.InternalMessageInfo
+
+func (m *QueryIntentRequest) GetId() string {
+ if m != nil {
+ return m.Id
+ }
+ return ""
+}
+
+func (m *QueryIntentRequest) GetAgentAddress() string {
+ if m != nil {
+ return m.AgentAddress
+ }
+ return ""
+}
+
+func (m *QueryIntentRequest) GetCollectionId() string {
+ if m != nil {
+ return m.CollectionId
+ }
+ return ""
+}
+
+type QueryIntentResponse struct {
+ Intent Intent `protobuf:"bytes,1,opt,name=intent,proto3" json:"intent"`
+}
+
+func (m *QueryIntentResponse) Reset() { *m = QueryIntentResponse{} }
+func (m *QueryIntentResponse) String() string { return proto.CompactTextString(m) }
+func (*QueryIntentResponse) ProtoMessage() {}
+func (*QueryIntentResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_496f233aff18959b, []int{15}
+}
+func (m *QueryIntentResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *QueryIntentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_QueryIntentResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *QueryIntentResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_QueryIntentResponse.Merge(m, src)
+}
+func (m *QueryIntentResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *QueryIntentResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_QueryIntentResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_QueryIntentResponse proto.InternalMessageInfo
+
+func (m *QueryIntentResponse) GetIntent() Intent {
+ if m != nil {
+ return m.Intent
+ }
+ return Intent{}
+}
+
+type QueryIntentListRequest struct {
+ Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
+}
+
+func (m *QueryIntentListRequest) Reset() { *m = QueryIntentListRequest{} }
+func (m *QueryIntentListRequest) String() string { return proto.CompactTextString(m) }
+func (*QueryIntentListRequest) ProtoMessage() {}
+func (*QueryIntentListRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_496f233aff18959b, []int{16}
+}
+func (m *QueryIntentListRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *QueryIntentListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_QueryIntentListRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *QueryIntentListRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_QueryIntentListRequest.Merge(m, src)
+}
+func (m *QueryIntentListRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *QueryIntentListRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_QueryIntentListRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_QueryIntentListRequest proto.InternalMessageInfo
+
+func (m *QueryIntentListRequest) GetPagination() *query.PageRequest {
+ if m != nil {
+ return m.Pagination
+ }
+ return nil
+}
+
+type QueryIntentListResponse struct {
+ Intents []Intent `protobuf:"bytes,1,rep,name=intents,proto3" json:"intents"`
+ Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
+}
+
+func (m *QueryIntentListResponse) Reset() { *m = QueryIntentListResponse{} }
+func (m *QueryIntentListResponse) String() string { return proto.CompactTextString(m) }
+func (*QueryIntentListResponse) ProtoMessage() {}
+func (*QueryIntentListResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_496f233aff18959b, []int{17}
+}
+func (m *QueryIntentListResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *QueryIntentListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_QueryIntentListResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *QueryIntentListResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_QueryIntentListResponse.Merge(m, src)
+}
+func (m *QueryIntentListResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *QueryIntentListResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_QueryIntentListResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_QueryIntentListResponse proto.InternalMessageInfo
+
+func (m *QueryIntentListResponse) GetIntents() []Intent {
+ if m != nil {
+ return m.Intents
+ }
+ return nil
+}
+
+func (m *QueryIntentListResponse) GetPagination() *query.PageResponse {
+ if m != nil {
+ return m.Pagination
+ }
+ return nil
+}
+
func init() {
proto.RegisterType((*QueryParamsRequest)(nil), "ixo.claims.v1beta1.QueryParamsRequest")
proto.RegisterType((*QueryParamsResponse)(nil), "ixo.claims.v1beta1.QueryParamsResponse")
@@ -678,59 +878,72 @@ func init() {
proto.RegisterType((*QueryDisputeResponse)(nil), "ixo.claims.v1beta1.QueryDisputeResponse")
proto.RegisterType((*QueryDisputeListRequest)(nil), "ixo.claims.v1beta1.QueryDisputeListRequest")
proto.RegisterType((*QueryDisputeListResponse)(nil), "ixo.claims.v1beta1.QueryDisputeListResponse")
+ proto.RegisterType((*QueryIntentRequest)(nil), "ixo.claims.v1beta1.QueryIntentRequest")
+ proto.RegisterType((*QueryIntentResponse)(nil), "ixo.claims.v1beta1.QueryIntentResponse")
+ proto.RegisterType((*QueryIntentListRequest)(nil), "ixo.claims.v1beta1.QueryIntentListRequest")
+ proto.RegisterType((*QueryIntentListResponse)(nil), "ixo.claims.v1beta1.QueryIntentListResponse")
}
func init() { proto.RegisterFile("ixo/claims/v1beta1/query.proto", fileDescriptor_496f233aff18959b) }
var fileDescriptor_496f233aff18959b = []byte{
- // 742 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x96, 0x41, 0x4f, 0xd4, 0x5a,
- 0x14, 0xc7, 0xa7, 0xf3, 0xde, 0x0c, 0x8f, 0x03, 0xe1, 0x85, 0x63, 0x05, 0x2c, 0xa4, 0x98, 0x1a,
- 0x01, 0x41, 0xdb, 0x00, 0x31, 0x6a, 0x8c, 0x1b, 0x24, 0xb8, 0xd0, 0x44, 0x1d, 0x76, 0x6e, 0x48,
- 0xa7, 0x53, 0xca, 0x8d, 0x33, 0xbd, 0x65, 0xda, 0x21, 0x20, 0xc1, 0x85, 0xee, 0x5c, 0x99, 0xb8,
- 0x73, 0xe9, 0x07, 0xf0, 0x73, 0xb0, 0x24, 0x71, 0xe3, 0xca, 0x18, 0xf0, 0x33, 0xb8, 0x36, 0xbd,
- 0xf7, 0xcc, 0xb4, 0xc3, 0x74, 0x9c, 0x2e, 0x60, 0x37, 0xbd, 0xf7, 0x7f, 0xce, 0xff, 0x77, 0xce,
- 0xbd, 0xf7, 0x64, 0x40, 0x67, 0xfb, 0xdc, 0x72, 0xea, 0x36, 0x6b, 0x84, 0xd6, 0xde, 0x72, 0xd5,
- 0x8d, 0xec, 0x65, 0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3, 0xf8, 0x54, 0x57, 0x4e, 0x4e, 0x75, 0xe5, 0xe7, 0xa9, 0xae, 0x7c,
- 0x3c, 0xd3, 0x0b, 0x27, 0x67, 0x7a, 0xe1, 0xfb, 0x99, 0x5e, 0x78, 0xf5, 0xc0, 0x63, 0xd1, 0x4e,
- 0xab, 0x6a, 0x3a, 0xbc, 0x11, 0x47, 0x6c, 0xf3, 0x96, 0x5f, 0x13, 0x8f, 0x35, 0xfe, 0xba, 0x53,
- 0xad, 0x73, 0xe7, 0xb5, 0xb3, 0x63, 0x33, 0xdf, 0xda, 0x5b, 0xb5, 0xf6, 0xdb, 0xaf, 0x29, 0x3a,
- 0x08, 0xdc, 0xb0, 0x5a, 0x16, 0xff, 0x6b, 0x56, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x2a, 0x23,
- 0xb4, 0xa4, 0x8e, 0x09, 0x00, 0x00,
+ // 895 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4d, 0x4f, 0xd4, 0x5a,
+ 0x18, 0x9e, 0x0e, 0x77, 0x86, 0x3b, 0xef, 0x70, 0xb9, 0xe1, 0x30, 0x02, 0x16, 0x52, 0x4c, 0x8d,
+ 0x80, 0xa0, 0xad, 0x40, 0xfc, 0x8e, 0x0b, 0x91, 0x60, 0x88, 0x26, 0xea, 0xb0, 0x73, 0x83, 0x9d,
+ 0x69, 0x29, 0x8d, 0x33, 0x3d, 0x65, 0xda, 0x21, 0xc0, 0x64, 0x5c, 0x68, 0xe2, 0xc2, 0x95, 0xc6,
+ 0x9d, 0x0b, 0x17, 0xfe, 0x00, 0x7f, 0x07, 0x4b, 0x12, 0x37, 0xae, 0x8c, 0x01, 0x7f, 0x88, 0xe9,
+ 0x39, 0x6f, 0xa7, 0x2d, 0xd3, 0xf9, 0x58, 0xc0, 0x6e, 0x7a, 0xce, 0xf3, 0x9e, 0xe7, 0x79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, 0xf2, 0x56, 0x36, 0x0e, 0x8f, 0x25,
+ 0xe1, 0xe8, 0x58, 0x12, 0x7e, 0x1f, 0x4b, 0xc2, 0xc7, 0x13, 0x29, 0x75, 0x74, 0x22, 0xa5, 0x7e,
+ 0x9e, 0x48, 0xa9, 0x97, 0x77, 0x4d, 0xcb, 0xdb, 0xae, 0x97, 0x94, 0x32, 0xad, 0xfa, 0x01, 0x5b,
+ 0xb4, 0x6e, 0xeb, 0xcc, 0xbc, 0xfc, 0xaf, 0xeb, 0xa5, 0x0a, 0x2d, 0xbf, 0x2e, 0x6f, 0x6b, 0x96,
+ 0xad, 0xee, 0x2e, 0xab, 0x7b, 0x81, 0xbb, 0x78, 0xfb, 0x8e, 0xe1, 0x96, 0xb2, 0xec, 0x9f, 0xfa,
+ 0xf2, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc1, 0x2e, 0xd5, 0x39, 0x60, 0x0c, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -753,6 +966,8 @@ type QueryClient interface {
ClaimList(ctx context.Context, in *QueryClaimListRequest, opts ...grpc.CallOption) (*QueryClaimListResponse, error)
Dispute(ctx context.Context, in *QueryDisputeRequest, opts ...grpc.CallOption) (*QueryDisputeResponse, error)
DisputeList(ctx context.Context, in *QueryDisputeListRequest, opts ...grpc.CallOption) (*QueryDisputeListResponse, error)
+ Intent(ctx context.Context, in *QueryIntentRequest, opts ...grpc.CallOption) (*QueryIntentResponse, error)
+ IntentList(ctx context.Context, in *QueryIntentListRequest, opts ...grpc.CallOption) (*QueryIntentListResponse, error)
}
type queryClient struct {
@@ -826,6 +1041,24 @@ func (c *queryClient) DisputeList(ctx context.Context, in *QueryDisputeListReque
return out, nil
}
+func (c *queryClient) Intent(ctx context.Context, in *QueryIntentRequest, opts ...grpc.CallOption) (*QueryIntentResponse, error) {
+ out := new(QueryIntentResponse)
+ err := c.cc.Invoke(ctx, "/ixo.claims.v1beta1.Query/Intent", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *queryClient) IntentList(ctx context.Context, in *QueryIntentListRequest, opts ...grpc.CallOption) (*QueryIntentListResponse, error) {
+ out := new(QueryIntentListResponse)
+ err := c.cc.Invoke(ctx, "/ixo.claims.v1beta1.Query/IntentList", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
// QueryServer is the server API for Query service.
type QueryServer interface {
// Parameters queries the parameters of the module.
@@ -836,6 +1069,8 @@ type QueryServer interface {
ClaimList(context.Context, *QueryClaimListRequest) (*QueryClaimListResponse, error)
Dispute(context.Context, *QueryDisputeRequest) (*QueryDisputeResponse, error)
DisputeList(context.Context, *QueryDisputeListRequest) (*QueryDisputeListResponse, error)
+ Intent(context.Context, *QueryIntentRequest) (*QueryIntentResponse, error)
+ IntentList(context.Context, *QueryIntentListRequest) (*QueryIntentListResponse, error)
}
// UnimplementedQueryServer can be embedded to have forward compatible implementations.
@@ -863,6 +1098,12 @@ func (*UnimplementedQueryServer) Dispute(ctx context.Context, req *QueryDisputeR
func (*UnimplementedQueryServer) DisputeList(ctx context.Context, req *QueryDisputeListRequest) (*QueryDisputeListResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DisputeList not implemented")
}
+func (*UnimplementedQueryServer) Intent(ctx context.Context, req *QueryIntentRequest) (*QueryIntentResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method Intent not implemented")
+}
+func (*UnimplementedQueryServer) IntentList(ctx context.Context, req *QueryIntentListRequest) (*QueryIntentListResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method IntentList not implemented")
+}
func RegisterQueryServer(s grpc1.Server, srv QueryServer) {
s.RegisterService(&_Query_serviceDesc, srv)
@@ -994,6 +1235,42 @@ func _Query_DisputeList_Handler(srv interface{}, ctx context.Context, dec func(i
return interceptor(ctx, in, info, handler)
}
+func _Query_Intent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(QueryIntentRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(QueryServer).Intent(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/ixo.claims.v1beta1.Query/Intent",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(QueryServer).Intent(ctx, req.(*QueryIntentRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Query_IntentList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(QueryIntentListRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(QueryServer).IntentList(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/ixo.claims.v1beta1.Query/IntentList",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(QueryServer).IntentList(ctx, req.(*QueryIntentListRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
var _Query_serviceDesc = grpc.ServiceDesc{
ServiceName: "ixo.claims.v1beta1.Query",
HandlerType: (*QueryServer)(nil),
@@ -1026,6 +1303,14 @@ var _Query_serviceDesc = grpc.ServiceDesc{
MethodName: "DisputeList",
Handler: _Query_DisputeList_Handler,
},
+ {
+ MethodName: "Intent",
+ Handler: _Query_Intent_Handler,
+ },
+ {
+ MethodName: "IntentList",
+ Handler: _Query_IntentList_Handler,
+ },
},
Streams: []grpc.StreamDesc{},
Metadata: "ixo/claims/v1beta1/query.proto",
@@ -1528,78 +1813,239 @@ func (m *QueryDisputeListResponse) MarshalToSizedBuffer(dAtA []byte) (int, error
return len(dAtA) - i, nil
}
-func encodeVarintQuery(dAtA []byte, offset int, v uint64) int {
- offset -= sovQuery(v)
- base := offset
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return base
-}
-func (m *QueryParamsRequest) Size() (n int) {
- if m == nil {
- return 0
+func (m *QueryIntentRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
}
- var l int
- _ = l
- return n
+ return dAtA[:n], nil
}
-func (m *QueryParamsResponse) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = m.Params.Size()
- n += 1 + l + sovQuery(uint64(l))
- return n
+func (m *QueryIntentRequest) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
}
-func (m *QueryCollectionRequest) Size() (n int) {
- if m == nil {
- return 0
- }
+func (m *QueryIntentRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
var l int
_ = l
- l = len(m.Id)
- if l > 0 {
- n += 1 + l + sovQuery(uint64(l))
+ if len(m.CollectionId) > 0 {
+ i -= len(m.CollectionId)
+ copy(dAtA[i:], m.CollectionId)
+ i = encodeVarintQuery(dAtA, i, uint64(len(m.CollectionId)))
+ i--
+ dAtA[i] = 0x1a
}
- return n
+ if len(m.AgentAddress) > 0 {
+ i -= len(m.AgentAddress)
+ copy(dAtA[i:], m.AgentAddress)
+ i = encodeVarintQuery(dAtA, i, uint64(len(m.AgentAddress)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Id) > 0 {
+ i -= len(m.Id)
+ copy(dAtA[i:], m.Id)
+ i = encodeVarintQuery(dAtA, i, uint64(len(m.Id)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
}
-func (m *QueryCollectionResponse) Size() (n int) {
- if m == nil {
- return 0
+func (m *QueryIntentResponse) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
}
- var l int
- _ = l
- l = m.Collection.Size()
- n += 1 + l + sovQuery(uint64(l))
- return n
+ return dAtA[:n], nil
}
-func (m *QueryCollectionListRequest) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- if m.Pagination != nil {
- l = m.Pagination.Size()
- n += 1 + l + sovQuery(uint64(l))
- }
- return n
+func (m *QueryIntentResponse) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
}
-func (m *QueryCollectionListResponse) Size() (n int) {
- if m == nil {
- return 0
- }
+func (m *QueryIntentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ {
+ size, err := m.Intent.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintQuery(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+
+func (m *QueryIntentListRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *QueryIntentListRequest) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *QueryIntentListRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.Pagination != nil {
+ {
+ size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintQuery(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *QueryIntentListResponse) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *QueryIntentListResponse) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *QueryIntentListResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.Pagination != nil {
+ {
+ size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintQuery(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Intents) > 0 {
+ for iNdEx := len(m.Intents) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Intents[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintQuery(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func encodeVarintQuery(dAtA []byte, offset int, v uint64) int {
+ offset -= sovQuery(v)
+ base := offset
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return base
+}
+func (m *QueryParamsRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ return n
+}
+
+func (m *QueryParamsResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = m.Params.Size()
+ n += 1 + l + sovQuery(uint64(l))
+ return n
+}
+
+func (m *QueryCollectionRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Id)
+ if l > 0 {
+ n += 1 + l + sovQuery(uint64(l))
+ }
+ return n
+}
+
+func (m *QueryCollectionResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = m.Collection.Size()
+ n += 1 + l + sovQuery(uint64(l))
+ return n
+}
+
+func (m *QueryCollectionListRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Pagination != nil {
+ l = m.Pagination.Size()
+ n += 1 + l + sovQuery(uint64(l))
+ }
+ return n
+}
+
+func (m *QueryCollectionListResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if len(m.Collections) > 0 {
@@ -1724,16 +2170,378 @@ func (m *QueryDisputeListResponse) Size() (n int) {
l = m.Pagination.Size()
n += 1 + l + sovQuery(uint64(l))
}
- return n
-}
+ return n
+}
+
+func (m *QueryIntentRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Id)
+ if l > 0 {
+ n += 1 + l + sovQuery(uint64(l))
+ }
+ l = len(m.AgentAddress)
+ if l > 0 {
+ n += 1 + l + sovQuery(uint64(l))
+ }
+ l = len(m.CollectionId)
+ if l > 0 {
+ n += 1 + l + sovQuery(uint64(l))
+ }
+ return n
+}
+
+func (m *QueryIntentResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = m.Intent.Size()
+ n += 1 + l + sovQuery(uint64(l))
+ return n
+}
+
+func (m *QueryIntentListRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Pagination != nil {
+ l = m.Pagination.Size()
+ n += 1 + l + sovQuery(uint64(l))
+ }
+ return n
+}
+
+func (m *QueryIntentListResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.Intents) > 0 {
+ for _, e := range m.Intents {
+ l = e.Size()
+ n += 1 + l + sovQuery(uint64(l))
+ }
+ }
+ if m.Pagination != nil {
+ l = m.Pagination.Size()
+ n += 1 + l + sovQuery(uint64(l))
+ }
+ return n
+}
+
+func sovQuery(x uint64) (n int) {
+ return (math_bits.Len64(x|1) + 6) / 7
+}
+func sozQuery(x uint64) (n int) {
+ return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowQuery
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ default:
+ iNdEx = preIndex
+ skippy, err := skipQuery(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthQuery
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowQuery
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowQuery
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthQuery
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthQuery
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipQuery(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthQuery
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *QueryCollectionRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowQuery
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: QueryCollectionRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: QueryCollectionRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowQuery
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthQuery
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthQuery
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Id = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipQuery(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthQuery
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *QueryCollectionResponse) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowQuery
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: QueryCollectionResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: QueryCollectionResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Collection", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowQuery
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthQuery
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthQuery
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Collection.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipQuery(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthQuery
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
-func sovQuery(x uint64) (n int) {
- return (math_bits.Len64(x|1) + 6) / 7
-}
-func sozQuery(x uint64) (n int) {
- return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
}
-func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error {
+func (m *QueryCollectionListRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -1756,12 +2564,48 @@ func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group")
+ return fmt.Errorf("proto: QueryCollectionListRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: QueryCollectionListRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowQuery
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthQuery
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthQuery
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Pagination == nil {
+ m.Pagination = &query.PageRequest{}
+ }
+ if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipQuery(dAtA[iNdEx:])
@@ -1783,7 +2627,7 @@ func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error {
+func (m *QueryCollectionListResponse) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -1806,15 +2650,15 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group")
+ return fmt.Errorf("proto: QueryCollectionListResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: QueryCollectionListResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Collections", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -1841,7 +2685,44 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ m.Collections = append(m.Collections, Collection{})
+ if err := m.Collections[len(m.Collections)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowQuery
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthQuery
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthQuery
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Pagination == nil {
+ m.Pagination = &query.PageResponse{}
+ }
+ if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -1866,7 +2747,7 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *QueryCollectionRequest) Unmarshal(dAtA []byte) error {
+func (m *QueryClaimRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -1889,10 +2770,10 @@ func (m *QueryCollectionRequest) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: QueryCollectionRequest: wiretype end group for non-group")
+ return fmt.Errorf("proto: QueryClaimRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: QueryCollectionRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: QueryClaimRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
@@ -1948,7 +2829,7 @@ func (m *QueryCollectionRequest) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *QueryCollectionResponse) Unmarshal(dAtA []byte) error {
+func (m *QueryClaimResponse) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -1971,15 +2852,15 @@ func (m *QueryCollectionResponse) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: QueryCollectionResponse: wiretype end group for non-group")
+ return fmt.Errorf("proto: QueryClaimResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: QueryCollectionResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: QueryClaimResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Collection", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Claim", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -2006,7 +2887,7 @@ func (m *QueryCollectionResponse) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := m.Collection.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ if err := m.Claim.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -2031,7 +2912,7 @@ func (m *QueryCollectionResponse) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *QueryCollectionListRequest) Unmarshal(dAtA []byte) error {
+func (m *QueryClaimListRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -2054,10 +2935,10 @@ func (m *QueryCollectionListRequest) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: QueryCollectionListRequest: wiretype end group for non-group")
+ return fmt.Errorf("proto: QueryClaimListRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: QueryCollectionListRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: QueryClaimListRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
@@ -2117,7 +2998,7 @@ func (m *QueryCollectionListRequest) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *QueryCollectionListResponse) Unmarshal(dAtA []byte) error {
+func (m *QueryClaimListResponse) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -2140,15 +3021,15 @@ func (m *QueryCollectionListResponse) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: QueryCollectionListResponse: wiretype end group for non-group")
+ return fmt.Errorf("proto: QueryClaimListResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: QueryCollectionListResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: QueryClaimListResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Collections", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Claims", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -2175,8 +3056,8 @@ func (m *QueryCollectionListResponse) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Collections = append(m.Collections, Collection{})
- if err := m.Collections[len(m.Collections)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ m.Claims = append(m.Claims, Claim{})
+ if err := m.Claims[len(m.Claims)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -2237,7 +3118,7 @@ func (m *QueryCollectionListResponse) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *QueryClaimRequest) Unmarshal(dAtA []byte) error {
+func (m *QueryDisputeRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -2260,15 +3141,15 @@ func (m *QueryClaimRequest) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: QueryClaimRequest: wiretype end group for non-group")
+ return fmt.Errorf("proto: QueryDisputeRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: QueryClaimRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: QueryDisputeRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -2296,7 +3177,7 @@ func (m *QueryClaimRequest) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Id = string(dAtA[iNdEx:postIndex])
+ m.Proof = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
@@ -2319,7 +3200,7 @@ func (m *QueryClaimRequest) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *QueryClaimResponse) Unmarshal(dAtA []byte) error {
+func (m *QueryDisputeResponse) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -2342,15 +3223,15 @@ func (m *QueryClaimResponse) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: QueryClaimResponse: wiretype end group for non-group")
+ return fmt.Errorf("proto: QueryDisputeResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: QueryClaimResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: QueryDisputeResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Claim", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Dispute", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -2377,7 +3258,7 @@ func (m *QueryClaimResponse) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := m.Claim.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ if err := m.Dispute.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -2402,7 +3283,7 @@ func (m *QueryClaimResponse) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *QueryClaimListRequest) Unmarshal(dAtA []byte) error {
+func (m *QueryDisputeListRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -2425,10 +3306,10 @@ func (m *QueryClaimListRequest) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: QueryClaimListRequest: wiretype end group for non-group")
+ return fmt.Errorf("proto: QueryDisputeListRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: QueryClaimListRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: QueryDisputeListRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
@@ -2488,7 +3369,7 @@ func (m *QueryClaimListRequest) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *QueryClaimListResponse) Unmarshal(dAtA []byte) error {
+func (m *QueryDisputeListResponse) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -2511,15 +3392,15 @@ func (m *QueryClaimListResponse) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: QueryClaimListResponse: wiretype end group for non-group")
+ return fmt.Errorf("proto: QueryDisputeListResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: QueryClaimListResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: QueryDisputeListResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Claims", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Disputes", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -2546,8 +3427,8 @@ func (m *QueryClaimListResponse) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Claims = append(m.Claims, Claim{})
- if err := m.Claims[len(m.Claims)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ m.Disputes = append(m.Disputes, Dispute{})
+ if err := m.Disputes[len(m.Disputes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -2608,7 +3489,7 @@ func (m *QueryClaimListResponse) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *QueryDisputeRequest) Unmarshal(dAtA []byte) error {
+func (m *QueryIntentRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -2631,15 +3512,15 @@ func (m *QueryDisputeRequest) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: QueryDisputeRequest: wiretype end group for non-group")
+ return fmt.Errorf("proto: QueryIntentRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: QueryDisputeRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: QueryIntentRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -2667,7 +3548,71 @@ func (m *QueryDisputeRequest) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Proof = string(dAtA[iNdEx:postIndex])
+ m.Id = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AgentAddress", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowQuery
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthQuery
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthQuery
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.AgentAddress = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CollectionId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowQuery
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthQuery
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthQuery
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.CollectionId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
@@ -2690,7 +3635,7 @@ func (m *QueryDisputeRequest) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *QueryDisputeResponse) Unmarshal(dAtA []byte) error {
+func (m *QueryIntentResponse) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -2713,15 +3658,15 @@ func (m *QueryDisputeResponse) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: QueryDisputeResponse: wiretype end group for non-group")
+ return fmt.Errorf("proto: QueryIntentResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: QueryDisputeResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: QueryIntentResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Dispute", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Intent", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -2748,7 +3693,7 @@ func (m *QueryDisputeResponse) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := m.Dispute.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ if err := m.Intent.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -2773,7 +3718,7 @@ func (m *QueryDisputeResponse) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *QueryDisputeListRequest) Unmarshal(dAtA []byte) error {
+func (m *QueryIntentListRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -2796,10 +3741,10 @@ func (m *QueryDisputeListRequest) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: QueryDisputeListRequest: wiretype end group for non-group")
+ return fmt.Errorf("proto: QueryIntentListRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: QueryDisputeListRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: QueryIntentListRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
@@ -2859,7 +3804,7 @@ func (m *QueryDisputeListRequest) Unmarshal(dAtA []byte) error {
}
return nil
}
-func (m *QueryDisputeListResponse) Unmarshal(dAtA []byte) error {
+func (m *QueryIntentListResponse) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -2882,15 +3827,15 @@ func (m *QueryDisputeListResponse) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
- return fmt.Errorf("proto: QueryDisputeListResponse: wiretype end group for non-group")
+ return fmt.Errorf("proto: QueryIntentListResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
- return fmt.Errorf("proto: QueryDisputeListResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ return fmt.Errorf("proto: QueryIntentListResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Disputes", wireType)
+ return fmt.Errorf("proto: wrong wireType = %d for field Intents", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -2917,8 +3862,8 @@ func (m *QueryDisputeListResponse) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Disputes = append(m.Disputes, Dispute{})
- if err := m.Disputes[len(m.Disputes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ m.Intents = append(m.Intents, Intent{})
+ if err := m.Intents[len(m.Intents)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
diff --git a/x/claims/types/query.pb.gw.go b/x/claims/types/query.pb.gw.go
index 6c1f2562..c9f7c87e 100644
--- a/x/claims/types/query.pb.gw.go
+++ b/x/claims/types/query.pb.gw.go
@@ -321,6 +321,140 @@ func local_request_Query_DisputeList_0(ctx context.Context, marshaler runtime.Ma
}
+func request_Query_Intent_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq QueryIntentRequest
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["agentAddress"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "agentAddress")
+ }
+
+ protoReq.AgentAddress, err = runtime.String(val)
+
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "agentAddress", err)
+ }
+
+ val, ok = pathParams["collectionId"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "collectionId")
+ }
+
+ protoReq.CollectionId, err = runtime.String(val)
+
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "collectionId", err)
+ }
+
+ val, ok = pathParams["id"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
+ }
+
+ protoReq.Id, err = runtime.String(val)
+
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
+ }
+
+ msg, err := client.Intent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_Query_Intent_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq QueryIntentRequest
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["agentAddress"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "agentAddress")
+ }
+
+ protoReq.AgentAddress, err = runtime.String(val)
+
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "agentAddress", err)
+ }
+
+ val, ok = pathParams["collectionId"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "collectionId")
+ }
+
+ protoReq.CollectionId, err = runtime.String(val)
+
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "collectionId", err)
+ }
+
+ val, ok = pathParams["id"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
+ }
+
+ protoReq.Id, err = runtime.String(val)
+
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
+ }
+
+ msg, err := server.Intent(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+var (
+ filter_Query_IntentList_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
+)
+
+func request_Query_IntentList_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq QueryIntentListRequest
+ var metadata runtime.ServerMetadata
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_IntentList_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := client.IntentList(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_Query_IntentList_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq QueryIntentListRequest
+ var metadata runtime.ServerMetadata
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_IntentList_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := server.IntentList(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
// RegisterQueryHandlerServer registers the http handlers for service Query to "mux".
// UnaryRPC :call QueryServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
@@ -488,6 +622,52 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
})
+ mux.Handle("GET", pattern_Query_Intent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_Query_Intent_0(rctx, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ ctx = runtime.NewServerMetadataContext(ctx, md)
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_Query_Intent_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("GET", pattern_Query_IntentList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_Query_IntentList_0(rctx, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ ctx = runtime.NewServerMetadataContext(ctx, md)
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_Query_IntentList_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
return nil
}
@@ -669,6 +849,46 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
})
+ mux.Handle("GET", pattern_Query_Intent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ rctx, err := runtime.AnnotateContext(ctx, mux, req)
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_Query_Intent_0(rctx, inboundMarshaler, client, req, pathParams)
+ ctx = runtime.NewServerMetadataContext(ctx, md)
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_Query_Intent_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("GET", pattern_Query_IntentList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ rctx, err := runtime.AnnotateContext(ctx, mux, req)
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_Query_IntentList_0(rctx, inboundMarshaler, client, req, pathParams)
+ ctx = runtime.NewServerMetadataContext(ctx, md)
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_Query_IntentList_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
return nil
}
@@ -686,6 +906,10 @@ var (
pattern_Query_Dispute_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"ixo", "dispute", "proof"}, "", runtime.AssumeColonVerbOpt(false)))
pattern_Query_DisputeList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"ixo", "dispute"}, "", runtime.AssumeColonVerbOpt(false)))
+
+ pattern_Query_Intent_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"ixo", "intent", "agentAddress", "collectionId", "id"}, "", runtime.AssumeColonVerbOpt(false)))
+
+ pattern_Query_IntentList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"ixo", "intent"}, "", runtime.AssumeColonVerbOpt(false)))
)
var (
@@ -702,4 +926,8 @@ var (
forward_Query_Dispute_0 = runtime.ForwardResponseMessage
forward_Query_DisputeList_0 = runtime.ForwardResponseMessage
+
+ forward_Query_Intent_0 = runtime.ForwardResponseMessage
+
+ forward_Query_IntentList_0 = runtime.ForwardResponseMessage
)
diff --git a/x/claims/types/tx.go b/x/claims/types/tx.go
index 8ffe0106..cdb33282 100755
--- a/x/claims/types/tx.go
+++ b/x/claims/types/tx.go
@@ -105,3 +105,27 @@ var _ sdk.Msg = &MsgUpdateCollectionPayments{}
func (msg MsgUpdateCollectionPayments) Type() string { return TypeMsgUpdateCollectionPayments }
func (msg MsgUpdateCollectionPayments) Route() string { return RouterKey }
+
+// --------------------------
+// UPDATE COLLECTION INTENTS
+// --------------------------
+const TypeMsgUpdateCollectionIntents = "update_collection_intents"
+
+var _ sdk.Msg = &MsgUpdateCollectionIntents{}
+
+func (msg MsgUpdateCollectionIntents) Type() string { return TypeMsgUpdateCollectionIntents }
+
+func (msg MsgUpdateCollectionIntents) Route() string { return RouterKey }
+
+// --------------------------
+// CLAIM INTENT
+// --------------------------
+const TypeMsgClaimIntent = "claim_intent"
+
+var _ sdk.Msg = &MsgClaimIntent{}
+
+func (msg MsgClaimIntent) Type() string { return TypeMsgClaimIntent }
+
+func (msg MsgClaimIntent) GetIidController() iidtypes.DIDFragment { return msg.AgentDid }
+
+func (msg MsgClaimIntent) Route() string { return RouterKey }
diff --git a/x/claims/types/tx.pb.go b/x/claims/types/tx.pb.go
index 610cfee3..4242c450 100644
--- a/x/claims/types/tx.pb.go
+++ b/x/claims/types/tx.pb.go
@@ -56,6 +56,9 @@ type MsgCreateCollection struct {
// payments is the amount paid for claim submission, evaluation, approval, or
// rejection
Payments *Payments `protobuf:"bytes,8,opt,name=payments,proto3" json:"payments,omitempty"`
+ // intents is the option for intents for this collection (allow, deny,
+ // required)
+ Intents CollectionIntentOptions `protobuf:"varint,9,opt,name=intents,proto3,enum=ixo.claims.v1beta1.CollectionIntentOptions" json:"intents,omitempty"`
}
func (m *MsgCreateCollection) Reset() { *m = MsgCreateCollection{} }
@@ -147,6 +150,13 @@ func (m *MsgCreateCollection) GetPayments() *Payments {
return nil
}
+func (m *MsgCreateCollection) GetIntents() CollectionIntentOptions {
+ if m != nil {
+ return m.Intents
+ }
+ return CollectionIntentOptions_allow
+}
+
type MsgCreateCollectionResponse struct {
}
@@ -193,6 +203,18 @@ type MsgSubmitClaim struct {
AgentAddress string `protobuf:"bytes,4,opt,name=agent_address,json=agentAddress,proto3" json:"agent_address,omitempty"`
// admin address used to sign this message, validated against Collection Admin
AdminAddress string `protobuf:"bytes,5,opt,name=admin_address,json=adminAddress,proto3" json:"admin_address,omitempty"`
+ // use_intent is the option for using intent for this claim if it exists and
+ // is active. NOTE: if use_intent is true then amount and cw20 amount are
+ // ignored and overriden with intent amounts. NOTE: if use_intent is true and
+ // there is no active intent then will error
+ UseIntent bool `protobuf:"varint,6,opt,name=use_intent,json=useIntent,proto3" json:"use_intent,omitempty"`
+ // NOTE: if both amount and cw20_payment are empty then use default by
+ // Collection custom amount specified by service agent for claim approval
+ Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,7,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"`
+ // NOTE: if both amount and cw20 amount are empty then use default by
+ // Collection custom cw20 payments specified by service agent for claim
+ // approval
+ Cw20Payment []*CW20Payment `protobuf:"bytes,8,rep,name=cw20_payment,json=cw20Payment,proto3" json:"cw20_payment,omitempty"`
}
func (m *MsgSubmitClaim) Reset() { *m = MsgSubmitClaim{} }
@@ -263,6 +285,27 @@ func (m *MsgSubmitClaim) GetAdminAddress() string {
return ""
}
+func (m *MsgSubmitClaim) GetUseIntent() bool {
+ if m != nil {
+ return m.UseIntent
+ }
+ return false
+}
+
+func (m *MsgSubmitClaim) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins {
+ if m != nil {
+ return m.Amount
+ }
+ return nil
+}
+
+func (m *MsgSubmitClaim) GetCw20Payment() []*CW20Payment {
+ if m != nil {
+ return m.Cw20Payment
+ }
+ return nil
+}
+
type MsgSubmitClaimResponse struct {
}
@@ -319,11 +362,11 @@ type MsgEvaluateClaim struct {
Reason uint32 `protobuf:"varint,8,opt,name=reason,proto3" json:"reason,omitempty"`
// verificationProof is the cid of the evaluation Verfiable Credential
VerificationProof string `protobuf:"bytes,9,opt,name=verification_proof,json=verificationProof,proto3" json:"verification_proof,omitempty"`
- // custom amount specified by evaluator for claim approval, if empty list then
- // use default by Collection
+ // NOTE: if both amount and cw20 amount are empty then use collection default
+ // custom amount specified by evaluator for claim approval
Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,10,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"`
- // custom cw20 payments specified by evaluator for claim approval, if empty
- // list then use default by Collection
+ // NOTE: if both amount and cw20 amount are empty then use collection default
+ // custom cw20 payments specified by evaluator for claim approval
Cw20Payment []*CW20Payment `protobuf:"bytes,11,rep,name=cw20_payment,json=cw20Payment,proto3" json:"cw20_payment,omitempty"`
}
@@ -1065,6 +1108,245 @@ func (m *MsgUpdateCollectionPaymentsResponse) XXX_DiscardUnknown() {
var xxx_messageInfo_MsgUpdateCollectionPaymentsResponse proto.InternalMessageInfo
+type MsgUpdateCollectionIntents struct {
+ // collection_id indicates which Collection to update
+ CollectionId string `protobuf:"bytes,1,opt,name=collection_id,json=collectionId,proto3" json:"collection_id,omitempty"`
+ // intents is the option for intents for this collection (allow, deny,
+ // required)
+ Intents CollectionIntentOptions `protobuf:"varint,2,opt,name=intents,proto3,enum=ixo.claims.v1beta1.CollectionIntentOptions" json:"intents,omitempty"`
+ // admin address used to sign this message, validated against Collection Admin
+ AdminAddress string `protobuf:"bytes,3,opt,name=admin_address,json=adminAddress,proto3" json:"admin_address,omitempty"`
+}
+
+func (m *MsgUpdateCollectionIntents) Reset() { *m = MsgUpdateCollectionIntents{} }
+func (m *MsgUpdateCollectionIntents) String() string { return proto.CompactTextString(m) }
+func (*MsgUpdateCollectionIntents) ProtoMessage() {}
+func (*MsgUpdateCollectionIntents) Descriptor() ([]byte, []int) {
+ return fileDescriptor_e0095508349b828a, []int{16}
+}
+func (m *MsgUpdateCollectionIntents) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *MsgUpdateCollectionIntents) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_MsgUpdateCollectionIntents.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *MsgUpdateCollectionIntents) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MsgUpdateCollectionIntents.Merge(m, src)
+}
+func (m *MsgUpdateCollectionIntents) XXX_Size() int {
+ return m.Size()
+}
+func (m *MsgUpdateCollectionIntents) XXX_DiscardUnknown() {
+ xxx_messageInfo_MsgUpdateCollectionIntents.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MsgUpdateCollectionIntents proto.InternalMessageInfo
+
+func (m *MsgUpdateCollectionIntents) GetCollectionId() string {
+ if m != nil {
+ return m.CollectionId
+ }
+ return ""
+}
+
+func (m *MsgUpdateCollectionIntents) GetIntents() CollectionIntentOptions {
+ if m != nil {
+ return m.Intents
+ }
+ return CollectionIntentOptions_allow
+}
+
+func (m *MsgUpdateCollectionIntents) GetAdminAddress() string {
+ if m != nil {
+ return m.AdminAddress
+ }
+ return ""
+}
+
+type MsgUpdateCollectionIntentsResponse struct {
+}
+
+func (m *MsgUpdateCollectionIntentsResponse) Reset() { *m = MsgUpdateCollectionIntentsResponse{} }
+func (m *MsgUpdateCollectionIntentsResponse) String() string { return proto.CompactTextString(m) }
+func (*MsgUpdateCollectionIntentsResponse) ProtoMessage() {}
+func (*MsgUpdateCollectionIntentsResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_e0095508349b828a, []int{17}
+}
+func (m *MsgUpdateCollectionIntentsResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *MsgUpdateCollectionIntentsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_MsgUpdateCollectionIntentsResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *MsgUpdateCollectionIntentsResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MsgUpdateCollectionIntentsResponse.Merge(m, src)
+}
+func (m *MsgUpdateCollectionIntentsResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *MsgUpdateCollectionIntentsResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_MsgUpdateCollectionIntentsResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MsgUpdateCollectionIntentsResponse proto.InternalMessageInfo
+
+type MsgClaimIntent struct {
+ // The service agent's DID (Decentralized Identifier).
+ AgentDid github_com_ixofoundation_ixo_blockchain_v3_x_iid_types.DIDFragment `protobuf:"bytes,1,opt,name=agent_did,json=agentDid,proto3,casttype=github.com/ixofoundation/ixo-blockchain/v3/x/iid/types.DIDFragment" json:"agent_did,omitempty"`
+ // The service agent's address (who submits this message).
+ AgentAddress string `protobuf:"bytes,2,opt,name=agent_address,json=agentAddress,proto3" json:"agent_address,omitempty"`
+ // The id of the collection this intent is linked to.
+ CollectionId string `protobuf:"bytes,3,opt,name=collection_id,json=collectionId,proto3" json:"collection_id,omitempty"`
+ // NOTE: if both amount and cw20 amount are empty then default by Collection
+ // is used (APPROVAL payment). The desired claim amount, if any.
+ Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"`
+ // NOTE: if both amount and cw20 amount are empty then default by Collection
+ // is used (APPROVAL payment). The custom CW20 payment, if any.
+ Cw20Payment []*CW20Payment `protobuf:"bytes,5,rep,name=cw20_payment,json=cw20Payment,proto3" json:"cw20_payment,omitempty"`
+}
+
+func (m *MsgClaimIntent) Reset() { *m = MsgClaimIntent{} }
+func (m *MsgClaimIntent) String() string { return proto.CompactTextString(m) }
+func (*MsgClaimIntent) ProtoMessage() {}
+func (*MsgClaimIntent) Descriptor() ([]byte, []int) {
+ return fileDescriptor_e0095508349b828a, []int{18}
+}
+func (m *MsgClaimIntent) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *MsgClaimIntent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_MsgClaimIntent.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *MsgClaimIntent) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MsgClaimIntent.Merge(m, src)
+}
+func (m *MsgClaimIntent) XXX_Size() int {
+ return m.Size()
+}
+func (m *MsgClaimIntent) XXX_DiscardUnknown() {
+ xxx_messageInfo_MsgClaimIntent.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MsgClaimIntent proto.InternalMessageInfo
+
+func (m *MsgClaimIntent) GetAgentDid() github_com_ixofoundation_ixo_blockchain_v3_x_iid_types.DIDFragment {
+ if m != nil {
+ return m.AgentDid
+ }
+ return ""
+}
+
+func (m *MsgClaimIntent) GetAgentAddress() string {
+ if m != nil {
+ return m.AgentAddress
+ }
+ return ""
+}
+
+func (m *MsgClaimIntent) GetCollectionId() string {
+ if m != nil {
+ return m.CollectionId
+ }
+ return ""
+}
+
+func (m *MsgClaimIntent) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins {
+ if m != nil {
+ return m.Amount
+ }
+ return nil
+}
+
+func (m *MsgClaimIntent) GetCw20Payment() []*CW20Payment {
+ if m != nil {
+ return m.Cw20Payment
+ }
+ return nil
+}
+
+// MsgClaimIntentResponse defines the response after submitting an intent.
+type MsgClaimIntentResponse struct {
+ // Resulting intent id.
+ IntentId string `protobuf:"bytes,1,opt,name=intent_id,json=intentId,proto3" json:"intent_id,omitempty"`
+ // Timeout period for the intent. If the claim is not submitted by this time,
+ // the intent expires.
+ ExpireAt *time.Time `protobuf:"bytes,2,opt,name=expire_at,json=expireAt,proto3,stdtime" json:"expire_at,omitempty"`
+}
+
+func (m *MsgClaimIntentResponse) Reset() { *m = MsgClaimIntentResponse{} }
+func (m *MsgClaimIntentResponse) String() string { return proto.CompactTextString(m) }
+func (*MsgClaimIntentResponse) ProtoMessage() {}
+func (*MsgClaimIntentResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_e0095508349b828a, []int{19}
+}
+func (m *MsgClaimIntentResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *MsgClaimIntentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_MsgClaimIntentResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *MsgClaimIntentResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MsgClaimIntentResponse.Merge(m, src)
+}
+func (m *MsgClaimIntentResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *MsgClaimIntentResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_MsgClaimIntentResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MsgClaimIntentResponse proto.InternalMessageInfo
+
+func (m *MsgClaimIntentResponse) GetIntentId() string {
+ if m != nil {
+ return m.IntentId
+ }
+ return ""
+}
+
+func (m *MsgClaimIntentResponse) GetExpireAt() *time.Time {
+ if m != nil {
+ return m.ExpireAt
+ }
+ return nil
+}
+
func init() {
proto.RegisterType((*MsgCreateCollection)(nil), "ixo.claims.v1beta1.MsgCreateCollection")
proto.RegisterType((*MsgCreateCollectionResponse)(nil), "ixo.claims.v1beta1.MsgCreateCollectionResponse")
@@ -1082,92 +1364,108 @@ func init() {
proto.RegisterType((*MsgUpdateCollectionDatesResponse)(nil), "ixo.claims.v1beta1.MsgUpdateCollectionDatesResponse")
proto.RegisterType((*MsgUpdateCollectionPayments)(nil), "ixo.claims.v1beta1.MsgUpdateCollectionPayments")
proto.RegisterType((*MsgUpdateCollectionPaymentsResponse)(nil), "ixo.claims.v1beta1.MsgUpdateCollectionPaymentsResponse")
+ proto.RegisterType((*MsgUpdateCollectionIntents)(nil), "ixo.claims.v1beta1.MsgUpdateCollectionIntents")
+ proto.RegisterType((*MsgUpdateCollectionIntentsResponse)(nil), "ixo.claims.v1beta1.MsgUpdateCollectionIntentsResponse")
+ proto.RegisterType((*MsgClaimIntent)(nil), "ixo.claims.v1beta1.MsgClaimIntent")
+ proto.RegisterType((*MsgClaimIntentResponse)(nil), "ixo.claims.v1beta1.MsgClaimIntentResponse")
}
func init() { proto.RegisterFile("ixo/claims/v1beta1/tx.proto", fileDescriptor_e0095508349b828a) }
var fileDescriptor_e0095508349b828a = []byte{
- // 1277 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x5b, 0x6f, 0x1b, 0x45,
- 0x14, 0x8e, 0x2f, 0x71,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f, 0x3d, 0x7d, 0x39, 0x3f, 0xf5, 0xeb, 0xcb, 0xf9, 0xa9, 0x8f, 0xaf, 0x4d, 0xf4, 0x9e,
+ 0xa8, 0x7f, 0x6e, 0x8a, 0xbb, 0xb9, 0x55, 0x14, 0x77, 0xdc, 0xe5, 0x7f, 0x03, 0x00, 0x00, 0xff,
+ 0xff, 0xc4, 0xd8, 0x77, 0x26, 0x5f, 0x15, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -1190,6 +1488,8 @@ type MsgClient interface {
UpdateCollectionState(ctx context.Context, in *MsgUpdateCollectionState, opts ...grpc.CallOption) (*MsgUpdateCollectionStateResponse, error)
UpdateCollectionDates(ctx context.Context, in *MsgUpdateCollectionDates, opts ...grpc.CallOption) (*MsgUpdateCollectionDatesResponse, error)
UpdateCollectionPayments(ctx context.Context, in *MsgUpdateCollectionPayments, opts ...grpc.CallOption) (*MsgUpdateCollectionPaymentsResponse, error)
+ UpdateCollectionIntents(ctx context.Context, in *MsgUpdateCollectionIntents, opts ...grpc.CallOption) (*MsgUpdateCollectionIntentsResponse, error)
+ ClaimIntent(ctx context.Context, in *MsgClaimIntent, opts ...grpc.CallOption) (*MsgClaimIntentResponse, error)
}
type msgClient struct {
@@ -1272,6 +1572,24 @@ func (c *msgClient) UpdateCollectionPayments(ctx context.Context, in *MsgUpdateC
return out, nil
}
+func (c *msgClient) UpdateCollectionIntents(ctx context.Context, in *MsgUpdateCollectionIntents, opts ...grpc.CallOption) (*MsgUpdateCollectionIntentsResponse, error) {
+ out := new(MsgUpdateCollectionIntentsResponse)
+ err := c.cc.Invoke(ctx, "/ixo.claims.v1beta1.Msg/UpdateCollectionIntents", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *msgClient) ClaimIntent(ctx context.Context, in *MsgClaimIntent, opts ...grpc.CallOption) (*MsgClaimIntentResponse, error) {
+ out := new(MsgClaimIntentResponse)
+ err := c.cc.Invoke(ctx, "/ixo.claims.v1beta1.Msg/ClaimIntent", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
// MsgServer is the server API for Msg service.
type MsgServer interface {
CreateCollection(context.Context, *MsgCreateCollection) (*MsgCreateCollectionResponse, error)
@@ -1282,6 +1600,8 @@ type MsgServer interface {
UpdateCollectionState(context.Context, *MsgUpdateCollectionState) (*MsgUpdateCollectionStateResponse, error)
UpdateCollectionDates(context.Context, *MsgUpdateCollectionDates) (*MsgUpdateCollectionDatesResponse, error)
UpdateCollectionPayments(context.Context, *MsgUpdateCollectionPayments) (*MsgUpdateCollectionPaymentsResponse, error)
+ UpdateCollectionIntents(context.Context, *MsgUpdateCollectionIntents) (*MsgUpdateCollectionIntentsResponse, error)
+ ClaimIntent(context.Context, *MsgClaimIntent) (*MsgClaimIntentResponse, error)
}
// UnimplementedMsgServer can be embedded to have forward compatible implementations.
@@ -1312,6 +1632,12 @@ func (*UnimplementedMsgServer) UpdateCollectionDates(ctx context.Context, req *M
func (*UnimplementedMsgServer) UpdateCollectionPayments(ctx context.Context, req *MsgUpdateCollectionPayments) (*MsgUpdateCollectionPaymentsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateCollectionPayments not implemented")
}
+func (*UnimplementedMsgServer) UpdateCollectionIntents(ctx context.Context, req *MsgUpdateCollectionIntents) (*MsgUpdateCollectionIntentsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method UpdateCollectionIntents not implemented")
+}
+func (*UnimplementedMsgServer) ClaimIntent(ctx context.Context, req *MsgClaimIntent) (*MsgClaimIntentResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ClaimIntent not implemented")
+}
func RegisterMsgServer(s grpc1.Server, srv MsgServer) {
s.RegisterService(&_Msg_serviceDesc, srv)
@@ -1461,6 +1787,42 @@ func _Msg_UpdateCollectionPayments_Handler(srv interface{}, ctx context.Context,
return interceptor(ctx, in, info, handler)
}
+func _Msg_UpdateCollectionIntents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(MsgUpdateCollectionIntents)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MsgServer).UpdateCollectionIntents(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/ixo.claims.v1beta1.Msg/UpdateCollectionIntents",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MsgServer).UpdateCollectionIntents(ctx, req.(*MsgUpdateCollectionIntents))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Msg_ClaimIntent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(MsgClaimIntent)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(MsgServer).ClaimIntent(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/ixo.claims.v1beta1.Msg/ClaimIntent",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(MsgServer).ClaimIntent(ctx, req.(*MsgClaimIntent))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
var _Msg_serviceDesc = grpc.ServiceDesc{
ServiceName: "ixo.claims.v1beta1.Msg",
HandlerType: (*MsgServer)(nil),
@@ -1497,6 +1859,14 @@ var _Msg_serviceDesc = grpc.ServiceDesc{
MethodName: "UpdateCollectionPayments",
Handler: _Msg_UpdateCollectionPayments_Handler,
},
+ {
+ MethodName: "UpdateCollectionIntents",
+ Handler: _Msg_UpdateCollectionIntents_Handler,
+ },
+ {
+ MethodName: "ClaimIntent",
+ Handler: _Msg_ClaimIntent_Handler,
+ },
},
Streams: []grpc.StreamDesc{},
Metadata: "ixo/claims/v1beta1/tx.proto",
@@ -1522,6 +1892,11 @@ func (m *MsgCreateCollection) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
+ if m.Intents != 0 {
+ i = encodeVarintTx(dAtA, i, uint64(m.Intents))
+ i--
+ dAtA[i] = 0x48
+ }
if m.Payments != nil {
{
size, err := m.Payments.MarshalToSizedBuffer(dAtA[:i])
@@ -1631,6 +2006,44 @@ func (m *MsgSubmitClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
+ if len(m.Cw20Payment) > 0 {
+ for iNdEx := len(m.Cw20Payment) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Cw20Payment[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintTx(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x42
+ }
+ }
+ if len(m.Amount) > 0 {
+ for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintTx(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x3a
+ }
+ }
+ if m.UseIntent {
+ i--
+ if m.UseIntent {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x30
+ }
if len(m.AdminAddress) > 0 {
i -= len(m.AdminAddress)
copy(dAtA[i:], m.AdminAddress)
@@ -2269,16 +2682,193 @@ func (m *MsgUpdateCollectionPaymentsResponse) MarshalToSizedBuffer(dAtA []byte)
return len(dAtA) - i, nil
}
-func encodeVarintTx(dAtA []byte, offset int, v uint64) int {
- offset -= sovTx(v)
- base := offset
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
+func (m *MsgUpdateCollectionIntents) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
}
- dAtA[offset] = uint8(v)
- return base
+ return dAtA[:n], nil
+}
+
+func (m *MsgUpdateCollectionIntents) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *MsgUpdateCollectionIntents) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if len(m.AdminAddress) > 0 {
+ i -= len(m.AdminAddress)
+ copy(dAtA[i:], m.AdminAddress)
+ i = encodeVarintTx(dAtA, i, uint64(len(m.AdminAddress)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if m.Intents != 0 {
+ i = encodeVarintTx(dAtA, i, uint64(m.Intents))
+ i--
+ dAtA[i] = 0x10
+ }
+ if len(m.CollectionId) > 0 {
+ i -= len(m.CollectionId)
+ copy(dAtA[i:], m.CollectionId)
+ i = encodeVarintTx(dAtA, i, uint64(len(m.CollectionId)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *MsgUpdateCollectionIntentsResponse) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *MsgUpdateCollectionIntentsResponse) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *MsgUpdateCollectionIntentsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ return len(dAtA) - i, nil
+}
+
+func (m *MsgClaimIntent) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *MsgClaimIntent) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *MsgClaimIntent) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if len(m.Cw20Payment) > 0 {
+ for iNdEx := len(m.Cw20Payment) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Cw20Payment[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintTx(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x2a
+ }
+ }
+ if len(m.Amount) > 0 {
+ for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintTx(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x22
+ }
+ }
+ if len(m.CollectionId) > 0 {
+ i -= len(m.CollectionId)
+ copy(dAtA[i:], m.CollectionId)
+ i = encodeVarintTx(dAtA, i, uint64(len(m.CollectionId)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.AgentAddress) > 0 {
+ i -= len(m.AgentAddress)
+ copy(dAtA[i:], m.AgentAddress)
+ i = encodeVarintTx(dAtA, i, uint64(len(m.AgentAddress)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.AgentDid) > 0 {
+ i -= len(m.AgentDid)
+ copy(dAtA[i:], m.AgentDid)
+ i = encodeVarintTx(dAtA, i, uint64(len(m.AgentDid)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *MsgClaimIntentResponse) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *MsgClaimIntentResponse) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *MsgClaimIntentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.ExpireAt != nil {
+ n10, err10 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(*m.ExpireAt, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.ExpireAt):])
+ if err10 != nil {
+ return 0, err10
+ }
+ i -= n10
+ i = encodeVarintTx(dAtA, i, uint64(n10))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.IntentId) > 0 {
+ i -= len(m.IntentId)
+ copy(dAtA[i:], m.IntentId)
+ i = encodeVarintTx(dAtA, i, uint64(len(m.IntentId)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func encodeVarintTx(dAtA []byte, offset int, v uint64) int {
+ offset -= sovTx(v)
+ base := offset
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return base
}
func (m *MsgCreateCollection) Size() (n int) {
if m == nil {
@@ -2316,6 +2906,9 @@ func (m *MsgCreateCollection) Size() (n int) {
l = m.Payments.Size()
n += 1 + l + sovTx(uint64(l))
}
+ if m.Intents != 0 {
+ n += 1 + sovTx(uint64(m.Intents))
+ }
return n
}
@@ -2354,6 +2947,21 @@ func (m *MsgSubmitClaim) Size() (n int) {
if l > 0 {
n += 1 + l + sovTx(uint64(l))
}
+ if m.UseIntent {
+ n += 2
+ }
+ if len(m.Amount) > 0 {
+ for _, e := range m.Amount {
+ l = e.Size()
+ n += 1 + l + sovTx(uint64(l))
+ }
+ }
+ if len(m.Cw20Payment) > 0 {
+ for _, e := range m.Cw20Payment {
+ l = e.Size()
+ n += 1 + l + sovTx(uint64(l))
+ }
+ }
return n
}
@@ -2623,6 +3231,85 @@ func (m *MsgUpdateCollectionPaymentsResponse) Size() (n int) {
return n
}
+func (m *MsgUpdateCollectionIntents) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.CollectionId)
+ if l > 0 {
+ n += 1 + l + sovTx(uint64(l))
+ }
+ if m.Intents != 0 {
+ n += 1 + sovTx(uint64(m.Intents))
+ }
+ l = len(m.AdminAddress)
+ if l > 0 {
+ n += 1 + l + sovTx(uint64(l))
+ }
+ return n
+}
+
+func (m *MsgUpdateCollectionIntentsResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ return n
+}
+
+func (m *MsgClaimIntent) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.AgentDid)
+ if l > 0 {
+ n += 1 + l + sovTx(uint64(l))
+ }
+ l = len(m.AgentAddress)
+ if l > 0 {
+ n += 1 + l + sovTx(uint64(l))
+ }
+ l = len(m.CollectionId)
+ if l > 0 {
+ n += 1 + l + sovTx(uint64(l))
+ }
+ if len(m.Amount) > 0 {
+ for _, e := range m.Amount {
+ l = e.Size()
+ n += 1 + l + sovTx(uint64(l))
+ }
+ }
+ if len(m.Cw20Payment) > 0 {
+ for _, e := range m.Cw20Payment {
+ l = e.Size()
+ n += 1 + l + sovTx(uint64(l))
+ }
+ }
+ return n
+}
+
+func (m *MsgClaimIntentResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.IntentId)
+ if l > 0 {
+ n += 1 + l + sovTx(uint64(l))
+ }
+ if m.ExpireAt != nil {
+ l = github_com_cosmos_gogoproto_types.SizeOfStdTime(*m.ExpireAt)
+ n += 1 + l + sovTx(uint64(l))
+ }
+ return n
+}
+
func sovTx(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
@@ -2900,6 +3587,25 @@ func (m *MsgCreateCollection) Unmarshal(dAtA []byte) error {
return err
}
iNdEx = postIndex
+ case 9:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Intents", wireType)
+ }
+ m.Intents = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Intents |= CollectionIntentOptions(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
default:
iNdEx = preIndex
skippy, err := skipTx(dAtA[iNdEx:])
@@ -3160,8 +3866,96 @@ func (m *MsgSubmitClaim) Unmarshal(dAtA []byte) error {
}
m.AdminAddress = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
- default:
- iNdEx = preIndex
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field UseIntent", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.UseIntent = bool(v != 0)
+ case 7:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthTx
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthTx
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Amount = append(m.Amount, types.Coin{})
+ if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 8:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Cw20Payment", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthTx
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthTx
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Cw20Payment = append(m.Cw20Payment, &CW20Payment{})
+ if err := m.Cw20Payment[len(m.Cw20Payment)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
skippy, err := skipTx(dAtA[iNdEx:])
if err != nil {
return err
@@ -4952,6 +5746,521 @@ func (m *MsgUpdateCollectionPaymentsResponse) Unmarshal(dAtA []byte) error {
}
return nil
}
+func (m *MsgUpdateCollectionIntents) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: MsgUpdateCollectionIntents: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: MsgUpdateCollectionIntents: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CollectionId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthTx
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTx
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.CollectionId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Intents", wireType)
+ }
+ m.Intents = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Intents |= CollectionIntentOptions(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AdminAddress", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthTx
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTx
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.AdminAddress = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipTx(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthTx
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *MsgUpdateCollectionIntentsResponse) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: MsgUpdateCollectionIntentsResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: MsgUpdateCollectionIntentsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ default:
+ iNdEx = preIndex
+ skippy, err := skipTx(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthTx
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *MsgClaimIntent) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: MsgClaimIntent: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: MsgClaimIntent: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AgentDid", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthTx
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTx
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.AgentDid = github_com_ixofoundation_ixo_blockchain_v3_x_iid_types.DIDFragment(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AgentAddress", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthTx
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTx
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.AgentAddress = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field CollectionId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthTx
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTx
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.CollectionId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthTx
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthTx
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Amount = append(m.Amount, types.Coin{})
+ if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Cw20Payment", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthTx
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthTx
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Cw20Payment = append(m.Cw20Payment, &CW20Payment{})
+ if err := m.Cw20Payment[len(m.Cw20Payment)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipTx(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthTx
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *MsgClaimIntentResponse) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: MsgClaimIntentResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: MsgClaimIntentResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field IntentId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthTx
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTx
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.IntentId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ExpireAt", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTx
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthTx
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthTx
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.ExpireAt == nil {
+ m.ExpireAt = new(time.Time)
+ }
+ if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(m.ExpireAt, dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipTx(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthTx
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
func skipTx(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0