Skip to content

Commit

Permalink
docs: Join drep endpoint (#4693) <!-- Detail in a few bullet points t…
Browse files Browse the repository at this point in the history
…he work accomplished in this PR. Before you submit, don't forget to: CODE-OF-CONDUCT.md CONTRIBUTING.md LICENSE MAINTAINERS.md README.md cabal.project configs docker-compose.yml docs flake.lock flake.nix floskell.json fourmolu.yaml hie-direnv.yaml justfile lib nix prototypes reports run scripts specifications test touch.me.CI weeder.dhall Make sure the GitHub PR fields are correct: ✓ Set a good Title for your PR. ✓ Assign yourself to the PR. ✓ Assign one or more reviewer(s). ✓ Link to a Jira issue, and/or other GitHub issues or PRs. ✓ In the PR description delete any empty sections and all text commented in <!--, so that this text does not appear in merge commit messages. CODE-OF-CONDUCT.md CONTRIBUTING.md LICENSE MAINTAINERS.md README.md cabal.project configs docker-compose.yml docs flake.lock flake.nix floskell.json fourmolu.yaml hie-direnv.yaml justfile lib nix prototypes reports run scripts specifications test touch.me.CI weeder.dhall Don't waste reviewers' time: ✓ If it's a draft, select the Create Draft PR option. ✓ Self-review your changes to make sure nothing unexpected slipped through. CODE-OF-CONDUCT.md CONTRIBUTING.md LICENSE MAINTAINERS.md README.md cabal.project configs docker-compose.yml docs flake.lock flake.nix floskell.json fourmolu.yaml hie-direnv.yaml justfile lib nix prototypes reports run scripts specifications test touch.me.CI weeder.dhall Try to make your intent clear: ✓ Write a good Description that explains what this PR is meant to do. ✓ Jira will detect and link to this PR once created, but you can also link this PR in the description of the corresponding Jira ticket. ✓ Highlight what Testing you have done. ✓ Acknowledge any changes required to the Documentation. --> - [x] Swagger updated - [x] Api scaffolding, Api types, Api errors - [x] Adding Http.Shelley.Server joinDRep - [x] Adding IO Deleg functions - [x] Adding Delegation's guard - [x] Checking that error is emitted when used in Babbage - [x] Checking we can vote, re-vote and emit error when voting the same in the absence of pool delegation in Conway - [x] Checking we can vote, re-vote and emit error when voting the same in the presence of pool delegation in Conway ### Comments <!-- Additional comments, links, or screenshots to attach, if any. --> ### Issue Number adp-3383 <!-- Reference the Jira/GitHub issue that this PR relates to, and which requirements it tackles. Note: Jira issues of the form ADP- will be auto-linked. --> Source commit: 8fb09f4
  • Loading branch information
Cardano Wallet Documentation Bot committed Aug 5, 2024
1 parent a1cf4f3 commit bcf863c
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions api/edge/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4307,6 +4307,12 @@ x-parametersAssetName: &parametersAssetName
format: hex
maxLength: 64

x-parametersDRepId: &parametersDRepId
in: path
name: drepId
required: true
schema: *ApiDRep

#############################################################################
# #
# RESPONSES #
Expand Down Expand Up @@ -6520,6 +6526,36 @@ x-responsesJoinStakePool: &responsesJoinStakePool
application/json:
schema: *ApiTransaction

x-responsesJoinDRep: &responsesJoinDRep
<<: *responsesErr400
403:
description: Forbidden
content:
application/json:
schema:
oneOf:
- <<: *errCannotCoverFee
- <<: *errNoRootKey
- <<: *errNoUtxosAvailable
- <<: *errWrongEncryptionPassphrase
- <<: *errSameVote
404:
description: Not Found
content:
application/json:
schema:
oneOf:
- <<: *errNoSuchWallet
- <<: *errWalletNotInitialized
- <<: *errNoSuchPool
<<: *responsesErr406
<<: *responsesErr415UnsupportedMediaType
202:
description: Accepted
content:
application/json:
schema: *ApiTransaction

x-responsesQuitStakePool: &responsesQuitStakePool
<<: *responsesErr400
403:
Expand Down Expand Up @@ -7361,6 +7397,27 @@ paths:
schema: *ApiWalletPassphrase
responses: *responsesJoinStakePool

/dreps/{drepId}/wallets/{walletId}:
put:
operationId: joinDRep
tags: ["DReps"]
summary: Join
description: |
<p align="right">status: <strong>unstable</strong></p>
Delegate all votes from the given wallet to the given DRep or
case abstain or no-confidence
parameters:
- *parametersDRepId
- *parametersWalletId
requestBody:
required: true
content:
application/json:
schema: *ApiWalletPassphrase
responses: *responsesJoinDRep

/wallets/{walletId}/coin-selections/random:
post:
operationId: selectCoins
Expand Down

0 comments on commit bcf863c

Please sign in to comment.