Class SageProgram

Hierarchy

Constructors

Properties

accountClosedListener: null | ((update: AccountClosedUpdate) => void)
accountDiscriminants: {
    craftingInstance: Readonly<Buffer>;
    disbandedFleet: Readonly<Buffer>;
    fleet: Readonly<Buffer>;
    fleetShips: Readonly<Buffer>;
    game: Readonly<Buffer>;
    gameState: Readonly<Buffer>;
    mineItem: Readonly<Buffer>;
    planet: Readonly<Buffer>;
    resource: Readonly<Buffer>;
    sagePlayerProfile: Readonly<Buffer>;
    sector: Readonly<Buffer>;
    ship: Readonly<Buffer>;
    star: Readonly<Buffer>;
    starbase: Readonly<Buffer>;
    starbasePlayer: Readonly<Buffer>;
    surveyDataUnitTracker: Readonly<Buffer>;
}

Type declaration

  • craftingInstance: Readonly<Buffer>
  • disbandedFleet: Readonly<Buffer>
  • fleet: Readonly<Buffer>
  • fleetShips: Readonly<Buffer>
  • game: Readonly<Buffer>
  • gameState: Readonly<Buffer>
  • mineItem: Readonly<Buffer>
  • planet: Readonly<Buffer>
  • resource: Readonly<Buffer>
  • sagePlayerProfile: Readonly<Buffer>
  • sector: Readonly<Buffer>
  • ship: Readonly<Buffer>
  • star: Readonly<Buffer>
  • starbase: Readonly<Buffer>
  • starbasePlayer: Readonly<Buffer>
  • surveyDataUnitTracker: Readonly<Buffer>
parsers: {
    craftingInstance: (new (...args: never[]) => CraftingInstance & Account) & AccountStatic<CraftingInstance, SageIDL>;
    disbandedFleet: (new (...args: never[]) => DisbandedFleet & Account) & AccountStatic<DisbandedFleet, SageIDL>;
    fleet: (new (...args: never[]) => Fleet & Account) & AccountStatic<Fleet, SageIDL>;
    fleetShips: (new (...args: never[]) => FleetShips & Account) & AccountStatic<FleetShips, SageIDL>;
    game: (new (...args: never[]) => Game & Account) & AccountStatic<Game, SageIDL>;
    gameState: (new (...args: never[]) => GameState & Account) & AccountStatic<GameState, SageIDL>;
    mineItem: (new (...args: never[]) => MineItem & Account) & AccountStatic<MineItem, SageIDL>;
    planet: (new (...args: never[]) => Planet & Account) & AccountStatic<Planet, SageIDL>;
    resource: (new (...args: never[]) => Resource & Account) & AccountStatic<Resource, SageIDL>;
    sagePlayerProfile: (new (...args: never[]) => SagePlayerProfile & Account) & AccountStatic<SagePlayerProfile, SageIDL>;
    sector: (new (...args: never[]) => Sector & Account) & AccountStatic<Sector, SageIDL>;
    ship: (new (...args: never[]) => Ship & Account) & AccountStatic<Ship, SageIDL>;
    star: (new (...args: never[]) => Star & Account) & AccountStatic<Star, SageIDL>;
    starbase: (new (...args: never[]) => Starbase & Account) & AccountStatic<Starbase, SageIDL>;
    starbasePlayer: (new (...args: never[]) => StarbasePlayer & Account) & AccountStatic<StarbasePlayer, SageIDL>;
    surveyDataUnitTracker: (new (...args: never[]) => SurveyDataUnitTracker & Account) & AccountStatic<SurveyDataUnitTracker, SageIDL>;
}

Type declaration

program: ProgramMethods<SageIDL>

Accessors

  • get programId(): PublicKey
  • Returns PublicKey

Methods

  • Parameters

    Returns Buffer

  • Parameters

    • data: Buffer

    Returns null | {
        discriminantLength: number;
        key: "craftingInstance" | "disbandedFleet" | "fleet" | "fleetShips" | "game" | "gameState" | "mineItem" | "planet" | "resource" | "sagePlayerProfile" | "sector" | "ship" | "star" | "starbase" | "starbasePlayer" | "surveyDataUnitTracker";
    }

  • Parameters

    • discriminant: Buffer

    Returns null | {
        discriminantLength: number;
        key: "craftingInstance" | "disbandedFleet" | "fleet" | "fleetShips" | "game" | "gameState" | "mineItem" | "planet" | "resource" | "sagePlayerProfile" | "sector" | "ship" | "star" | "starbase" | "starbasePlayer" | "surveyDataUnitTracker";
    }

  • Parameters

    • key: PublicKey
    • oldOwner: PublicKey
    • newOwner: PublicKey
    • slot: number
    • confirmationStatus: TransactionConfirmationStatus | "recent"
    • writeVersion: number
    • accountInfo: AccountInfo<Buffer>

    Returns void

  • Parameters

    • account: KeyedAccountInfo
    • slot: number
    • confirmationStatus: TransactionConfirmationStatus | "recent"
    • isStartup: boolean
    • writeVersion: number
    • Optional unknownAccountHandler: ((key: PublicKey) => void)
        • (key: PublicKey): void
        • Parameters

          • key: PublicKey

          Returns void

    Returns void

  • Type Parameters

    Parameters

    • accountId: AccountId
    • account: SageAccounts[AccountId]
    • slot: number
    • confirmationStatus: TransactionConfirmationStatus | "recent"
    • isStartup: boolean
    • accountInfo: AccountInfo<Buffer>
    • writeVersion: number

    Returns void

  • Parameters

    • listener: ((update: AccountClosedUpdate) => null | void)
        • (update: AccountClosedUpdate): null | void
        • Parameters

          • update: AccountClosedUpdate

          Returns null | void

    Returns void

  • Type Parameters

    Parameters

    • accountId: AccountId
    • accountType: (new (...args: never[]) => SageAccounts[AccountId])
    • listener: null | AccountUpdateHandler<SageAccounts[AccountId]>

    Returns void

  • Parameters

    • programId: PublicKey
    • Optional provider: default
    • Optional coder: Coder<string, string>

    Returns SageIDLProgram

Generated using TypeDoc