Utility.Credential.App.V0.Service.User
Templates
template UserService
User service.
Signatory: operator, user
Field
Type
Description
operator
App operator.
user
App user.
dso
Reference to the DSO party (Decentralized Synchronizer Operations).
Choice Archive
Controller: operator, user
Returns: ()
(no fields)
Choice UserService_AcceptFreeCredentialOffer
Accepts a credential offer (of a free credential) from an issuer.
Controller: user
Returns: CredentialOffer_AcceptFree_Result
Field
Type
Description
credentialOfferCid
The offer to accept.
Choice UserService_AcceptPaidCredentialOffer
Accepts a credential offer (of a paid credential) from an issuer. Takes unlocked coins as input. Beware of contention. Retries may be required.
Controller: user
Returns: CredentialOffer_AcceptPaid_Result
Field
Type
Description
credentialOfferCid
The offer that the user accepts.
depositAmulets
Amulets to be locked as deposit.
appTransferContext
Canton Network transfer context required to perform locking.
Choice UserService_AdjustBillingParams
Changes the parameters of a credential billing.
Controller: user
Returns: CredentialBilling_AdjustBillingParams_Result
Field
Type
Description
credentialBillingCid
The credential billing that the user modifies.
billingParams
The new parameters of the credential billing.
Choice UserService_BillingParamsAdjustmentRequest_Accept
Accepts a billing parameters adjustment request.
Controller: user
Returns: BillingParamsAdjustmentRequest_Accept_Result
Field
Type
Description
requestCid
The billing adjustment request to accept. The
credentialId
must match with one in the given credential billing.credentialBillingCid
The credential billing that the user modifies. The
credentialId
must match with the one in the given adjustment request.Choice UserService_BillingParamsAdjustmentRequest_Cancel
Cancels a billing parameters adjustment request.
Controller: user
Returns: BillingParamsAdjustmentRequest_Cancel_Result
Field
Type
Description
requestCid
The billing adjustment request to cancel.
Choice UserService_CancelCredentialBilling
Cancels a credential billing.
Controller: user
Returns: CredentialBilling_Cancel_Result
Field
Type
Description
credentialBillingCid
The credential billing that the user cancels.
appTransferContext
Canton Network transfer context required to perform locking.
Choice UserService_CancelCredentialOffer
Cancels a credential offer made to a holder.
Controller: user
Returns: CredentialOffer_Cancel_Result
Field
Type
Description
credentialOfferCid
The offer to cancel.
Choice UserService_Distribute
Distributes coins to a credential holder. Takes unlocked coins as input. Beware of contention. Retries may be required.
Controller: user
Returns: CredentialBilling_Distribute_Result
Field
Type
Description
credentialBillingCid
Credential billing of the distribution recipient.
amountUsd
Amount to distribute (in USD).
coinCids
Coins to distribute.
appTransferContext
Coin transfer context.
Choice UserService_DistributeAndAdjustDeposit
Distributes coins to and adjust / top up deposits for a credential holder. Takes unlocked coins as input. Beware of contention. Retries may be required.
Controller: user
Returns: CredentialBilling_DistributeAndAdjustDeposit_Result
Field
Type
Description
credentialBillingCid
Credential billing of the distribution recipient.
amountUsd
Amount to distribute (in USD).
coinCids
Coins to distribute.
appTransferContext
Coin transfer context.
Choice UserService_DistributeAndAdjustDepositMulti
Distributes coins to and adjust / top up deposits for multiple credential holders. Takes unlocked coins as input. Beware of contention. Retries may be required.
Controller: user
Returns: UserService_DistributeAndAdjustDepositMulti_Result
Field
Type
Description
distributionSlices
Distribution slices to distribute to.
amountUsd
Amount to distribute (in USD).
coinCids
Coins to distribute.
appTransferContext
Coin transfer context.
Choice UserService_DistributeMulti
Distributes coins to multiple credential holders. Takes unlocked coins as input. Beware of contention. Retries may be required.
Controller: user
Returns: UserService_DistributeMulti_Result
Field
Type
Description
distributionSlices
Distribution slices to distribute to.
amountUsd
Amount to distribute (in USD).
coinCids
Coins to distribute.
appTransferContext
Coin transfer context.
Choice UserService_OfferFreeCredential
Offers a free credential.
Controller: user
Returns: UserService_OfferFreeCredential_Result
Field
Type
Description
holder
Holder of the credential.
id
Identifier of the credential.
description
Description of the credential.
claims
[Claim]
Claims contained in the credential.
Choice UserService_OfferPaidCredential
Offers a paid credential.
Controller: user
Returns: UserService_OfferPaidCredential_Result
Field
Type
Description
holder
Holder of the credential.
id
Identifier of the credential.
description
Description of the credential.
claims
[Claim]
Claims contained in the credential.
billingParams
Billing parameters of the credential.
depositInitialAmountUsd
The amount of USD to be initially locked (as CC) as a deposit to cover fee payments.
Choice UserService_RejectCredentialOffer
Rejects a credential offer from an issuer.
Controller: user
Returns: CredentialOffer_Reject_Result
Field
Type
Description
credentialOfferCid
The offer to reject.
reason
The reason for rejecting the offer.
Choice UserService_RequestToAdjustBillingParams
Changes the parameters of a credential billing.
Controller: user
Returns: CredentialBilling_RequestToAdjustBillingParams_Result
Field
Type
Description
credentialBillingCid
The credential billing that the user modifies.
billingParams
The new parameters of the credential billing.
Choice UserService_RevokeCredential
Revokes a (free or paid) credential.
Controller: user
Returns: Credential_Revoke_Result
Field
Type
Description
credentialCid
The credential that the user revokes.
Choice UserService_RevokeCredentialAndCancelBilling
Revokes a paid credential and cancels the corresponding credential billing.
Controller: user
Returns: CredentialBilling_Cancel_Result
Field
Type
Description
credentialCid
The credential that the user revokes.
credentialBillingCid
The credential billing that the user cancels.
appTransferContext
Canton Network transfer context required to perform locking.
Choice UserService_Terminate
Terminates the user service.
Controller: actor `oneOf` signatory this
Returns: UserService_Terminate_Result
Field
Type
Description
actor
Party initiating the termination of this agreement.
Choice UserService_TopUp
Tops up a deposit for a paid credential. Takes unlocked coins as input. Beware of contention. Retries may be required.
Controller: user
Returns: CredentialBilling_TopUp_Result
Field
Type
Description
credentialBillingCid
Credential billing to top up.
amountUsd
Amount to top up (in USD).
coinCids
Coins to be locked as deposit for the top-up.
appTransferContext
Canton Network transfer context required to perform locking.
template UserServiceRequest
Request for a UserService.
Signatory: user
Field
Type
Description
operator
App operator.
user
App user.
Choice Archive
Controller: user
Returns: ()
(no fields)
Choice UserServiceRequest_Accept
Accepts a user service request.
Controller: operator
Returns: UserServiceRequest_Accept_Result
Field
Type
Description
dso
Reference to the DSO party (Decentralized Synchronizer Operations).
Choice UserServiceRequest_Cancel
Cancels a user service request.
Controller: user
Returns: UserServiceRequest_Cancel_Result
(no fields)
Choice UserServiceRequest_Reject
Rejects a user service request.
Controller: operator
Returns: UserServiceRequest_Reject_Result
(no fields)
Data Types
data DistributionSlice
Encapsulates the percentage of a distribution a particular holder (represented by a credential billing) will receive.
Field
Type
Description
credentialBillingCid
Credential billing of the recipient.
percentage
Percentage of the total distribution distributed to the recipient.
data UserServiceRequest_Accept_Result
Result of
UserServiceRequest_Accept
.UserServiceRequest_Accept_Result
Field
Type
Description
userServiceCid
The created
UserService
.
data UserServiceRequest_Cancel_Result
data UserServiceRequest_Reject_Result
data UserService_DistributeAndAdjustDepositMulti_Result
Result of
UserService_DistributeAndAdjustDepositMulti
.UserService_DistributeAndAdjustDepositMulti_Result
Field
Type
Description
transferResults
The
TransferResult
for each distribution.
data UserService_DistributeMulti_Result
Result of
UserService_DistributeMulti
.UserService_DistributeMulti_Result
Field
Type
Description
transferResults
The
TransferResult
for each distribution.
data UserService_OfferFreeCredential_Result
Result of
UserService_OfferFreeCredential
.UserService_OfferFreeCredential_Result
Field
Type
Description
credentialOfferCid
The credential offer.
data UserService_OfferPaidCredential_Result
Result of
UserService_OfferPaidCredential
.UserService_OfferPaidCredential_Result
Field
Type
Description
credentialOfferCid
The credential offer.
data UserService_Terminate_Result