staratlasmeta/factory

Update Root-level README

Opened this issue · 1 comments

Problem

There is no clear documentation on what the Factory Module is or what it does

Solution

Update README to include a few things:

  • Introduction to the Star Atlas Factory
  • Current program list this module supports
    • Official progam ids for devnet/mainnet included, or a link to the source of truth
  • Badges w/npm downloads and latest health check status

Alternatives Considered

Notes

We may want a separate document for each integrated program to describe the associated functions

Obviously not an answer for the issue:

https://build.staratlas.com/apis-and-data/factory

Some things i've done with just experimenting:

  import * as factory from "@staratlas/factory";
  ////
  const starAtlasId = new PublicKey('FLEET1qqzpexyaDpqb2DGsSzE2sDCizewCg9WjrA6DBW');
  const idl: Idl = factory.getIDL(starAtlasId) as Idl;
  const programStarAtlas = new Program(idl, starAtlasId, provider);
  const fleet = await factory.getAllFleetsForUserPublicKey(
                connection,
                new PublicKey(...), //pubkey for playerAccount
                starAtlasId
            );
            
            ```