GlassEaters / hydra

Collective account pooling, fan out wallet, dao treasury

Home Page:hydra-dox.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing dependencies from SDK (yarn)

abdelhakeem opened this issue · comments

Description

The SDK package uses some packages not listed in its dependencies, which yarn complains about. For example:

Error: @glasseaters/hydra-sdk tried to access @project-serum/anchor, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

To Reproduce

Given the following file (index.ts):

import { Connection, Keypair } from '@solana/web3.js';
import { FanoutClient, MembershipModel } from '@glasseaters/hydra-sdk';
import { NodeWallet } from '@metaplex/js';

(async () => {
  const connection = new Connection("devnet", "confirmed");
  let fanoutSdk: FanoutClient;

  const authorityWallet = Keypair.generate();

  fanoutSdk = new FanoutClient(
    connection,
    new NodeWallet(authorityWallet)
  );

  const init = await fanoutSdk.initializeFanout({
    totalShares: 100,
    name: `Test${Date.now()}`,
    membershipModel: MembershipModel.Wallet,
  });
})();

Run the following commands:

$ yarn init -y
$ yarn add --dev typescript @types/node ts-node
$ yarn add @solana/web3.js @metaplex/js @glasseaters/hydra-sdk
$ yarn exec ts-node index.ts

Expected Behavior

Dependencies should be included in the SDK's package.json