-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature(porter): add porter domains for taco and pre
- Loading branch information
1 parent
0a13562
commit 8cf7e21
Showing
15 changed files
with
74 additions
and
43 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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { getPorterUri as doGetPorterUri } from '@nucypher/shared'; | ||
|
||
type PreDomain = 'oryx'; | ||
|
||
export const PRE_DOMAIN: Record<string, PreDomain> = { | ||
TESTNET: 'oryx', | ||
}; | ||
|
||
export const getPorterUri = (domain: PreDomain): string => { | ||
const preDomainKeys = Object.keys(PRE_DOMAIN); | ||
if (!preDomainKeys.includes(domain)) { | ||
throw new Error(`${domain} is not a valid PRE domain.`); | ||
} | ||
return doGetPorterUri(domain); | ||
}; | ||
|
||
export { fromBytes, initialize, toBytes, toHexString } from '@nucypher/shared'; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
export { DkgPublicKey, ThresholdMessageKit } from '@nucypher/nucypher-core'; | ||
|
||
export { fromBytes, getPorterUri, initialize, toBytes } from '@nucypher/shared'; | ||
|
||
export * as conditions from './conditions'; | ||
|
||
export { decrypt, encrypt } from './taco'; | ||
export * from './porter'; | ||
export * from './taco'; |
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,18 @@ | ||
import { getPorterUri as doGetPorterUri } from '@nucypher/shared'; | ||
|
||
type TacoDomain = 'lynx' | 'tapir'; | ||
|
||
export const TACO_DOMAIN: Record<string, TacoDomain> = { | ||
DEV: 'lynx', | ||
TESTNET: 'tapir', | ||
}; | ||
|
||
export const getPorterUri = (domain: TacoDomain): string => { | ||
const tacoDomainKeys = Object.keys(TACO_DOMAIN); | ||
if (!tacoDomainKeys.includes(domain)) { | ||
throw new Error(`${domain} is not a valid TACo domain.`); | ||
} | ||
return doGetPorterUri(domain); | ||
}; | ||
|
||
export { fromBytes, initialize, toBytes, toHexString } from '@nucypher/shared'; |
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