1.1.0 • Published 8 days ago

@joeymeere/dreamcast v1.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
8 days ago

Who Is This For?

Dreamcast is for both novice and expert developers who are looking to interact with programs that lack a Typescript SDK, but have a published IDL account on-chain.

Additionally, this library is suitable for those who have an IDL file for a custom program they are interacting with, but want a concise and reusable method for creating their provider and program instances.

Installation

You can install Dreamcast with npm using the following command:

npm i @joeymeere/dreamcast

Additionally, you can load the source code via unpkg:

https://unpkg.com/@joeymeere/dreamcast@latest

Usage

Fetching IDLs

// create a connection (web3.js)
const connection = new Connection("<rpc url>");
const programId = "STKUaKniasuqrfer3XNbmrrc578pkL1XACdK8H3YPu8";

// returns formatted IDL object
const idl = await getIDL(connection, programId); 

Use with Next.js

If you're using this package with Next.js, you'll need to add some extra lines to your next.config.js to ensure IDLs are correctly loaded.

transpilePackages: ['@joeymeere/dreamcast'],
webpack: (config) => {
    config.resolve.extensionAlias = {
        ".js": [".ts", ".tsx", ".js", ".jsx"],
        ".mjs": [".mts", ".mjs"],
        ".cjs": [".cts", ".cjs"],
    };
  return config;
},
1.1.0

8 days ago

1.0.9

8 days ago

1.0.8

8 days ago

1.0.71

15 days ago

1.0.7

15 days ago

1.0.6

15 days ago

1.0.5

16 days ago

1.0.4

16 days ago

1.0.3

16 days ago

1.0.2

16 days ago

1.0.1

16 days ago

1.0.0

16 days ago