UNPKG

@wuwei-labs/srsly

Version:

[![npm version](https://img.shields.io/npm/v/ts-sdk-example.svg)](https://www.npmjs.com/package/ts-sdk-example)

48 lines 2.29 kB
import { Address } from '@solana/kit'; /** * Helper function to derive the borrower's profile faction account * * @param profile The borrower's profile address * @returns Promise that resolves to the derived profile faction address */ export declare function deriveProfileFaction(profile: Address<string>): Promise<Address<string>>; /** * Helper function to derive the sage player profile * * @param borrowerProfile The borrower's profile address * @param gameId The game ID (defaults to the standard game ID) * @returns Promise that resolves to the derived sage player profile address */ export declare function deriveSagePlayerProfile(borrowerProfile: Address<string>, gameId?: Address<string>): Promise<Address<string>>; /** * Helper function to derive the starbase address based on faction * * @param faction The faction (1/2/3 or 'mud'/'oni'/'ustur') * @param gameId The game ID (defaults to the standard game ID) * @returns Promise that resolves to the derived starbase address */ export declare function deriveStarbase(faction: number | string, gameId?: Address<string>): Promise<Address<string>>; /** * Helper function to derive the starbase player address * * @param sagePlayerProfile The sage player profile address * @param starbase The starbase address * @param starbaseSeqId The starbase sequence ID (defaults to 0) * @returns Promise that resolves to the derived starbase player address */ export declare function deriveStarbasePlayer(sagePlayerProfile: Address<string>, starbase: Address<string>, starbaseSeqId?: number): Promise<Address<string>>; /** * Derives all three accounts needed: profileFaction, starbase, and starbasePlayer * * @param profile The borrower's profile address * @param faction The faction (1/2/3 or 'mud'/'oni'/'ustur') * @param gameId The game ID (defaults to the standard game ID) * @param starbaseSeqId The starbase sequence ID (defaults to 0) * @returns Promise that resolves to the three derived addresses */ export declare function deriveGameAccounts(profile: Address<string>, faction: number | string, gameId?: Address<string>, starbaseSeqId?: number): Promise<{ profileFaction: Address<string>; starbase: Address<string>; starbasePlayer: Address<string>; }>; //# sourceMappingURL=profiles.d.ts.map