oyster icon indicating copy to clipboard operation
oyster copied to clipboard

Q: How do I install and use this? Is this same as https://www.npmjs.com/package/oyster-common

Open r4881t opened this issue 3 years ago • 5 comments

I have a few questions. I am understanding how MetaPlex works, and found various references to @oyster/common in the codebade. Example - https://github.com/metaplex-foundation/metaplex/blob/81023eb3e52c31b605e1dcf2eb1e7425153600cd/js/packages/web/src/views/artCreate/index.tsx#L21

  1. Is this repo same as @oyster/common?
  2. I am currently using oyster-common from https://www.npmjs.com/package/oyster-common. The issue I'm facing is that while Metaplex seems to be able to import {useWallet} from @oyster/common. I am unable to do so because its not exported.

r4881t avatar Sep 16 '21 04:09 r4881t

@r4881t metaplex repo has its own package called common and that's what you should be using.

yamijuan avatar Sep 19 '21 01:09 yamijuan

Having the same issue. How can I use @oyster/common in my own project?

drummerjolev avatar Oct 06 '21 06:10 drummerjolev

Here's what I did.

  1. I reorganised my repo to be a lerna package. It was a simple react app first.
  2. I noticed there are two "versions" of @oyester/common. There is 0.0.1 that is provided here, and then there is a 0.0.2 that is provided by Metaplex (here). I asked about this on Metaplex's discord but no one answered.
  3. I copied the codebase of both versions of @oyester/common in my lerna packages and started to see what works.
  4. I found that metaplex's version is generally better, but your use case may be different.

I think one can do smarter than copying the directories, maybe by using git submodules in some way.

r4881t avatar Oct 06 '21 15:10 r4881t

Why can't the package just be published like any normal open source repo? Metaplex just raised $46 million, it can afford 5 minutes to publish a package on npm.

ozyman42 avatar Jan 31 '22 11:01 ozyman42

Looks like there is a library on npm after all: https://docs.metaplex.com/sdk/js/getting-started @metaplex/js

ozyman42 avatar Jan 31 '22 11:01 ozyman42