|
10 | 10 | module Cardano.Wasm.Api.Certificate.StakeCertificate |
11 | 11 | ( StakeCertificateObject (..) |
12 | 12 | , createStakeKeyCertificateImpl |
13 | | - , asStakeRegistrationImpl |
14 | | - , asStakeUnregistrationImpl |
15 | | - , asDelegateOnlyImpl |
16 | | - , withDepositImpl |
17 | | - , withoutDepositImpl |
18 | | - , withDelegationImpl |
19 | | - , withoutDelegationImpl |
20 | | - , toCborImpl |
| 13 | + , stakeCertAsStakeRegistrationImpl |
| 14 | + , stakeCertAsStakeUnregistrationImpl |
| 15 | + , stakeCertAsDelegateOnlyImpl |
| 16 | + , stakeCertWithDepositImpl |
| 17 | + , stakeCertWithoutDepositImpl |
| 18 | + , stakeCertWithDelegationImpl |
| 19 | + , stakeCertWithoutDelegationImpl |
| 20 | + , stakeCertToCborImpl |
21 | 21 | ) |
22 | 22 | where |
23 | 23 |
|
@@ -138,46 +138,46 @@ createStakeKeyCertificateImpl skHashStr = do |
138 | 138 | readHash = rightOrError . Api.deserialiseFromRawBytesHex . Text.encodeUtf8 . Text.pack |
139 | 139 |
|
140 | 140 | -- | Marks the certificate as a stake registration certificate. |
141 | | -asStakeRegistrationImpl :: StakeCertificateObject -> StakeCertificateObject |
142 | | -asStakeRegistrationImpl certObj = |
| 141 | +stakeCertAsStakeRegistrationImpl :: StakeCertificateObject -> StakeCertificateObject |
| 142 | +stakeCertAsStakeRegistrationImpl certObj = |
143 | 143 | certObj{action = RegisterStake} |
144 | 144 |
|
145 | 145 | -- | Marks the certificate as a stake un-registration certificate. |
146 | | -asStakeUnregistrationImpl :: StakeCertificateObject -> StakeCertificateObject |
147 | | -asStakeUnregistrationImpl certObj = |
| 146 | +stakeCertAsStakeUnregistrationImpl :: StakeCertificateObject -> StakeCertificateObject |
| 147 | +stakeCertAsStakeUnregistrationImpl certObj = |
148 | 148 | certObj{action = UnregisterStake} |
149 | 149 |
|
150 | 150 | -- | Marks the certificate as a delegation-only certificate (not registration nor un-registration). |
151 | | -asDelegateOnlyImpl :: StakeCertificateObject -> StakeCertificateObject |
152 | | -asDelegateOnlyImpl certObj = |
| 151 | +stakeCertAsDelegateOnlyImpl :: StakeCertificateObject -> StakeCertificateObject |
| 152 | +stakeCertAsDelegateOnlyImpl certObj = |
153 | 153 | certObj{action = DelegateOnly} |
154 | 154 |
|
155 | 155 | -- | Sets the deposit for the stake certificate. This only has effect for stake registration |
156 | 156 | -- and unregistration certificates. The amount must match the expected deposit amount specified by |
157 | 157 | -- 'ppKeyDepositL' in the protocol parameters for registration certificates and the amount |
158 | 158 | -- depositted for unregistration certificates. |
159 | | -withDepositImpl :: Coin -> StakeCertificateObject -> StakeCertificateObject |
160 | | -withDepositImpl dep certObj = |
| 159 | +stakeCertWithDepositImpl :: Coin -> StakeCertificateObject -> StakeCertificateObject |
| 160 | +stakeCertWithDepositImpl dep certObj = |
161 | 161 | certObj{mDeposit = Just dep} |
162 | 162 |
|
163 | 163 | -- | Resets the deposit for the stake certificate. |
164 | | -withoutDepositImpl :: StakeCertificateObject -> StakeCertificateObject |
165 | | -withoutDepositImpl certObj = |
| 164 | +stakeCertWithoutDepositImpl :: StakeCertificateObject -> StakeCertificateObject |
| 165 | +stakeCertWithoutDepositImpl certObj = |
166 | 166 | certObj{mDeposit = Nothing} |
167 | 167 |
|
168 | 168 | -- | Sets the pool to which the stake key will be delegated. |
169 | | -withDelegationImpl :: PoolId -> StakeCertificateObject -> StakeCertificateObject |
170 | | -withDelegationImpl poolId certObj = |
| 169 | +stakeCertWithDelegationImpl :: PoolId -> StakeCertificateObject -> StakeCertificateObject |
| 170 | +stakeCertWithDelegationImpl poolId certObj = |
171 | 171 | certObj{mDelegatee = Just (DelegStake $ unStakePoolKeyHash poolId)} |
172 | 172 |
|
173 | 173 | -- | Resets the delegation for the stake certificate. |
174 | | -withoutDelegationImpl :: StakeCertificateObject -> StakeCertificateObject |
175 | | -withoutDelegationImpl certObj = |
| 174 | +stakeCertWithoutDelegationImpl :: StakeCertificateObject -> StakeCertificateObject |
| 175 | +stakeCertWithoutDelegationImpl certObj = |
176 | 176 | certObj{mDelegatee = Nothing} |
177 | 177 |
|
178 | 178 | -- | Convert a StakeCertificateObject to the base16 encoding of its CBOR representation. |
179 | | -toCborImpl :: MonadThrow m => StakeCertificateObject -> m String |
180 | | -toCborImpl |
| 179 | +stakeCertToCborImpl :: MonadThrow m => StakeCertificateObject -> m String |
| 180 | +stakeCertToCborImpl |
181 | 181 | ( StakeCertificateObject |
182 | 182 | { era |
183 | 183 | , stakeCredential |
|
0 commit comments