oyster
oyster copied to clipboard
Q: How do I install and use this? Is this same as https://www.npmjs.com/package/oyster-common
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
- Is this repo same as
@oyster/common? - I am currently using
oyster-commonfrom https://www.npmjs.com/package/oyster-common. The issue I'm facing is that while Metaplex seems to be able toimport {useWallet} from @oyster/common. I am unable to do so because its not exported.
@r4881t metaplex repo has its own package called common and that's what you should be using.
Having the same issue. How can I use @oyster/common in my own project?
Here's what I did.
- I reorganised my repo to be a lerna package. It was a simple react app first.
- I noticed there are two "versions" of
@oyester/common. There is0.0.1that is provided here, and then there is a0.0.2that is provided by Metaplex (here). I asked about this on Metaplex's discord but no one answered. - I copied the codebase of both versions of
@oyester/commonin my lerna packages and started to see what works. - 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.
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.
Looks like there is a library on npm after all: https://docs.metaplex.com/sdk/js/getting-started
@metaplex/js