Expose Porter domains using helper methods#312
Expose Porter domains using helper methods#312piotr-roslaniec merged 9 commits intonucypher:monorepofrom
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.
Was this supposed to be tapir?
| TESTNET: 'oryx', | |
| TESTNET: 'tapir', |
There was a problem hiding this comment.
I'm not sure. I thought that @nucypher/nucypher-ts@0.10.0, 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.
Support tapir, mainnet and lynx networks. Test examples and demos against lynx.
There was a problem hiding this comment.
@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.
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.
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.
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.
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,mainnetandlynxnetworks. Test examples and demos against lynx.