Skip to content

Commit

Permalink
Merge pull request #301 from blockfrost/feat/gov
Browse files Browse the repository at this point in the history
feat: add gov endpoints
  • Loading branch information
vladimirvolek authored Oct 31, 2024
2 parents 3fb352c + f483a02 commit 8a636b8
Show file tree
Hide file tree
Showing 5 changed files with 972 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
"commitlint",
"delegators",
"deregistrations",
"drep",
"dreps",
"emurgo",
"id",
"io",
Expand Down Expand Up @@ -41,5 +43,4 @@
"**/.pnp.*": true
},
"eslint.nodePath": ".yarn/sdks",
"prettier.prettierPath": ".yarn/sdks/prettier/index.js"
}
5 changes: 5 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Methods for querying [governance DReps endpoints](https://docs.blockfrost.io/#tag/cardano--governance.) - `governance.dreps`, `governance.drepsById`, `governance.drepsByIdDelegators`, `governance.drepsByIdMetadata`, `governance.drepsByIdUpdates`, `governance.drepsByIdVotes`
- Methods for querying [governance proposals endpoints](https://docs.blockfrost.io/#tag/cardano--governance.) - `governance.proposals`, `governance.proposal`, `governance.proposalMetadata`, `governance.proposalParameters`, `governance.proposalVotes`, `governance.proposalWithdrawals`

## [5.6.0] - 2024-10-03

### Added
Expand Down
5 changes: 5 additions & 0 deletions src/BlockFrostAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ import {
blocksAddressesAll,
} from './endpoints/api/blocks';

import { GovernanceAPI } from './endpoints/api/governance';

import {
epochs,
epochsBlocks,
Expand Down Expand Up @@ -172,6 +174,7 @@ class BlockFrostAPI {
instance: Got;
/** @ignore */
rateLimiter: Bottleneck | undefined;
governance: GovernanceAPI;

constructor(options?: Options) {
this.options = validateOptions(options);
Expand Down Expand Up @@ -206,6 +209,8 @@ class BlockFrostAPI {
this.userAgent,
this.rateLimiter,
);

this.governance = new GovernanceAPI(this);
}

accounts = accounts;
Expand Down
Loading

0 comments on commit 8a636b8

Please sign in to comment.