Skip to content

Commit

Permalink
Merge pull request #212 from atonoy/feature/fix-mpl-bubblegum-version…
Browse files Browse the repository at this point in the history
…-utils

Feature/fix mpl bubblegum version utils
  • Loading branch information
fukaoi authored Feb 3, 2024
2 parents 6ae205c + 8d6fcd6 commit 4d5c73e
Show file tree
Hide file tree
Showing 171 changed files with 7,063 additions and 16,443 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"tslib": "^2.6.2",
"tsup": "^7.2.0",
"tsx": "^3.14.0",
"turbo": "^1.11.2",
"turbo": "^1.12.2",
"typedoc": "^0.25.4"
},
"repository": "[email protected]:atonoy/solana-suite.git",
Expand Down
69 changes: 30 additions & 39 deletions packages/account/dist/index.d.mts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TransactionInstruction, PublicKey, Keypair } from '@solana/web3.js';
import { PublicKey, Keypair } from '@solana/web3.js';

declare const pubKeyNominality: unique symbol;
declare const secretNominality: unique symbol;
Expand All @@ -9,43 +9,6 @@ type Secret = (string & {
[secretNominality]: never;
}) | string;

/**
* Get Associated token Account.
* if not created, create new token accouint
*
* @param {Pubkey} mint
* @param {Pubkey} owner
* @param {Secret} feePayer
* @param {boolean} allowOwnerOffCurve
* @returns Promise<string | Instruction>
*/
declare namespace Account$3 {
namespace Associated {
/**
* Retry function if create new token accouint
*
* @param {Pubkey} mint
* @param {Pubkey} owner
* @param {Secret} feePayer
* @returns Promise<string>
*/
const retryGetOrCreate: (mint: Pubkey, owner: Pubkey, feePayer: Secret) => Promise<string>;
/**
* [Main logic]Get Associated token Account.
* if not created, create new token accouint
*
* @param {Pubkey} mint
* @param {Pubkey} owner
* @param {Pubkey} feePayer
* @returns Promise<string>
*/
const makeOrCreateInstruction: (mint: Pubkey, owner: Pubkey, feePayer?: Pubkey, allowOwnerOffCurve?: boolean) => Promise<{
tokenAccount: string;
inst: TransactionInstruction | undefined;
}>;
}
}

declare namespace Account$2 {
class Keypair {
secret: Secret;
Expand Down Expand Up @@ -73,10 +36,38 @@ declare namespace Account$1 {
}
}

declare global {
interface String {
toPublicKey(): PublicKey;
toKeypair(): Keypair;
toExplorerUrl(explorer?: Explorer, options?: ExplorerOptions): string;
}
interface Number {
toSol(): number;
toLamports(): number;
}
interface Console {
debug(data: unknown, data2?: unknown, data3?: unknown): void;
}
interface Secret {
toKeypair(): Keypair;
}
interface Pubkey {
toPublicKey(): PublicKey;
}
}
declare enum Explorer {
Solscan = "solscan",
SolanaFM = "solanafm",
Xray = "xray"
}
type ExplorerOptions = {
replacePath: string;
};

declare const Account: {
Pda: typeof Account$1.Pda;
Keypair: typeof Account$2.Keypair;
Associated: typeof Account$3.Associated;
};

export { Account };
69 changes: 30 additions & 39 deletions packages/account/dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TransactionInstruction, PublicKey, Keypair } from '@solana/web3.js';
import { PublicKey, Keypair } from '@solana/web3.js';

declare const pubKeyNominality: unique symbol;
declare const secretNominality: unique symbol;
Expand All @@ -9,43 +9,6 @@ type Secret = (string & {
[secretNominality]: never;
}) | string;

/**
* Get Associated token Account.
* if not created, create new token accouint
*
* @param {Pubkey} mint
* @param {Pubkey} owner
* @param {Secret} feePayer
* @param {boolean} allowOwnerOffCurve
* @returns Promise<string | Instruction>
*/
declare namespace Account$3 {
namespace Associated {
/**
* Retry function if create new token accouint
*
* @param {Pubkey} mint
* @param {Pubkey} owner
* @param {Secret} feePayer
* @returns Promise<string>
*/
const retryGetOrCreate: (mint: Pubkey, owner: Pubkey, feePayer: Secret) => Promise<string>;
/**
* [Main logic]Get Associated token Account.
* if not created, create new token accouint
*
* @param {Pubkey} mint
* @param {Pubkey} owner
* @param {Pubkey} feePayer
* @returns Promise<string>
*/
const makeOrCreateInstruction: (mint: Pubkey, owner: Pubkey, feePayer?: Pubkey, allowOwnerOffCurve?: boolean) => Promise<{
tokenAccount: string;
inst: TransactionInstruction | undefined;
}>;
}
}

declare namespace Account$2 {
class Keypair {
secret: Secret;
Expand Down Expand Up @@ -73,10 +36,38 @@ declare namespace Account$1 {
}
}

declare global {
interface String {
toPublicKey(): PublicKey;
toKeypair(): Keypair;
toExplorerUrl(explorer?: Explorer, options?: ExplorerOptions): string;
}
interface Number {
toSol(): number;
toLamports(): number;
}
interface Console {
debug(data: unknown, data2?: unknown, data3?: unknown): void;
}
interface Secret {
toKeypair(): Keypair;
}
interface Pubkey {
toPublicKey(): PublicKey;
}
}
declare enum Explorer {
Solscan = "solscan",
SolanaFM = "solanafm",
Xray = "xray"
}
type ExplorerOptions = {
replacePath: string;
};

declare const Account: {
Pda: typeof Account$1.Pda;
Keypair: typeof Account$2.Keypair;
Associated: typeof Account$3.Associated;
};

export { Account };
Loading

0 comments on commit 4d5c73e

Please sign in to comment.