Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cardano-services): metadata fetching logic
- implement the main SP metadata fetching logic
- Loading branch information
1 parent
06db621
commit 3647598
Showing
8 changed files
with
468 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
packages/cardano-services/src/StakePool/HttpStakePoolMetadata/errors.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { ComposableError, formatErrorMessage } from '@cardano-sdk/util'; | ||
|
||
export enum StakePoolMetadataServiceFailure { | ||
FailedToFetchExtendedMetadata = 'FAILED_TO_FETCH_EXTENDED_METADATA', | ||
FailedToFetchMetadata = 'FAILED_TO_FETCH_METADATA', | ||
FailedToFetchExtendedSignature = 'FAILED_TO_FETCH_EXTENDED_SIGNATURE', | ||
InvalidExtendedMetadataFormat = 'INVALID_EXTENDED_METADATA_FORMAT', | ||
InvalidExtendedMetadataSignature = 'INVALID_EXTENDED_METADATA_SIGNATURE', | ||
InvalidStakePoolHash = 'INVALID_STAKE_POOL_HASH', | ||
InvalidMetadata = 'INVALID_METADATA' | ||
} | ||
|
||
export class StakePoolMetadataServiceError<InnerError = unknown> extends ComposableError<InnerError> { | ||
constructor(public reason: StakePoolMetadataServiceFailure, innerError?: InnerError, public detail?: string) { | ||
super(formatErrorMessage(reason, detail), innerError); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.