Skip to content
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

fix client package #1027

Merged
merged 4 commits into from
May 3, 2024
Merged

fix client package #1027

merged 4 commits into from
May 3, 2024

Conversation

turbocrime
Copy link
Contributor

@turbocrime turbocrime commented May 3, 2024

  • correct build
  • correct paths
  • change name of injection interface to prevent confusion
  • rm generic get-port export
  • add createPraxTransport export

some more client package work in another PR but this is enough for the demo

@turbocrime turbocrime force-pushed the turbocrime/fix-client-package branch 2 times, most recently from 55a240c to 90a2364 Compare May 3, 2024 02:40
@turbocrime
Copy link
Contributor Author

working demo with this client package here https://github.com/turbocrime/nextjs-penumbra-client-example

@@ -5,7 +5,7 @@ export enum PenumbraRequestFailure {

export const PenumbraSymbol = Symbol.for('penumbra');

export interface PenumbraProvider {
export interface PenumbraInjection {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the thinking behind the rename? Is this standard with other wallets? I feel like the Provider naming is more common in things I've encountered.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Provider naming is common for react components that provide something to child components, which felt awkward while writing the demo and using other Provider-named things, so i renamed this.

Comment on lines +11 to +12
"prebuild": "$npm_execpath run clean",
"prepack": "$npm_execpath run build"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's $npm_execpath do here?

Copy link
Contributor Author

@turbocrime turbocrime May 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$npm_execpath will refer to npm/pnpm/yarn/whatever was used to call the script. it seems like this is the only cross-package-manager way for one package script to call another. these scripts probably don't matter because a consumer won't call them outside of our monorepo, but in general when writing a package for publication it's better to not name an explicit npm/pnpm/yarn in scripts

@turbocrime
Copy link
Contributor Author

i'm going to add a changeset patch bump to bech32m to calm down the peer dependency, and then merge this

@turbocrime turbocrime force-pushed the turbocrime/fix-client-package branch from 5070eaa to d6d65f1 Compare May 3, 2024 16:07
@turbocrime turbocrime merged commit 8410d2f into main May 3, 2024
6 checks passed
@turbocrime turbocrime deleted the turbocrime/fix-client-package branch May 3, 2024 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants