-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #533 from JesseTheRobot/feat/bundlr-to-irys
feat: ✨ plugins: Transition from Bundlr to Irys storage driver
- Loading branch information
Showing
16 changed files
with
452 additions
and
377 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@metaplex-foundation/js': minor | ||
--- | ||
|
||
Transition from Bundlr to Irys |
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 was deleted.
Oops, something went wrong.
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,54 @@ | ||
import { MetaplexError } from './MetaplexError'; | ||
|
||
/** @group Errors */ | ||
export class IrysError extends MetaplexError { | ||
readonly name: string = 'IrysError'; | ||
constructor(message: string, cause?: Error) { | ||
super(message, 'plugin', 'Irys', cause); | ||
} | ||
} | ||
|
||
/** @group Errors */ | ||
export class FailedToInitializeIrysError extends IrysError { | ||
readonly name: string = 'FailedToInitializeIrysError'; | ||
constructor(cause: Error) { | ||
const message = | ||
'Irys could not be initialized. ' + | ||
'Please check the underlying error below for more details.'; | ||
super(message, cause); | ||
} | ||
} | ||
|
||
/** @group Errors */ | ||
export class FailedToConnectToIrysAddressError extends IrysError { | ||
readonly name: string = 'FailedToConnectToIrysAddressError'; | ||
constructor(address: string, cause: Error) { | ||
const message = | ||
`Irys could not connect to the provided address [${address}]. ` + | ||
'Please ensure the provided address is valid. Some valid addresses include: ' + | ||
'"https://node1.irys.xyz" for mainnet and "https://devnet.irys.xyz" for devnet'; | ||
super(message, cause); | ||
} | ||
} | ||
|
||
/** @group Errors */ | ||
export class AssetUploadFailedError extends IrysError { | ||
readonly name: string = 'AssetUploadFailedError'; | ||
constructor(status: number) { | ||
const message = | ||
`The asset could not be uploaded to the Irys network and ` + | ||
`returned the following status code [${status}].`; | ||
super(message); | ||
} | ||
} | ||
|
||
/** @group Errors */ | ||
export class IrysWithdrawError extends IrysError { | ||
readonly name: string = 'IrysWithdrawError'; | ||
constructor(error: string) { | ||
const message = | ||
`The balance could not be withdrawn from the Irys network and ` + | ||
`returned the following error: ${error}.`; | ||
super(message); | ||
} | ||
} |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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.