-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose Porter domains using helper methods #312
Expose Porter domains using helper methods #312
Conversation
234d8cc
to
cb7ed57
Compare
Codecov Report
@@ Coverage Diff @@
## monorepo #312 +/- ##
============================================
- Coverage 88.25% 88.17% -0.08%
============================================
Files 33 33
Lines 2409 2394 -15
Branches 205 205
============================================
- Hits 2126 2111 -15
Misses 254 254
Partials 29 29
|
8cf7e21
to
e53419a
Compare
packages/pre/src/porter.ts
Outdated
type PreDomain = 'oryx'; | ||
|
||
export const PRE_DOMAIN: Record<string, PreDomain> = { | ||
TESTNET: 'oryx', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this supposed to be tapir
?
TESTNET: 'oryx', | |
TESTNET: 'tapir', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure. I thought that @nucypher/[email protected]
, the vanilla PRE release, was working on oryx
. tapir
was used by tDec-PRE. I think these two are not compatible. Not sure what to do here, other than to update @nucypher/pre
to use the current nucypher-core
version and make sure it works on tapir
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Support tapir
, mainnet
and lynx
networks. Test examples and demos against lynx
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@derekpierre What was the conclusion here? To support tapir
, mainnet
, and lynx
networks in both PRE and TACo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. All possible TACo domains should be allowed: tapir
, lynx
, mainnet
.
packages/shared/src/porter.ts
Outdated
export type PorterNetwork = keyof typeof porterUri; | ||
|
||
export const getPorterUri = (network: Network): string => { | ||
const uri = PORTER_URIS[network]; | ||
export const getPorterUri = (network: PorterNetwork): string => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use "domain" instead of "network"?
packages/pre/src/porter.ts
Outdated
@@ -0,0 +1,17 @@ | |||
import { getPorterUri as doGetPorterUri } from '@nucypher/shared'; | |||
|
|||
type PreDomain = 'oryx'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This domain is planned to be EOL after the next release, Shall we update it?
type PreDomain = 'oryx'; | |
type PreDomain = PRE_DOMAIN.TESTNET; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can update it now, sure. I gather from comments in this PR that it's supposed to be tapir
?
WRT to the line: Notice how type PreDomain = 'oryx';
is used in PRE_DOMAIN
type definition:
export const PRE_DOMAIN: Record<string, PreDomain> = {
TESTNET: 'oryx',
};
It works here like an enum - It describes the legal values in the PRE_DOMAIN
dictionary.
7abe95f
to
76911fa
Compare
8323ae1
to
9b6de63
Compare
9b6de63
to
21f6d93
Compare
Type of PR:
Required reviews:
Issues fixed/closed:
@nucypher/*
packages #311Notes for reviewers:
@nucypher/taco
#315tapir
,mainnet
andlynx
networks. Test examples and demos against lynx.